Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

usb_match_id(9) [centos man page]

USB_MATCH_ID(9) 						   USB Core APIs						   USB_MATCH_ID(9)

NAME
usb_match_id - find first usb_device_id matching device or interface SYNOPSIS
const struct usb_device_id * usb_match_id(struct usb_interface * interface, const struct usb_device_id * id); ARGUMENTS
interface the interface of interest id array of usb_device_id structures, terminated by zero entry DESCRIPTION
usb_match_id searches an array of usb_device_id's and returns the first one matching the device or interface, or null. This is used when binding (or rebinding) a driver to an interface. Most USB device drivers will use this indirectly, through the usb core, but some layered driver frameworks use it directly. These device tables are exported with MODULE_DEVICE_TABLE, through modutils, to support the driver loading functionality of USB hotplugging. RETURN
The first matching usb_device_id, or NULL. WHAT MATCHES
The "match_flags" element in a usb_device_id controls which members are used. If the corresponding bit is set, the value in the device_id must match its corresponding member in the device or interface descriptor, or else the device_id does not match. "driver_info" is normally used only by device drivers, but you can create a wildcard "matches anything" usb_device_id as a driver's "modules.usbmap" entry if you provide an id with only a nonzero "driver_info" field. If you do this, the USB device driver's probe routine should use additional intelligence to decide whether to bind to the specified interface. WHAT MAKES GOOD USB_DEVICE_ID TABLES The match algorithm is very simple, so that intelligence in driver selection must come from smart driver id records. Unless you have good reasons to use another selection policy, provide match elements only in related groups, and order match specifiers from specific to general. Use the macros provided for that purpose if you can. The most specific match specifiers use device descriptor data. These are commonly used with product-specific matches; the USB_DEVICE macro lets you provide vendor and product IDs, and you can also match against ranges of product revisions. These are widely used for devices with application or vendor specific bDeviceClass values. Matches based on device class/subclass/protocol specifications are slightly more general; use the USB_DEVICE_INFO macro, or its siblings. These are used with single-function devices where bDeviceClass doesn't specify that each interface has its own class. Matches based on interface class/subclass/protocol are the most general; they let drivers bind to any interface on a multiple-function device. Use the USB_INTERFACE_INFO macro, or its siblings, to match class-per-interface style devices (as recorded in bInterfaceClass). Note that an entry created by USB_INTERFACE_INFO won't match any interface if the device class is set to Vendor-Specific. This is deliberate; according to the USB spec the meanings of the interface class/subclass/protocol for these devices are also vendor-specific, and hence matching against a standard product class wouldn't work anyway. If you really want to use an interface-based match for such a device, create a match record that also specifies the vendor ID. (Unforunately there isn't a standard macro for creating records like this.) Within those groups, remember that not all combinations are meaningful. For example, don't give a product version range without vendor and product IDs; or specify a protocol without its associated class and subclass. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 USB_MATCH_ID(9)

Check Out this Related Man Page

CDCE(4) 						   BSD Kernel Interfaces Manual 						   CDCE(4)

NAME
cdce -- USB Communication Device Class Ethernet driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device uhci device ohci device usb device cdce Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_cdce_load="YES" DESCRIPTION
The cdce driver provides support for USB Host-to-Host (aka USB-to-USB) and USB-to-Ethernet bridges based on the USB Communication Device Class (CDC) and Ethernet subclass. The USB bridge appears as a regular network interface on both sides, transporting Ethernet frames. For more information on configuring this device, see ifconfig(8). USB 1.x bridges support speeds of up to 12Mbps, and USB 2.0 speeds of up to 480Mbps. Packets are received and transmitted over separate USB bulk transfer endpoints. The cdce driver does not support different media types or options. HARDWARE
The following devices are supported by the cdce driver: o Prolific PL-2501 Host-to-Host Bridge Controller o Sharp Zaurus PDA o Terayon TJ-715 DOCSIS Cable Modem DIAGNOSTICS
cdce%d: no union descriptor The driver could not fetch an interface descriptor from the USB device. For a manually added USB vendor/prod- uct, the CDCE_NO_UNION flag can be tried to work around the missing descriptor. cdce%d: no data interface cdce%d: could not read endpoint descriptor cdce%d: unexpected endpoint cdce%d: could not find data bulk in/out For a manually added USB vendor/product, these errors indicate that the bridge is not compatible with the driver. cdce%d: watchdog timeout A packet was queued for transmission and a transmit command was issued, however the device failed to acknowledge the transmission before a timeout expired. cdce%d: no memory for rx list -- packet dropped! Memory allocation through MGETHDR or MCLGET failed, the system is running low on mbufs. cdce%d: abort/close rx/tx pipe failed cdce%d: rx/tx list init failed cdce%d: open rx/tx pipe failed cdce%d: usb error on rx/tx SEE ALSO
arp(4), intro(4), ipheth(4), netintro(4), urndis(4), usb(4), ifconfig(8) Universal Serial Bus Class Definitions for Communication Devices, http://www.usb.org/developers/devclass_docs/usbcdc11.pdf. Data sheet Prolific PL-2501 Host-to-Host Bridge/Network Controller, http://tech.prolific.com.tw/visitor/fcabdl.asp?fid=20679530. HISTORY
The cdce device driver first appeared in OpenBSD 3.6, NetBSD 3.0 and FreeBSD 6.0. AUTHORS
The cdce driver was written by Craig Boston <craig@tobuj.gank.org> based on the aue(4) driver written by Bill Paul <wpaul@windriver.com> and ported to OpenBSD by Daniel Hartmeier <dhartmei@openbsd.org>. CAVEATS
Many USB devices notoriously fail to report their class and interfaces correctly. Undetected products might work flawlessly when their ven- dor and product IDs are added to the driver manually. BSD
September 25, 2014 BSD
Man Page