Source-Changes archive

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

CVS commit: [netbsd-8] src/sys/dev/usb



Module Name:    src
Committed By:   martin
Date:           Tue Nov 20 16:05:38 UTC 2018

Modified Files:
        src/sys/dev/usb [netbsd-8]: usb_quirks.c usb_quirks.h usbdi.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #1099):

        sys/dev/usb/usb_quirks.c: revision 1.90
        sys/dev/usb/usbdi.c: revision 1.179
        sys/dev/usb/usb_quirks.h: revision 1.29
        sys/dev/usb/usbdi.c: revision 1.180

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.

 -

Build fix
>From David H. Gutteridge


To generate a diff of this commit:
cvs rdiff -u -r1.86.8.1 -r1.86.8.2 src/sys/dev/usb/usb_quirks.c
cvs rdiff -u -r1.27.10.1 -r1.27.10.2 src/sys/dev/usb/usb_quirks.h
cvs rdiff -u -r1.173.2.3 -r1.173.2.4 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