diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 04:44:42 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 04:44:42 -0500 |
commit | a7dac447bb9cef27d4d29cdf63e2d7809c50b1f4 (patch) | |
tree | a8935490cdd374aba3a804ba9f79d1aed67db36d /drivers/scsi/ahci.c | |
parent | 81cfb8864c73230eb1c37753aba517db15cf4d8f (diff) |
[libata] change ata_qc_complete() to take error mask as second arg
The second argument to ata_qc_complete() was being used for two
purposes: communicate the ATA Status register to the completion
function, and indicate an error. On legacy PCI IDE hardware, the latter
is often implicit in the former. On more modern hardware, the driver
often completely emulated a Status register value, passing ATA_ERR as an
indication that something went wrong.
Now that previous code changes have eliminated the need to use drv_stat
arg to communicate the ATA Status register value, we can convert it to a
mask of possible error classes.
This will lead to more flexible error handling in the future.
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r-- | drivers/scsi/ahci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 03829aedfd39..5efb3c50aa8a 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -600,7 +600,7 @@ static void ahci_eng_timeout(struct ata_port *ap) | |||
600 | * not being called from the SCSI EH. | 600 | * not being called from the SCSI EH. |
601 | */ | 601 | */ |
602 | qc->scsidone = scsi_finish_command; | 602 | qc->scsidone = scsi_finish_command; |
603 | ata_qc_complete(qc, ATA_ERR); | 603 | ata_qc_complete(qc, AC_ERR_OTHER); |
604 | } | 604 | } |
605 | 605 | ||
606 | spin_unlock_irqrestore(&host_set->lock, flags); | 606 | spin_unlock_irqrestore(&host_set->lock, flags); |
@@ -629,7 +629,7 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
629 | if (status & PORT_IRQ_FATAL) { | 629 | if (status & PORT_IRQ_FATAL) { |
630 | ahci_intr_error(ap, status); | 630 | ahci_intr_error(ap, status); |
631 | if (qc) | 631 | if (qc) |
632 | ata_qc_complete(qc, ATA_ERR); | 632 | ata_qc_complete(qc, AC_ERR_OTHER); |
633 | } | 633 | } |
634 | 634 | ||
635 | return 1; | 635 | return 1; |