Re: [PATCH 2/3] usb: cdns3: gadget: own the lock wrongly at the suspend routine

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

 



Hi,

Peter Chen <peter.chen@xxxxxxx> writes:
> @@ -1783,7 +1780,9 @@ static void cdns3_check_usb_interrupt_proceed(struct cdns3_device *priv_dev,
>  
>  	/* Disconnection detected */
>  	if (usb_ists & (USB_ISTS_DIS2I | USB_ISTS_DISI)) {
> +		spin_unlock(&priv_dev->lock);
>  		cdns3_disconnect_gadget(priv_dev);
> +		spin_lock(&priv_dev->lock);

don't you need to add sparse __releases() an __acquires() markers?

>  		priv_dev->gadget.speed = USB_SPEED_UNKNOWN;
>  		usb_gadget_set_state(&priv_dev->gadget, USB_STATE_NOTATTACHED);
>  		cdns3_hw_reset_eps_config(priv_dev);
> @@ -3266,7 +3265,9 @@ static int cdns3_gadget_suspend(struct cdns3 *cdns, bool do_wakeup)
>  {
>  	struct cdns3_device *priv_dev = cdns->gadget_dev;
>  
> +	spin_unlock(&cdns->lock);
>  	cdns3_disconnect_gadget(priv_dev);
> +	spin_lock(&cdns->lock);

ditto

-- 
balbi

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux