On Thu, Dec 10, 2009 at 8:32 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Thu, 10 Dec 2009, Pratik Prajapati wrote: > >> Hi there, >> >> >> I'm facing an issue with patch of "debounce before unregistering" >> >> rerefence: >> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=commit;h=24618b0cd42f936cda461bdf6144670a5c925178 >> >> >> When I'm connecting USB pen drive, it doesn't get detected on my >> board. kernel linux-2.6.28 gives error "unable to enumerate USB device >> on port 1" >> >> But on linux-2.6.25 (on the same board) it works fine. >> >> To debug further I have traced this error message. >> >> >> With linux-2.6.25 kernel, >> >> file: driver/usb/core/hub.c >> function: hub_port_connect_change >> has portchange &= ~USB_PORT_STAT_C_CONNECTION; >> >> But in linux-2.6.28 kernel patch of "debounce before unregistering" is >> present. Which masks USB_PORT_STAT_C_CONNECTION as well as >> USB_PORT_STAT_C_ENABLE. > > Are you talking about this code? > > #ifdef CONFIG_USB_OTG > /* during HNP, don't repeat the debounce */ > if (hdev->bus->is_b_host) > portchange &= ~(USB_PORT_STAT_C_CONNECTION | > USB_PORT_STAT_C_ENABLE); > #endif Yes, I'm talking about this code only. > >> To experiment, I have changed the code to portchange &= >> ~USB_PORT_STAT_C_CONNECTION ( removed masking of >> USB_PORT_STAT_C_ENABLE) in linux-2.6.28. And my USB pen drive got >> detected with linux-2.6.28 also. >> >> >> Now I don't understand logic behind masking USB_PORT_STAT_C_ENABLE in >> portchange. >> >> Kindly explain me what could be the issue? > > That code should not affect you at all, since it runs only when your > controller is a B-host and that can never happen when you plug in a USB > pendrive. If it _does_ affect you then because your controller driver > must be doing something wrong (setting bus->is_b_host even when the > controller is an A-host). > > Alan Stern > > I'll double check in my controller driver, as per your inputs. Thank a lot for your inputs. -- Regards, Pratik PRAJAPATI -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html