Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 155272 Details for
Bug 241002
USB2.0 hub disappears after overcurrent on another port
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for rhel4.5 (2.6.9-55.EL)
hub_reset_rhel4_c.patch (text/plain), 4.36 KB, created by
Stuart Hayes
on 2007-05-23 16:22:01 UTC
(
hide
)
Description:
patch for rhel4.5 (2.6.9-55.EL)
Filename:
MIME Type:
Creator:
Stuart Hayes
Created:
2007-05-23 16:22:01 UTC
Size:
4.36 KB
patch
obsolete
>diff -purN linux-2.6.9-55.EL_orig/drivers/usb/core/hub.c linux-2.6.9-55.EL_patch/drivers/usb/core/hub.c >--- linux-2.6.9-55.EL_orig/drivers/usb/core/hub.c 2007-05-22 11:01:03.000000000 -0400 >+++ linux-2.6.9-55.EL_patch/drivers/usb/core/hub.c 2007-05-22 15:30:11.000000000 -0400 >@@ -637,8 +637,6 @@ static void hub_quiesce(struct usb_hub * > flush_scheduled_work(); > } > >-#ifdef CONFIG_USB_SUSPEND >- > static void hub_reactivate(struct usb_hub *hub) > { > int status; >@@ -651,8 +649,6 @@ static void hub_reactivate(struct usb_hu > schedule_delayed_work(&hub->leds, LED_CYCLE_PERIOD); > } > >-#endif >- > static void hub_disconnect(struct usb_interface *intf) > { > struct usb_hub *hub = usb_get_intfdata (intf); >@@ -794,34 +790,17 @@ hub_ioctl(struct usb_interface *intf, un > } > } > >-/* caller has locked the hub and must own the device lock */ >-static int hub_reset(struct usb_hub *hub) >+/* caller has locked the hub device */ >+static void hub_pre_reset(struct usb_device *hdev) > { >- struct usb_device *hdev = hub->hdev; >+ struct usb_hub *hub = usb_get_intfdata(hdev->actconfig->interface[0]); > int i; > >- /* Disconnect any attached devices */ >- for (i = 0; i < hub->descriptor->bNbrPorts; i++) { >+ for (i = 0; i < hdev->maxchild; ++i) { > if (hdev->children[i]) > usb_disconnect(&hdev->children[i]); > } >- >- /* Attempt to reset the hub */ >- if (hub->urb) >- usb_kill_urb(hub->urb); >- else >- return -1; >- >- if (__usb_reset_device(hdev)) >- return -1; >- >- hub->urb->dev = hdev; >- if (usb_submit_urb(hub->urb, GFP_KERNEL)) >- return -1; >- >- hub_power_on(hub); >- >- return 0; >+ hub_quiesce(hub); > } > > static void usb_disconnect_nolock(struct usb_device **pdev) >@@ -862,24 +841,13 @@ static void usb_disconnect_nolock(struct > device_unregister(&udev->dev); > } > >-/* caller has locked the hub */ >-/* FIXME! This routine should be subsumed into hub_reset */ >-static void hub_start_disconnect(struct usb_device *hdev) >+/* caller has locked the hub device */ >+static void hub_post_reset(struct usb_device *hdev) > { >- struct usb_device *parent = hdev->parent; >- int i; >- >- /* Find the device pointer to disconnect */ >- if (parent) { >- for (i = 0; i < parent->maxchild; i++) { >- if (parent->children[i] == hdev) { >- usb_disconnect_nolock(&parent->children[i]); >- return; >- } >- } >- } >+ struct usb_hub *hub = usb_get_intfdata(hdev->actconfig->interface[0]); > >- dev_err(&hdev->dev, "cannot disconnect hub!\n"); >+ hub_reactivate(hub); >+ hub_power_on(hub); > } > > >@@ -2494,10 +2462,10 @@ static void hub_events(void) > dev_dbg (hub_dev, "resetting for error %d\n", > hub->error); > >- if (hub_reset(hub)) { >+ ret = __usb_reset_device(hdev); >+ if (ret) { > dev_dbg (hub_dev, >- "can't reset; disconnecting\n"); >- hub_start_disconnect(hdev); >+ "error resetting hub: %d\n", ret); > goto loop; > } > >@@ -2772,6 +2740,7 @@ int __usb_reset_device(struct usb_device > struct usb_device_descriptor descriptor = udev->descriptor; > int i, ret, port = -1; > struct usb_hub *hub; >+ int udev_is_a_hub = 0; > > if (udev->state == USB_STATE_NOTATTACHED || > udev->state == USB_STATE_SUSPENDED) { >@@ -2780,13 +2749,9 @@ int __usb_reset_device(struct usb_device > return -EINVAL; > } > >- /* FIXME: This should be legal for regular hubs. Root hubs may >- * have special requirements. */ >- if (udev->maxchild) { >- /* this requires hub- or hcd-specific logic; >- * see hub_reset() and OHCI hc_restart() >- */ >- dev_dbg(&udev->dev, "%s for hub!\n", __FUNCTION__); >+ if (!parent) { >+ /* this requires hcd-specific logic; see OHCI hc_restart() */ >+ dev_dbg(&udev->dev, "%s for root hub!\n", __FUNCTION__); > return -EISDIR; > } > >@@ -2802,6 +2767,14 @@ int __usb_reset_device(struct usb_device > return -ENOENT; > } > >+ /* If we're resetting an active hub, take some special actions */ >+ if (udev->actconfig && >+ udev->actconfig->interface[0]->dev.driver == >+ &hub_driver.driver) { >+ udev_is_a_hub = 1; >+ hub_pre_reset(udev); >+ } >+ > ret = hub_port_init(parent, udev, port); > if (ret < 0) > goto re_enumerate; >@@ -2815,7 +2788,7 @@ int __usb_reset_device(struct usb_device > } > > if (!udev->actconfig) >- return 0; >+ goto done; > > ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), > USB_REQ_SET_CONFIGURATION, 0, >@@ -2849,6 +2822,9 @@ int __usb_reset_device(struct usb_device > } > } > >+done: >+ if (udev_is_a_hub) >+ hub_post_reset(udev); > return 0; > > re_enumerate:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241002
: 155272