public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Xose Vazquez Perez <xose.vazquez@gmail.com>
To: Tony Battersby <tonyb@cybernetics.com>,
	Nilesh Javali <njavali@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	adadasdasdasasd@adasdasasdasdasdas
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	target-devel@vger.kernel.org, scst-devel@lists.sourceforge.net,
	KERNEL ML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 14/15] scsi: qla2xxx: add back SRR support
Date: Thu, 25 Sep 2025 14:49:52 +0200	[thread overview]
Message-ID: <0669b097-0bf1-4895-9c2a-5e953aebbfab@gmail.com> (raw)
In-Reply-To: <2cc10189-6953-428e-b34e-b1c714fc0eae@cybernetics.com>

On 9/8/25 9:10 PM, Tony Battersby wrote:

> (target mode)

> [...]

> I ran into some HBA firmware bugs with QLE2694L firmware 9.06.02 -
> 9.08.02 where a SRR would cause the HBA to misbehave badly.  Since SRRs
> are rare and therefore difficult to test, I figured it would be worth
> checking for the buggy firmware and disabling SLER with a warning
> instead of letting others run into the same problem on the rare
> occasion that they get a SRR.  This turned out to be difficult because
> the firmware version isn't known in the normal NVRAM config routine, so
> I added a second NVRAM config routine that is called after the firmware
> version is known.  It may be necessary to add checks for additional
> buggy firmware versions or additional chips that I was not able to
> test.
> 
> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> ---
>   drivers/scsi/qla2xxx/qla_dbg.c     |    1 +
>   drivers/scsi/qla2xxx/qla_init.c    |    1 +
>   drivers/scsi/qla2xxx/qla_target.c  | 1030 ++++++++++++++++++++++++++++
>   drivers/scsi/qla2xxx/qla_target.h  |   81 +++
>   drivers/scsi/qla2xxx/tcm_qla2xxx.c |   15 +
>   5 files changed, 1128 insertions(+)

> [...]

> + * Return true if the HBA firmware version is known to have bugs that
> + * prevent Sequence Level Error Recovery (SLER) / Sequence Retransmission
> + * Request (SRR) from working.
> + */
> +static bool qlt_has_sler_fw_bug(struct qla_hw_data *ha)
> +{
> +	bool has_sler_fw_bug = false;
> +
> +	if (IS_QLA2071(ha)) {
> +		/*
> +		 * QLE2694L known bad firmware:
> +		 *   9.06.02
> +		 *   9.07.00
> +		 *   9.08.02
> +		 *   SRRs trigger hundreds of bogus entries in the response
> +		 *   queue and various other problems.
> +		 *
> +		 * QLE2694L known good firmware:
> +		 *   8.08.05
> +		 *   9.09.00
> +		 *
> +		 * QLE2694L unknown firmware:
> +		 *   9.00.00 - 9.05.xx
> +		 */
> +		if (ha->fw_major_version == 9 &&
> +		    ha->fw_minor_version >= 6 &&
> +		    ha->fw_minor_version <= 8)
> +			has_sler_fw_bug = true;
> +	}
> +
> +	return has_sler_fw_bug;
> +}

> [...]

 > +/* Update any settings that depend on ha->fw_*_version. */> +void
> +qlt_config_nvram_with_fw_version(struct scsi_qla_host *vha)
> +{
> +	struct qla_hw_data *ha = vha->hw;
> +
> +	if (!QLA_TGT_MODE_ENABLED())
> +		return;
> +
> +	if (ql2xtgt_tape_enable && qlt_has_sler_fw_bug(ha)) {
> +		ql_log(ql_log_warn, vha, 0x11036,
> +		    "WARNING: ignoring ql2xtgt_tape_enable due to buggy HBA firmware; please upgrade FW\n");
> +
> +		/* Disable FC Tape support */
> +		if (ha->isp_ops->nvram_config == qla81xx_nvram_config) {
> +			struct init_cb_81xx *icb =
> +				(struct init_cb_81xx *)ha->init_cb;
> +			icb->firmware_options_2 &= cpu_to_le32(~BIT_12);
> +		} else {
> +			struct init_cb_24xx *icb =
> +				(struct init_cb_24xx *)ha->init_cb;
> +			icb->firmware_options_2 &= cpu_to_le32(~BIT_12);
> +		}
> +	}
> +}

If you want to review the firmware changelog, mainly: FCD-1183 (FCD-371, ER147301), FCD-259, ER146998
(from 9.00.00 to 9.15.05 [06/10/25]):
https://www.marvell.com/content/dam/marvell/en/drivers/2025-06-10-release/fw_release_notes/Fibre_Channel_Firmware_Release_Notes.pdf

