linux/drivers/staging/usbip
Johan Hovold fe98267be9 USB: usbip: fix nonconforming hub descriptor
commit ec963b412a upstream.

Fix up the root-hub descriptor to accommodate the variable-length
DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as
removable (and leaving the reserved bit zero unset).

Also add a build-time constraint on VHCI_HC_PORTS which must never be
greater than USB_MAXCHILDREN (but this was only enforced through a
KConfig constant).

This specifically fixes the descriptor layout whenever VHCI_HC_PORTS is
greater than seven (default is 8).

Fixes: 04679b3489 ("Staging: USB/IP: add client driver")
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Cc: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16:
 - s/VHCI_HC_PORTS/VHCI_NPORTS/
 - Adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-09-15 18:29:41 +01:00
..
uapi staging/usbip: add uapi header to export usbip kernel interfaces 2014-03-04 16:12:14 -08:00
userspace USB driver patches for 3.16-rc1 2014-06-03 09:11:20 -07:00
Kconfig Kconfig: Remove useless "default N" lines 2014-02-20 14:38:06 +01:00
Makefile staging: usbip: edit Kconfig and rename CONFIG options 2011-05-12 09:17:57 -07:00
README staging: usbip: README: we need to document the protocol 2011-06-07 14:08:51 -07:00
stub.h staging: usbip: trigger driver probing after unbinding from usbip-host 2014-03-08 22:48:11 -08:00
stub_dev.c Staging: usbip: missing a blank lines after declarations 2014-05-24 01:59:36 +09:00
stub_main.c staging: usbip: trigger driver probing after unbinding from usbip-host 2014-03-08 22:48:11 -08:00
stub_rx.c staging: usbip: let client choose device configuration 2014-03-08 22:48:11 -08:00
stub_tx.c staging: usbip: use kcalloc instead of kzalloc for array allocations 2014-05-24 04:38:34 +09:00
usbip_common.c USB: usbip: fix potential out-of-bounds write 2016-05-01 00:06:11 +02:00
usbip_common.h Staging: usbip: missing a blank lines after declarations 2014-05-24 01:59:36 +09:00
usbip_event.c staging: usbip: Renaming pr_warning function 2013-05-13 13:39:31 -07:00
usbip_protocol.txt staging: Fix typo in multiple files 2012-04-10 10:31:01 -07:00
vhci.h staging: usbip: remove unnused, broken macro 2013-04-05 14:22:50 -07:00
vhci_hcd.c USB: usbip: fix nonconforming hub descriptor 2017-09-15 18:29:41 +01:00
vhci_rx.c staging: usbip: removed enumeration of comments 2013-04-05 14:22:50 -07:00
vhci_sysfs.c staging/usbip: fix store_attach() sscanf return value check 2014-04-15 14:43:01 -07:00
vhci_tx.c staging: usbip: replace the interrupt safe spinlocks with common ones. 2013-01-22 09:00:10 -08:00

TODO:
	- more discussion about the protocol
	- testing
	- review of the userspace interface
	- document the protocol

Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com>