Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4661094pxu; Tue, 13 Oct 2020 04:14:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRGxQVFb/pr8ntJvpjg18bSAs1ywXnlJB0+gLg0RHNg1Ens72gOX2UjAwNfR+cFG+CGxao X-Received: by 2002:a17:906:48b:: with SMTP id f11mr33828083eja.293.1602587651755; Tue, 13 Oct 2020 04:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602587651; cv=none; d=google.com; s=arc-20160816; b=JiSgN3izfwa3WeidMAAXvTXxsJX32dX6x+3SuQzPbCRiApsFJGEm3DcZF7ekHVKLGL ++To2jEmXxQshdsakZ2Cr0Wb5o5YjaPxzviJEN0QuZRx9puyjaaW9Ilwg7gGnCSdyKj6 lxEtGiz4Je6zoWTcBpTAFf/5qgQbSlTsXoqM9iG1/PMAsAdBjbPU75bug9jNhADLxAuP 3Yk89RWuNONf/94aplV4Q7+3B5FOZCSDejcnNp8Ld8tjPvGjXPCh0rknTJiD6aR0BoUF TTkUSDOF3icSrSx7AUWBgxpmZSJmY0mjCagumPUNVkAYogNsJyfW3TVv51IlC2CmCVFb m9tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=oWgv5LGDrW69Irg4bNqudwB1pQh9/j+SjHvZGAjszXo=; b=Kvpk/wasO8nu7Dm2aLnsc8sFUnK9vWlPytSGwx3QNAyCQr1wUS1S1VQg5w/ku1jsdL NP6TeAlbz1bSC48wdkgGn7DYKva2CekhitZv8f4TkYEnzaYmPhUnW+5U8n3pJGMFoRc0 /l7p6qBae2NOBRf1DcdQHrfIUPW7Lj3Kcl5TSsGA4QaV8Y83SNDHvXlnSb8qSDviE4uq /kHk5n8LOWswbLRvgXG57RoVioClt9YotGMGY5aSfEcuitjD8SYuWyD9BlWurcXux7QS OBeVMsTJxwhtR1Z8eItaCjHpUH6UWgNIfpzZVEiwGIm1N8x7eRGxd9QIJ9bKHnssq8Gt Lzwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si13827209ejm.736.2020.10.13.04.13.49; Tue, 13 Oct 2020 04:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389506AbgJLX7W (ORCPT + 99 others); Mon, 12 Oct 2020 19:59:22 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:55864 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388709AbgJLX7W (ORCPT ); Mon, 12 Oct 2020 19:59:22 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id 6BAB0272DB; Mon, 12 Oct 2020 19:59:18 -0400 (EDT) Date: Tue, 13 Oct 2020 10:59:18 +1100 (AEDT) From: Finn Thain To: Daniel Wagner cc: Nilesh Javali , Arun Easi , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] qla2xxx: Return EBUSY on fcport deletion In-Reply-To: <20201012173524.46544-1-dwagner@suse.de> Message-ID: References: <20201012173524.46544-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Oct 2020, Daniel Wagner wrote: > When the fcport is about to be deleted we should return EBUSY instead > of ENODEV. Only for EBUSY the request will be requeued in a multipath > setup. > > Also in case we have a valid qpair but the firmware has not yet > started return EBUSY to avoid dropping the request. > > Signed-off-by: Daniel Wagner > --- > > v3: simplify test logic as suggested by Arun. Not exactly a "simplification": there was a change of behaviour between v2 and v3. It seems the commit log no longer reflects the code. > v2: rebased on mkp/staging > > drivers/scsi/qla2xxx/qla_nvme.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c > index 2cd9bd288910..1fa457a5736e 100644 > --- a/drivers/scsi/qla2xxx/qla_nvme.c > +++ b/drivers/scsi/qla2xxx/qla_nvme.c > @@ -555,10 +555,12 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport, > > fcport = qla_rport->fcport; > > - if (!qpair || !fcport || (qpair && !qpair->fw_started) || > - (fcport && fcport->deleted)) > + if (!qpair || !fcport) > return -ENODEV; > > + if (!qpair->fw_started || fcport->deleted) > + return -EBUSY; > + > vha = fcport->vha; > > if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED)) >