• Johan Hovold's avatar
    USB: usbip: fix nonconforming hub descriptor · 20a204f4
    Johan Hovold authored
    commit ec963b41 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: 04679b34 ("Staging: USB/IP: add client driver")
    Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
    Cc: Valentina Manea <valentina.manea.m@gmail.com>
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    Acked-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    20a204f4
vhci_hcd.c 30.2 KB