From: James Bottomley <James.Bottomley@steeleye.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: PATCH: (as73) Do a minimal transfer for disk-cache mode-sense page
Date: 30 Jul 2003 16:04:44 -0500 [thread overview]
Message-ID: <1059599085.1849.264.camel@mulgrave> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0307301622410.2990-100000@ida.rowland.org>
On Wed, 2003-07-30 at 15:36, Alan Stern wrote:
> It sets the DBD flag to prevent the transfer of unwanted Block
> Descriptors.
I'm afraid I think we've already been around the houses on this one and
decided that we can't do it.
The problem is that most CD-ROMS and some USB storage devices follow one
of the ATAPI packet specifications which has the DBD bit as reserved,
and someone actually found one which gets annoyed if DBD is set.
> It uses 512 (the actual buffer size) as an upper limit, not 128
> as in the current code.
This is fine since the magic buffer size is 512 bytes.
> It transfers only the first 4 bytes of the cache page; the
> information we want is in the 3rd byte.
I didn't actually spot this anywhere in the patch.
> - len = data.length;
> - if (len > 128)
> - len = 128;
> - res = sd_do_mode_sense(SRpnt, dbd, modepage, buffer,
> + len = data.header_length + data.block_descriptor_length + 4;
> + if (len <= 512)
> + res = sd_do_mode_sense(SRpnt, dbd, modepage, buffer,
> len, &data);
> + else
> + res = SAM_STAT_BUSY;
Won't work. SAM_STAT_BUSY will cause an immediate retry, which still
won't get satisfied. I think you need to follow the original logic but
change 128 to 512
James
next prev parent reply other threads:[~2003-07-30 21:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-22 16:09 Is it safe to do DMA directly into scmd->sense_buffer? Alan Stern
2003-06-22 17:06 ` James Bottomley
2003-07-17 14:50 ` Comments about the __scsi_mode_sense() routine Alan Stern
2003-07-17 15:47 ` James Bottomley
2003-07-17 19:51 ` Alan Stern
2003-07-30 20:36 ` PATCH: (as73) Do a minimal transfer for disk-cache mode-sense page Alan Stern
2003-07-30 21:04 ` James Bottomley [this message]
2003-07-31 15:12 ` Revised PATCH: (as73b) " Alan Stern
2003-07-31 19:53 ` PATCH: (as70b) Update request_bufflen to match this_count Alan Stern
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=1059599085.1849.264.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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