Re: [PATCH 2/9] usbip: vhci-hcd: Add vhci struct
On Fri, Apr 14, 2017 at 11:29:14AM +0200, Oliver Neukum wrote: > > > what is the motivation for this change? That is the way XHCI > > > does it. But why do that when you export something over > > > a network? Are you ever going to use both VHCIs? > > > > I, a usbip client, could use a LowSpeed device and a SuperSpeed > > device from usbip host/hosts at the same time. Does that answer > > your question? > > Only partially, because the problem already exists if you use a > HighSpeed and a LowSpeed device. Then the question is whether we can have a single HCD that supports all speeds, which was my question, yet I haven't known the answer. As a result, I just followed the SuperSpeed patch implemented in dummy_hcd. Thanks, Yuyang -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/9] usbip: vhci-hcd: Add vhci struct
Am Freitag, den 14.04.2017, 06:34 +0800 schrieb Yuyang Du: > Hi Oliver, > > > > > what is the motivation for this change? That is the way XHCI > > does it. But why do that when you export something over > > a network? Are you ever going to use both VHCIs? > > I, a usbip client, could use a LowSpeed device and a SuperSpeed > device from usbip host/hosts at the same time. Does that answer > your question? Only partially, because the problem already exists if you use a HighSpeed and a LowSpeed device. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/9] usbip: vhci-hcd: Add vhci struct
Hi Oliver, > what is the motivation for this change? That is the way XHCI > does it. But why do that when you export something over > a network? Are you ever going to use both VHCIs? I, a usbip client, could use a LowSpeed device and a SuperSpeed device from usbip host/hosts at the same time. Does that answer your question? Thanks, Yuyang -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/9] usbip: vhci-hcd: Add vhci struct
Am Mittwoch, den 12.04.2017, 07:13 +0800 schrieb Yuyang Du: > 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. > Hi, what is the motivation for this change? That is the way XHCI does it. But why do that when you export something over a network? Are you ever going to use both VHCIs? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/9] usbip: vhci-hcd: Add vhci struct
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--- drivers/usb/usbip/vhci.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/usb/usbip/vhci.h b/drivers/usb/usbip/vhci.h index bff472f..9959584 100644 --- a/drivers/usb/usbip/vhci.h +++ b/drivers/usb/usbip/vhci.h @@ -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 */ -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html