Subject: Re: [PATCH v2 4/6] cxlflash: Fix to resolve cmd leak after host reset

From: Andrew Donnellan <[email-masked]>
Date: Tue, 15 Dec 2015 13:45:10 +1100

On 15/12/15 08:07, Uma Krishnan wrote:
> From: Manoj Kumar <[email-masked]>
>
> After a few iterations of resetting the card, either during EEH
> recovery, or a host_reset the following is seen in the logs.
> cxlflash 0008:00: cxlflash_queuecommand: could not get a free command
>
> At every reset of the card, the commands that are outstanding are
> being leaked.  No effort is being made to reap these commands.  A few
> more resets later, the above error message floods the logs and the
> card is rendered totally unusable as no free commands are available.
>
> Iterated through the 'cmd' queue and printed out the 'free' counter
> and found that on each reset certain commands were in-use and
> stayed in-use through subsequent resets.
>
> To resolve this issue, when the card is reset, reap all the commands
> that are active/outstanding.
>
> Signed-off-by: Manoj N. Kumar <[email-masked]>
> Acked-by: Matthew R. Ochs <[email-masked]>

Looks reasonable.

Reviewed-by: Andrew Donnellan <[email-masked]>

-- 
Andrew Donnellan              Software Engineer, OzLabs
[email-masked]  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited