Source-Changes archive

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

CVS commit: src/sys/dev/usb



Module Name:    src
Committed By:   manu
Date:           Thu Nov 15 02:35:23 UTC 2018

Modified Files:
        src/sys/dev/usb: usb_quirks.c usb_quirks.h usbdi.c

Log Message:
Workaround NBP PN533 USB toggle bit bugs

The PN533 is known to mishandle the USB toggle bit, causing replies to
be filtered out by the host controller. As a result, the kernel sees
a timed out operation.

Vendor errata suggests that userland applications should detect the
situation on read timeout, and write a dumy frame to resync the toggle bit.
NFC Tools's libnfc does just that, but in order to succeed, the dummy
frame write must not be reported as timed out.

We therefore introduce a new USB quirk for devices known to miss output
acks. When that occur, we pretend that the operation succeeded, leaving
userland the duty to check that everything went okay.

This workaround lets libnfc recover from interrupted communications
without the need te reboot the system.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/dev/usb/usb_quirks.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/usb_quirks.h
cvs rdiff -u -r1.178 -r1.179 src/sys/dev/usb/usbdi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index