linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is scsi_reset_provider() overdoing it?
@ 2007-07-03 14:07 Boaz Harrosh
  0 siblings, 0 replies; only message in thread
From: Boaz Harrosh @ 2007-07-03 14:07 UTC (permalink / raw)
  To: linux-scsi, James Bottomley


In scsi_error.c at scsi_reset_provider()
 Why do we need the uninitialized struct request hanging on
 the reset scsi_cmnd? It looks like we are bypassing block
 queues and directly going to llds. It also looks like llds
 understand not to touch any garbage request's fields during
 reset. Would it not be better to Just put a NULL instead?
 And while at it can I just put a DMA_NONE on this No-Data
 command?

Boaz

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 9adb64a..4f6026d 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1662,11 +1662,10 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
 {
 	struct scsi_cmnd *scmd = scsi_get_command(dev, GFP_KERNEL);
 	struct Scsi_Host *shost = dev->host;
-	struct request req;
 	unsigned long flags;
 	int rtn;
 
-	scmd->request = &req;
+	scmd->request = NULL;
 	memset(&scmd->eh_timeout, 0, sizeof(scmd->eh_timeout));
 
 	memset(&scmd->cmnd, '\0', sizeof(scmd->cmnd));
@@ -1678,7 +1677,7 @@ scsi_reset_provider(struct scsi_device *dev, int flag)
 
 	scmd->cmd_len			= 0;
 
-	scmd->sc_data_direction		= DMA_BIDIRECTIONAL;
+	scmd->sc_data_direction		= DMA_NONE;
 
 	init_timer(&scmd->eh_timeout);
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-03 14:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-03 14:07 Is scsi_reset_provider() overdoing it? Boaz Harrosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).