From: <gregkh@linuxfoundation.org>
To: avri.altman@wdc.com,bvanassche@acm.org,martin.petersen@oracle.com
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb()" failed to apply to 5.15-stable tree
Date: Mon, 14 Oct 2024 13:47:36 +0200 [thread overview]
Message-ID: <2024101436-cherub-rehydrate-8076@gregkh> (raw)
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x d5130c5a093257aa4542aaded8034ef116a7624a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2024101436-cherub-rehydrate-8076@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
d5130c5a0932 ("scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb()")
06caeb536b2b ("scsi: ufs: core: Rename symbol sizeof_utp_transfer_cmd_desc()")
5149452ca662 ("scsi: ufs: core: Fix MCQ tag calculation")
f87b2c41822a ("scsi: ufs: mcq: Add completion support of a CQE")
854f84e7feeb ("scsi: ufs: core: mcq: Find hardware queue to queue request")
22a2d563de14 ("scsi: ufs: core: Prepare ufshcd_send_command() for MCQ")
2468da61ea09 ("scsi: ufs: core: mcq: Configure operation and runtime interface")
4682abfae2eb ("scsi: ufs: core: mcq: Allocate memory for MCQ mode")
7224c806876e ("scsi: ufs: core: mcq: Calculate queue depth")
c263b4ef737e ("scsi: ufs: core: mcq: Configure resource regions")
57b1c0ef89ac ("scsi: ufs: core: mcq: Add support to allocate multiple queues")
0cab4023ec7b ("scsi: ufs: core: Defer adding host to SCSI if MCQ is supported")
305a357d3595 ("scsi: ufs: core: Introduce multi-circular queue capability")
6e1d850acff9 ("scsi: ufs: core: Probe for EXT_IID support")
baf5ddac90dc ("scsi: ufs: ufs-qcom: Add support for reinitializing the UFS device")
96a7141da332 ("scsi: ufs: core: Add support for reinitializing the UFS device")
c2c38c573a2e ("scsi: ufs: core: Add reinit_notify() callback")
031312dbc695 ("scsi: ufs: ufs-qcom: Remove unnecessary goto statements")
4a5bd1a928a2 ("Merge patch series "Prepare for upstreaming Pixel 6 and 7 UFS support"")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d5130c5a093257aa4542aaded8034ef116a7624a Mon Sep 17 00:00:00 2001
From: Avri Altman <avri.altman@wdc.com>
Date: Tue, 10 Sep 2024 07:45:43 +0300
Subject: [PATCH] scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb()
Replace manual offset calculations for response_upiu and prd_table in
ufshcd_init_lrb() with pre-calculated offsets already stored in the
utp_transfer_req_desc structure. The pre-calculated offsets are set
differently in ufshcd_host_memory_configure() based on the
UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk, ensuring correct alignment and
access.
Fixes: 26f968d7de82 ("scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk")
Cc: stable@vger.kernel.org
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20240910044543.3812642-1-avri.altman@wdc.com
Acked-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 24a32e2fd75e..6a71ebf953e2 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -2933,9 +2933,8 @@ static void ufshcd_init_lrb(struct ufs_hba *hba, struct ufshcd_lrb *lrb, int i)
struct utp_transfer_req_desc *utrdlp = hba->utrdl_base_addr;
dma_addr_t cmd_desc_element_addr = hba->ucdl_dma_addr +
i * ufshcd_get_ucd_size(hba);
- u16 response_offset = offsetof(struct utp_transfer_cmd_desc,
- response_upiu);
- u16 prdt_offset = offsetof(struct utp_transfer_cmd_desc, prd_table);
+ u16 response_offset = le16_to_cpu(utrdlp[i].response_upiu_offset);
+ u16 prdt_offset = le16_to_cpu(utrdlp[i].prd_table_offset);
lrb->utr_descriptor_ptr = utrdlp + i;
lrb->utrd_dma_addr = hba->utrdl_dma_addr +
reply other threads:[~2024-10-14 11:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=2024101436-cherub-rehydrate-8076@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=martin.petersen@oracle.com \
--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