mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Ju, Seokmann" <Seokmann.Ju@lsil.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: RE: Question: where should the SCSI driver place MODE_SENSE data ?
Date: Wed, 22 Mar 2006 10:14:37 -0600	[thread overview]
Message-ID: <1143044077.3633.15.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <9738BCBE884FDB42801FAD8A7769C26514211A@NAMAIL1.ad.lsil.com>

On Wed, 2006-03-22 at 08:52 -0700, Ju, Seokmann wrote:
> On Tuesday, March 21, 2006 6:02 PM, James Bottomley wrote:
> > I don't understand the question.  Are you asking why
> > sd_read_write_protect_flag and sd_read_cache_type operate in the way
> > they do?  i.e. header first then actual data.
> For any SCSI command including MODE_SENSE, 'bufflen'in scsi_cmnd structure holds actual data buffer size in bytes if 'use_sg' flage is NOT set.
> The question is that "value of bufflen is 4 for the sd_read_cache_type operation and that is NOT sufficient to return header and page data by driver".
> If there is something that I misunderstood with the operation, please guide.

If you look at the functions in sd.c you'll see it goes about asking for
mode sense very carefully, because there are a lot of broken devices out
there.  The first request is only for enough of the headers to work out
the length of the page.

James



  reply	other threads:[~2006-03-22 16:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-22 15:52 Ju, Seokmann
2006-03-22 16:14 ` James Bottomley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-03-21 22:43 Ju, Seokmann
2006-03-21 16:44 Ju, Seokmann
2006-03-21 23:01 ` 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=1143044077.3633.15.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=Seokmann.Ju@lsil.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®