From: Uma Krishnan Subject: Re: [PATCH 3/6] cxlflash: Fix to avoid EEH and host reset collisions Date: Fri, 9 Sep 2016 17:13:33 -0500 Message-ID: <7a45eab7-3c52-cff9-56e3-77f73a2e1e00@linux.vnet.ibm.com> References: <1472848612-64888-1-git-send-email-ukrishn@linux.vnet.ibm.com> <1472848770-65034-1-git-send-email-ukrishn@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39684 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754406AbcIIWNc (ORCPT ); Fri, 9 Sep 2016 18:13:32 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u89MDTpT096448 for ; Fri, 9 Sep 2016 18:13:31 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0b-001b2d01.pphosted.com with ESMTP id 25c3egce2t-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 09 Sep 2016 18:13:31 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Sep 2016 18:13:30 -0400 In-Reply-To: <1472848770-65034-1-git-send-email-ukrishn@linux.vnet.ibm.com> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: linux-scsi@vger.kernel.org, James Bottomley , "Martin K. Petersen" , "Matthew R. Ochs" , "Manoj N. Kumar" Cc: Christophe Lombard , Frederic Barrat , Ian Munsie , Andrew Donnellan , Brian King , linuxppc-dev@lists.ozlabs.org On 9/2/2016 3:39 PM, Uma Krishnan wrote: > From: "Matthew R. Ochs" > > The EEH reset handler is ignorant to the current state of the > driver when processing a frozen event and initiating a device > reset. This can be an issue if an EEH event occurs while a user > or stack initiated reset is executing. More specifically, if an > EEH occurs while the SCSI host reset handler is active, the reset > initiated by the EEH thread will likely collide with the host reset > thread. This can leave the device in an inconsistent state, or worse, > cause a system crash. > > As a remedy, the EEH handler is updated to evaluate the device state > and take appropriate action (proceed, wait, or disconnect host). The > host reset handler is also updated to handle situations where an EEH > occurred during a host reset. In such situations, the host reset handler > will delay reporting back a success to give the EEH reset an opportunity > to complete. > > Signed-off-by: Matthew R. Ochs Acked-by: Uma Krishnan