]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/scsi.c
[SPARC]: Convert all FB SBUS drivers to of_driver framework.
[linux-2.6-omap-h63xx.git] / drivers / scsi / scsi.c
index 3e90ba797df236ec278460a25e1c8171045df3ab..2ab7df0dcfe8df2901cd9aaf68e735ee1f521d01 100644 (file)
@@ -578,6 +578,24 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
  */
 static DEFINE_PER_CPU(struct list_head, scsi_done_q);
 
+/**
+ * scsi_req_abort_cmd -- Request command recovery for the specified command
+ * cmd: pointer to the SCSI command of interest
+ *
+ * This function requests that SCSI Core start recovery for the
+ * command by deleting the timer and adding the command to the eh
+ * queue.  It can be called by either LLDDs or SCSI Core.  LLDDs who
+ * implement their own error recovery MAY ignore the timeout event if
+ * they generated scsi_req_abort_cmd.
+ */
+void scsi_req_abort_cmd(struct scsi_cmnd *cmd)
+{
+       if (!scsi_delete_timer(cmd))
+               return;
+       scsi_times_out(cmd);
+}
+EXPORT_SYMBOL(scsi_req_abort_cmd);
+
 /**
  * scsi_done - Enqueue the finished SCSI command into the done queue.
  * @cmd: The SCSI Command for which a low-level device driver (LLDD) gives