Loading drivers/usb/core/hcd.c +8 −0 Original line number Diff line number Diff line Loading @@ -2412,6 +2412,14 @@ 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); } static int usb_hcd_request_irqs(struct usb_hcd *hcd, unsigned int irqnum, unsigned long irqflags) { Loading drivers/usb/core/usb-acpi.c +7 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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 { Loading drivers/usb/gadget/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ config USB_LPC32XX tristate "LPC32XX USB Peripheral Controller" depends on ARCH_LPC32XX select USB_ISP1301 select USB_OTG_UTILS help This option selects the USB device controller in the LPC32xx SoC. Loading drivers/usb/host/ehci-sched.c +2 −0 Original line number Diff line number Diff line Loading @@ -1206,6 +1206,7 @@ itd_urb_transaction ( memset (itd, 0, sizeof *itd); itd->itd_dma = itd_dma; itd->frame = 9999; /* an invalid value */ list_add (&itd->itd_list, &sched->td_list); } spin_unlock_irqrestore (&ehci->lock, flags); Loading Loading @@ -1907,6 +1908,7 @@ sitd_urb_transaction ( memset (sitd, 0, sizeof *sitd); sitd->sitd_dma = sitd_dma; sitd->frame = 9999; /* an invalid value */ list_add (&sitd->sitd_list, &iso_sched->td_list); } Loading drivers/usb/host/xhci-mem.c +8 −28 Original line number Diff line number Diff line Loading @@ -1022,44 +1022,24 @@ void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci, * is attached to (or the roothub port its ancestor hub is attached to). All we * know is the index of that port under either the USB 2.0 or the USB 3.0 * roothub, but that doesn't give us the real index into the HW port status * registers. Scan through the xHCI roothub port array, looking for the Nth * entry of the correct port speed. Return the port number of that entry. * registers. Call xhci_find_raw_port_number() to get real index. */ static u32 xhci_find_real_port_number(struct xhci_hcd *xhci, struct usb_device *udev) { struct usb_device *top_dev; unsigned int num_similar_speed_ports; unsigned int faked_port_num; int i; struct usb_hcd *hcd; if (udev->speed == USB_SPEED_SUPER) hcd = xhci->shared_hcd; else hcd = xhci->main_hcd; for (top_dev = udev; top_dev->parent && top_dev->parent->parent; top_dev = top_dev->parent) /* Found device below root hub */; faked_port_num = top_dev->portnum; for (i = 0, num_similar_speed_ports = 0; i < HCS_MAX_PORTS(xhci->hcs_params1); i++) { u8 port_speed = xhci->port_array[i]; /* * Skip ports that don't have known speeds, or have duplicate * Extended Capabilities port speed entries. */ if (port_speed == 0 || port_speed == DUPLICATE_ENTRY) continue; /* * USB 3.0 ports are always under a USB 3.0 hub. USB 2.0 and * 1.1 ports are under the USB 2.0 hub. If the port speed * matches the device speed, it's a similar speed port. */ if ((port_speed == 0x03) == (udev->speed == USB_SPEED_SUPER)) num_similar_speed_ports++; if (num_similar_speed_ports == faked_port_num) /* Roothub ports are numbered from 1 to N */ return i+1; } return 0; return xhci_find_raw_port_number(hcd, top_dev->portnum); } /* Setup an xHCI virtual device for a Set Address command */ Loading Loading
drivers/usb/core/hcd.c +8 −0 Original line number Diff line number Diff line Loading @@ -2412,6 +2412,14 @@ 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); } static int usb_hcd_request_irqs(struct usb_hcd *hcd, unsigned int irqnum, unsigned long irqflags) { Loading
drivers/usb/core/usb-acpi.c +7 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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 { Loading
drivers/usb/gadget/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ config USB_LPC32XX tristate "LPC32XX USB Peripheral Controller" depends on ARCH_LPC32XX select USB_ISP1301 select USB_OTG_UTILS help This option selects the USB device controller in the LPC32xx SoC. Loading
drivers/usb/host/ehci-sched.c +2 −0 Original line number Diff line number Diff line Loading @@ -1206,6 +1206,7 @@ itd_urb_transaction ( memset (itd, 0, sizeof *itd); itd->itd_dma = itd_dma; itd->frame = 9999; /* an invalid value */ list_add (&itd->itd_list, &sched->td_list); } spin_unlock_irqrestore (&ehci->lock, flags); Loading Loading @@ -1907,6 +1908,7 @@ sitd_urb_transaction ( memset (sitd, 0, sizeof *sitd); sitd->sitd_dma = sitd_dma; sitd->frame = 9999; /* an invalid value */ list_add (&sitd->sitd_list, &iso_sched->td_list); } Loading
drivers/usb/host/xhci-mem.c +8 −28 Original line number Diff line number Diff line Loading @@ -1022,44 +1022,24 @@ void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci, * is attached to (or the roothub port its ancestor hub is attached to). All we * know is the index of that port under either the USB 2.0 or the USB 3.0 * roothub, but that doesn't give us the real index into the HW port status * registers. Scan through the xHCI roothub port array, looking for the Nth * entry of the correct port speed. Return the port number of that entry. * registers. Call xhci_find_raw_port_number() to get real index. */ static u32 xhci_find_real_port_number(struct xhci_hcd *xhci, struct usb_device *udev) { struct usb_device *top_dev; unsigned int num_similar_speed_ports; unsigned int faked_port_num; int i; struct usb_hcd *hcd; if (udev->speed == USB_SPEED_SUPER) hcd = xhci->shared_hcd; else hcd = xhci->main_hcd; for (top_dev = udev; top_dev->parent && top_dev->parent->parent; top_dev = top_dev->parent) /* Found device below root hub */; faked_port_num = top_dev->portnum; for (i = 0, num_similar_speed_ports = 0; i < HCS_MAX_PORTS(xhci->hcs_params1); i++) { u8 port_speed = xhci->port_array[i]; /* * Skip ports that don't have known speeds, or have duplicate * Extended Capabilities port speed entries. */ if (port_speed == 0 || port_speed == DUPLICATE_ENTRY) continue; /* * USB 3.0 ports are always under a USB 3.0 hub. USB 2.0 and * 1.1 ports are under the USB 2.0 hub. If the port speed * matches the device speed, it's a similar speed port. */ if ((port_speed == 0x03) == (udev->speed == USB_SPEED_SUPER)) num_similar_speed_ports++; if (num_similar_speed_ports == faked_port_num) /* Roothub ports are numbered from 1 to N */ return i+1; } return 0; return xhci_find_raw_port_number(hcd, top_dev->portnum); } /* Setup an xHCI virtual device for a Set Address command */ Loading