From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] definitive abstraction of the mode_sense commands
Date: Tue, 24 Jun 2003 18:10:29 +1000 [thread overview]
Message-ID: <3EF80775.9020105@torque.net> (raw)
In-Reply-To: <1056429111.2887.173.camel@mulgrave>
James Bottomley wrote:
> +/** scsi_do_mode_sense - issue a mode sense, falling back from 10 to
> + * six bytes if necessary.
> + * @SRpnt: SCSI request to fill in with the MODE_SENSE
> + * @dbd: set if mode sense will allow block descriptors to be returned
"A DBD bit of one specifies that the device server shall
not return any block descriptors in the returned MODE SENSE
data" [SPC-3 rev 13]. So that description of @dbd seems
inverted.
> # Note: Requestors of the Block Descriptors now must pay attention
> # to the longlba flag
The longlba flag can only be set in the "mode parameter
header(10)" if the LLBAA bit is set in the corresponding
MODE SENSE(10) command [ref: SPC-3 rev 13 MODE SENSE(10)
command (section 6.10)]. Your code doesn't set LLBAA so
there should be no reason to check the longlba flag.
For really depraved devices it can be useful to send a
MODE SENSE(6 or 10) that only asks for a 4 byte response. From
this response the length of the respone that can be supplied
is deduced. Then a second MODE SENSE can be
issued for the now known response length. Yes, it's
horrible, but that is precisely what Joerg Schilling
does in cdrecord.
Your code seems to have this technique in mind but requires
a MODE SENSE(10) response buffer to be at least 8 bytes long.
Doug Gilbert
next prev parent reply other threads:[~2003-06-24 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-24 4:31 [PATCH] definitive abstraction of the mode_sense commands James Bottomley
2003-06-24 8:10 ` Douglas Gilbert [this message]
2003-06-24 8:17 ` Matthew Dharm
2003-06-24 17:58 ` James Bottomley
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=3EF80775.9020105@torque.net \
--to=dougg@torque.net \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
/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