usb_quirk.c - ordering of quirks
Hans Petter Selasky
hselasky at c2i.net
Fri Jan 7 08:49:22 UTC 2011
On Friday 07 January 2011 02:05:48 Jeremy Chadwick wrote:
> (Please keep me CC'd as I am not subscribed to freebsd-usb)
>
> It seems recent commits/patches that people have commit have appended
> things to the bottom of the quirks list, but I don't see any comments
> indicating that their location is justified (e.g. probe order, etc.).
>
> Is there a particular reason for the lack of alphabetic ordering in
> usb_quirk.c? Can they be re-alphabetised safely?
>
> The reason I ask: I was in the process of writing a USB quirk when I
> found that PR 153599 already addressed my needs. However, the vendor ID
> string ("Feiya") is no longer valid; Feiya was bought by Silicon Motion,
> Inc. in 2002: http://www.siliconmotion.com/A2.D_About_us.php?s=3
>
> So the usbdevs entry for FEIYA should be changed to SILICONMOTION and
> refer to Silicon Motion, Inc. (which is both what USB-IF has as well as
> the Manufacturer string in a device itself (see below)).
>
> I found that the quirks were in alphabetical order based on vendor name
> (not vendor ID number), yet some weren't[2]. Reviewing CVS annotations
> and associated PRs with patches didn't provide any answers.
>
> Let me know so I can submit appropriate patches and update appropriate
> PRs. Thanks!
Hi,
Entries in usb/usbdevs must be sorted. Entries in usb/quirk/usb_quirk.c must
not be sorted, but we try to keep them according to functionality, so that
mass storage quirks are grouped and then alphabetical. This is not important.
--HPS
>
>
> [1]:
> ugen7.2: <Generic USB2.0 card Silicon Motion, Inc.> at usbus7, cfg=0
> md=HOST spd=HIGH (480Mbps) pwr=ON
>
> bLength = 0x0012
> bDescriptorType = 0x0001
> bcdUSB = 0x0200
> bDeviceClass = 0x0000
> bDeviceSubClass = 0x0000
> bDeviceProtocol = 0x0000
> bMaxPacketSize0 = 0x0040
> idVendor = 0x090c
> idProduct = 0x6200
> bcdDevice = 0x0100
> iManufacturer = 0x0001 <Silicon Motion, Inc.>
> iProduct = 0x0002 <Generic USB2.0 card >
> iSerialNumber = 0x0003 <12345678901234567890>
> bNumConfigurations = 0x0001
>
> [2]:
> 448 USB_QUIRK(YEDATA, FLASHBUSTERU, 0x0081, 0xFFFF,
> UQ_MSC_FORCE_WIRE_CBI_I, 449 UQ_MSC_FORCE_PROTO_UFI,
> UQ_MSC_NO_RS_CLEAR_UA, UQ_MSC_FLOPPY_SPEED, 450
> UQ_MSC_NO_GETMAXLUN),
> 451 USB_QUIRK(ZORAN, EX20DSC, 0x0000, 0xffff,
> UQ_MSC_FORCE_WIRE_CBI, 452 UQ_MSC_FORCE_PROTO_ATAPI),
> 453 USB_QUIRK(MEIZU, M6_SL, 0x0000, 0xffff,
> UQ_MSC_FORCE_WIRE_BBB, 454 UQ_MSC_FORCE_PROTO_SCSI,
> UQ_MSC_NO_INQUIRY, UQ_MSC_NO_SYNC_CACHE), 455 USB_QUIRK(ACTIONS,
> MP4, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, 456
> UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), 457
> USB_QUIRK(ASUS, GMSC, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), 458
> USB_QUIRK(CHIPSBANK, USBMEMSTICK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
> 459 USB_QUIRK(CHIPSBANK, USBMEMSTICK1, 0x0000, 0xffff,
> UQ_MSC_NO_SYNC_CACHE), 460 USB_QUIRK(NEWLINK, USB2IDEBRIDGE,
> 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),
More information about the freebsd-usb
mailing list