U3GINIT_SCSIEJECT quirk
Don Lewis
truckman at FreeBSD.org
Fri Nov 15 18:04:17 UTC 2013
On 15 Nov, Hans Petter Selasky wrote:
> On 11/15/13 00:37, Don Lewis wrote:
>> My first question is how does U3GINIT_SCSIEJECT manage to ever work? It
>> seems like there would be chicken vs. egg issue here. The quirk is on
>> the u3g device, so how would it get activated until the u3g device is
>> attached? The u3g device doesn't appear until the umass device is
>> ejected.
>
> Hi,
>
> Check the VID and PID of your USB device using usbconfig. Maybe it is
> not the same value in both cases?
I don't know how the device would know if it's being the first time
after a reboot, but anyway:
reboot
ugen2.2: <Novatel Wireless CDMA Novatel Wireless Inc.> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0110
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x1410
idProduct = 0x5020
bcdDevice = 0x0000
iManufacturer = 0x0001 <Novatel Wireless Inc.>
iProduct = 0x0002 <Novatel Wireless CDMA >
iSerialNumber = 0x0004 <091166643730000>
bNumConfigurations = 0x0001
camcontrol eject
ugen2.2: <Novatel Wireless CDMA Novatel Wireless Inc.> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0110
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x1410
idProduct = 0x5020
bcdDevice = 0x0000
iManufacturer = 0x0001 <Novatel Wireless Inc.>
iProduct = 0x0002 <Novatel Wireless CDMA >
iSerialNumber = 0x0004 <091166643730000>
bNumConfigurations = 0x0001
unplug, power off, replug
ugen2.2: <Novatel Wireless CDMA Novatel Wireless Inc.> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0110
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x1410
idProduct = 0x6000
bcdDevice = 0x0000
iManufacturer = 0x0001 <Novatel Wireless Inc.>
iProduct = 0x0002 <Novatel Wireless CDMA >
iSerialNumber = 0x0004 <091166643731000>
bNumConfigurations = 0x0001
Hmn, interesting ... idProduct is now 0x6000. Even stranger is that it
worked with the quirk I added for 0x5020!!!
> U3G patch looks OK.
>
> The SCSI quirk is not needed. This should be fixed in the SCSI stack!
I don't have any problems on my unpatched 8.4-STABLE laptop, but I do on
11-CURRENT. It seems sort of odd that the device would be getting a
PREVENT/ALLOW MEDIUM REMOVAL command right after it is attached (maybe
from geom tasting it?), but without the UQ_MSC_NO_PREVENT_ALLOW quirk, I
get a bunch of SCSI read errors as mentioned here:
<http://docs.FreeBSD.org/cgi/mid.cgi?201311140129.rAE1TQnm070352>.
That seems to but CAM into a bad state that causes a use after free
issue the triggers a panic when the umass device goes away. That seems
like a definite bug. I suspect that it might be related to the recent
batch of CAM changes. In any case, the quirk also seems to prevent the
panic.
More information about the freebsd-usb
mailing list