Skip to contentSkip to conversation

3ware bad queuecommand returns

PATCH New Jens Axboe 1 participant 1 message Nov 19, 2004

Subsystems (2)
lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

PATCH 1/1 3ware bad queuecommand returns

Hi,

If your ->queuecommand() completes a command through done, it must not return non-zero to the mid layer so that it takes ownership of the command again.

===== drivers/scsi/3w-9xxx.c 1.4 vs edited =====

drivers/scsi/3w-9xxx.c +1 -0
@@ -1746,6 +1746,7 @@ static int twa_scsi_queue(struct scsi_cm
 		twa_free_request_id(tw_dev, request_id);
 		SCpnt->result = (DID_ERROR << 16);
 		done(SCpnt);
+		reval = 0;
 	}
 
 	return retval;

===== drivers/scsi/3w-xxxx.c 1.47 vs edited =====

drivers/scsi/3w-xxxx.c +1 -0
@@ -2067,6 +2067,7 @@ static int tw_scsi_queue(struct scsi_cmn
 		tw_state_request_finish(tw_dev, request_id);
 		SCpnt->result = (DID_ERROR << 16);
 		done(SCpnt);
+		retval = 0;
 	}
 out:
 	return retval;
Signature · 1 line
Jens Axboe