RE: Question: where should the SCSI driver place MODE_SENSE data ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux