aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-15 20:58:05 +0900
committerTejun Heo <htejun@gmail.com>2006-05-15 20:58:05 +0900
commitf686bcb8078ac7505ec88818886c2c72639f4fc5 (patch)
tree7c563e0032b2d85b631b617b8bb2a7a648607468 /drivers/scsi/libata.h
parent[PATCH] libata-eh-fw: update ata_qc_from_tag() to enforce normal/EH qc ownership (diff)
downloadlinux-dev-f686bcb8078ac7505ec88818886c2c72639f4fc5.tar.xz
linux-dev-f686bcb8078ac7505ec88818886c2c72639f4fc5.zip
[PATCH] libata-eh-fw: implement new EH scheduling via error completion
There are several ways a qc can get schedule for EH in new EH. This patch implements one of them - completing a qc with ATA_QCFLAG_FAILED set or with non-zero qc->err_mask. ALL such qc's are examined by EH. New EH schedules a qc for EH from completion iff ->error_handler is implemented, qc is marked as failed or qc->err_mask is non-zero and the command is not an internal command (internal cmd is handled via ->post_internal_cmd). The EH scheduling itself is performed by asking SCSI midlayer to schedule EH for the specified scmd. For drivers implementing old-EH, nothing changes. As this change makes ata_qc_complete() rather large, it's not inlined anymore and __ata_qc_complete() is exported to other parts of libata for later use. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi/libata.h')
-rw-r--r--drivers/scsi/libata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index c9ff83bbcfae..52622b7f8a9e 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -57,6 +57,7 @@ extern int ata_do_reset(struct ata_port *ap, ata_reset_fn_t reset,
unsigned int *classes);
extern void ata_qc_free(struct ata_queued_cmd *qc);
extern void ata_qc_issue(struct ata_queued_cmd *qc);
+extern void __ata_qc_complete(struct ata_queued_cmd *qc);
extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
extern void ata_dev_select(struct ata_port *ap, unsigned int device,
unsigned int wait, unsigned int can_sleep);
@@ -101,5 +102,6 @@ extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
/* libata-eh.c */
extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
extern void ata_scsi_error(struct Scsi_Host *host);
+extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);
#endif /* __LIBATA_H__ */