From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id F352F1A0246 for ; Tue, 15 Dec 2015 13:46:46 +1100 (AEDT) Received: from localhost by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Dec 2015 12:46:45 +1000 Received: from d23relay08.au.ibm.com (d23relay08.au.ibm.com [9.185.71.33]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 8543B3578054 for ; Tue, 15 Dec 2015 13:46:38 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tBF2kBgX30212106 for ; Tue, 15 Dec 2015 13:46:19 +1100 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tBF2k5dx025998 for ; Tue, 15 Dec 2015 13:46:06 +1100 Subject: Re: [PATCH v2 4/6] cxlflash: Fix to resolve cmd leak after host reset To: Uma Krishnan , linux-scsi@vger.kernel.org, James Bottomley , "Martin K. Petersen" , "Matthew R. Ochs" , "Manoj N. Kumar" , Brian King References: <1450126293-47440-1-git-send-email-ukrishn@linux.vnet.ibm.com> <1450127222-48145-1-git-send-email-ukrishn@linux.vnet.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org, Ian Munsie , Daniel Axtens From: Andrew Donnellan Message-ID: <566F7EB6.7030005@au1.ibm.com> Date: Tue, 15 Dec 2015 13:45:10 +1100 MIME-Version: 1.0 In-Reply-To: <1450127222-48145-1-git-send-email-ukrishn@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 15/12/15 08:07, Uma Krishnan wrote: > From: Manoj Kumar > > 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 > Acked-by: Matthew R. Ochs Looks reasonable. Reviewed-by: Andrew Donnellan -- Andrew Donnellan Software Engineer, OzLabs andrew.donnellan@au1.ibm.com Australia Development Lab, Canberra +61 2 6201 8874 (work) IBM Australia Limited