public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
To: Douglas Gilbert <dougg@torque.net>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] definitive abstraction of the mode_sense commands
Date: Tue, 24 Jun 2003 01:17:35 -0700	[thread overview]
Message-ID: <20030624011735.B13924@one-eyed-alien.net> (raw)
In-Reply-To: <3EF80775.9020105@torque.net>; from dougg@torque.net on Tue, Jun 24, 2003 at 06:10:29PM +1000

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]

On Tue, Jun 24, 2003 at 06:10:29PM +1000, Douglas Gilbert wrote:
> 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.

The code does it this way because more devices seem to work that way.  That
is, always ask for the 'header' size as a minimum, and header size depends
on which command you send.

Lots of devices can't return less than the header size.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

What, are you one of those Microsoft-bashing Linux freaks?
					-- Customer to Greg
User Friendly, 2/10/1999

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2003-06-24  8:03 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
2003-06-24  8:17   ` Matthew Dharm [this message]
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=20030624011735.B13924@one-eyed-alien.net \
    --to=mdharm-scsi@one-eyed-alien.net \
    --cc=James.Bottomley@steeleye.com \
    --cc=dougg@torque.net \
    --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