From patchwork Sun Dec 9 16:38:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satish Kharat X-Patchwork-Id: 10720155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B232B18B8 for ; Sun, 9 Dec 2018 16:54:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A25D82A0C3 for ; Sun, 9 Dec 2018 16:54:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96E322A0D0; Sun, 9 Dec 2018 16:54:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5378E2A0D9 for ; Sun, 9 Dec 2018 16:54:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726194AbeLIQyQ (ORCPT ); Sun, 9 Dec 2018 11:54:16 -0500 Received: from alln-iport-4.cisco.com ([173.37.142.91]:23515 "EHLO alln-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbeLIQyQ (ORCPT ); Sun, 9 Dec 2018 11:54:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=963; q=dns/txt; s=iport; t=1544374456; x=1545584056; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=3a7pFEVT+/LaAz/kKIRKNpHjRdPYvWovOSuCNxdPoOM=; b=fWdupLcObAlsMwg0YUnm/8wMaJ2RQo02Tn2J2PGfFmXWmG41FmPhHQAq 4Tb0iEnfPNFewqfOmSSlAwAUC/N5Zi1/W9xrGSk45AlS2FoIqyNbN44n3 wGVahkABikST5W35DRRH6Uo3e+zijs6V+KzeB7RwkzPsUY41E9op7OEdn Q=; X-IronPort-AV: E=Sophos;i="5.56,335,1539648000"; d="scan'208";a="210522794" Received: from alln-core-11.cisco.com ([173.36.13.133]) by alln-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Dec 2018 16:44:48 +0000 Received: from satish-ini-cisco-com.cisco.com (satish-ini.cisco.com [10.193.101.67]) by alln-core-11.cisco.com (8.15.2/8.15.2) with ESMTP id wB9GiXtB022582; Sun, 9 Dec 2018 16:44:47 GMT From: Satish Kharat To: linux-scsi@vger.kernel.org Cc: Satish Kharat Subject: [PATCH 1/1] scsi:fnic: delaying vnic dev enable till after req intr Date: Sun, 9 Dec 2018 08:38:38 -0800 Message-Id: <20181209163844.48020-4-satishkh@cisco.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181209163844.48020-1-satishkh@cisco.com> References: <20181209163844.48020-1-satishkh@cisco.com> X-Outbound-SMTP-Client: 10.193.101.67, satish-ini.cisco.com X-Outbound-Node: alln-core-11.cisco.com Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP doing vnic_device_enable before this could cause interrupts to happen before they are setup. Signed-off-by: Satish Kharat --- drivers/scsi/fnic/fnic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index cc461fd7bef1..5a8bee4c018f 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -878,8 +878,6 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) fc_fabric_login(lp); - vnic_dev_enable(fnic->vdev); - err = fnic_request_intr(fnic); if (err) { shost_printk(KERN_ERR, fnic->lport->host, @@ -887,6 +885,8 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out_free_exch_mgr; } + vnic_dev_enable(fnic->vdev); + for (i = 0; i < fnic->intr_count; i++) vnic_intr_unmask(&fnic->intr[i]);