Hi, On Wed, Dec 15, 2010 at 04:44:13PM +0530, Pavankumar Kondeti wrote:
Introduce start_hnp callback function for HCD to receive notification from EHCI core that HNP enabled port is suspended. HCD may initiate HNP or notify the same to OTG via otg_start_hnp(). This patch is inspired by "USB: Hook start_hnp into ohci struct" (e8b24450). Change-Id: I8e258a6fdf42c166ea9cb3a727e4d3d28a8adc72 Signed-off-by: Pavankumar Kondeti <pkondeti@xxxxxxxxxxxxxx> --- drivers/usb/host/ehci-hub.c | 11 +++++++++++ drivers/usb/host/ehci.h | 2 ++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 796ea0c..65bf104 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -1018,6 +1018,17 @@ static int ehci_hub_control ( || (temp & PORT_RESET) != 0) goto error; +#ifdef CONFIG_USB_OTG + if (hcd->self.otg_port == (wIndex + 1) && + hcd->self.b_hnp_enable && + ehci->start_hnp) { + ehci_writel(ehci, temp | PORT_SUSPEND, + status_reg); + set_bit(wIndex, &ehci->suspended_ports); + ehci->start_hnp(ehci);
should you check if this pointer is valid before ? -- balbi -- 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