aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:39 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:39 -0400
commit9ad540937554a3779c5fe7af13aa390b1d2aeb3e (patch)
tree9ed83a58e8fb0d57ebbfacb92c62d40db185a8a8 /drivers/ide/ide-lib.c
parent3e153cfb5e38ae237ff27a10a833946ac95db8a4 (diff)
ide: move PIO blacklist to ide-pio-blacklist.c
Move PIO blacklist to ide-pio-blacklist.c. While at it: - fix comment - fix whitespace damage There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c96
1 files changed, 0 insertions, 96 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 3e12f229bd5f..13af72f09ec4 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -75,102 +75,6 @@ static u8 ide_rate_filter(ide_drive_t *drive, u8 speed)
75 return min(speed, mode); 75 return min(speed, mode);
76} 76}
77 77
78/*
79 * Shared data/functions for determining best PIO mode for an IDE drive.
80 * Most of this stuff originally lived in cmd640.c, and changes to the
81 * ide_pio_blacklist[] table should be made with EXTREME CAUTION to avoid
82 * breaking the fragile cmd640.c support.
83 */
84
85/*
86 * Black list. Some drives incorrectly report their maximal PIO mode,
87 * at least in respect to CMD640. Here we keep info on some known drives.
88 */
89static struct ide_pio_info {
90 const char *name;
91 int pio;
92} ide_pio_blacklist [] = {
93 { "Conner Peripherals 540MB - CFS540A", 3 },
94
95 { "WDC AC2700", 3 },
96 { "WDC AC2540", 3 },
97 { "WDC AC2420", 3 },
98 { "WDC AC2340", 3 },
99 { "WDC AC2250", 0 },
100 { "WDC AC2200", 0 },
101 { "WDC AC21200", 4 },
102 { "WDC AC2120", 0 },
103 { "WDC AC2850", 3 },
104 { "WDC AC1270", 3 },
105 { "WDC AC1170", 1 },
106 { "WDC AC1210", 1 },
107 { "WDC AC280", 0 },
108 { "WDC AC31000", 3 },
109 { "WDC AC31200", 3 },
110
111 { "Maxtor 7131 AT", 1 },
112 { "Maxtor 7171 AT", 1 },
113 { "Maxtor 7213 AT", 1 },
114 { "Maxtor 7245 AT", 1 },
115 { "Maxtor 7345 AT", 1 },
116 { "Maxtor 7546 AT", 3 },
117 { "Maxtor 7540 AV", 3 },
118
119 { "SAMSUNG SHD-3121A", 1 },
120 { "SAMSUNG SHD-3122A", 1 },
121 { "SAMSUNG SHD-3172A", 1 },
122
123 { "ST5660A", 3 },
124 { "ST3660A", 3 },
125 { "ST3630A", 3 },
126 { "ST3655A", 3 },
127 { "ST3391A", 3 },
128 { "ST3390A", 1 },
129 { "ST3600A", 1 },
130 { "ST3290A", 0 },
131 { "ST3144A", 0 },
132 { "ST3491A", 1 }, /* reports 3, should be 1 or 2 (depending on */
133 /* drive) according to Seagates FIND-ATA program */
134
135 { "QUANTUM ELS127A", 0 },
136 { "QUANTUM ELS170A", 0 },
137 { "QUANTUM LPS240A", 0 },
138 { "QUANTUM LPS210A", 3 },
139 { "QUANTUM LPS270A", 3 },
140 { "QUANTUM LPS365A", 3 },
141 { "QUANTUM LPS540A", 3 },
142 { "QUANTUM LIGHTNING 540A", 3 },
143 { "QUANTUM LIGHTNING 730A", 3 },
144
145 { "QUANTUM FIREBALL_540", 3 }, /* Older Quantum Fireballs don't work */
146 { "QUANTUM FIREBALL_640", 3 },
147 { "QUANTUM FIREBALL_1080", 3 },
148 { "QUANTUM FIREBALL_1280", 3 },
149 { NULL, 0 }
150};
151
152/**
153 * ide_scan_pio_blacklist - check for a blacklisted drive
154 * @model: Drive model string
155 *
156 * This routine searches the ide_pio_blacklist for an entry
157 * matching the start/whole of the supplied model name.
158 *
159 * Returns -1 if no match found.
160 * Otherwise returns the recommended PIO mode from ide_pio_blacklist[].
161 */
162
163static int ide_scan_pio_blacklist (char *model)
164{
165 struct ide_pio_info *p;
166
167 for (p = ide_pio_blacklist; p->name != NULL; p++) {
168 if (strncmp(p->name, model, strlen(p->name)) == 0)
169 return p->pio;
170 }
171 return -1;
172}
173
174/** 78/**
175 * ide_get_best_pio_mode - get PIO mode from drive 79 * ide_get_best_pio_mode - get PIO mode from drive
176 * @drive: drive to consider 80 * @drive: drive to consider