ignatenkobrain / rpms / kernel

Forked from rpms/kernel 3 years ago
Clone
Pablo Greco d6c4c4
From: Peter Robinson <pbrobinson@gmail.com>
Pablo Greco d6c4c4
Date: Thu, 3 May 2012 20:27:11 +0100
Pablo Greco d6c4c4
Subject: [PATCH] ARM: tegra: usb no reset
Pablo Greco d6c4c4
Pablo Greco d6c4c4
Patch for disconnect issues with storage attached to a
Pablo Greco d6c4c4
 tegra-ehci controller
Pablo Greco d6c4c4
---
Pablo Greco d6c4c4
 drivers/usb/core/hub.c | 7 +++++++
Pablo Greco d6c4c4
 1 file changed, 7 insertions(+)
Pablo Greco d6c4c4
Pablo Greco d6c4c4
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
Pablo Greco d6c4c4
index 43cb2f2e3b43..7f838ec11c81 100644
Pablo Greco d6c4c4
--- a/drivers/usb/core/hub.c
Pablo Greco d6c4c4
+++ b/drivers/usb/core/hub.c
Pablo Greco d6c4c4
@@ -4996,6 +4996,13 @@ static void hub_event(struct work_struct *work)
Pablo Greco d6c4c4
 			(u16) hub->change_bits[0],
Pablo Greco d6c4c4
 			(u16) hub->event_bits[0]);
Pablo Greco d6c4c4
 
Pablo Greco d6c4c4
+	/* Don't disconnect USB-SATA on TrimSlice */
Pablo Greco d6c4c4
+	if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) {
Pablo Greco d6c4c4
+		if ((hdev->state == 7) && (hub->change_bits[0] == 0) &&
Pablo Greco d6c4c4
+				(hub->event_bits[0] == 0x2))
Pablo Greco d6c4c4
+			hub->event_bits[0] = 0;
Pablo Greco d6c4c4
+	}
Pablo Greco d6c4c4
+
Pablo Greco d6c4c4
 	/* Lock the device, then check to see if we were
Pablo Greco d6c4c4
 	 * disconnected while waiting for the lock to succeed. */
Pablo Greco d6c4c4
 	usb_lock_device(hdev);