From: Chris Wright Date: Tue, 19 Dec 2006 01:18:53 +0000 (-0800) Subject: SCSI CDB clearing fix (some drives choke with garbage after CDB), from X-Git-Tag: v2.6.19.2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5891e33b526468647248e9bde13854e2d98a10ad;p=thirdparty%2Fkernel%2Fstable-queue.git SCSI CDB clearing fix (some drives choke with garbage after CDB), from Tejun Heo. --- diff --git a/queue-2.6.19/scsi-add-missing-cdb-clearing-in-scsi_execute.patch b/queue-2.6.19/scsi-add-missing-cdb-clearing-in-scsi_execute.patch new file mode 100644 index 00000000000..a6d083ddf44 --- /dev/null +++ b/queue-2.6.19/scsi-add-missing-cdb-clearing-in-scsi_execute.patch @@ -0,0 +1,33 @@ +From stable-bounces@linux.kernel.org Sat Dec 16 03:08:38 2006 +Date: Sat, 16 Dec 2006 20:02:32 +0900 +From: Tejun Heo +To: jens.axboe@oracle.com, dougg@torque.net, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, stable@kernel.org +Message-ID: <20061216110232.GF5400@htj.dyndns.org> +Subject: SCSI: add missing cdb clearing in scsi_execute() + +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 +Cc: Jens Axboe +Cc: Douglas Gilbert +Signed-off-by: Chris Wright + +--- + drivers/scsi/scsi_lib.c | 1 + + 1 file changed, 1 insertion(+) + +--- linux-2.6.19.1.orig/drivers/scsi/scsi_lib.c ++++ linux-2.6.19.1/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; diff --git a/queue-2.6.19/series b/queue-2.6.19/series index acdb62288c4..cf6a8b16ca3 100644 --- a/queue-2.6.19/series +++ b/queue-2.6.19/series @@ -13,3 +13,4 @@ kbuild-don-t-put-temp-files-in-source.patch arm-add-sys_-at-syscalls.patch sched-remove-__cpuinitdata-anotation-to-cpu_isolated_map.patch ib-srp-fix-fmr-mapping-for-32-bit-kernels-and-addresses-above-4g.patch +scsi-add-missing-cdb-clearing-in-scsi_execute.patch