Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 3tTZQC0q7czDwLJ for ; Thu, 1 Dec 2016 09:11:46 +1100 (AEDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAUM8qYj034358 for ; Wed, 30 Nov 2016 17:11:44 -0500 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 27277hg9d9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 30 Nov 2016 17:11:44 -0500 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Nov 2016 15:11:43 -0700 Subject: Re: [PATCH v2 10/14] cxlflash: Remove AFU command lock 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> <1480380162-60533-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:12:28 -0600 MIME-Version: 1.0 In-Reply-To: <1480380162-60533-1-git-send-email-ukrishn@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Message-Id: <8d9dd4f3-ff12-8a0c-16ee-da2a28b9f275@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > From: "Matthew R. Ochs" > > The original design of the cxlflash driver required AFU commands > to convey state information across multiple threads. The IOASA > "host use" byte was used to track if a command was done, errored, > or timed out. A per-command spin lock was used to serialize access > to this byte. As this is no longer required with the introduction > of completions and various refactoring over time, the spin lock, > state tracking, and associated code can be removed. To support the > simplification, the wait_resp() routine is refactored to return a > success or failure. Additionally, as the simplification to the > AFU internal command routine, explicit assignments of AFU command > fields to zero are removed as the memory is zeroed upon allocation. > > Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan