Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "beanhuo@micron.com" <beanhuo@micron.com>,
	"mani@kernel.org" <mani@kernel.org>,
	"can.guo@oss.qualcomm.com" <can.guo@oss.qualcomm.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] scsi: ufs: core: Add a quirk for extended TX EQTR Adapt L0L1L2L3 length
Date: Mon, 4 May 2026 09:19:07 +0000	[thread overview]
Message-ID: <a173bb1733968d41690f8472d13b95028c8975c5.camel@mediatek.com> (raw)
In-Reply-To: <20260501131641.826258-2-can.guo@oss.qualcomm.com>

On Fri, 2026-05-01 at 06:16 -0700, Can Guo wrote:
> 
> diff --git a/drivers/ufs/core/ufs-txeq.c b/drivers/ufs/core/ufs-
> txeq.c
> index b2dc89124353..fe647450a7a1 100644
> --- a/drivers/ufs/core/ufs-txeq.c
> +++ b/drivers/ufs/core/ufs-txeq.c
> @@ -740,7 +740,9 @@ static int
> ufshcd_setup_tx_eqtr_adapt_length(struct ufs_hba *hba,
>                 if (adapt_l0l1l2l3_cap_local >
> ADAPT_L0L1L2L3_LENGTH_MAX) {
>                         dev_err(hba->dev, "local
> RX_HS_G%u_ADAPT_INITIAL_L0L1L2L3_CAP (0x%x) exceeds MAX\n",
>                                 gear, adapt_l0l1l2l3_cap_local);
> -                       return -EINVAL;
> +
> +                       if (!(hba->quirks &
> UFSHCD_QUIRK_EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3))
> +                               return -EINVAL;
>                 }
> 
>                 ret = ufshcd_dme_get(hba,
> UIC_ARG_MIB(PA_PEERRXHSG6ADAPTINITIALL0L1L2L3),
> @@ -751,7 +753,9 @@ static int
> ufshcd_setup_tx_eqtr_adapt_length(struct ufs_hba *hba,
>                 if (adapt_l0l1l2l3_cap_peer >
> ADAPT_L0L1L2L3_LENGTH_MAX) {
>                         dev_err(hba->dev, "peer
> RX_HS_G%u_ADAPT_INITIAL_L0L1L2L3_CAP (0x%x) exceeds MAX\n",
>                                 gear, adapt_l0l1l2l3_cap_peer);
> -                       return -EINVAL;
> +
> +                       if (!(hba->quirks &
> UFSHCD_QUIRK_EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3))
> +                               return -EINVAL;
> 

Hi Can,

The quirk UFSHCD_QUIRK_EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3
is defined as a host quirk, but it appears to be used for the
device (peer) in this context. Is this usage wrong or intended?

Thanks
Peter


  parent reply	other threads:[~2026-05-04  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 13:16 [PATCH 0/2] scsi: ufs: Add quirk EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3 Can Guo
2026-05-01 13:16 ` [PATCH 1/2] scsi: ufs: core: Add a quirk for extended TX EQTR Adapt L0L1L2L3 length Can Guo
2026-05-04  3:06   ` Bart Van Assche
2026-05-04  9:19   ` Peter Wang (王信友) [this message]
2026-05-04 12:55     ` Can Guo
2026-05-05  5:48       ` Peter Wang (王信友)
2026-05-01 13:16 ` [PATCH 2/2] scsi: ufs: ufs-qcom: Use quirk EXTENDED_TX_EQTR_ADAPT_LENGTH_L0L1L2L3 Can Guo
2026-05-04  3:06   ` Bart Van Assche
2026-05-04  3:11     ` Can Guo

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=a173bb1733968d41690f8472d13b95028c8975c5.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=can.guo@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.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