Re: [PATCH] Don't add scsi_device for devices that return PQ=1, PDT=0x1f

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

 



On Mon, 7 Aug 2006, Dave Wysochanski wrote:

> > If you look at scsi_probe_and_add_lun in current mainline we already
> > have a check for PDT=0x1f, keyed of a blacklist flag in the scsi target.
> > The comment above it says it's for USB UFI.  It's missing the PQ=1
> > check, though.  Can you reassure with the USB storage people that USB
> > UFI indeed sets that periphal qualifier aswell (I'd guess so as IIRC
> > that standard references SPC).  If that's the case replace that check
> > with your version and remove the target flag.
> > 
> Yeah, I saw that.  If you look at that patch description from Alan, he
> states the PQ=0 for these devices:
> http://marc.theaimsgroup.com/?l=linux-scsi&m=113951679626087&w=2
> 
> Unfortunately USB UFI 1.0 spec has "reserved" where the PQ bits normally are,
> so maybe that's why there's only a check for PDT=0x1f?  Alan or someone
> from the usb-storage list, can you confirm this is correct (PQ really
> "reserved" is 0 for the USB UFI devices)?  I thought I had a USB floppy
> lying around but no luck.

I don't have any UFI devices, but Matt Dharm probably does.  Maybe he can
verify this.

Although I've lost track of the original email thread leading to that 
patch, it seems clear that there never would have been a problem if the 
UFI device in question had set PQ=3.  Since the UFI spec really does say 
that those bits are reserved and should be set to 0, it's reasonable to 
assume that lots of UFI devices will do just that.

> Also, it does not look like pdt_1f_for_no_lun flag Alan added is used.
> Alan do you intend on submitting the patch to the USB slave_alloc() function
> as you mentioned?

You know, that was half a year ago and it simply slipped my mind.  Partly 
because I never know when James accepts one of my patches.  But yes, now 
that it's there I will add appropriate code to usb-storage.

> I'm not sure Alan's pdt_1f_for_no_lun flag should be used in my case,
> since I would want to set it based on vid/pid - most appropriate in
> scsi_get_device_flags() - and he wanted to set it in slave_alloc().
> Maybe setting it in 2 different places for different devices is ok
> though - your call.

I don't see any problem with setting the flag from two different places.  
We already do the same sort of thing with other flags.  It doesn't matter
_where_ the flag gets set; all that matters is that it _is_ set during the
scanning.

Alan Stern

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