SDDR-289 slo-mo reboot
Waitman Gobble
uzimac at da3m0n8t3r.com
Sun Jan 20 17:05:50 UTC 2013
Waitman Gobble <uzimac at da3m0n8t3r.com> wrote ..
> Waitman Gobble <uzimac at da3m0n8t3r.com> wrote ..
> > Hans Petter Selasky <hselasky at c2i.net> wrote ..
> > > On Sunday 20 January 2013 09:06:51 Waitman Gobble wrote:
> > > > Hi,
> > > >
> > > > I have a SanDisk SDDR-289 hooked up through a pci-e interface card w/ VIA
> > > > VL800 chipset With it plugged it, when I reboot it takes 5-6 minutes to
> > > > shut down and 15 to come back up.
> > > >
> > > > Jan 18 20:58:20 kamira kernel: ugen0.4 (: <SanDisk> at usbus0
> > > > Jan 18 20:58:20 kamira kernel: umass2: <Bulk-In, Bulk-Out, Interface> on
> > > > usbus0 Jan 18 20:58:20 kamira kernel: umass2: SCSI over Bulk-Only; quirks
> > > > = 0x4000 Jan 18 20:58:20 kamira kernel: umass2:7:2:-1: Attached to scbus7
> > > > Jan 18 20:58:20 kamira kernel: da2 at umass-sim2 bus 2 scbus7 target 0 lun
> > > > 0 Jan 18 20:58:20 kamira kernel: da2: <SanDisk uSD SDDR-289 1.00>
> > > > Removable Direct Access SCSI-0
> > > >
> > > > I don't see this model listed in sys/dev/usb/usbdevs, or
> > > > sys/dev/usb/quirk/usb_quirk.c ..not sure if the 'quirks = 0x4000' refers
> > > > to something. (?) I have a hunch the problem is related to missing quirks,
> > > > but I'm not sure.
> > > >
> > > > # uname -a
> > > > FreeBSD kamira.waitman.net 9.1-RELEASE FreeBSD 9.1-RELEASE #3 r245537M: Sat
> > > > Jan 19 13:41:28 PST 2013
> > > > root at kamira.waitman.net:/usr/obj/usr/src/sys/BURPLEX amd64
> > >
> > > There is currently some automagic detection of quirks. You can try to add your
> > > device to the quirklist in sys/dev/usb/quirk/usb_quirk.c
> > >
> > > --HPS
> >
> > Hi,
> >
> > Thanks. I did try just to see what happens, but it seems i need to have the device
> > listed in usbdev and I wasn't sure how to list it.
> >
> > for example, an older product with the same brand name, but conceivably a different
> > architecture:
> >
> > in usb_quirk.c
> >
> > USB_QUIRK(ONSPEC2, IMAGEMATE_SDDR55, 0x0000, 0xffff,
> > UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN),
> >
> > and usbdevs
> > product ONSPEC2 IMAGEMATE_SDDR55 0xa103 ImageMate SDDR55
> >
> > i'm not sure where i get this number:0xa103
> > and if that's all that is needed?
> >
> >
> > # usbconfig -u 0 -a 4 dump_curr_config_desc
> > ugen0.4: <USB3.0 Card Reader SanDisk> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps)
> > pwr=ON
> >
> >
> > Configuration index 0
> >
> > bLength = 0x0009
> > bDescriptorType = 0x0002
> > wTotalLength = 0x002c
> > bNumInterfaces = 0x0001
> > bConfigurationValue = 0x0001
> > iConfiguration = 0x0004 <SDDR-289>
> > bmAttributes = 0x0080
> > bMaxPower = 0x0064
> >
> > Interface 0
> > bLength = 0x0009
> > bDescriptorType = 0x0004
> > bInterfaceNumber = 0x0000
> > bAlternateSetting = 0x0000
> > bNumEndpoints = 0x0002
> > bInterfaceClass = 0x0008
> > bInterfaceSubClass = 0x0006
> > bInterfaceProtocol = 0x0050
> > iInterface = 0x0005 <Bulk-In, Bulk-Out, Interface>
> >
> > Endpoint 0
> > bLength = 0x0007
> > bDescriptorType = 0x0005
> > bEndpointAddress = 0x0001 <OUT>
> > bmAttributes = 0x0002 <BULK>
> > wMaxPacketSize = 0x0400
> > bInterval = 0x0000
> > bRefresh = 0x0000
> > bSynchAddress = 0x0000
> >
> > Additional Descriptor
> >
> > bLength = 0x06
> > bDescriptorType = 0x30
> > bDescriptorSubType = 0x03
> > RAW dump:
> > 0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
> >
> >
> > Endpoint 1
> > bLength = 0x0007
> > bDescriptorType = 0x0005
> > bEndpointAddress = 0x0082 <IN>
> > bmAttributes = 0x0002 <BULK>
> > wMaxPacketSize = 0x0400
> > bInterval = 0x0000
> > bRefresh = 0x0000
> > bSynchAddress = 0x0000
> >
> > Additional Descriptor
> >
> > bLength = 0x06
> > bDescriptorType = 0x30
> > bDescriptorSubType = 0x03
> > RAW dump:
> > 0x00 | 0x06, 0x30, 0x03, 0x00, 0x00, 0x00
> >
> >
> >
> > # usbconfig -u 0 -a 4 dump_device_desc
> > ugen0.4: <USB3.0 Card Reader SanDisk> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps)
> > pwr=ON
> >
> > bLength = 0x0012
> > bDescriptorType = 0x0001
> > bcdUSB = 0x0300
> > bDeviceClass = 0x0000
> > bDeviceSubClass = 0x0000
> > bDeviceProtocol = 0x0000
> > bMaxPacketSize0 = 0x0009
> > idVendor = 0x0781
> > idProduct = 0xb6ba
> > bcdDevice = 0x0124
> > iManufacturer = 0x0001 <SanDisk>
> > iProduct = 0x0002 <USB3.0 Card Reader>
> > iSerialNumber = 0x0003 <11150005027>
> > bNumConfigurations = 0x0001
> >
> >
> > Thank you,
> >
> >
> > --
> > Waitman Gobble
> > San Jose California USA
>
>
> OOPs, I think I answered my own question..
>
> I put this in usbdevs, based on the output of usbconfig above.
>
>
> product SANDISK IMAGEMATE_SDDR289 0xb6ba ImageMate SDDR-289
>
>
> then in
> usb_quirk.c
>
> USB_QUIRK(SANDISK, IMAGEMATE_SDDR289, 0x0000, 0xffff,
> UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY | UQ_MSC_NO_GETMAXLUN),
>
>
> Not sure if it's correct but I think maybe a starting point to experiment.
>
> Thanks,
>
>
>
>
The UQ_MSC_NO_INQUIRY makes it crash bad, but removing NO_INQUIRY from the quirk works though - and totally solves the reboot problem, yay.
I submitted a pr.
Thanks so much,
--
Waitman Gobble
San Jose California USA
More information about the freebsd-usb
mailing list