X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fscsi.c;h=17dce6657a7c7f140a6204e8aa27235227e0e143;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=12f81878f1cbf777a8b43be08bbf10aca14402c5;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 12f81878f..17dce6657 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -56,8 +56,14 @@ #include #include +#include +#include +#include +#include +#include #include -#include "scsi.h" +#include +#include #include "scsi_priv.h" #include "scsi_logging.h" @@ -400,7 +406,7 @@ void scsi_log_send(struct scsi_cmnd *cmd) * output in scsi_log_completion. */ printk(" "); - print_command(cmd->cmnd); + scsi_print_command(cmd); if (level > 3) { printk(KERN_INFO "buffer = 0x%p, bufflen = %d," " done = 0x%p, queuecommand 0x%p\n", @@ -468,13 +474,13 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition) printk("UNKNOWN"); } printk(" %8x ", cmd->result); - print_command(cmd->cmnd); + scsi_print_command(cmd); if (status_byte(cmd->result) & CHECK_CONDITION) { /* * XXX The print_sense formatting/prefix * doesn't match this function. */ - print_sense("", cmd); + scsi_print_sense("", cmd); } if (level > 3) { printk(KERN_INFO "scsi host busy %d failed %d\n", @@ -689,8 +695,6 @@ static DEFINE_PER_CPU(struct list_head, scsi_done_q); */ void scsi_done(struct scsi_cmnd *cmd) { - unsigned long flags; - /* * We don't have to worry about this one timing out any more. * If we are unable to remove the timer, then the command @@ -701,6 +705,14 @@ void scsi_done(struct scsi_cmnd *cmd) */ if (!scsi_delete_timer(cmd)) return; + __scsi_done(cmd); +} + +/* Private entry to scsi_done() to complete a command when the timer + * isn't running --- used by scsi_times_out */ +void __scsi_done(struct scsi_cmnd *cmd) +{ + unsigned long flags; /* * Set the serial numbers back to zero