Re: [PATCH] SCSI: detect missing data for INQUIRY

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

 



On Mon, 27 Oct 2008, James Bottomley wrote:

> > --- usb-2.6.orig/drivers/scsi/scsi_scan.c
> > +++ usb-2.6/drivers/scsi/scsi_scan.c
> > @@ -602,6 +602,13 @@ static int scsi_probe_lun(struct scsi_de
> >  				    (sshdr.ascq == 0))
> >  					continue;
> >  			}
> > +		} else {
> > +			/*
> > +			 * Additional Length and Vendor fields missing
> > +			 * probably means nothing was transferred.  Try again.
> > +			 */
> > +			if (inq_result[4] == 0 && inq_result[8] == 0)
> > +				continue;
> 
> Really, no.
> 
> A legitimate minimal response from a device is zero in the additional
> length field.  If it does that, then the vendor field is bound to be
> zero as well.
> 
> About the best we can do is check the first four fields.  For them to be
> all zero, it would have to be a minimal response SCSI-1 device (RDF of
> zero) ... hopefully they're all dead by now.

Then you're saying that the patch should everything up to
inq_result[8]?  Or maybe even beyond?  I can do that.  Would that be 
acceptable?

Alan Stern

--
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