Re: [PATCH 10/14] uas: correctly label reset functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <oneukum@xxxxxxxx>
---
  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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux