Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tTZPS0xF6zDwJ0 for ; Thu, 1 Dec 2016 09:11:07 +1100 (AEDT) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAUM8t0n081086 for ; Wed, 30 Nov 2016 17:11:06 -0500 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 27230yn07h-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 30 Nov 2016 17:11:05 -0500 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Nov 2016 15:11:05 -0700 Subject: Re: [PATCH v2 09/14] cxlflash: Wait for active AFU commands to timeout upon tear down To: linux-scsi@vger.kernel.org, James Bottomley , "Martin K. Petersen" , "Matthew R. Ochs" , "Manoj N. Kumar" References: <1480379984-60114-1-git-send-email-ukrishn@linux.vnet.ibm.com> <1480380153-60497-1-git-send-email-ukrishn@linux.vnet.ibm.com> Cc: Brian King , linuxppc-dev@lists.ozlabs.org, Ian Munsie , Andrew Donnellan , Frederic Barrat , Christophe Lombard From: Uma Krishnan Date: Wed, 30 Nov 2016 16:11:47 -0600 MIME-Version: 1.0 In-Reply-To: <1480380153-60497-1-git-send-email-ukrishn@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Message-Id: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > From: "Matthew R. Ochs" > > With the removal of the static private command pool, the ability to > 'complete' outstanding commands was lost. While not an issue for the > commands originating outside the driver, internal AFU commands are > synchronous and therefore have a timeout associated with them. To > avoid a stale memory access, the tear down sequence needs to ensure > that there are not any active commands before proceeding. As these > internal AFU commands are rare events, the simplest way to accomplish > this is detecting the activity and waiting for it to timeout. > > Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan