===== drivers/scsi/scsi.c 1.50 vs edited ===== --- 1.50/drivers/scsi/scsi.c Tue Oct 22 12:43:29 2002 +++ edited/drivers/scsi/scsi.c Fri Oct 25 13:23:32 2002 @@ -1224,6 +1224,12 @@ SCSI_LOG_MLQUEUE(3, printk("Leaving scsi_do_cmd()\n")); } +static void scsi_null_done_method(Scsi_Cmnd *SCp) +{ + printk(KERN_EMERG "Done called on already done command\n"); + dump_stack(); +} + /** * scsi_done - Mark this command as done * @SCpnt: The SCSI Command which we think we've completed. @@ -1247,6 +1253,10 @@ unsigned long flags; int cpu, tstatus; struct softscsi_data *queue; + + /* clear out the done method to produce an error for done on the + * same command */ + SCpnt->scsi_done = scsi_null_done_method; /* * We don't have to worry about this one timing out any more.