aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_sx4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sata_sx4.c')
-rw-r--r--drivers/scsi/sata_sx4.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c
index 4139ad4b1df0..7f864410f7c2 100644
--- a/drivers/scsi/sata_sx4.c
+++ b/drivers/scsi/sata_sx4.c
@@ -46,7 +46,7 @@
46#include "sata_promise.h" 46#include "sata_promise.h"
47 47
48#define DRV_NAME "sata_sx4" 48#define DRV_NAME "sata_sx4"
49#define DRV_VERSION "0.8" 49#define DRV_VERSION "0.9"
50 50
51 51
52enum { 52enum {
@@ -191,6 +191,7 @@ static struct scsi_host_template pdc_sata_sht = {
191 .proc_name = DRV_NAME, 191 .proc_name = DRV_NAME,
192 .dma_boundary = ATA_DMA_BOUNDARY, 192 .dma_boundary = ATA_DMA_BOUNDARY,
193 .slave_configure = ata_scsi_slave_config, 193 .slave_configure = ata_scsi_slave_config,
194 .slave_destroy = ata_scsi_slave_destroy,
194 .bios_param = ata_std_bios_param, 195 .bios_param = ata_std_bios_param,
195}; 196};
196 197
@@ -204,6 +205,7 @@ static const struct ata_port_operations pdc_20621_ops = {
204 .phy_reset = pdc_20621_phy_reset, 205 .phy_reset = pdc_20621_phy_reset,
205 .qc_prep = pdc20621_qc_prep, 206 .qc_prep = pdc20621_qc_prep,
206 .qc_issue = pdc20621_qc_issue_prot, 207 .qc_issue = pdc20621_qc_issue_prot,
208 .data_xfer = ata_mmio_data_xfer,
207 .eng_timeout = pdc_eng_timeout, 209 .eng_timeout = pdc_eng_timeout,
208 .irq_handler = pdc20621_interrupt, 210 .irq_handler = pdc20621_interrupt,
209 .irq_clear = pdc20621_irq_clear, 211 .irq_clear = pdc20621_irq_clear,
@@ -218,7 +220,7 @@ static const struct ata_port_info pdc_port_info[] = {
218 .sht = &pdc_sata_sht, 220 .sht = &pdc_sata_sht,
219 .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 221 .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
220 ATA_FLAG_SRST | ATA_FLAG_MMIO | 222 ATA_FLAG_SRST | ATA_FLAG_MMIO |
221 ATA_FLAG_NO_ATAPI, 223 ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING,
222 .pio_mask = 0x1f, /* pio0-4 */ 224 .pio_mask = 0x1f, /* pio0-4 */
223 .mwdma_mask = 0x07, /* mwdma0-2 */ 225 .mwdma_mask = 0x07, /* mwdma0-2 */
224 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 226 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
@@ -833,11 +835,11 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re
833 tmp = mask & (1 << i); 835 tmp = mask & (1 << i);
834 VPRINTK("seq %u, port_no %u, ap %p, tmp %x\n", i, port_no, ap, tmp); 836 VPRINTK("seq %u, port_no %u, ap %p, tmp %x\n", i, port_no, ap, tmp);
835 if (tmp && ap && 837 if (tmp && ap &&
836 !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { 838 !(ap->flags & ATA_FLAG_DISABLED)) {
837 struct ata_queued_cmd *qc; 839 struct ata_queued_cmd *qc;
838 840
839 qc = ata_qc_from_tag(ap, ap->active_tag); 841 qc = ata_qc_from_tag(ap, ap->active_tag);
840 if (qc && (!(qc->tf.ctl & ATA_NIEN))) 842 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)))
841 handled += pdc20621_host_intr(ap, qc, (i > 4), 843 handled += pdc20621_host_intr(ap, qc, (i > 4),
842 mmio_base); 844 mmio_base);
843 } 845 }
@@ -868,15 +870,16 @@ static void pdc_eng_timeout(struct ata_port *ap)
868 switch (qc->tf.protocol) { 870 switch (qc->tf.protocol) {
869 case ATA_PROT_DMA: 871 case ATA_PROT_DMA:
870 case ATA_PROT_NODATA: 872 case ATA_PROT_NODATA:
871 printk(KERN_ERR "ata%u: command timeout\n", ap->id); 873 ata_port_printk(ap, KERN_ERR, "command timeout\n");
872 qc->err_mask |= __ac_err_mask(ata_wait_idle(ap)); 874 qc->err_mask |= __ac_err_mask(ata_wait_idle(ap));
873 break; 875 break;
874 876
875 default: 877 default:
876 drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); 878 drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
877 879
878 printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", 880 ata_port_printk(ap, KERN_ERR,
879 ap->id, qc->tf.command, drv_stat); 881 "unknown timeout, cmd 0x%x stat 0x%x\n",
882 qc->tf.command, drv_stat);
880 883
881 qc->err_mask |= ac_err_mask(drv_stat); 884 qc->err_mask |= ac_err_mask(drv_stat);
882 break; 885 break;
@@ -1375,10 +1378,6 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
1375 if (!printed_version++) 1378 if (!printed_version++)
1376 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 1379 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
1377 1380
1378 /*
1379 * If this driver happens to only be useful on Apple's K2, then
1380 * we should check that here as it has a normal Serverworks ID
1381 */
1382 rc = pci_enable_device(pdev); 1381 rc = pci_enable_device(pdev);
1383 if (rc) 1382 if (rc)
1384 return rc; 1383 return rc;