linux-stable/drivers/usb/core
Sarah Sharp c563543784 usb: Make core allocate resources per PCI-device.
Introduce the notion of a PCI device that may be associated with more than
one USB host controller driver (struct usb_hcd).  This patch is the start
of the work to separate the xHCI host controller into two roothubs: a USB
3.0 roothub with SuperSpeed-only ports, and a USB 2.0 roothub with
HS/FS/LS ports.

One usb_hcd structure is designated to be the "primary HCD", and a pointer
is added to the usb_hcd structure to keep track of that.  A new function
call, usb_hcd_is_primary_hcd() is added to check whether the USB hcd is
marked as the primary HCD (or if it is not part of a roothub pair).  To
allow the USB core and xHCI driver to access either roothub in a pair, a
"shared_hcd" pointer is added to the usb_hcd structure.

Add a new function, usb_create_shared_hcd(), that does roothub allocation
for paired roothubs.  It will act just like usb_create_hcd() did if the
primary_hcd pointer argument is NULL.  If it is passed a non-NULL
primary_hcd pointer, it sets usb_hcd->shared_hcd and usb_hcd->primary_hcd
fields.  It will also skip the bandwidth_mutex allocation, and set the
secondary hcd's bandwidth_mutex pointer to the primary HCD's mutex.

IRQs are only allocated once for the primary roothub.

Introduce a new usb_hcd driver flag that indicates the host controller
driver wants to create two roothubs.  If the HCD_SHARED flag is set, then
the USB core PCI probe methods will allocate a second roothub, and make
sure that second roothub gets freed during rmmod and in initialization
error paths.

When usb_hc_died() is called with the primary HCD, make sure that any
roothubs that share that host controller are also marked as being dead.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-03-13 18:23:06 -07:00
..
buffer.c USB: Core: Fix minor coding style issues 2011-01-22 19:35:39 -08:00
config.c USB: remove the usb_host_ss_ep_comp structure 2010-05-20 13:21:40 -07:00
devices.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
devio.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
driver.c usb: Always return 0 or -EBUSY to the runtime PM core. 2011-03-13 18:07:07 -07:00
endpoint.c usb: set ep_dev async suspend should be later than device_initialize 2011-01-22 18:36:42 -08:00
file.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
generic.c USB: accept RNDIS configs if there's no alternative 2010-08-10 14:35:43 -07:00
hcd-pci.c usb: Make usb_hcd_pci_probe labels more descriptive. 2011-03-13 18:07:14 -07:00
hcd.c usb: Make core allocate resources per PCI-device. 2011-03-13 18:23:06 -07:00
hub.c usb: Change usb_hcd->bandwidth_mutex to a pointer. 2011-03-13 18:07:14 -07:00
inode.c fs: dcache remove dcache_lock 2011-01-07 17:50:23 +11:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile usb: makefile cleanup 2010-10-22 10:22:07 -07:00
message.c usb: Change usb_hcd->bandwidth_mutex to a pointer. 2011-03-13 18:07:14 -07:00
notify.c
otg_whitelist.h USB: fix codingstyle issues in drivers/usb/core/*.h 2008-02-01 14:35:07 -08:00
quirks.c USB: improve uses of usb_mark_last_busy 2010-11-16 14:04:22 -08:00
sysfs.c USB: use the runtime-PM autosuspend implementation 2010-11-16 14:03:41 -08:00
urb.c USB: output an error message when the pipe type doesn't match the endpoint type 2010-10-22 10:21:27 -07:00
usb.c USB: use the runtime-PM autosuspend implementation 2010-11-16 14:03:41 -08:00
usb.h USB: add helper to convert USB error codes 2011-01-22 19:35:38 -08:00