aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_qstor.c
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-09-27 05:39:50 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-28 12:07:13 -0400
commite50362eccd8809a224cda5f71714a088ba37b2ab (patch)
tree762b753691ef8c4645efaa677b32c57fd33ecbc0 /drivers/scsi/sata_qstor.c
parent312f7da2824c82800ee78d6190f12854456957af (diff)
[PATCH] libata: interrupt driven pio for LLD
libata.h: libata-core: Add ATA_FLAG_PIO_POLLING flag for LLDs that expect interrupt for command completion only. sata_nv.c: sata_vsc.c: irq handler is wrapper around ata_host_intr(), can handle PIO interrupts. sata_promise.c: sata_sx4.c: sata_qstor.c: sata_mv.c: Private irq handler. Polling mode ATA_FLAG_PIO_POLLING used for compatibility. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/sata_qstor.c')
-rw-r--r--drivers/scsi/sata_qstor.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c
index ffcdeb68641..a604afafaec 100644
--- a/drivers/scsi/sata_qstor.c
+++ b/drivers/scsi/sata_qstor.c
@@ -175,7 +175,7 @@ static struct ata_port_info qs_port_info[] = {
175 .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 175 .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
176 ATA_FLAG_SATA_RESET | 176 ATA_FLAG_SATA_RESET |
177 //FIXME ATA_FLAG_SRST | 177 //FIXME ATA_FLAG_SRST |
178 ATA_FLAG_MMIO, 178 ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING,
179 .pio_mask = 0x10, /* pio4 */ 179 .pio_mask = 0x10, /* pio4 */
180 .udma_mask = 0x7f, /* udma0-6 */ 180 .udma_mask = 0x7f, /* udma0-6 */
181 .port_ops = &qs_ata_ops, 181 .port_ops = &qs_ata_ops,
@@ -389,14 +389,13 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set)
389 DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n", 389 DPRINTK("SFF=%08x%08x: sCHAN=%u sHST=%d sDST=%02x\n",
390 sff1, sff0, port_no, sHST, sDST); 390 sff1, sff0, port_no, sHST, sDST);
391 handled = 1; 391 handled = 1;
392 if (ap && !(ap->flags & 392 if (ap && !(ap->flags & ATA_FLAG_PORT_DISABLED)) {
393 (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {
394 struct ata_queued_cmd *qc; 393 struct ata_queued_cmd *qc;
395 struct qs_port_priv *pp = ap->private_data; 394 struct qs_port_priv *pp = ap->private_data;
396 if (!pp || pp->state != qs_state_pkt) 395 if (!pp || pp->state != qs_state_pkt)
397 continue; 396 continue;
398 qc = ata_qc_from_tag(ap, ap->active_tag); 397 qc = ata_qc_from_tag(ap, ap->active_tag);
399 if (qc && (!(qc->tf.ctl & ATA_NIEN))) { 398 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
400 switch (sHST) { 399 switch (sHST) {
401 case 0: /* sucessful CPB */ 400 case 0: /* sucessful CPB */
402 case 3: /* device error */ 401 case 3: /* device error */
@@ -422,13 +421,13 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set)
422 struct ata_port *ap; 421 struct ata_port *ap;
423 ap = host_set->ports[port_no]; 422 ap = host_set->ports[port_no];
424 if (ap && 423 if (ap &&
425 !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { 424 !(ap->flags & ATA_FLAG_PORT_DISABLED)) {
426 struct ata_queued_cmd *qc; 425 struct ata_queued_cmd *qc;
427 struct qs_port_priv *pp = ap->private_data; 426 struct qs_port_priv *pp = ap->private_data;
428 if (!pp || pp->state != qs_state_mmio) 427 if (!pp || pp->state != qs_state_mmio)
429 continue; 428 continue;
430 qc = ata_qc_from_tag(ap, ap->active_tag); 429 qc = ata_qc_from_tag(ap, ap->active_tag);
431 if (qc && (!(qc->tf.ctl & ATA_NIEN))) { 430 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) {
432 431
433 /* check main status, clearing INTRQ */ 432 /* check main status, clearing INTRQ */
434 u8 status = ata_chk_status(ap); 433 u8 status = ata_chk_status(ap);