Re: Bugs in scsi_vpd_inquiry()

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

 



On Thu, 2009-08-13 at 16:58 +0300, Boaz Harrosh wrote:
> On 08/11/2009 07:24 PM, James Bottomley wrote:
> > On Tue, 2009-08-11 at 12:14 -0400, Alan Stern wrote:
> >> On Tue, 11 Aug 2009, James Bottomley wrote:
> >>
> >>> Sort of, but it's not really doing it properly.  Lets do it like this.
> >>> This should also fix the > 255 length problem older devices might have.
> >>
> >> Do you mind including also the residue check?
> > 
> > But there's no point to it ... it's a Byzantine check.  The standard
> > says shall return as many bytes as will fit in the allocation length
> > (what it does with allocation length beyond data to return is
> > undefined).
> > 
> > For the USB case where a full residue and no error indicates there was
> > actually an error, we already have a translation.
> > 
> > If devices just return random data lengths and then stop, your proposed
> > residue check doesn't catch them anyway.  However, I'd much rather
> > assume a device performs to spec until proven otherwise.
> > 
> 
> OK so this is also the case for devices that did not error, did not return
> resid, and yet did not return the page in question. Please remove that
> != page check then. ("until proven otherwise")

The usual presumption is that if a check is there, there's a reason for
it.  There are actually several devices that only return the one VPD
page they're programmed for whatever you happen to ask for ... that's
why the check is there.

James


--
To unsubscribe from this list: 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