summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e0eb1b)
raw | patch | inline | side by side (parent: 4e0eb1b)
author | Ajay Kumar Gupta <ajay.gupta@ti.com> | |
Fri, 21 Oct 2011 05:02:12 +0000 (10:32 +0530) | ||
committer | Vaibhav Hiremath <hvaibhav@ti.com> | |
Mon, 23 Jan 2012 19:14:33 +0000 (00:44 +0530) |
Fixes kernel panic seen during g_ether.ko module insertion performed
after the FSG gadget rmmod.
Ether gadget doesn't reset the usb_ep(s) during initialization and
so was getting the previous gadget's usb_ep->desc data.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
after the FSG gadget rmmod.
Ether gadget doesn't reset the usb_ep(s) during initialization and
so was getting the previous gadget's usb_ep->desc data.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
index 753aa0683ac12c483ed34e23543063182bc15536..a9f58da54304cc51866ecd2f067f51a3a3bdaa6b 100644 (file)
list_for_each_entry (ep, &gadget->ep_list, ep_list) {
ep->driver_data = NULL;
+ ep->desc = NULL;
}
#ifdef MANY_ENDPOINTS
in_epnum = 0;
index 11c07cb7d3372b967725dbaf1c3d236193603433..58d91729a34ae4661a0fa0fbb7759852fb610130 100644 (file)
status = -ENODEV;
/* allocate instance-specific endpoints */
+ usb_ep_autoconfig_reset(cdev->gadget);
ep = usb_ep_autoconfig(cdev->gadget, &fs_ecm_in_desc);
if (!ep)
goto fail;
index b6e6dac0d3376629947aab6ec35194f9535cc1d6..661449003cc289ce56b6c4f201f770129ef2542f 100644 (file)
status = -ENODEV;
/* allocate instance-specific endpoints */
+ usb_ep_autoconfig_reset(cdev->gadget);
ep = usb_ep_autoconfig(cdev->gadget, &fs_in_desc);
if (!ep)
goto fail;
index c1540648125a8c24f91317612806a17aae827c44..85bd9bd7081d41fee33e93f0cca53ec67a73490c 100644 (file)
status = -ENODEV;
/* allocate instance-specific endpoints */
+ usb_ep_autoconfig_reset(cdev->gadget);
ep = usb_ep_autoconfig(cdev->gadget, &fs_subset_in_desc);
if (!ep)
goto fail;