]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usbip: vhci-hcd: Add vhci struct
authorYuyang Du <yuyang.du@intel.com>
Thu, 8 Jun 2017 05:04:06 +0000 (13:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Jun 2017 08:51:09 +0000 (10:51 +0200)
In order to support SuperSpeed devices, a USB3 HCD is added to
share the USB2 HCD. As a result, a VHCI is composed of two
vhci_hcds associated with the two HCDs respectively. So we add
another level of abstraction, vhci, and thus this vhci structure.

Signed-off-by: Yuyang Du <yuyang.du@intel.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vhci.h

index bff472f748a9ccfac8ba715b2f51bd9c368ef58f..995958494263bf7c2ff4f2d886af5c66b2b42488 100644 (file)
@@ -87,8 +87,17 @@ struct vhci_unlink {
 
 #define MAX_STATUS_NAME 16
 
-/* for usb_bus.hcpriv */
+struct vhci {
+       spinlock_t lock;
+
+       struct vhci_hcd *vhci_hcd_hs;
+       struct vhci_hcd *vhci_hcd_ss;
+};
+
+/* for usb_hcd.hcd_priv[0] */
 struct vhci_hcd {
+       struct vhci *vhci;
+
        spinlock_t lock;
 
        u32 port_status[VHCI_HC_PORTS];
@@ -108,6 +117,7 @@ struct vhci_hcd {
 
 extern int vhci_num_controllers;
 extern struct platform_device **vhci_pdevs;
+extern struct vhci *vhcis;
 extern struct attribute_group vhci_attr_group;
 
 /* vhci_hcd.c */