diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 04:50:22 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 04:50:22 -0500 |
commit | 054ee8fd39f1b5d50e803f126b63f400d631eea4 (patch) | |
tree | 2819e388f853de88e09635de8e38017b563069bc /drivers/scsi/sata_promise.c | |
parent | f0612bbc41f65f5a684f69d714a1a17a6f0f40c5 (diff) | |
parent | a7dac447bb9cef27d4d29cdf63e2d7809c50b1f4 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r-- | drivers/scsi/sata_promise.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 63911f16b6ec..8f41702275db 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -399,7 +399,8 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
399 | case ATA_PROT_DMA: | 399 | case ATA_PROT_DMA: |
400 | case ATA_PROT_NODATA: | 400 | case ATA_PROT_NODATA: |
401 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); | 401 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); |
402 | ata_qc_complete(qc, ata_wait_idle(ap) | ATA_ERR); | 402 | drv_stat = ata_wait_idle(ap); |
403 | ata_qc_complete(qc, __ac_err_mask(drv_stat)); | ||
403 | break; | 404 | break; |
404 | 405 | ||
405 | default: | 406 | default: |
@@ -408,7 +409,7 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
408 | printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", | 409 | printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", |
409 | ap->id, qc->tf.command, drv_stat); | 410 | ap->id, qc->tf.command, drv_stat); |
410 | 411 | ||
411 | ata_qc_complete(qc, drv_stat); | 412 | ata_qc_complete(qc, ac_err_mask(drv_stat)); |
412 | break; | 413 | break; |
413 | } | 414 | } |
414 | 415 | ||
@@ -420,24 +421,21 @@ out: | |||
420 | static inline unsigned int pdc_host_intr( struct ata_port *ap, | 421 | static inline unsigned int pdc_host_intr( struct ata_port *ap, |
421 | struct ata_queued_cmd *qc) | 422 | struct ata_queued_cmd *qc) |
422 | { | 423 | { |
423 | u8 status; | 424 | unsigned int handled = 0, err_mask = 0; |
424 | unsigned int handled = 0, have_err = 0; | ||
425 | u32 tmp; | 425 | u32 tmp; |
426 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; | 426 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; |
427 | 427 | ||
428 | tmp = readl(mmio); | 428 | tmp = readl(mmio); |
429 | if (tmp & PDC_ERR_MASK) { | 429 | if (tmp & PDC_ERR_MASK) { |
430 | have_err = 1; | 430 | err_mask = AC_ERR_DEV; |
431 | pdc_reset_port(ap); | 431 | pdc_reset_port(ap); |
432 | } | 432 | } |
433 | 433 | ||
434 | switch (qc->tf.protocol) { | 434 | switch (qc->tf.protocol) { |
435 | case ATA_PROT_DMA: | 435 | case ATA_PROT_DMA: |
436 | case ATA_PROT_NODATA: | 436 | case ATA_PROT_NODATA: |
437 | status = ata_wait_idle(ap); | 437 | err_mask |= ac_err_mask(ata_wait_idle(ap)); |
438 | if (have_err) | 438 | ata_qc_complete(qc, err_mask); |
439 | status |= ATA_ERR; | ||
440 | ata_qc_complete(qc, status); | ||
441 | handled = 1; | 439 | handled = 1; |
442 | break; | 440 | break; |
443 | 441 | ||