aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_serverworks.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index fc5f31d4828e..57de02123c4c 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -251,12 +251,18 @@ static void serverworks_set_dmamode(struct ata_port *ap, struct ata_device *adev
251 pci_write_config_byte(pdev, 0x54, ultra_cfg); 251 pci_write_config_byte(pdev, 0x54, ultra_cfg);
252} 252}
253 253
254static struct scsi_host_template serverworks_sht = { 254static struct scsi_host_template serverworks_osb4_sht = {
255 ATA_BMDMA_SHT(DRV_NAME),
256 .sg_tablesize = LIBATA_DUMB_MAX_PRD,
257};
258
259static struct scsi_host_template serverworks_csb_sht = {
255 ATA_BMDMA_SHT(DRV_NAME), 260 ATA_BMDMA_SHT(DRV_NAME),
256}; 261};
257 262
258static struct ata_port_operations serverworks_osb4_port_ops = { 263static struct ata_port_operations serverworks_osb4_port_ops = {
259 .inherits = &ata_bmdma_port_ops, 264 .inherits = &ata_bmdma_port_ops,
265 .qc_prep = ata_bmdma_dumb_qc_prep,
260 .cable_detect = serverworks_cable_detect, 266 .cable_detect = serverworks_cable_detect,
261 .mode_filter = serverworks_osb4_filter, 267 .mode_filter = serverworks_osb4_filter,
262 .set_piomode = serverworks_set_piomode, 268 .set_piomode = serverworks_set_piomode,
@@ -265,6 +271,7 @@ static struct ata_port_operations serverworks_osb4_port_ops = {
265 271
266static struct ata_port_operations serverworks_csb_port_ops = { 272static struct ata_port_operations serverworks_csb_port_ops = {
267 .inherits = &serverworks_osb4_port_ops, 273 .inherits = &serverworks_osb4_port_ops,
274 .qc_prep = ata_bmdma_qc_prep,
268 .mode_filter = serverworks_csb_filter, 275 .mode_filter = serverworks_csb_filter,
269}; 276};
270 277
@@ -404,6 +411,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
404 } 411 }
405 }; 412 };
406 const struct ata_port_info *ppi[] = { &info[id->driver_data], NULL }; 413 const struct ata_port_info *ppi[] = { &info[id->driver_data], NULL };
414 struct scsi_host_template *sht = &serverworks_csb_sht;
407 int rc; 415 int rc;
408 416
409 rc = pcim_enable_device(pdev); 417 rc = pcim_enable_device(pdev);
@@ -417,6 +425,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
417 /* Select non UDMA capable OSB4 if we can't do fixups */ 425 /* Select non UDMA capable OSB4 if we can't do fixups */
418 if (rc < 0) 426 if (rc < 0)
419 ppi[0] = &info[1]; 427 ppi[0] = &info[1];
428 sht = &serverworks_osb4_sht;
420 } 429 }
421 /* setup CSB5/CSB6 : South Bridge and IDE option RAID */ 430 /* setup CSB5/CSB6 : South Bridge and IDE option RAID */
422 else if ((pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE) || 431 else if ((pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE) ||
@@ -433,7 +442,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
433 ppi[1] = &ata_dummy_port_info; 442 ppi[1] = &ata_dummy_port_info;
434 } 443 }
435 444
436 return ata_pci_bmdma_init_one(pdev, ppi, &serverworks_sht, NULL, 0); 445 return ata_pci_bmdma_init_one(pdev, ppi, sht, NULL, 0);
437} 446}
438 447
439#ifdef CONFIG_PM_SLEEP 448#ifdef CONFIG_PM_SLEEP