From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753413Ab0LWQIj (ORCPT ); Thu, 23 Dec 2010 11:08:39 -0500 Received: from netrider.rowland.org ([192.131.102.5]:35879 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753053Ab0LWQIh (ORCPT ); Thu, 23 Dec 2010 11:08:37 -0500 Date: Thu, 23 Dec 2010 11:08:36 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Anoop P A cc: Ralf Baechle , Greg Kroah-Hartman , Anatolij Gustschin , Anand Gadiyar , , , , Sarah Sharp , Oliver Neukum , Hans de Goede , Paul Mortier , Andiry Xu Subject: Re: [PATCH V2 2/2] MSP onchip root hub over current quirk. In-Reply-To: <1293096541.27661.46.camel@paanoop1-desktop> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Dec 2010, Anoop P A wrote: > > > + usb_detect_quirks(hdev); > > > > This line is wrong. usb_detect_quirks() gets called only once per > > device, when the device is initialized. Besides, you probably want to > > use a hub-specific flag for this rather than a device-specific flag. > > Can you point me to an example for the recommended way of doing the > hack. I don't have much exposure to USB subsystem. One example, suitable for PCI devices, can be found in drivers/usb/host/ehci-pci.c:ehci_pci_setup(). However the best approach would be for you to avoid adding any special-purpose code at all. Is it possible to handle overcurrent-change events in a way that will work just as well for normal hubs as for your MSP root hub? Alan Stern From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from netrider.rowland.org ([192.131.102.5]:33567 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with SMTP id S1491031Ab0LWQIk (ORCPT ); Thu, 23 Dec 2010 17:08:40 +0100 Date: Thu, 23 Dec 2010 11:08:36 -0500 (EST) From: Alan Stern Subject: Re: [PATCH V2 2/2] MSP onchip root hub over current quirk. In-Reply-To: <1293096541.27661.46.camel@paanoop1-desktop> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org To: Anoop P A Cc: Ralf Baechle , Greg Kroah-Hartman , Anatolij Gustschin , Anand Gadiyar , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Sarah Sharp , Oliver Neukum , Hans de Goede , Paul Mortier , Andiry Xu Message-ID: <20101223160836.TeAhG9agrQPwf-UhBGidC_6Xp3V4aOV_l-1ai5lCPqs@z> On Thu, 23 Dec 2010, Anoop P A wrote: > > > + usb_detect_quirks(hdev); > > > > This line is wrong. usb_detect_quirks() gets called only once per > > device, when the device is initialized. Besides, you probably want to > > use a hub-specific flag for this rather than a device-specific flag. > > Can you point me to an example for the recommended way of doing the > hack. I don't have much exposure to USB subsystem. One example, suitable for PCI devices, can be found in drivers/usb/host/ehci-pci.c:ehci_pci_setup(). However the best approach would be for you to avoid adding any special-purpose code at all. Is it possible to handle overcurrent-change events in a way that will work just as well for normal hubs as for your MSP root hub? Alan Stern