-
Alan Stern authored
This patch addresses a problem common among digital cameras that use the CB transport. Namely, too much auto-sensing confuses them; particularly auto-sensing after INQUIRY. I've made some traces of a Windows 2000 driver to see what it does (data sent to Andries Brouwer for inclusion on his web site; I'll announce when it's ready for viewing). Basically, it almost never sends REQUEST SENSE unless it received a STALL from the device. That's a pretty bogus way to operate, because it means that Windows has no way to tell when the device has finished executing a command if the command doesn't involve an IN transfer. Even after a lengthy WRITE, Windows continues to transmit more commands without regard for whether or not they will get overwritten in the device's internal buffer (and hence not executed). Indeed, exactly that happened with some of the commands in one of my traces. To be safe, we must follow every non-IN transfer with an auto-sense, but IN transfers that don't stall can be considered to have succeeded. That's what this patch does. It reduces auto-sensing by a considerable factor, probably close to half. It also fixes the problem with INQUIRY, since INQUIRY involves an IN data transfer.
35f751d9