patch-2.4.10 linux/drivers/scsi/scsi_error.c

Next file: linux/drivers/scsi/sd.c
Previous file: linux/drivers/scsi/qlogicfc_asm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/scsi/scsi_error.c linux/drivers/scsi/scsi_error.c
@@ -421,6 +421,7 @@
 	static unsigned char generic_sense[6] =
 	{REQUEST_SENSE, 0, 0, 0, 255, 0};
 	unsigned char scsi_result0[256], *scsi_result = NULL;
+	int saved_result;
 
 	ASSERT_LOCK(&io_request_lock, 0);
 
@@ -446,6 +447,7 @@
 	memset((void *) SCpnt->sense_buffer, 0, sizeof(SCpnt->sense_buffer));
 	memset((void *) scsi_result, 0, 256);
 
+	saved_result = SCpnt->result;
 	SCpnt->request_buffer = scsi_result;
 	SCpnt->request_bufflen = 256;
 	SCpnt->use_sg = 0;
@@ -470,6 +472,7 @@
 	 */
 	memcpy((void *) SCpnt->cmnd, (void *) SCpnt->data_cmnd,
 	       sizeof(SCpnt->data_cmnd));
+	SCpnt->result = saved_result;
 	SCpnt->request_buffer = SCpnt->buffer;
 	SCpnt->request_bufflen = SCpnt->bufflen;
 	SCpnt->use_sg = SCpnt->old_use_sg;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)