From owner-freebsd-usb@FreeBSD.ORG Fri Jan 7 01:19:08 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1BA5106564A for ; Fri, 7 Jan 2011 01:19:08 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA11.westchester.pa.mail.comcast.net (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) by mx1.freebsd.org (Postfix) with ESMTP id 752358FC13 for ; Fri, 7 Jan 2011 01:19:08 +0000 (UTC) Received: from omta02.westchester.pa.mail.comcast.net ([76.96.62.19]) by QMTA11.westchester.pa.mail.comcast.net with comcast id sQ2o1f00r0QuhwU5BR5tkt; Fri, 07 Jan 2011 01:05:53 +0000 Received: from koitsu.dyndns.org ([98.248.34.134]) by omta02.westchester.pa.mail.comcast.net with comcast id sR5q1f00H2tehsa3NR5r3m; Fri, 07 Jan 2011 01:05:52 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 55E559B422; Thu, 6 Jan 2011 17:05:48 -0800 (PST) Date: Thu, 6 Jan 2011 17:05:48 -0800 From: Jeremy Chadwick To: freebsd-usb@freebsd.org Message-ID: <20110107010548.GA2858@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: usb_quirk.c - ordering of quirks X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2011 01:19:08 -0000 (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! [1]: ugen7.2: 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 iProduct = 0x0002 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), -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |