From: Bart Van Assche <bvanassche@acm.org>
To: Ajay Neeli <ajay.neeli@amd.com>,
martin.petersen@oracle.com,
James.Bottomley@HansenPartnership.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
pedrom.sousa@synopsys.com
Cc: alim.akhtar@samsung.com, avri.altman@wdc.com,
linux-scsi@vger.kernel.org, devicetree@vger.kernel.org,
git@amd.com, michal.simek@amd.com, srinivas.goud@amd.com,
radhey.shyam.pandey@amd.com,
Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Subject: Re: [PATCH 4/5] ufs: core: Add vendor specific ops to handle interrupts
Date: Fri, 19 Sep 2025 10:34:57 -0700 [thread overview]
Message-ID: <d2a66ef0-1f01-4ef2-afa8-8ea6f392c365@acm.org> (raw)
In-Reply-To: <20250919123835.17899-5-ajay.neeli@amd.com>
On 9/19/25 5:38 AM, Ajay Neeli wrote:
> Some vendors will define their own interrupts, current interrupt service
> routine handles only interrupts defined by the JEDEC standard.
> Add provision to handle vendor specific interrupts by defining vendor
> specific vops.
Yikes. Please comply to the standard or contribute to the standard
instead of using reserved interrupt status bits for vendor-specific
purposes.
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 5442bb8..7a6dde8 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -7069,6 +7069,9 @@ static irqreturn_t ufshcd_sl_intr(struct ufs_hba *hba, u32 intr_status)
> if (intr_status & MCQ_CQ_EVENT_STATUS)
> retval |= ufshcd_handle_mcq_cq_events(hba);
>
> + if (intr_status & UFSHCD_VENDOR_IS_MASK)
> + retval |= ufshcd_vops_isr(hba, intr_status);
> +
> return retval;
> }
[ ... ]
> diff --git a/include/ufs/ufshci.h b/include/ufs/ufshci.h
> index 612500a..2844772 100644
> --- a/include/ufs/ufshci.h
> +++ b/include/ufs/ufshci.h
> @@ -185,6 +185,9 @@ static inline u32 ufshci_version(u32 major, u32 minor)
> #define CRYPTO_ENGINE_FATAL_ERROR 0x40000
> #define MCQ_CQ_EVENT_STATUS 0x100000
>
> +/* Other than above mentioned bits are treated as Vendor specific status bits */
> +#define UFSHCD_VENDOR_IS_MASK 0xFFE8F000
That's a violation of the UFSHCI standard. In the UFSHCI standard bits
31:22 and 15:13 are marked as reserved and hence must not be marked as
"vendor specific". Please either drop this patch or remove the
UFSHCD_VENDOR_IS_MASK definition from this patch and remove the
"if (intr_status & UFSHCD_VENDOR_IS_MASK)" condition from the interrupt
handler.
Bart.
next prev parent reply other threads:[~2025-09-19 17:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 12:38 [PATCH 0/5] ufs: Add support for AMD Versal Gen2 UFS Ajay Neeli
2025-09-19 12:38 ` [PATCH 1/5] dt-bindings: ufs: amd-versal2: Add support for AMD Versal Gen 2 UFS Host Controller Ajay Neeli
2025-09-22 19:46 ` Rob Herring
2025-10-06 12:30 ` Neeli, Ajay
2025-09-19 12:38 ` [PATCH 2/5] firmware: xilinx: Add support for secure read/write ioctl interface Ajay Neeli
2025-09-19 12:38 ` [PATCH 3/5] firmware: xilinx: Add APIs for UFS PHY initialization Ajay Neeli
2025-09-19 12:38 ` [PATCH 4/5] ufs: core: Add vendor specific ops to handle interrupts Ajay Neeli
2025-09-19 17:34 ` Bart Van Assche [this message]
2025-10-06 12:30 ` Neeli, Ajay
2025-09-19 12:38 ` [PATCH 5/5] ufs: amd-versal2: Add AMD Versal Gen 2 UFS support Ajay Neeli
2025-09-19 17:44 ` Bart Van Assche
2025-10-06 12:45 ` Neeli, Ajay
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=d2a66ef0-1f01-4ef2-afa8-8ea6f392c365@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ajay.neeli@amd.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=git@amd.com \
--cc=krzk+dt@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michal.simek@amd.com \
--cc=pedrom.sousa@synopsys.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=robh@kernel.org \
--cc=sai.krishna.potthuri@amd.com \
--cc=srinivas.goud@amd.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;
as well as URLs for NNTP newsgroup(s).