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_sil24.c | |
parent | f0612bbc41f65f5a684f69d714a1a17a6f0f40c5 (diff) | |
parent | a7dac447bb9cef27d4d29cdf63e2d7809c50b1f4 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/sata_sil24.c')
-rw-r--r-- | drivers/scsi/sata_sil24.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 7e6e5c049b7d..05ce84286aea 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -503,7 +503,7 @@ static void sil24_eng_timeout(struct ata_port *ap) | |||
503 | 503 | ||
504 | qc = ata_qc_from_tag(ap, ap->active_tag); | 504 | qc = ata_qc_from_tag(ap, ap->active_tag); |
505 | if (!qc) { | 505 | if (!qc) { |
506 | printk(KERN_ERR "ata%u: BUG: tiemout without command\n", | 506 | printk(KERN_ERR "ata%u: BUG: timeout without command\n", |
507 | ap->id); | 507 | ap->id); |
508 | return; | 508 | return; |
509 | } | 509 | } |
@@ -517,7 +517,7 @@ static void sil24_eng_timeout(struct ata_port *ap) | |||
517 | */ | 517 | */ |
518 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); | 518 | printk(KERN_ERR "ata%u: command timeout\n", ap->id); |
519 | qc->scsidone = scsi_finish_command; | 519 | qc->scsidone = scsi_finish_command; |
520 | ata_qc_complete(qc, ATA_ERR); | 520 | ata_qc_complete(qc, AC_ERR_OTHER); |
521 | 521 | ||
522 | sil24_reset_controller(ap); | 522 | sil24_reset_controller(ap); |
523 | } | 523 | } |
@@ -528,6 +528,7 @@ static void sil24_error_intr(struct ata_port *ap, u32 slot_stat) | |||
528 | struct sil24_port_priv *pp = ap->private_data; | 528 | struct sil24_port_priv *pp = ap->private_data; |
529 | void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; | 529 | void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; |
530 | u32 irq_stat, cmd_err, sstatus, serror; | 530 | u32 irq_stat, cmd_err, sstatus, serror; |
531 | unsigned int err_mask; | ||
531 | 532 | ||
532 | irq_stat = readl(port + PORT_IRQ_STAT); | 533 | irq_stat = readl(port + PORT_IRQ_STAT); |
533 | writel(irq_stat, port + PORT_IRQ_STAT); /* clear irq */ | 534 | writel(irq_stat, port + PORT_IRQ_STAT); /* clear irq */ |
@@ -555,17 +556,18 @@ static void sil24_error_intr(struct ata_port *ap, u32 slot_stat) | |||
555 | * Device is reporting error, tf registers are valid. | 556 | * Device is reporting error, tf registers are valid. |
556 | */ | 557 | */ |
557 | sil24_update_tf(ap); | 558 | sil24_update_tf(ap); |
559 | err_mask = ac_err_mask(pp->tf.command); | ||
558 | } else { | 560 | } else { |
559 | /* | 561 | /* |
560 | * Other errors. libata currently doesn't have any | 562 | * Other errors. libata currently doesn't have any |
561 | * mechanism to report these errors. Just turn on | 563 | * mechanism to report these errors. Just turn on |
562 | * ATA_ERR. | 564 | * ATA_ERR. |
563 | */ | 565 | */ |
564 | pp->tf.command = ATA_ERR; | 566 | err_mask = AC_ERR_OTHER; |
565 | } | 567 | } |
566 | 568 | ||
567 | if (qc) | 569 | if (qc) |
568 | ata_qc_complete(qc, pp->tf.command); | 570 | ata_qc_complete(qc, err_mask); |
569 | 571 | ||
570 | sil24_reset_controller(ap); | 572 | sil24_reset_controller(ap); |
571 | } | 573 | } |
@@ -590,7 +592,7 @@ static inline void sil24_host_intr(struct ata_port *ap) | |||
590 | sil24_update_tf(ap); | 592 | sil24_update_tf(ap); |
591 | 593 | ||
592 | if (qc) | 594 | if (qc) |
593 | ata_qc_complete(qc, pp->tf.command); | 595 | ata_qc_complete(qc, ac_err_mask(pp->tf.command)); |
594 | } else | 596 | } else |
595 | sil24_error_intr(ap, slot_stat); | 597 | sil24_error_intr(ap, slot_stat); |
596 | } | 598 | } |