于 2013/1/10 23:14, Alan Stern 写道:
On Thu, 10 Jan 2013, Lan Tianyu wrote:

xhci driver divides the root hub into two logical hubs which work
respectively for usb 2.0 and usb 3.0 devices. They are independent
devices in the usb core. But in the ACPI table, it's one device node
and all usb2.0 and usb3.0 ports are under it. Binding usb port with
its acpi node needs the raw port number which is reflected in the xhci
extended capabilities table. This patch is to add find_raw_port_number
callback to struct hc_driver() and fill it with xhci_find_raw_port_number().

Signed-off-by: Lan Tianyu <tianyu....@intel.com>
---
  drivers/usb/core/hcd.c      |    9 +++++++++
  drivers/usb/host/xhci-pci.c |    1 +
  drivers/usb/host/xhci.c     |   22 ++++++++++++++++++++++
  drivers/usb/host/xhci.h     |    1 +
  include/linux/usb/hcd.h     |    2 ++
  5 files changed, 35 insertions(+)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 4225d5e..7d695ea 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2364,6 +2364,15 @@ int usb_hcd_is_primary_hcd(struct usb_hcd *hcd)
  }
  EXPORT_SYMBOL_GPL(usb_hcd_is_primary_hcd);

+int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1)
+{
+       if (!hcd->driver->find_raw_port_number)
+               return port1;
+
+       return hcd->driver->find_raw_port_number(hcd, port1);
+}
+EXPORT_SYMBOL_GPL(usb_hcd_find_raw_port_number);

Does this really need to be EXPORTed?  The routine doesn't have any
users outside of usbcore.
Yeah. I will remove it.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to