summaryrefslogtreecommitdiff
path: root/drivers/usb/core/usb-acpi.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-27 01:14:54 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-27 01:14:54 +0400
commitd78658d45eef74f18d78bc49801f90a0c50fbea0 (patch)
tree06fd2856a929eaf745b0f68fa3e8d732d52bedad /drivers/usb/core/usb-acpi.c
parenteba0e3c3a0ba7b96f01cbe997680f6a4401a0bfc (diff)
parenta83d6755814e4614ba77e15d82796af0f695c6b8 (diff)
downloadlinux-d78658d45eef74f18d78bc49801f90a0c50fbea0.tar.xz
Merge tag 'for-usb-linus-2013-03-26' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
Misc xHCI fixes for 3.9 Hi Greg, Here's a couple of fixes for the xHCI driver. Three patches are nothing major: build warning fix, macro field width fix, and removing some unnecessary log spam. The only interesting thing here is Tianyu's two patches to fix the USB port connection type discovery, for the USB port power off mechanism. This adds new USB host API, but as discussed, it's necessary to avoid powering off the wrong USB port. It's not marked for backport to stable kernels, since the sysfs mechanism to manually power off a port didn't go in until 3.9. I've smoke tested these, including system suspend, USB device suspend, and rocking out in my cube with a pair of USB headphones. They look fine to me. Hibernate is currently broken on my system, due to some nouveau MMIO read faults. I'll report that separately. Sarah Sharp
Diffstat (limited to 'drivers/usb/core/usb-acpi.c')
-rw-r--r--drivers/usb/core/usb-acpi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index b6f4bad3f756..255c14464bf2 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -15,6 +15,7 @@
#include <linux/kernel.h>
#include <linux/acpi.h>
#include <linux/pci.h>
+#include <linux/usb/hcd.h>
#include <acpi/acpi_bus.h>
#include "usb.h"
@@ -188,8 +189,13 @@ static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
* connected to.
*/
if (!udev->parent) {
- *handle = acpi_get_child(DEVICE_ACPI_HANDLE(&udev->dev),
+ struct usb_hcd *hcd = bus_to_hcd(udev->bus);
+ int raw_port_num;
+
+ raw_port_num = usb_hcd_find_raw_port_number(hcd,
port_num);
+ *handle = acpi_get_child(DEVICE_ACPI_HANDLE(&udev->dev),
+ raw_port_num);
if (!*handle)
return -ENODEV;
} else {