aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pdc_adma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pdc_adma.c')
-rw-r--r--drivers/scsi/pdc_adma.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c
index 5cda16cfacb0..7ebe8e03aa96 100644
--- a/drivers/scsi/pdc_adma.c
+++ b/drivers/scsi/pdc_adma.c
@@ -46,7 +46,7 @@
46#include <linux/libata.h> 46#include <linux/libata.h>
47 47
48#define DRV_NAME "pdc_adma" 48#define DRV_NAME "pdc_adma"
49#define DRV_VERSION "0.03" 49#define DRV_VERSION "0.04"
50 50
51/* macro to calculate base address for ATA regs */ 51/* macro to calculate base address for ATA regs */
52#define ADMA_ATA_REGS(base,port_no) ((base) + ((port_no) * 0x40)) 52#define ADMA_ATA_REGS(base,port_no) ((base) + ((port_no) * 0x40))
@@ -152,6 +152,7 @@ static struct scsi_host_template adma_ata_sht = {
152 .proc_name = DRV_NAME, 152 .proc_name = DRV_NAME,
153 .dma_boundary = ADMA_DMA_BOUNDARY, 153 .dma_boundary = ADMA_DMA_BOUNDARY,
154 .slave_configure = ata_scsi_slave_config, 154 .slave_configure = ata_scsi_slave_config,
155 .slave_destroy = ata_scsi_slave_destroy,
155 .bios_param = ata_std_bios_param, 156 .bios_param = ata_std_bios_param,
156}; 157};
157 158
@@ -167,6 +168,7 @@ static const struct ata_port_operations adma_ata_ops = {
167 .qc_prep = adma_qc_prep, 168 .qc_prep = adma_qc_prep,
168 .qc_issue = adma_qc_issue, 169 .qc_issue = adma_qc_issue,
169 .eng_timeout = adma_eng_timeout, 170 .eng_timeout = adma_eng_timeout,
171 .data_xfer = ata_mmio_data_xfer,
170 .irq_handler = adma_intr, 172 .irq_handler = adma_intr,
171 .irq_clear = adma_irq_clear, 173 .irq_clear = adma_irq_clear,
172 .port_start = adma_port_start, 174 .port_start = adma_port_start,
@@ -455,13 +457,13 @@ static inline unsigned int adma_intr_pkt(struct ata_host_set *host_set)
455 continue; 457 continue;
456 handled = 1; 458 handled = 1;
457 adma_enter_reg_mode(ap); 459 adma_enter_reg_mode(ap);
458 if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)) 460 if (ap->flags & ATA_FLAG_DISABLED)
459 continue; 461 continue;
460 pp = ap->private_data; 462 pp = ap->private_data;
461 if (!pp || pp->state != adma_state_pkt) 463 if (!pp || pp->state != adma_state_pkt)
462 continue; 464 continue;
463 qc = ata_qc_from_tag(ap, ap->active_tag); 465 qc = ata_qc_from_tag(ap, ap->active_tag);
464 if (qc && (!(qc->tf.ctl & ATA_NIEN))) { 466 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
465 if ((status & (aPERR | aPSD | aUIRQ))) 467 if ((status & (aPERR | aPSD | aUIRQ)))
466 qc->err_mask |= AC_ERR_OTHER; 468 qc->err_mask |= AC_ERR_OTHER;
467 else if (pp->pkt[0] != cDONE) 469 else if (pp->pkt[0] != cDONE)
@@ -480,13 +482,13 @@ static inline unsigned int adma_intr_mmio(struct ata_host_set *host_set)
480 for (port_no = 0; port_no < host_set->n_ports; ++port_no) { 482 for (port_no = 0; port_no < host_set->n_ports; ++port_no) {
481 struct ata_port *ap; 483 struct ata_port *ap;
482 ap = host_set->ports[port_no]; 484 ap = host_set->ports[port_no];
483 if (ap && (!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)))) { 485 if (ap && (!(ap->flags & ATA_FLAG_DISABLED))) {
484 struct ata_queued_cmd *qc; 486 struct ata_queued_cmd *qc;
485 struct adma_port_priv *pp = ap->private_data; 487 struct adma_port_priv *pp = ap->private_data;
486 if (!pp || pp->state != adma_state_mmio) 488 if (!pp || pp->state != adma_state_mmio)
487 continue; 489 continue;
488 qc = ata_qc_from_tag(ap, ap->active_tag); 490 qc = ata_qc_from_tag(ap, ap->active_tag);
489 if (qc && (!(qc->tf.ctl & ATA_NIEN))) { 491 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
490 492
491 /* check main status, clearing INTRQ */ 493 /* check main status, clearing INTRQ */
492 u8 status = ata_check_status(ap); 494 u8 status = ata_check_status(ap);