Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4532337imm; Mon, 17 Sep 2018 16:00:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZA1pJbGBaBwXKW/RHyIeZo+D5gkwbSl6GLeQ6eP8Qy4FIe5iDm6XHaEnb3EdaeZJw3DJnw X-Received: by 2002:aa7:86cb:: with SMTP id h11-v6mr27589963pfo.58.1537225220508; Mon, 17 Sep 2018 16:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537225220; cv=none; d=google.com; s=arc-20160816; b=chTvVaAHPQ11BMA8KNEr7nZnbW68U7HyQvWGWGf+WmB/bvDcr+c4EefzGz0A5jLVc2 z2i18BpC3V4N4hg0gArVHSATast/o4KanYVq9e7ZNYWFcNdk2WH5ckalBM2OV5jJo+Of BTYy/9mkLnyC4MwY+4jY8tQWmzlA3YgN6dU9nwgFWhI9h5YxsBUS7CJghMimqk4qpM2M pfHWcXQ7RLfozj3T+S7wywKIPekbgfuG4pwPxAACbXmP23r98l2oXglYnuGMvs7S3cP0 ji9xf1n63lrW/51+U9/EB0aMBM0J+kWV0xrBRW5AI0t5o9KFkLPHg7bLKM+fWTwikh1p dssA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=BafAgEw6fXcnlbkBBCMwCPNGZp+vF729aBa9JjHs3Tk=; b=wJN/20xqAxEIX7LPmIP9mtPWtUBwBn9x9o1xoZt1LZuogEIvWLMEO2jaRLADSvLnh2 TVvk9L5g/IKxQdW+8+EtUusfDh0V2mE1bHjgGowl+kIVTopgbpSqsUiAijdmRytLfpBl T8dpBMuMy8RDOlm0WeKlpnzNXE3PFhmPfJUeapmSH4FYvdAOWKqLU6pwqAGF8G6463Un xOY70uJZOTB3CyBh7QFKzHX4h8bLw00TwyZu1JdWeX8zNMPpeYhsjQc77iystfTspui1 eXjQ7vUtdCL8vgkdkxPMq1QfSyqAn3xL1orjOsZEZDTq7Grz218gs8hetOQDgoNu/fZG SmUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t127-v6si17379995pfc.118.2018.09.17.16.00.05; Mon, 17 Sep 2018 16:00:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729896AbeIRE32 (ORCPT + 99 others); Tue, 18 Sep 2018 00:29:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47992 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbeIRE31 (ORCPT ); Tue, 18 Sep 2018 00:29:27 -0400 Received: from localhost (li1825-44.members.linode.com [172.104.248.44]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1D6FDC03; Mon, 17 Sep 2018 22:59:58 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dick Kennedy , James Smart , "Ewan D. Milne" , "Martin K. Petersen" Subject: [PATCH 4.14 003/126] scsi: lpfc: Correct MDS diag and nvmet configuration Date: Tue, 18 Sep 2018 00:40:51 +0200 Message-Id: <20180917211703.701016044@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180917211703.481236999@linuxfoundation.org> References: <20180917211703.481236999@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: James Smart commit 53e13ee087a80e8d4fc95436318436e5c2c1f8c2 upstream. A recent change added some MDS processing in the lpfc_drain_txq routine that relies on the fcp_wq being allocated. For nvmet operation the fcp_wq is not allocated because it can only be an nvme-target. When the original MDS support was added LS_MDS_LOOPBACK was defined wrong, (0x16) it should have been 0x10 (decimal value used for hex setting). This incorrect value allowed MDS_LOOPBACK to be set simultaneously with LS_NPIV_FAB_SUPPORTED, causing the driver to crash when it accesses the non-existent fcp_wq. Correct the bad value setting for LS_MDS_LOOPBACK. Fixes: ae9e28f36a6c ("lpfc: Add MDS Diagnostic support.") Cc: # v4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Tested-by: Ewan D. Milne Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/lpfc/lpfc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -676,7 +676,7 @@ struct lpfc_hba { #define LS_NPIV_FAB_SUPPORTED 0x2 /* Fabric supports NPIV */ #define LS_IGNORE_ERATT 0x4 /* intr handler should ignore ERATT */ #define LS_MDS_LINK_DOWN 0x8 /* MDS Diagnostics Link Down */ -#define LS_MDS_LOOPBACK 0x16 /* MDS Diagnostics Link Up (Loopback) */ +#define LS_MDS_LOOPBACK 0x10 /* MDS Diagnostics Link Up (Loopback) */ uint32_t hba_flag; /* hba generic flags */ #define HBA_ERATT_HANDLED 0x1 /* This flag is set when eratt handled */