summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorJingchang Lu <b35083@freescale.com>2012-07-26 16:37:38 +0800
committerJustin Waters <justin.waters@timesys.com>2012-09-12 16:49:55 -0400
commit02d27a69deed00b2866ca941cd3312000bd96b7a (patch)
treee3f75bff0333622353ef9826d00cbf845456b4b7 /drivers/usb/core/hub.c
parenta3a01b2d057f18efaf6143dda3bda98c1d22056a (diff)
ENGR00181396-2: high-speed USB device disconnection management
Detection of high-speed USB device disconnection should be enable on connection and disable on disconnection. Signed-off-by: Jingchang Lu <b35083@freescale.com>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 4ef23fe6789d..6ce6dd7b944b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -25,6 +25,8 @@
#include <linux/mutex.h>
#include <linux/freezer.h>
+#include <linux/fsl_devices.h>
+
#include <asm/uaccess.h>
#include <asm/byteorder.h>
@@ -37,6 +39,10 @@
extern void fsl_platform_set_usb_phy_dis(struct fsl_usb2_platform_data *pdata,
bool enable);
#endif
+#ifdef CONFIG_ARCH_MVF
+#define MVF_USB_HOST_HACK
+#include <linux/fsl_devices.h>
+#endif
/* if we are in debug mode, always announce new devices */
#ifdef DEBUG
#ifndef CONFIG_USB_ANNOUNCE_NEW_DEVICES
@@ -1661,7 +1667,10 @@ void usb_disconnect(struct usb_device **pdev)
usb_set_device_state(udev, USB_STATE_NOTATTACHED);
dev_info(&udev->dev, "USB disconnect, device number %d\n",
udev->devnum);
-
+#ifdef MVF_USB_HOST_HACK
+ if (udev->speed == USB_SPEED_HIGH)
+ fsl_platform_set_usb_phy_dis(NULL, 0);
+#endif
usb_lock_device(udev);
/* Free up all the children before we remove this device */
@@ -2906,7 +2915,10 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
udev->tt = &hub->tt;
udev->ttport = port1;
}
-
+#ifdef MVF_USB_HOST_HACK
+ if (udev->speed == USB_SPEED_HIGH)
+ fsl_platform_set_usb_phy_dis(NULL, 1);
+#endif
/* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way?
* Because device hardware and firmware is sometimes buggy in
* this area, and this is how Linux has done it for ages.