Re: [PATCH] firmware: wake all waiters

From: Luis R. Rodriguez
Date: Mon Jun 26 2017 - 19:41:40 EST


On Mon, Jun 26, 2017 at 11:20:36PM +0200, Luis R. Rodriguez wrote:
> On Fri, Jun 23, 2017 at 04:37:02PM -0700, Jakub Kicinski wrote:
> There's a slew of bugs lurking here though!
>
> As noted the reported Intel driver issues still need other fixes, one was the
> fw_state_done() on the direct filesystem lookup mechanism [1], and that may be
> a regression since direct filesystem loading was added, and even secondary
> requests would seem to just wait forever (MAX_SCHEDULE_TIMEOUT); the combination
> of both fixes should fix your reported issue.

Actually fw_state_done() is already called on success on direct filesystem loading,
so that should be fine. The bug report proposed change only adds a fw_state_aborted()
in case of a failure on direct fs lookups. That in turn, needs consideration of the
fallback mechanism, ie, only in case of *real* final falure should fw_state_aborte()
be issued. Distros that have enabled the fallback mechanism (seems like andoid now)
have no other option but to wait for the fallback mechanism or timeout to complete.

Its one reason why the firmwared thing is a good thing to review which has the
best-effort mode and final-mode [0].

[0] https://github.com/teg/firmwared.git

Luis