Re: [PATCH] usb: dwc3: update link state when process wakeup interrupt

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

 



On Thu, Feb 02, 2023, Linyu Yuan wrote:
> 
> hi Thinh,
> 
> 
> do you prefer below change ? will it be good for all cases ?
> 
> 
> +static void dwc3_gadget_update_link_state(struct dwc3 *dwc,
> +               const struct dwc3_event_devt *event)
> +{
> +       switch (event->type) {
> +       case DWC3_DEVICE_EVENT_HIBER_REQ:
> +       case DWC3_DEVICE_EVENT_LINK_STATUS_CHANGE:
> +       case DWC3_DEVICE_EVENT_SUSPEND:
> +               break;
> +       default:
> +               dwc->link_state = event->event_info & DWC3_LINK_STATE_MASK;
> +               break;
> +       }
> +}
> +
>  static void dwc3_gadget_interrupt(struct dwc3 *dwc,
>                 const struct dwc3_event_devt *event)
>  {
> +       dwc3_gadget_update_link_state(dwc3, event);
> +
>         switch (event->type)
> 
> 

This would break the check in dwc3_gadget_suspend_interrupt(). However,
I'm actually not sure why we had that check in the beginning. I suppose
certain setup may trigger suspend event multiple time consecutively?

Thanks,
Thinh




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

  Powered by Linux