Re: [PATCH v1] usbip: Add USB_SPEED_SUPER_PLUS as valid arg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 05, 2024 at 09:19:02AM +0000, Łukasz Bartosik wrote:
> Add USB_SPEED_SUPER_PLUS as valid argument to allow
> to attach USB SuperSpeed+ devices.
> 
> Signed-off-by: Łukasz Bartosik <ukaszb@xxxxxxxxxxxx>
> ---
>  drivers/usb/usbip/vhci_sysfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.c
> index e2847cd3e6e3..d5865460e82d 100644
> --- a/drivers/usb/usbip/vhci_sysfs.c
> +++ b/drivers/usb/usbip/vhci_sysfs.c
> @@ -283,6 +283,7 @@ static int valid_args(__u32 *pdev_nr, __u32 *rhport,
>  	case USB_SPEED_HIGH:
>  	case USB_SPEED_WIRELESS:
>  	case USB_SPEED_SUPER:
> +	case USB_SPEED_SUPER_PLUS:
>  		break;
>  	default:
>  		pr_err("Failed attach request for unsupported USB speed: %s\n",
> @@ -349,7 +350,7 @@ static ssize_t attach_store(struct device *dev, struct device_attribute *attr,
>  	vhci_hcd = hcd_to_vhci_hcd(hcd);
>  	vhci = vhci_hcd->vhci;
>  
> -	if (speed == USB_SPEED_SUPER)
> +	if (speed >= USB_SPEED_SUPER)

It's an enum, are you sure this will work?

thanks,

greg k-h




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux