aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r--drivers/usb/host/ehci-hub.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 382587c4457c..d613dc9e9c05 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -875,3 +875,13 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum)
875 set_owner(ehci, --portnum, PORT_OWNER); 875 set_owner(ehci, --portnum, PORT_OWNER);
876} 876}
877 877
878static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum)
879{
880 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
881 u32 __iomem *reg;
882
883 if (ehci_is_TDI(ehci))
884 return 0;
885 reg = &ehci->regs->port_status[portnum - 1];
886 return ehci_readl(ehci, reg) & PORT_OWNER;
887}