projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: Allow autosuspend delay to equal 0
[powerpc.git]
/
drivers
/
usb
/
core
/
hub.c
diff --git
a/drivers/usb/core/hub.c
b/drivers/usb/core/hub.c
index
50c0db1
..
19abe81
100644
(file)
--- a/
drivers/usb/core/hub.c
+++ b/
drivers/usb/core/hub.c
@@
-119,8
+119,7
@@
MODULE_PARM_DESC(use_both_schemes,
"first one fails");
"first one fails");
-#ifdef DEBUG
-static inline char *portspeed (int portstatus)
+static inline char *portspeed(int portstatus)
{
if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED))
return "480 Mb/s";
{
if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED))
return "480 Mb/s";
@@
-129,7
+128,6
@@
static inline char *portspeed (int portstatus)
else
return "12 Mb/s";
}
else
return "12 Mb/s";
}
-#endif
/* Note that hdev or one of its children must be locked! */
static inline struct usb_hub *hdev_to_hub(struct usb_device *hdev)
/* Note that hdev or one of its children must be locked! */
static inline struct usb_hub *hdev_to_hub(struct usb_device *hdev)
@@
-1281,11
+1279,8
@@
int usb_new_device(struct usb_device *udev)
{
int err;
{
int err;
- /* Lock ourself into memory in order to keep a probe sequence
- * sleeping in a new thread from allowing us to be unloaded.
- */
- if (!try_module_get(THIS_MODULE))
- return -EINVAL;
+ /* Determine quirks */
+ usb_detect_quirks(udev);
err = usb_get_configuration(udev);
if (err < 0) {
err = usb_get_configuration(udev);
if (err < 0) {
@@
-1387,7
+1382,6
@@
int usb_new_device(struct usb_device *udev)
usb_autoresume_device(udev->parent);
exit:
usb_autoresume_device(udev->parent);
exit:
- module_put(THIS_MODULE);
return err;
fail:
return err;
fail:
@@
-1861,12
+1855,7
@@
static int remote_wakeup(struct usb_device *udev)
usb_lock_device(udev);
if (udev->state == USB_STATE_SUSPENDED) {
dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-");
usb_lock_device(udev);
if (udev->state == USB_STATE_SUSPENDED) {
dev_dbg(&udev->dev, "usb %sresume\n", "wakeup-");
- status = usb_autoresume_device(udev);
-
- /* Give the interface drivers a chance to do something,
- * then autosuspend the device again. */
- if (status == 0)
- usb_autosuspend_device(udev);
+ status = usb_external_resume_device(udev);
}
usb_unlock_device(udev);
return status;
}
usb_unlock_device(udev);
return status;
@@
-1990,13
+1979,6
@@
static inline int remote_wakeup(struct usb_device *udev)
#define hub_resume NULL
#endif
#define hub_resume NULL
#endif
-void usb_resume_root_hub(struct usb_device *hdev)
-{
- struct usb_hub *hub = hdev_to_hub(hdev);
-
- kick_khubd(hub);
-}
-
/* USB 2.0 spec, 7.1.7.3 / fig 7-29:
*
/* USB 2.0 spec, 7.1.7.3 / fig 7-29:
*
@@
-2440,7
+2422,7
@@
static void hub_port_connect_change(struct usb_hub *hub, int port1,
if (portchange & USB_PORT_STAT_C_CONNECTION) {
status = hub_port_debounce(hub, port1);
if (portchange & USB_PORT_STAT_C_CONNECTION) {
status = hub_port_debounce(hub, port1);
- if (status < 0) {
+ if (status < 0
&& printk_ratelimit()
) {
dev_err (hub_dev,
"connect-debounce failed, port %d disabled\n",
port1);
dev_err (hub_dev,
"connect-debounce failed, port %d disabled\n",
port1);