Loading drivers/usb/core/hcd.c +10 −0 Original line number Diff line number Diff line Loading @@ -2301,6 +2301,16 @@ usb_hcd_get_xfer_ring_dma_addr(struct usb_device *udev, return hcd->driver->get_xfer_ring_dma_addr(hcd, udev, ep); } int usb_hcd_get_controller_id(struct usb_device *udev) { struct usb_hcd *hcd = bus_to_hcd(udev->bus); if (!HCD_RH_RUNNING(hcd)) return -EINVAL; return hcd->driver->get_core_id(hcd); } #ifdef CONFIG_PM int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg) Loading drivers/usb/core/usb.c +9 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,15 @@ dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, } EXPORT_SYMBOL(usb_get_xfer_ring_dma_addr); int usb_get_controller_id(struct usb_device *dev) { if (dev->state == USB_STATE_NOTATTACHED) return -EINVAL; return usb_hcd_get_controller_id(dev); } EXPORT_SYMBOL(usb_get_controller_id); /*-------------------------------------------------------------------*/ /* * __usb_get_extra_descriptor() finds a descriptor of specific type in the Loading drivers/usb/host/xhci.c +8 −0 Original line number Diff line number Diff line Loading @@ -4961,6 +4961,13 @@ dma_addr_t xhci_get_xfer_ring_dma_addr(struct usb_hcd *hcd, return 0; } int xhci_get_core_id(struct usb_hcd *hcd) { struct xhci_hcd *xhci = hcd_to_xhci(hcd); return xhci->core_id; } static const struct hc_driver xhci_hc_driver = { .description = "xhci-hcd", .product_desc = "xHCI Host Controller", Loading Loading @@ -5025,6 +5032,7 @@ static const struct hc_driver xhci_hc_driver = { .get_sec_event_ring_dma_addr = xhci_get_sec_event_ring_dma_addr, .get_xfer_ring_dma_addr = xhci_get_xfer_ring_dma_addr, .get_dcba_dma_addr = xhci_get_dcba_dma_addr, .get_core_id = xhci_get_core_id, }; void xhci_init_driver(struct hc_driver *drv, Loading drivers/usb/host/xhci.h +1 −0 Original line number Diff line number Diff line Loading @@ -2096,6 +2096,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1); void xhci_hc_died(struct xhci_hcd *xhci); int xhci_get_core_id(struct usb_hcd *hcd); #ifdef CONFIG_PM int xhci_bus_suspend(struct usb_hcd *hcd); Loading include/linux/usb.h +1 −0 Original line number Diff line number Diff line Loading @@ -816,6 +816,7 @@ extern dma_addr_t usb_get_sec_event_ring_dma_addr(struct usb_device *dev, extern dma_addr_t usb_get_dcba_dma_addr(struct usb_device *dev); extern dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, struct usb_host_endpoint *ep); extern int usb_get_controller_id(struct usb_device *dev); /* Sets up a group of bulk endpoints to support multiple stream IDs. */ extern int usb_alloc_streams(struct usb_interface *interface, Loading Loading
drivers/usb/core/hcd.c +10 −0 Original line number Diff line number Diff line Loading @@ -2301,6 +2301,16 @@ usb_hcd_get_xfer_ring_dma_addr(struct usb_device *udev, return hcd->driver->get_xfer_ring_dma_addr(hcd, udev, ep); } int usb_hcd_get_controller_id(struct usb_device *udev) { struct usb_hcd *hcd = bus_to_hcd(udev->bus); if (!HCD_RH_RUNNING(hcd)) return -EINVAL; return hcd->driver->get_core_id(hcd); } #ifdef CONFIG_PM int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg) Loading
drivers/usb/core/usb.c +9 −0 Original line number Diff line number Diff line Loading @@ -872,6 +872,15 @@ dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, } EXPORT_SYMBOL(usb_get_xfer_ring_dma_addr); int usb_get_controller_id(struct usb_device *dev) { if (dev->state == USB_STATE_NOTATTACHED) return -EINVAL; return usb_hcd_get_controller_id(dev); } EXPORT_SYMBOL(usb_get_controller_id); /*-------------------------------------------------------------------*/ /* * __usb_get_extra_descriptor() finds a descriptor of specific type in the Loading
drivers/usb/host/xhci.c +8 −0 Original line number Diff line number Diff line Loading @@ -4961,6 +4961,13 @@ dma_addr_t xhci_get_xfer_ring_dma_addr(struct usb_hcd *hcd, return 0; } int xhci_get_core_id(struct usb_hcd *hcd) { struct xhci_hcd *xhci = hcd_to_xhci(hcd); return xhci->core_id; } static const struct hc_driver xhci_hc_driver = { .description = "xhci-hcd", .product_desc = "xHCI Host Controller", Loading Loading @@ -5025,6 +5032,7 @@ static const struct hc_driver xhci_hc_driver = { .get_sec_event_ring_dma_addr = xhci_get_sec_event_ring_dma_addr, .get_xfer_ring_dma_addr = xhci_get_xfer_ring_dma_addr, .get_dcba_dma_addr = xhci_get_dcba_dma_addr, .get_core_id = xhci_get_core_id, }; void xhci_init_driver(struct hc_driver *drv, Loading
drivers/usb/host/xhci.h +1 −0 Original line number Diff line number Diff line Loading @@ -2096,6 +2096,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1); void xhci_hc_died(struct xhci_hcd *xhci); int xhci_get_core_id(struct usb_hcd *hcd); #ifdef CONFIG_PM int xhci_bus_suspend(struct usb_hcd *hcd); Loading
include/linux/usb.h +1 −0 Original line number Diff line number Diff line Loading @@ -816,6 +816,7 @@ extern dma_addr_t usb_get_sec_event_ring_dma_addr(struct usb_device *dev, extern dma_addr_t usb_get_dcba_dma_addr(struct usb_device *dev); extern dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, struct usb_host_endpoint *ep); extern int usb_get_controller_id(struct usb_device *dev); /* Sets up a group of bulk endpoints to support multiple stream IDs. */ extern int usb_alloc_streams(struct usb_interface *interface, Loading