2 * PIO blacklist. Some drives incorrectly report their maximal PIO mode,
3 * at least in respect to CMD640. Here we keep info on some known drives.
5 * Changes to the ide_pio_blacklist[] should be made with EXTREME CAUTION
6 * to avoid breaking the fragile cmd640.c support.
9 #include <linux/string.h>
10 #include <linux/ide.h>
12 static struct ide_pio_info
{
15 } ide_pio_blacklist
[] = {
16 { "Conner Peripherals 540MB - CFS540A", 3 },
34 { "Maxtor 7131 AT", 1 },
35 { "Maxtor 7171 AT", 1 },
36 { "Maxtor 7213 AT", 1 },
37 { "Maxtor 7245 AT", 1 },
38 { "Maxtor 7345 AT", 1 },
39 { "Maxtor 7546 AT", 3 },
40 { "Maxtor 7540 AV", 3 },
42 { "SAMSUNG SHD-3121A", 1 },
43 { "SAMSUNG SHD-3122A", 1 },
44 { "SAMSUNG SHD-3172A", 1 },
55 { "ST3491A", 1 }, /* reports 3, should be 1 or 2 (depending on drive)
56 according to Seagate's FIND-ATA program */
58 { "QUANTUM ELS127A", 0 },
59 { "QUANTUM ELS170A", 0 },
60 { "QUANTUM LPS240A", 0 },
61 { "QUANTUM LPS210A", 3 },
62 { "QUANTUM LPS270A", 3 },
63 { "QUANTUM LPS365A", 3 },
64 { "QUANTUM LPS540A", 3 },
65 { "QUANTUM LIGHTNING 540A", 3 },
66 { "QUANTUM LIGHTNING 730A", 3 },
68 { "QUANTUM FIREBALL_540", 3 }, /* Older Quantum Fireballs don't work */
69 { "QUANTUM FIREBALL_640", 3 },
70 { "QUANTUM FIREBALL_1080", 3 },
71 { "QUANTUM FIREBALL_1280", 3 },
76 * ide_scan_pio_blacklist - check for a blacklisted drive
77 * @model: Drive model string
79 * This routine searches the ide_pio_blacklist for an entry
80 * matching the start/whole of the supplied model name.
82 * Returns -1 if no match found.
83 * Otherwise returns the recommended PIO mode from ide_pio_blacklist[].
86 int ide_scan_pio_blacklist(char *model
)
88 struct ide_pio_info
*p
;
90 for (p
= ide_pio_blacklist
; p
->name
!= NULL
; p
++) {
91 if (strncmp(p
->name
, model
, strlen(p
->name
)) == 0)