shrink uca.ibufsize from UCHCOMIBUFSIZE to wMaxPacketSize of bulk-in pipe
authoruaa <uaa@openbsd.org>
Wed, 26 Jan 2022 12:05:33 +0000 (12:05 +0000)
committeruaa <uaa@openbsd.org>
Wed, 26 Jan 2022 12:05:33 +0000 (12:05 +0000)
commit7f0d0f7f5039e92e1462502c79c17f8cb5c9e420
treedfbd037046c34ff896425d255823db73a8012ef4
parent440468a9c9cce302607c3a97f45a433e6ff0fba4
shrink uca.ibufsize from UCHCOMIBUFSIZE to wMaxPacketSize of bulk-in pipe

USB transaction is finished when whole requested data has transferred,
or short packet (the size is less than wMaxPacketSize) has sent.

UCHCOMIBUFSIZE(256) was multiply of wMaxPacketSize(32). When CH340 sends
exact wMaxPacketSize byte packet, this will cause Rx jam problem
due to transaction is not finished.

Now uca.ibufsize is same as wMaxPacketSize to avoid this problem.

ok kevlo@
sys/dev/usb/uchcom.c