patch-2.3.99-pre6 linux/drivers/scsi/scsi_error.c

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

diff -u --recursive --new-file v2.3.99-pre5/linux/drivers/scsi/scsi_error.c linux/drivers/scsi/scsi_error.c
@@ -409,6 +409,7 @@
 	SCpnt->use_sg = SCpnt->old_use_sg;
 	SCpnt->cmd_len = SCpnt->old_cmd_len;
 	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
+	SCpnt->underflow = SCpnt->old_underflow;
 
 	scsi_send_eh_cmnd(SCpnt, SCpnt->timeout_per_command);
 
@@ -466,6 +467,7 @@
 	SCpnt->use_sg = 0;
 	SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
 	SCpnt->sc_data_direction = SCSI_DATA_READ;
+	SCpnt->underflow = 0;
 
 	scsi_send_eh_cmnd(SCpnt, SENSE_TIMEOUT);
 
@@ -489,6 +491,7 @@
 	SCpnt->use_sg = SCpnt->old_use_sg;
 	SCpnt->cmd_len = SCpnt->old_cmd_len;
 	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
+	SCpnt->underflow = SCpnt->old_underflow;
 
 	/*
 	 * Hey, we are done.  Let's look to see what happened.
@@ -533,9 +536,11 @@
 	SCpnt->request_bufflen = 256;
 	SCpnt->use_sg = 0;
 	SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
-	scsi_send_eh_cmnd(SCpnt, SENSE_TIMEOUT);
+	SCpnt->underflow = 0;
 	SCpnt->sc_data_direction = SCSI_DATA_NONE;
 
+	scsi_send_eh_cmnd(SCpnt, SENSE_TIMEOUT);
+
 	/* Last chance to have valid sense data */
 	if (!scsi_sense_valid(SCpnt))
 		memcpy((void *) SCpnt->sense_buffer,
@@ -556,6 +561,7 @@
 	SCpnt->use_sg = SCpnt->old_use_sg;
 	SCpnt->cmd_len = SCpnt->old_cmd_len;
 	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
+	SCpnt->underflow = SCpnt->old_underflow;
 
 	/*
 	 * Hey, we are done.  Let's look to see what happened.
@@ -736,6 +742,7 @@
 	 */
 	SCpnt->use_sg = SCpnt->old_use_sg;
 	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
+	SCpnt->underflow = SCpnt->old_underflow;
 	*SClist = SCpnt;
 }
 

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