Re: [usb-storage] usb: storage: suspicious code

2017-02-14 Thread Gustavo A. R. Silva
Hi Oliver, Quoting Oliver Neukum : Am Dienstag, den 14.02.2017, 23:06 -0600 schrieb Gustavo A. R. Silva: Hi, waitcount = 0; do { result = jumpshot_get_status(us); if (result != USB_STOR_TRANSPORT_GOOD) { // I have not experimented to find the smallest value.  

Re: [usb-storage] usb: storage: suspicious code

2017-02-14 Thread Oliver Neukum
Am Dienstag, den 14.02.2017, 23:06 -0600 schrieb Gustavo A. R. Silva: Hi, > waitcount = 0; > do { > result = jumpshot_get_status(us); > if (result != USB_STOR_TRANSPORT_GOOD) { > // I have not experimented to find the smallest > value. > // >   

usb: storage: suspicious code

2017-02-14 Thread Gustavo A. R. Silva
Hello, I ran into the following piece of code at drivers/usb/storage/jumpshot.c:305 (linux-next), and it seems a little bit suspicious: // read the result. apparently the bulk write can complete // before the jumpshot drive is finished writing. so we loop // here until we get a good return cod