Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: CVS commit: src/sys/dev/usb



"Emmanuel Dreyfus" writes:
> Module Name:	src
> Committed By:	manu
> Date:		Thu Nov  8 02:11:54 UTC 2018
> 
> Modified Files:
> 	src/sys/dev/usb: usb_quirks.c usb_quirks.h usbdi_util.c usbdi_util.h
> 
> Log Message:
> Workaround PN533 USB descriptor corruption
> 
> During normal operation, the PN533 chip may corrupt its USB configuration,
> interface and endpoint descriptors. The device descriptor remains unaffected.
> 
> Since the descriptors are documented to be immutable, we can work around
> the problem by providing hard-coded descriptors instead of pulling them
> from the device.
> 
> Userland implementation such as NFC tools' libnfc use the same approach,
> but this kernel quirk is still necessary so that the device can be
> attached on reboot, after its USB descriptors got corrupted.

this is kind of ugly, in that the base kernel knows all about
this device even if it isn't in my kernel.

can you try to rework this such that the fake code is only
included if that device is actually attached?  ie, then it
will not be present if i don't build it, but only when the
driver is present (module or otherwise).

it's not quite the same as most of the quirk code which is
typically shared across multiple drivers and is generally
not a whole lot of code, so it would be nice for general
cleanliness if the majority of this new code lived in the
driver itself.. 

thanks.


.mrg.


Home | Main Index | Thread Index | Old Index