From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753675AbbLVIAj (ORCPT ); Tue, 22 Dec 2015 03:00:39 -0500 Received: from mx2.suse.de ([195.135.220.15]:44258 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753541AbbLVIAh (ORCPT ); Tue, 22 Dec 2015 03:00:37 -0500 Subject: Re: [PATCH v3 61/77] ncr5380: Fix EH during arbitration and selection To: Finn Thain , "James E.J. Bottomley" , Michael Schmitz , linux-m68k@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "Martin K. Petersen" References: <20151222011737.980475848@telegraphics.com.au> <20151222011754.605516715@telegraphics.com.au> From: Hannes Reinecke Message-ID: <56790323.2090406@suse.de> Date: Tue, 22 Dec 2015 09:00:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151222011754.605516715@telegraphics.com.au> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/22/2015 02:18 AM, Finn Thain wrote: > During arbitration and selection, the relevant command is invisible to > exception handlers and can be found only in a pointer on the stack of a > different thread. > > When eh_abort_handler can't find a given command, it can't decide whether > that command was completed already or is still in arbitration or selection > phase. But it must return either SUCCESS (e.g. command completed earlier) > or FAILED (could not abort the nexus, try bus reset). > > The solution is to make sure all commands belonging to the LLD are always > visible to exception handlers. Add another scsi_cmnd pointer to the > hostdata struct to track the command in arbitration or selection phase. > > Replace 'retain_dma_irq' with the new 'selecting' pointer, to bring > atari_NCR5380.c into line with NCR5380.c. > > Signed-off-by: Finn Thain > > --- > drivers/scsi/NCR5380.c | 76 +++++++++++++++++++++++++++++---------- > drivers/scsi/NCR5380.h | 4 +- > drivers/scsi/atari_NCR5380.c | 82 +++++++++++++++++++++++++++++++------------ > 3 files changed, 119 insertions(+), 43 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)