linux-kernel-test/drivers/usb/core
Lan Tianyu 3f5eb14135 usb: add find_raw_port_number callback to struct hc_driver()
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(), fill it with xhci_find_raw_port_number()
which will return raw port number and add a wrap usb_hcd_find_raw_port_number().

Otherwise, refactor xhci_find_real_port_number(). Using
xhci_find_raw_port_number() to get real index in the HW port status
registers instead of scanning through the xHCI roothub port array.
This can help to speed up.

All addresses in xhci->usb2_ports and xhci->usb3_ports array are
kown good ports and don't include following bad ports in the extended
capabilities talbe.
     (1) root port that doesn't have an entry
     (2) root port with unknown speed
     (3) root port that is listed twice and with different speeds.

So xhci_find_raw_port_number() will only return port num of good ones
and never touch bad ports above.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-03-25 10:39:17 -07:00
..
buffer.c USB: Core: Fix minor coding style issues 2011-01-22 19:35:39 -08:00
config.c usb: Fail a get config when the port is powered off. 2012-09-10 13:04:01 -07:00
devices.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
devio.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
driver.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
endpoint.c usb/endpoint: Set release callback in the struct device_type instead of in the device itself directly 2012-08-20 14:38:08 -07:00
file.c USB: rename the usb misc class from "usb" to "usbmisc" 2012-06-13 15:37:13 -07:00
generic.c usb/core: consider link speed while looking at bMaxPower 2013-01-11 16:16:01 -08:00
hcd-pci.c USB: xhci: correctly enable interrupts 2013-03-15 12:07:53 -07:00
hcd.c usb: add find_raw_port_number callback to struct hc_driver() 2013-03-25 10:39:17 -07:00
hub.c usb: forbid memory allocation with I/O during bus reset 2013-02-23 17:50:16 -08:00
hub.h usb: add usb port auto power off mechanism 2013-01-25 10:14:20 -08:00
Kconfig USB: remove CONFIG_EXPERIMENTAL dependancies 2012-09-17 23:00:15 -07:00
Makefile usb: Add driver/usb/core/(port.c,hub.h) files 2013-01-18 15:49:00 -08:00
message.c usb/core: consider link speed while looking at bMaxPower 2013-01-11 16:16:01 -08:00
notify.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
otg_whitelist.h
port.c Revert "usb: Register usb port's acpi power resources" 2013-01-29 07:33:07 -08:00
quirks.c USB: Add device quirk for Microsoft VX700 webcam 2013-01-11 16:01:07 -08:00
sysfs.c usb/core: consider link speed while looking at bMaxPower 2013-01-11 16:16:01 -08:00
urb.c USB: report submission of active URBs 2012-11-11 18:10:46 -08:00
usb-acpi.c ACPI / glue: Add .match() callback to struct acpi_bus_type 2013-03-04 14:23:40 +01:00
usb.c usb-core: remove CONFIG_HOTPLUG ifdefs 2012-11-21 13:27:16 -08:00
usb.h Revert "usb: Register usb port's acpi power resources" 2013-01-29 07:33:07 -08:00