.. | .. |
---|
35 | 35 | |
---|
36 | 36 | /* our private defines. if this grows any larger, use your own .h file */ |
---|
37 | 37 | #define MAX_TRANSFER (PAGE_SIZE - 512) |
---|
38 | | -/* MAX_TRANSFER is chosen so that the VM is not stressed by |
---|
39 | | - allocations > PAGE_SIZE and the number of packets in a page |
---|
40 | | - is an integer 512 is the largest possible packet on EHCI */ |
---|
| 38 | +/* |
---|
| 39 | + * MAX_TRANSFER is chosen so that the VM is not stressed by |
---|
| 40 | + * allocations > PAGE_SIZE and the number of packets in a page |
---|
| 41 | + * is an integer 512 is the largest possible packet on EHCI |
---|
| 42 | + */ |
---|
41 | 43 | #define WRITES_IN_FLIGHT 8 |
---|
42 | 44 | /* arbitrarily chosen */ |
---|
43 | 45 | |
---|
.. | .. |
---|
228 | 230 | |
---|
229 | 231 | dev = file->private_data; |
---|
230 | 232 | |
---|
231 | | - /* if we cannot read at all, return EOF */ |
---|
232 | | - if (!dev->bulk_in_urb || !count) |
---|
| 233 | + if (!count) |
---|
233 | 234 | return 0; |
---|
234 | 235 | |
---|
235 | 236 | /* no concurrent readers */ |
---|
.. | .. |
---|
573 | 574 | dev->disconnected = 1; |
---|
574 | 575 | mutex_unlock(&dev->io_mutex); |
---|
575 | 576 | |
---|
| 577 | + usb_kill_urb(dev->bulk_in_urb); |
---|
576 | 578 | usb_kill_anchored_urbs(&dev->submitted); |
---|
577 | 579 | |
---|
578 | 580 | /* decrement our usage count */ |
---|