lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2017 10:17:14 -0400 (EDT)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Roger Quadros <rogerq@...com>
cc:     balbi@...nel.org, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] USB: dummy-hcd: Adapt dummy_udc_set_speed()

On Thu, 2 Nov 2017, Roger Quadros wrote:

> The UDC core ensures that .udc_set_speed() is called with
> a speed that is a minimum of the max speeds supported
> by the gadget function driver and the UDC driver.
> 
> We can now use the speed argument as is.
> 
> Get rid of the debug print as that condition will never happen.
> 
> Signed-off-by: Roger Quadros <rogerq@...com>
> ---
>  drivers/usb/gadget/udc/dummy_hcd.c | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
> index b17618a..c42ca8e 100644
> --- a/drivers/usb/gadget/udc/dummy_hcd.c
> +++ b/drivers/usb/gadget/udc/dummy_hcd.c
> @@ -910,20 +910,8 @@ static void dummy_udc_set_speed(struct usb_gadget *_gadget,
>  	struct dummy	*dum;
>  
>  	dum = gadget_dev_to_dummy(&_gadget->dev);
> -
> -	 if (mod_data.is_super_speed)
> -		 dum->gadget.speed = min_t(u8, USB_SPEED_SUPER, speed);
> -	 else if (mod_data.is_high_speed)
> -		 dum->gadget.speed = min_t(u8, USB_SPEED_HIGH, speed);
> -	 else
> -		 dum->gadget.speed = USB_SPEED_FULL;
> -
> +	dum->gadget.speed = speed;
>  	dummy_udc_update_ep0(dum);
> -
> -	if (dum->gadget.speed < speed)
> -		dev_dbg(udc_dev(dum), "This device can perform faster"
> -			" if you connect it to a %s port...\n",
> -			usb_speed_string(speed));
>  }
>  
>  static int dummy_udc_start(struct usb_gadget *g,
> 

Acked-by: Alan Stern <stern@...land.harvard.edu>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