aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/hpt366.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/hpt366.c')
-rw-r--r--drivers/ide/hpt366.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
index 0feb66c720e1..7ce68ef6b904 100644
--- a/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -138,14 +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 LM20.4",
145 "QUANTUM FIREBALLP LM20.5",
146 NULL
147};
148
149static const char *bad_ata100_5[] = { 141static const char *bad_ata100_5[] = {
150 "IBM-DTLA-307075", 142 "IBM-DTLA-307075",
151 "IBM-DTLA-307060", 143 "IBM-DTLA-307060",
@@ -729,27 +721,13 @@ static void hpt3xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
729 hpt3xx_set_mode(drive, XFER_PIO_0 + pio); 721 hpt3xx_set_mode(drive, XFER_PIO_0 + pio);
730} 722}
731 723
732static void hpt3xx_quirkproc(ide_drive_t *drive)
733{
734 char *m = (char *)&drive->id[ATA_ID_PROD];
735 const char **list = quirk_drives;
736
737 while (*list)
738 if (strstr(m, *list++)) {
739 drive->quirk_list = 1;
740 return;
741 }
742
743 drive->quirk_list = 0;
744}
745
746static void hpt3xx_maskproc(ide_drive_t *drive, int mask) 724static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
747{ 725{
748 ide_hwif_t *hwif = drive->hwif; 726 ide_hwif_t *hwif = drive->hwif;
749 struct pci_dev *dev = to_pci_dev(hwif->dev); 727 struct pci_dev *dev = to_pci_dev(hwif->dev);
750 struct hpt_info *info = hpt3xx_get_info(hwif->dev); 728 struct hpt_info *info = hpt3xx_get_info(hwif->dev);
751 729
752 if (drive->quirk_list == 0) 730 if ((drive->dev_flags & IDE_DFLAG_NIEN_QUIRK) == 0)
753 return; 731 return;
754 732
755 if (info->chip_type >= HPT370) { 733 if (info->chip_type >= HPT370) {
@@ -1404,7 +1382,6 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
1404static const struct ide_port_ops hpt3xx_port_ops = { 1382static const struct ide_port_ops hpt3xx_port_ops = {
1405 .set_pio_mode = hpt3xx_set_pio_mode, 1383 .set_pio_mode = hpt3xx_set_pio_mode,
1406 .set_dma_mode = hpt3xx_set_mode, 1384 .set_dma_mode = hpt3xx_set_mode,
1407 .quirkproc = hpt3xx_quirkproc,
1408 .maskproc = hpt3xx_maskproc, 1385 .maskproc = hpt3xx_maskproc,
1409 .mdma_filter = hpt3xx_mdma_filter, 1386 .mdma_filter = hpt3xx_mdma_filter,
1410 .udma_filter = hpt3xx_udma_filter, 1387 .udma_filter = hpt3xx_udma_filter,