Re: [PATCH v3 13/16] usb: phy: tegra: Keep CPU interrupts enabled

From: Michał Mirosław
Date: Mon Dec 30 2019 - 15:36:56 EST


On Sat, Dec 28, 2019 at 11:33:55PM +0300, Dmitry Osipenko wrote:
> There is no good reason for disabling of CPU interrupts in order to
> protect the utmip_pad_count modification.

Since there are sleeping functions called outside of the locked sections,
this should be a mutex instead. OTOH if the spin_lock is to protect register
write against IRQ handler, then the patch is wrong.

[...]
> - spin_unlock_irqrestore(&utmip_pad_lock, flags);
> + spin_unlock(&utmip_pad_lock);
>
> clk_disable_unprepare(phy->pad_clk);

Best Regards,
Michał Mirosław