Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp223439pxu; Thu, 22 Oct 2020 21:35:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyju1RO9QRiKCk6wonXksgSiekhPxkyooC1a1thZV6wOyib8gqA2JP3ooZyyzAxsirmDtpt X-Received: by 2002:a17:906:3ed0:: with SMTP id d16mr215016ejj.477.1603427711837; Thu, 22 Oct 2020 21:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603427711; cv=none; d=google.com; s=arc-20160816; b=LX2rR2L2bx2pzKEK2xYnPpUKd+vV8Q+FAPrNqodB8cCR16Cqdcs/31ESXRWkL49Jo4 TNSR7c5zpzyXN5Ob9qpSGjDNJDHcg9K4ZpsM9brxUC7aK+bFETC+8g5zw7lTuEIo1Pkt QTDQmKNsRzlmwEH3SYyY3aFFVIst5lXnUqIXnbClbuSJFiQPAbk+vDf29KGgCvLfSXuu YN66JOVc+qLSJP5leSwhfepvipYMI4/P/QkB9VS4yY3UY7BKspghoJTZPBcu3P5GM7dL wAhk6Dt0lkSvjBmXv/BO0ijL//NbCDdMf3bGujzsjj+uuc4PEES5JP4jQfMpxUwOegfe jqeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=syTatktNJj218s4w8i0vH5DjvlhLYwwOkkKzR/GTeIM=; b=TuqQcofCthCT9zwgFJWNvWIuthTHF2hJ00ZOmHjid4T7peYH8rYFQtVfYB2QD6okBP yjjvS9ilQ4EOsAx4H/GMLenuby3Wah0J6EQgTYGnkL9Mw9cMapmGt+eoluyUSWf30oqO VqKs90amfLU5jx4HfCKKVHIX0Y2cbkuvDHOLxZ69LIOCZoCXU7W7Sd2WtPTyzQNDOwbj PF2hDFrJj+wETmb8EJUy1PkgRtDrhnsFk0Z/Y8mGLB2XmfYW3cPkGSHzXioudo/ncaZu fWPM4hWw3K/8tdMlfjCNoaEf6C/hnFPHJKpqzOstSpWC1wPV4OA25mfY2MrV20sGOw+q n47A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=GETOLZlO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=marvell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 23si67780ejx.661.2020.10.22.21.34.49; Thu, 22 Oct 2020 21:35: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; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=GETOLZlO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S370410AbgJVTq2 (ORCPT + 99 others); Thu, 22 Oct 2020 15:46:28 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:20832 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2508766AbgJVTq1 (ORCPT ); Thu, 22 Oct 2020 15:46:27 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09MJiuLX027962; Thu, 22 Oct 2020 12:46:24 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : in-reply-to : message-id : references : mime-version : content-type; s=pfpt0220; bh=syTatktNJj218s4w8i0vH5DjvlhLYwwOkkKzR/GTeIM=; b=GETOLZlOfC7FJYoQalB4Oc1pmpKNgMAW81Qpyl52VAj5sc4rYrmlp0CLnlWrASLv7SGv YX1U/95TqIwF7gnYKMoUBLtm4ex6GhwmSLZ6dDLfoRF/MNM7eXYk5knNvI8ZXzXE7cdi J1c9qIMs4v8nR9hgd1z6EucR/AD62UNylwTLUWqLptTygHBlzGEChPKXppY9D5r5amKW rYza0pRw3EWfi1BTopQqM/ArAj7g68e5+TnbTnqVotpBeyl/NGTqEWYFGPd5nE2iMMHD +0qzUgN9whSbSMd0j+V3OgzV3xHWLbnS5DTMwRTmmU0WnlMv5iT77o3i85fhfB8cVjEQ Tg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 34asbe5451-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 22 Oct 2020 12:46:24 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 22 Oct 2020 12:46:23 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 22 Oct 2020 12:46:23 -0700 Received: from irv1user01.caveonetworks.com (unknown [10.104.116.179]) by maili.marvell.com (Postfix) with ESMTP id 210803F7041; Thu, 22 Oct 2020 12:46:23 -0700 (PDT) Received: from localhost (aeasi@localhost) by irv1user01.caveonetworks.com (8.14.4/8.14.4/Submit) with ESMTP id 09MJkL4L026377; Thu, 22 Oct 2020 12:46:22 -0700 X-Authentication-Warning: irv1user01.caveonetworks.com: aeasi owned process doing -bs Date: Thu, 22 Oct 2020 12:46:21 -0700 From: Arun Easi X-X-Sender: aeasi@irv1user01.caveonetworks.com To: Daniel Wagner CC: Nilesh Javali , , , Finn Thain Subject: Re: [EXT] [PATCH v4] qla2xxx: Return EBUSY on fcport deletion In-Reply-To: <20201014073048.36219-1-dwagner@suse.de> Message-ID: References: <20201014073048.36219-1-dwagner@suse.de> User-Agent: Alpine 2.21.9999 (LRH 334 2019-03-29) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.737 definitions=2020-10-22_15:2020-10-20,2020-10-22 signatures=0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Oct 2020, 12:30am, Daniel Wagner wrote: > External Email > > ---------------------------------------------------------------------- > 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 when the firmware has not yet started return EBUSY to avoid > dropping the request. > > Signed-off-by: Daniel Wagner > Reviewed-by: Arun Easi > --- > > v4: updated commit message as suggested by Finn > v3: simplify and changed test logic as suggested by Arun > 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)) > Looks good to me. Regards, -Arun