Hello.

On 02/17/2016 06:50 PM, Oliver Neukum wrote:

A reset based on usb_reset_device() will reset the whole
host, not just a bus. We should use the correct entry.

Signed-off-by: Oliver Neukum <oneu...@suse.com>
---
  drivers/usb/storage/uas.c | 33 +++++++++++++++++++++++++++++++--
  1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 31ff1a0..f1eaa93 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
[...]
@@ -492,6 +494,20 @@ static void uas_tmf_cmplt(struct urb *urb)
        if (status < 0) {
                devinfo->deathrow = NULL;
                complete(&devinfo->deathknell);
+               switch (status) {
+               case -ESHUTDOWN:
+               case -ENODEV:
+                       devinfo->tmf_catastrophic = true;
+                       break;
+               case -EPIPE:
+               /* small packages, hence no partial transmission */

   Not packets?

+               case -EILSEQ:
+               case -EPROTO:
+                       devinfo->tmf_error = true;
+                       break;
+               default:
+                       break;
+               }
        }

        /*
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to