CVSROOT:        /cvs
Module name:    src
Changes by:     k...@cvs.openbsd.org    2020/01/21 20:43:13

Modified files:
        sys/dev/usb    : umass.c 

Log message:
Some devices do not update the TRB transfer residual information as
STALL'ing. So use the standard's recommended csw.dCSWDataResidue and
copy data only on successful completion of the request.

Fixes issue where N bytes are requested, M bytes are returned, and the
device STALL's because it has no more data to give. Thus resulting in
no data is copied to the user buffer but the claim being made that
said buffer now contains M new bytes of valid data.

e.g. when cdio(1) asks for 4096 bytes of media data and only 96 bytes
are provided by the CDRW device.

Feeback, cluebats, fixes and ok patrick@

Reply via email to