linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ewan D. Milne" <emilne@redhat.com>
To: James Smart <jsmart2021@gmail.com>
Cc: linux-scsi@vger.kernel.org, stable@vger.kernel.org,
	Dick Kennedy <dick.kennedy@broadcom.com>,
	James Smart <james.smart@broadcom.com>
Subject: Re: [PATCH] lpfc: Correct MDS diag and nvmet configuration
Date: Mon, 20 Aug 2018 18:15:13 -0400	[thread overview]
Message-ID: <1534803313.4073.33.camel@localhost.localdomain> (raw)
In-Reply-To: <20180816230405.14272-1-jsmart2021@gmail.com>

On Thu, 2018-08-16 at 16:04 -0700, James Smart wrote:
> 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: <stable@vger.kernel.org> # 4.12
> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
> Signed-off-by: James Smart <james.smart@broadcom.com>
> ---
>  drivers/scsi/lpfc/lpfc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
> index e0d0da5f43d6..43732e8d1347 100644
> --- a/drivers/scsi/lpfc/lpfc.h
> +++ b/drivers/scsi/lpfc/lpfc.h
> @@ -672,7 +672,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 */

Fixes driver crash when lpfc_enable_nvmet used.

Tested-by: Ewan D. Milne <emilne@redhat.com>

  reply	other threads:[~2018-08-20 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-16 23:04 [PATCH] lpfc: Correct MDS diag and nvmet configuration James Smart
2018-08-20 22:15 ` Ewan D. Milne [this message]
2018-08-24  2:13 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1534803313.4073.33.camel@localhost.localdomain \
    --to=emilne@redhat.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=jsmart2021@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).