It's look like all 2{678}xx devices/chips are affected by this bug.
Perhaps the Marvel crew could provide more information on this.

  parent reply	other threads:[~2025-09-25 12:49 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08 18:45 [PATCH 00/15] qla2xxx target mode improvements Tony Battersby
2025-09-08 18:47 ` [PATCH 01/15] Revert "scsi: qla2xxx: Perform lockless command completion in abort path" Tony Battersby
2025-09-08 18:48 ` [PATCH 02/15] scsi: qla2xxx: fix initiator mode with qlini_mode=exclusive Tony Battersby
2025-09-08 18:50 ` [PATCH 03/15] scsi: qla2xxx: fix lost interrupts with qlini_mode=disabled Tony Battersby
2025-09-08 18:51 ` [PATCH 04/15] scsi: qla2xxx: use reinit_completion on mbx_intr_comp Tony Battersby
2025-09-08 18:53 ` [PATCH 05/15] scsi: qla2xxx: remove code for unsupported hardware Tony Battersby
2025-09-08 18:54 ` [PATCH 06/15] scsi: qla2xxx: improve debug output for term exchange Tony Battersby
2025-09-08 18:56 ` [PATCH 07/15] scsi: qla2xxx: fix term exchange when cmd_sent_to_fw == 1 Tony Battersby
2025-09-08 18:58 ` [PATCH 08/15] scsi: qla2xxx: fix oops during cmd abort Tony Battersby
2025-09-08 18:59   ` [SCST PATCH " Tony Battersby
2025-09-11 14:21   ` [PATCH " Dmitry Bogdanov
2025-09-24 19:41     ` Tony Battersby
2025-09-24 19:43       ` [PATCH v2 09/16] scsi: qla2xxx: fix races with aborting commands Tony Battersby
2025-09-24 19:45         ` [SCST PATCH " Tony Battersby
2025-09-25  8:42       ` [DMARC Error]Re: [PATCH 08/15] scsi: qla2xxx: fix oops during cmd abort Dmitry Bogdanov
2025-09-08 19:01 ` [PATCH 09/15] scsi: qla2xxx: improve checks in qlt_xmit_response / qlt_rdy_to_xfer Tony Battersby
2025-09-08 19:02 ` [PATCH 10/15] scsi: qla2xxx: fix TMR failure handling Tony Battersby
2025-09-12 14:36   ` Dmitry Bogdanov
2025-09-16 16:04     ` Tony Battersby
2025-09-17 13:06       ` [DMARC Error]Re: " Dmitry Bogdanov
2025-09-17 20:38         ` Tony Battersby
2025-09-08 19:04 ` [PATCH 11/15] scsi: qla2xxx: fix invalid memory access with big CDBs Tony Battersby
2025-09-08 19:05   ` [SCST PATCH " Tony Battersby
2025-09-08 19:07 ` [PATCH 12/15] scsi: qla2xxx: add cmd->rsp_sent Tony Battersby
2025-09-08 19:08   ` [SCST PATCH " Tony Battersby
2025-09-15 13:47   ` [PATCH " Dmitry Bogdanov
2025-09-24 20:04     ` Tony Battersby
2025-09-08 19:09 ` [PATCH 13/15] scsi: qla2xxx: improve cmd logging Tony Battersby
2025-09-08 19:10 ` [PATCH 14/15] scsi: qla2xxx: add back SRR support Tony Battersby
2025-09-08 19:11   ` [SCST PATCH " Tony Battersby
2025-09-25 12:49   ` Xose Vazquez Perez [this message]
2025-09-25 15:30     ` [PATCH " Xose Vazquez Perez
2025-09-25 16:04       ` Tony Battersby
2025-09-25 17:00         ` Tony Battersby
2025-09-25 19:30           ` Tony Battersby
2025-09-08 19:13 ` [PATCH 15/15] scsi: qla2xxx: improve safety of cmd lookup by handle Tony Battersby
2025-09-08 19:14 ` [SCST PATCH] qla2x00t-32gbit: add on_abort_cmd callback Tony Battersby

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=0669b097-0bf1-4895-9c2a-5e953aebbfab@gmail.com \
    --to=xose.vazquez@gmail.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adadasdasdasasd@adasdasasdasdasdas \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    --cc=scst-devel@lists.sourceforge.net \
    --cc=target-devel@vger.kernel.org \
    --cc=tonyb@cybernetics.com \
    /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