# Re: \[PATCH v2\] usb: chipidea: local\_irq\_save/restore added for hw\_ep\_prime

- From: Sebastian Andrzej Siewior \<bigeasy@linutronix.de\>
- Date: 2021-08-23 16:51:24 
- List: linux-usb
- Page: https://ratatoskr.run/linux-usb/2021/08/1486024
- Thread: https://ratatoskr.run/linux-usb/2021/08/1480247/t.md

```text
On 2021-08-20 14:15:55 [+0900], Jeaho Hwang wrote:
> So we protect irqs inside hw_ep_priming not to make error cases and
> also add a timeout inside the hw_ep_set_halt loop for a walkaround.
> The timeout patch is submitted to linux-usb.
> ( https://marc.info/?l=linux-usb&m=162918269024007&w=2 )
>
> We withdrew this patch since we don't know if disabling irq is the
> best solution to solve the problem and udc would work fine with
> hw_ep_set_halt walkaround even though hw_ep_prime fails.
> But we are still trying to find out the cause of this symptom so We'd
> so appreciate it if RT or USB experts share some ideas or ways to
> report somewhere. Xilinx doesn't provide any support without their
> official kernel :(

The UDC driver sometimes drops the lock and acquires it again. On UP it
would not matter but on SMP/RT the other may acquire lock and do
something with the HW. One thing that you could check if there is any HW
access in between which would affect the behaviour.

> Thanks for the discussion Sebastian.
> 
> Jeaho Hwang.

Sebastian
```
