diff options
author | Tejun Heo <htejun@gmail.com> | 2006-01-22 23:09:36 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-26 22:36:28 -0500 |
commit | 041c5fc33cb7ed4fe5322585a611fb6e29a05d3a (patch) | |
tree | 7c03ea4fa7c4329a693ce8041110b27251a9923a | |
parent | 9a3d9eb0177eb10500d49cd283b35576082a522d (diff) |
[PATCH] SCSI: export scsi_eh_finish_cmd() and scsi_eh_flush_done_q()
Export two SCSI EH command handling functions. To be used by libata EH.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | drivers/scsi/scsi_error.c | 7 | ||||
-rw-r--r-- | include/scsi/scsi_eh.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index a2333d2c7af0..6bac3d2668fa 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -584,8 +584,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd) | |||
584 | * keep a list of pending commands for final completion, and once we | 584 | * keep a list of pending commands for final completion, and once we |
585 | * are ready to leave error handling we handle completion for real. | 585 | * are ready to leave error handling we handle completion for real. |
586 | **/ | 586 | **/ |
587 | static void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, | 587 | void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, struct list_head *done_q) |
588 | struct list_head *done_q) | ||
589 | { | 588 | { |
590 | scmd->device->host->host_failed--; | 589 | scmd->device->host->host_failed--; |
591 | scmd->eh_eflags = 0; | 590 | scmd->eh_eflags = 0; |
@@ -597,6 +596,7 @@ static void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, | |||
597 | scsi_setup_cmd_retry(scmd); | 596 | scsi_setup_cmd_retry(scmd); |
598 | list_move_tail(&scmd->eh_entry, done_q); | 597 | list_move_tail(&scmd->eh_entry, done_q); |
599 | } | 598 | } |
599 | EXPORT_SYMBOL(scsi_eh_finish_cmd); | ||
600 | 600 | ||
601 | /** | 601 | /** |
602 | * scsi_eh_get_sense - Get device sense data. | 602 | * scsi_eh_get_sense - Get device sense data. |
@@ -1425,7 +1425,7 @@ static void scsi_eh_ready_devs(struct Scsi_Host *shost, | |||
1425 | * @done_q: list_head of processed commands. | 1425 | * @done_q: list_head of processed commands. |
1426 | * | 1426 | * |
1427 | **/ | 1427 | **/ |
1428 | static void scsi_eh_flush_done_q(struct list_head *done_q) | 1428 | void scsi_eh_flush_done_q(struct list_head *done_q) |
1429 | { | 1429 | { |
1430 | struct scsi_cmnd *scmd, *next; | 1430 | struct scsi_cmnd *scmd, *next; |
1431 | 1431 | ||
@@ -1454,6 +1454,7 @@ static void scsi_eh_flush_done_q(struct list_head *done_q) | |||
1454 | } | 1454 | } |
1455 | } | 1455 | } |
1456 | } | 1456 | } |
1457 | EXPORT_SYMBOL(scsi_eh_flush_done_q); | ||
1457 | 1458 | ||
1458 | /** | 1459 | /** |
1459 | * scsi_unjam_host - Attempt to fix a host which has a cmd that failed. | 1460 | * scsi_unjam_host - Attempt to fix a host which has a cmd that failed. |
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index fabd879c2f2e..d160880b2a87 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h | |||
@@ -35,6 +35,9 @@ static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr) | |||
35 | } | 35 | } |
36 | 36 | ||
37 | 37 | ||
38 | extern void scsi_eh_finish_cmd(struct scsi_cmnd *scmd, | ||
39 | struct list_head *done_q); | ||
40 | extern void scsi_eh_flush_done_q(struct list_head *done_q); | ||
38 | extern void scsi_report_bus_reset(struct Scsi_Host *, int); | 41 | extern void scsi_report_bus_reset(struct Scsi_Host *, int); |
39 | extern void scsi_report_device_reset(struct Scsi_Host *, int, int); | 42 | extern void scsi_report_device_reset(struct Scsi_Host *, int, int); |
40 | extern int scsi_block_when_processing_errors(struct scsi_device *); | 43 | extern int scsi_block_when_processing_errors(struct scsi_device *); |