Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name: src
Committed By: martin
Date: Sat Nov 29 17:01:47 UTC 2025
Modified Files:
src/sys/dev/usb [netbsd-9]: ucom.c
Log Message:
Pull up following revision(s) (requested by skrll in ticket #1983):
sys/dev/usb/ucom.c: revision 1.142
sys/dev/usb/ucom.c: revision 1.149
Fix ucom input queue corruption on open-after-close
When closing ucom(4) while a transfer was in progress, ucomreadcb()
is called with USBD_CANCELLED. Previously, the ucom_buffer was not
removed from sc->sc_ibuff_empty, leading to queue corruption when
reopening the device: ucomopen() calls ucomsubmitread(), which
queues the ucom_buffer again.
We fix this by making sure the ucom_buffer is removed from queue
on USBD_CANCELLED or USBD_IOERROR.
Approved by Nick Hudson, who rewrote the comment.
Add a KASSERT in ucomreadcb that the ucom_buffer removed from the
sc_ibuff_empty list is associated with the current xfer. This was
suggested by Taylor.
While I'm here fix a typo in the comment above this code.
To generate a diff of this commit:
cvs rdiff -u -r1.125.2.2 -r1.125.2.3 src/sys/dev/usb/ucom.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