aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_serverworks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_serverworks.c')
-rw-r--r--drivers/ata/pata_serverworks.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index be7f60efcb61..0fa803e6399c 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -41,7 +41,7 @@
41#include <linux/libata.h> 41#include <linux/libata.h>
42 42
43#define DRV_NAME "pata_serverworks" 43#define DRV_NAME "pata_serverworks"
44#define DRV_VERSION "0.3.7" 44#define DRV_VERSION "0.3.9"
45 45
46#define SVWKS_CSB5_REVISION_NEW 0x92 /* min PCI_REVISION_ID for UDMA5 (A2.0) */ 46#define SVWKS_CSB5_REVISION_NEW 0x92 /* min PCI_REVISION_ID for UDMA5 (A2.0) */
47#define SVWKS_CSB6_REVISION 0xa0 /* min PCI_REVISION_ID for UDMA4 (A1.0) */ 47#define SVWKS_CSB6_REVISION 0xa0 /* min PCI_REVISION_ID for UDMA4 (A1.0) */
@@ -327,6 +327,8 @@ static struct scsi_host_template serverworks_sht = {
327 .slave_configure = ata_scsi_slave_config, 327 .slave_configure = ata_scsi_slave_config,
328 .slave_destroy = ata_scsi_slave_destroy, 328 .slave_destroy = ata_scsi_slave_destroy,
329 .bios_param = ata_std_bios_param, 329 .bios_param = ata_std_bios_param,
330 .resume = ata_scsi_device_resume,
331 .suspend = ata_scsi_device_suspend,
330}; 332};
331 333
332static struct ata_port_operations serverworks_osb4_port_ops = { 334static struct ata_port_operations serverworks_osb4_port_ops = {
@@ -554,6 +556,30 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
554 return ata_pci_init_one(pdev, port_info, ports); 556 return ata_pci_init_one(pdev, port_info, ports);
555} 557}
556 558
559static int serverworks_reinit_one(struct pci_dev *pdev)
560{
561 /* Force master latency timer to 64 PCI clocks */
562 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x40);
563
564 switch (pdev->device)
565 {
566 case PCI_DEVICE_ID_SERVERWORKS_OSB4IDE:
567 serverworks_fixup_osb4(pdev);
568 break;
569 case PCI_DEVICE_ID_SERVERWORKS_CSB5IDE:
570 ata_pci_clear_simplex(pdev);
571 /* fall through */
572 case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE:
573 case PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2:
574 serverworks_fixup_csb(pdev);
575 break;
576 case PCI_DEVICE_ID_SERVERWORKS_HT1000IDE:
577 serverworks_fixup_ht1000(pdev);
578 break;
579 }
580 return ata_pci_device_resume(pdev);
581}
582
557static const struct pci_device_id serverworks[] = { 583static const struct pci_device_id serverworks[] = {
558 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, 584 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0},
559 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 2}, 585 { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 2},
@@ -568,7 +594,9 @@ static struct pci_driver serverworks_pci_driver = {
568 .name = DRV_NAME, 594 .name = DRV_NAME,
569 .id_table = serverworks, 595 .id_table = serverworks,
570 .probe = serverworks_init_one, 596 .probe = serverworks_init_one,
571 .remove = ata_pci_remove_one 597 .remove = ata_pci_remove_one,
598 .suspend = ata_pci_device_suspend,
599 .resume = serverworks_reinit_one,
572}; 600};
573 601
574static int __init serverworks_init(void) 602static int __init serverworks_init(void)