aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/hpt366.c27
-rw-r--r--drivers/ide/ide-iops.c25
-rw-r--r--drivers/ide/ide-probe.c2
-rw-r--r--drivers/ide/pdc202xx_new.c26
-rw-r--r--drivers/ide/pdc202xx_old.c27
5 files changed, 27 insertions, 80 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
index cb04523e31cb..a2e9f6c65a93 100644
--- a/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -138,18 +138,6 @@
138#undef HPT_RESET_STATE_ENGINE 138#undef HPT_RESET_STATE_ENGINE
139#undef HPT_DELAY_INTERRUPT 139#undef HPT_DELAY_INTERRUPT
140 140
141static const char *quirk_drives[] = {
142 "QUANTUM FIREBALLlct08 08",
143 "QUANTUM FIREBALLP KA6.4",
144 "QUANTUM FIREBALLP KA9.1",
145 "QUANTUM FIREBALLP KX13.6",
146 "QUANTUM FIREBALLP KX20.5",
147 "QUANTUM FIREBALLP KX27.3",
148 "QUANTUM FIREBALLP LM20.4",
149 "QUANTUM FIREBALLP LM20.5",
150 NULL
151};
152
153static const char *bad_ata100_5[] = { 141static const char *bad_ata100_5[] = {
154 "IBM-DTLA-307075", 142 "IBM-DTLA-307075",
155 "IBM-DTLA-307060", 143 "IBM-DTLA-307060",
@@ -733,20 +721,6 @@ static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
733 hpt3xx_set_mode(drive, XFER_PIO_0 + pio); 721 hpt3xx_set_mode(drive, XFER_PIO_0 + pio);
734} 722}
735 723
736static void hpt3xx_quirkproc(ide_drive_t *drive)
737{
738 char *m = (char *)&drive->id[ATA_ID_PROD];
739 const char **list = quirk_drives;
740
741 while (*list)
742 if (strstr(m, *list++)) {
743 drive->quirk_list = 2;
744 return;
745 }
746
747 drive->quirk_list = 0;
748}
749
750static void hpt3xx_maskproc(ide_drive_t *drive, int mask) 724static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
751{ 725{
752 ide_hwif_t *hwif = drive->hwif; 726 ide_hwif_t *hwif = drive->hwif;
@@ -1408,7 +1382,6 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
1408static const struct ide_port_ops hpt3xx_port_ops = { 1382static const struct ide_port_ops hpt3xx_port_ops = {
1409 .set_pio_mode = hpt3xx_set_pio_mode, 1383 .set_pio_mode = hpt3xx_set_pio_mode,
1410 .set_dma_mode = hpt3xx_set_mode, 1384 .set_dma_mode = hpt3xx_set_mode,
1411 .quirkproc = hpt3xx_quirkproc,
1412 .maskproc = hpt3xx_maskproc, 1385 .maskproc = hpt3xx_maskproc,
1413 .mdma_filter = hpt3xx_mdma_filter, 1386 .mdma_filter = hpt3xx_mdma_filter,
1414 .udma_filter = hpt3xx_udma_filter, 1387 .udma_filter = hpt3xx_udma_filter,
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 8dff623f9da3..c55349537c27 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -282,6 +282,31 @@ no_80w:
282 return 0; 282 return 0;
283} 283}
284 284
285static const char *nien_quirk_list[] = {
286 "QUANTUM FIREBALLlct08 08",
287 "QUANTUM FIREBALLP KA6.4",
288 "QUANTUM FIREBALLP KA9.1",
289 "QUANTUM FIREBALLP KX13.6",
290 "QUANTUM FIREBALLP KX20.5",
291 "QUANTUM FIREBALLP KX27.3",
292 "QUANTUM FIREBALLP LM20.4",
293 "QUANTUM FIREBALLP LM20.5",
294 NULL
295};
296
297void ide_check_nien_quirk_list(ide_drive_t *drive)
298{
299 const char **list, *m = (char *)&drive->id[ATA_ID_PROD];
300
301 for (list = nien_quirk_list; *list != NULL; list++)
302 if (strstr(m, *list) != NULL) {
303 drive->quirk_list = 2;
304 return;
305 }
306
307 drive->quirk_list = 0;
308}
309
285int ide_driveid_update(ide_drive_t *drive) 310int ide_driveid_update(ide_drive_t *drive)
286{ 311{
287 u16 *id; 312 u16 *id;
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 89574b0bd56d..28f95cb41c29 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -732,6 +732,8 @@ static void ide_port_tune_devices(ide_hwif_t *hwif)
732 int i; 732 int i;
733 733
734 ide_port_for_each_present_dev(i, drive, hwif) { 734 ide_port_for_each_present_dev(i, drive, hwif) {
735 ide_check_nien_quirk_list(drive);
736
735 if (port_ops && port_ops->quirkproc) 737 if (port_ops && port_ops->quirkproc)
736 port_ops->quirkproc(drive); 738 port_ops->quirkproc(drive);
737 } 739 }
diff --git a/drivers/ide/pdc202xx_new.c b/drivers/ide/pdc202xx_new.c
index b68906c3c17e..65ba8239e7b5 100644
--- a/drivers/ide/pdc202xx_new.c
+++ b/drivers/ide/pdc202xx_new.c
@@ -40,18 +40,6 @@
40#define DBG(fmt, args...) 40#define DBG(fmt, args...)
41#endif 41#endif
42 42
43static const char *pdc_quirk_drives[] = {
44 "QUANTUM FIREBALLlct08 08",
45 "QUANTUM FIREBALLP KA6.4",
46 "QUANTUM FIREBALLP KA9.1",
47 "QUANTUM FIREBALLP LM20.4",
48 "QUANTUM FIREBALLP KX13.6",
49 "QUANTUM FIREBALLP KX20.5",
50 "QUANTUM FIREBALLP KX27.3",
51 "QUANTUM FIREBALLP LM20.5",
52 NULL
53};
54
55static u8 max_dma_rate(struct pci_dev *pdev) 43static u8 max_dma_rate(struct pci_dev *pdev)
56{ 44{
57 u8 mode; 45 u8 mode;
@@ -200,19 +188,6 @@ static u8 pdcnew_cable_detect(ide_hwif_t *hwif)
200 return ATA_CBL_PATA80; 188 return ATA_CBL_PATA80;
201} 189}
202 190
203static void pdcnew_quirkproc(ide_drive_t *drive)
204{
205 const char **list, *m = (char *)&drive->id[ATA_ID_PROD];
206
207 for (list = pdc_quirk_drives; *list != NULL; list++)
208 if (strstr(m, *list) != NULL) {
209 drive->quirk_list = 2;
210 return;
211 }
212
213 drive->quirk_list = 0;
214}
215
216static void pdcnew_reset(ide_drive_t *drive) 191static void pdcnew_reset(ide_drive_t *drive)
217{ 192{
218 /* 193 /*
@@ -473,7 +448,6 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
473static const struct ide_port_ops pdcnew_port_ops = { 448static const struct ide_port_ops pdcnew_port_ops = {
474 .set_pio_mode = pdcnew_set_pio_mode, 449 .set_pio_mode = pdcnew_set_pio_mode,
475 .set_dma_mode = pdcnew_set_dma_mode, 450 .set_dma_mode = pdcnew_set_dma_mode,
476 .quirkproc = pdcnew_quirkproc,
477 .resetproc = pdcnew_reset, 451 .resetproc = pdcnew_reset,
478 .cable_detect = pdcnew_cable_detect, 452 .cable_detect = pdcnew_cable_detect,
479}; 453};
diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c
index 4980dd7b2e28..fe01db679a39 100644
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -23,18 +23,6 @@
23 23
24#define PDC202XX_DEBUG_DRIVE_INFO 0 24#define PDC202XX_DEBUG_DRIVE_INFO 0
25 25
26static const char *pdc_quirk_drives[] = {
27 "QUANTUM FIREBALLlct08 08",
28 "QUANTUM FIREBALLP KA6.4",
29 "QUANTUM FIREBALLP KA9.1",
30 "QUANTUM FIREBALLP LM20.4",
31 "QUANTUM FIREBALLP KX13.6",
32 "QUANTUM FIREBALLP KX20.5",
33 "QUANTUM FIREBALLP KX27.3",
34 "QUANTUM FIREBALLP LM20.5",
35 NULL
36};
37
38static void pdc_old_disable_66MHz_clock(ide_hwif_t *); 26static void pdc_old_disable_66MHz_clock(ide_hwif_t *);
39 27
40static void pdc202xx_set_mode(ide_drive_t *drive, const u8 speed) 28static void pdc202xx_set_mode(ide_drive_t *drive, const u8 speed)
@@ -151,19 +139,6 @@ static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif)
151 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); 139 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg);
152} 140}
153 141
154static void pdc202xx_quirkproc(ide_drive_t *drive)
155{
156 const char **list, *m = (char *)&drive->id[ATA_ID_PROD];
157
158 for (list = pdc_quirk_drives; *list != NULL; list++)
159 if (strstr(m, *list) != NULL) {
160 drive->quirk_list = 2;
161 return;
162 }
163
164 drive->quirk_list = 0;
165}
166
167static void pdc202xx_dma_start(ide_drive_t *drive) 142static void pdc202xx_dma_start(ide_drive_t *drive)
168{ 143{
169 if (drive->current_speed > XFER_UDMA_2) 144 if (drive->current_speed > XFER_UDMA_2)
@@ -256,13 +231,11 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
256static const struct ide_port_ops pdc20246_port_ops = { 231static const struct ide_port_ops pdc20246_port_ops = {
257 .set_pio_mode = pdc202xx_set_pio_mode, 232 .set_pio_mode = pdc202xx_set_pio_mode,
258 .set_dma_mode = pdc202xx_set_mode, 233 .set_dma_mode = pdc202xx_set_mode,
259 .quirkproc = pdc202xx_quirkproc,
260}; 234};
261 235
262static const struct ide_port_ops pdc2026x_port_ops = { 236static const struct ide_port_ops pdc2026x_port_ops = {
263 .set_pio_mode = pdc202xx_set_pio_mode, 237 .set_pio_mode = pdc202xx_set_pio_mode,
264 .set_dma_mode = pdc202xx_set_mode, 238 .set_dma_mode = pdc202xx_set_mode,
265 .quirkproc = pdc202xx_quirkproc,
266 .cable_detect = pdc2026x_cable_detect, 239 .cable_detect = pdc2026x_cable_detect,
267}; 240};
268 241