Re: [PATCH] phy-twl4030-usb: better handle musb_mailbox() failure

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

 



* Andreas Kemnade <andreas@xxxxxxxxxxxx> [160821 01:04]:
> setting twl->linkstat = MUSB_UNKNOWN upon error in musb_mailbox as
> introduced in
> commit 12b7db2bf8b8 ("usb: musb: Return error value from musb_mailbox")
> causes twl4030_usb_irq() to not detect a state change form cable connected
> to cable disconnected after such an error so that
> pm_runtime_put_autosuspend() will not be called and the usage counter
> gets unbalanced. Such errors happen e.g. if the omap2430 module is not
> (yet) loaded during plug/unplug events.

OK makes sense to me.

> This patch introduces a flag instead that indicates whether musb
> knows about the status and calls musb_mailbox() when it does not
> know yet about the status.

Works for me the same with this patch too. Probably best to not
use musb naming here though in the phy. How about use something like
musb_mailbox_pending for the flag?

Maybe also swap the logic around to only set musb_mailbox_pending
if musb_mailbox(status) returns err?

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux