From: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
To: Linux SCSI list <linux-scsi@vger.kernel.org>
Cc: USB Storage List <usb-storage@one-eyed-alien.net>
Subject: 2 PATCHES: fix request_tranferlength
Date: Sun, 21 Jul 2002 15:15:23 -0700 [thread overview]
Message-ID: <20020721151523.D1909@one-eyed-alien.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 3481 bytes --]
These two BK patches fix two instances where a command is issued with an
incorrect transfer length. The first is in the probing code... the section
where we make the second INQUIRY request for the full INQUIRY data. The
second is in sd.c where the MODE_SENSE request is issued.
Both of these patches are requred to allow usb-storage devices to work
properly. As a side-effect, this should reduce problems for all 'emulated
scsi' systems (ide-scsi, sbp2, etc).
Is there someone in particular I should send them to? In the USB world,
all patches go to Greg K-H... what's the procedure here in SCSI land?
Matt
# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.594 -> 1.595
# drivers/scsi/scsi_scan.c 1.9 -> 1.10
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/07/20 mdharm@zen.san.one-eyed-alien.net 1.595
# Fixed one of the INQUIRY commands used for probing SCSI devices. This
# badly-formed command was trapped by the usb-storage driver BUG_ON() which
# is designed to stop command with a badly formed transfer_length field.
# --------------------------------------------
#
diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
--- a/drivers/scsi/scsi_scan.c Sun Jul 21 00:55:37 2002
+++ b/drivers/scsi/scsi_scan.c Sun Jul 21 00:55:37 2002
@@ -717,7 +717,7 @@
scsi_wait_req (SRpnt, (void *) scsi_cmd,
(void *) scsi_result,
- 256, SCSI_TIMEOUT+4*HZ, 3);
+ scsi_cmd[4], SCSI_TIMEOUT+4*HZ, 3);
/* assume successful */
}
SDpnt->inquiry_len = possible_inq_resp_len;
# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.595 -> 1.596
# drivers/scsi/sd.c 1.22 -> 1.23
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/07/20 greg@kroah.com 1.7.2.39
# patch-2.5.27
# --------------------------------------------
# 02/07/20 greg@kroah.com 1.561.1.124
# Merge kroah.com:/home/linux/linux/linux-2.5
# into kroah.com:/home/linux/linux/tmp/linux-2.5
# --------------------------------------------
# 02/07/20 mdharm@zen.san.one-eyed-alien.net 1.596
# Modified the MODE_SENSE write-protect test in sd.c to issue a SCSI request
# with the request_bufflen the same size as the MODE_SENSE command being
# issued requests.
# --------------------------------------------
#
diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c
--- a/drivers/scsi/sd.c Sun Jul 21 00:55:44 2002
+++ b/drivers/scsi/sd.c Sun Jul 21 00:55:44 2002
@@ -1102,7 +1102,7 @@
SRpnt->sr_data_direction = SCSI_DATA_READ;
scsi_wait_req(SRpnt, (void *) cmd, (void *) buffer,
- 512, SD_TIMEOUT, MAX_RETRIES);
+ 255, SD_TIMEOUT, MAX_RETRIES);
the_result = SRpnt->sr_result;
--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
C: Like the Furby?
DP: He gives me the creeps. Think the SPCA will take him?
-- Cobb and Dust Puppy
User Friendly, 1/2/1999
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next reply other threads:[~2002-07-21 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-21 22:15 Matthew Dharm [this message]
2002-07-21 22:52 ` 2 PATCHES: fix request_tranferlength Willem Riede
2002-07-22 0:05 ` Matthew Dharm
2002-07-22 1:24 ` Kurt Garloff
2002-07-27 22:07 ` Matthew Dharm
2002-07-29 15:18 ` Alan Cox
2002-07-29 16:00 ` Randy.Dunlap
2002-07-29 16:50 ` Kurt Garloff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020721151523.D1909@one-eyed-alien.net \
--to=mdharm-usb@one-eyed-alien.net \
--cc=linux-scsi@vger.kernel.org \
--cc=usb-storage@one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox