Re: [RFC 4/5] USB: EHCI: Notify HCD about HNP enabled port suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux