linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 04/18] SCSI: add missing cdb clearing in scsi_execute()
       [not found] ` <20070221014927.GA3684@kroah.com>
@ 2007-02-21  1:50   ` Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2007-02-21  1:50 UTC (permalink / raw)
  To: linux-kernel, stable, jens.axboe, dougg, linux-ide, linux-scsi
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	torvalds, akpm, alan, Tejun Heo, Chris Wright

[-- Attachment #1: scsi-add-missing-cdb-clearing-in-scsi_execute.patch --]
[-- Type: text/plain, Size: 1098 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Tejun Heo <htejun@gmail.com>

Clear-garbage-after-CDB patch missed scsi_execute() and it causes some
ODDs (HL-DT-ST DVD-RAM GSA-H30N) choke during SCSI scan.  Note that
this patch is only for -stable.  There is another more reliable fix
for this problem proposed for devel tree.

http://thread.gmane.org/gmane.linux.ide/14605/focus=14605

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/scsi_lib.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-2.6.18.7.orig/drivers/scsi/scsi_lib.c
+++ linux-2.6.18.7/drivers/scsi/scsi_lib.c
@@ -191,6 +191,7 @@ int scsi_execute(struct scsi_device *sde
 		goto out;
 
 	req->cmd_len = COMMAND_SIZE(cmd[0]);
+	memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
 	memcpy(req->cmd, cmd, req->cmd_len);
 	req->sense = sense;
 	req->sense_len = 0;

--

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

only message in thread, other threads:[~2007-02-21  1:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070221014413.282048309@mini.kroah.org>
     [not found] ` <20070221014927.GA3684@kroah.com>
2007-02-21  1:50   ` [patch 04/18] SCSI: add missing cdb clearing in scsi_execute() Greg KH

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).