aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/serverworks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/serverworks.c')
-rw-r--r--drivers/ide/pci/serverworks.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index 49ec0ac64a4b..d3ffc52e22af 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -97,6 +97,7 @@ static u8 svwks_udma_filter(ide_drive_t *drive)
97 mode = 2; 97 mode = 2;
98 98
99 switch(mode) { 99 switch(mode) {
100 case 3: mask = 0x3f; break;
100 case 2: mask = 0x1f; break; 101 case 2: mask = 0x1f; break;
101 case 1: mask = 0x07; break; 102 case 1: mask = 0x07; break;
102 default: mask = 0x00; break; 103 default: mask = 0x00; break;
@@ -195,19 +196,6 @@ static void svwks_set_dma_mode(ide_drive_t *drive, const u8 speed)
195 pci_write_config_byte(dev, 0x54, ultra_enable); 196 pci_write_config_byte(dev, 0x54, ultra_enable);
196} 197}
197 198
198static int svwks_config_drive_xfer_rate (ide_drive_t *drive)
199{
200 drive->init_speed = 0;
201
202 if (ide_tune_dma(drive))
203 return 0;
204
205 if (ide_use_fast_pio(drive))
206 ide_set_max_pio(drive);
207
208 return -1;
209}
210
211static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name) 199static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
212{ 200{
213 unsigned int reg; 201 unsigned int reg;
@@ -386,23 +374,16 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
386 374
387 hwif->mwdma_mask = 0x07; 375 hwif->mwdma_mask = 0x07;
388 376
389 hwif->autodma = 0;
390
391 hwif->drives[0].autotune = 1; 377 hwif->drives[0].autotune = 1;
392 hwif->drives[1].autotune = 1; 378 hwif->drives[1].autotune = 1;
393 379
394 if (!hwif->dma_base) 380 if (!hwif->dma_base)
395 return; 381 return;
396 382
397 hwif->ide_dma_check = &svwks_config_drive_xfer_rate;
398 if (hwif->pci_dev->device != PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) { 383 if (hwif->pci_dev->device != PCI_DEVICE_ID_SERVERWORKS_OSB4IDE) {
399 if (hwif->cbl != ATA_CBL_PATA40_SHORT) 384 if (hwif->cbl != ATA_CBL_PATA40_SHORT)
400 hwif->cbl = ata66_svwks(hwif); 385 hwif->cbl = ata66_svwks(hwif);
401 } 386 }
402 if (!noautodma)
403 hwif->autodma = 1;
404
405 hwif->drives[0].autodma = hwif->drives[1].autodma = 1;
406} 387}
407 388
408static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d) 389static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
@@ -490,12 +471,12 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
490 return d->init_setup(dev, d); 471 return d->init_setup(dev, d);
491} 472}
492 473
493static struct pci_device_id svwks_pci_tbl[] = { 474static const struct pci_device_id svwks_pci_tbl[] = {
494 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 475 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0 },
495 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 476 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 1 },
496 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 477 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2 },
497 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, 478 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 3 },
498 { PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, 479 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 4 },
499 { 0, }, 480 { 0, },
500}; 481};
501MODULE_DEVICE_TABLE(pci, svwks_pci_tbl); 482MODULE_DEVICE_TABLE(pci, svwks_pci_tbl);