CVSROOT:        /cvs
Module name:    src
Changes by:     lan...@cvs.openbsd.org  2018/05/01 12:14:46

Modified files:
        sys/dev/usb    : ugen.c uhid.c umass_scsi.c uoak_subr.c usb.c 
                         usb_subr.c usbdi.h usbdivar.h uvideo.c 

Log message:
Simplify/refactor the way vendor/product/serial informations are
gathered from usb devices.

Cache them early in usbd_new_device() instead of querying the device
several times (the content wont change anyway) and uselessly generating
usb traffic (which could conflict with other access..)

The heuristic stays the same, first look in the device descriptor, then
try to match against usb_known_vendors/usb_known_products, then fallback
to use the idVendor/idProduct codes.

Remove the now useless 'usedev' parameter from usbd_fill_deviceinfo().

Tested from bsd & bsd.rd.

suggested by and ok mpi@

Reply via email to