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

Next file: linux/drivers/scsi/scsi_ioctl.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.46/linux/drivers/scsi/scsi_error.c linux/drivers/scsi/scsi_error.c
@@ -408,6 +408,7 @@
 	SCpnt->request_bufflen = SCpnt->bufflen;
 	SCpnt->use_sg = SCpnt->old_use_sg;
 	SCpnt->cmd_len = SCpnt->old_cmd_len;
+	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
 
 	scsi_send_eh_cmnd(SCpnt, SCpnt->timeout_per_command);
 
@@ -464,6 +465,7 @@
 	SCpnt->request_bufflen = 256;
 	SCpnt->use_sg = 0;
 	SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
+	SCpnt->sc_data_direction = SCSI_DATA_READ;
 
 	scsi_send_eh_cmnd(SCpnt, SENSE_TIMEOUT);
 
@@ -486,6 +488,7 @@
 	SCpnt->request_bufflen = SCpnt->bufflen;
 	SCpnt->use_sg = SCpnt->old_use_sg;
 	SCpnt->cmd_len = SCpnt->old_cmd_len;
+	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
 
 	/*
 	 * Hey, we are done.  Let's look to see what happened.
@@ -531,6 +534,7 @@
 	SCpnt->use_sg = 0;
 	SCpnt->cmd_len = COMMAND_SIZE(SCpnt->cmnd[0]);
 	scsi_send_eh_cmnd(SCpnt, SENSE_TIMEOUT);
+	SCpnt->sc_data_direction = SCSI_DATA_NONE;
 
 	/* Last chance to have valid sense data */
 	if (!scsi_sense_valid(SCpnt))
@@ -551,6 +555,7 @@
 	SCpnt->request_bufflen = SCpnt->bufflen;
 	SCpnt->use_sg = SCpnt->old_use_sg;
 	SCpnt->cmd_len = SCpnt->old_cmd_len;
+	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
 
 	/*
 	 * Hey, we are done.  Let's look to see what happened.
@@ -730,6 +735,7 @@
 	 * things.
 	 */
 	SCpnt->use_sg = SCpnt->old_use_sg;
+	SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
 	*SClist = SCpnt;
 }
 
@@ -1245,6 +1251,7 @@
 		request_queue_t *q;
 		if ((host->can_queue > 0 && (host->host_busy >= host->can_queue))
 		    || (host->host_blocked)
+		    || (host->host_self_blocked)
 		    || (SDpnt->device_blocked)) {
 			break;
 		}

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