scsi: ufs: change upiu_flags to be u8
PATCH 1/1 scsi: ufs: change upiu_flags to be u8
From: Bean Huo <[email protected]>
According to the UFS Spec, the Flags in the UPIU is one-byte length, not 4 bytes. change it to be u8.
--- drivers/scsi/ufs/ufshcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/scsi/ufs/ufshcd.c +6 -6
@@ -2240,7 +2240,7 @@ static void ufshcd_disable_intr(struct ufs_hba *hba, u32 intrs)* @cmd_dir: requests data direction */ static void ufshcd_prepare_req_desc_hdr (struct ufshcd_lrb *lrbp, -u32 *upiu_flags,enum dma_data_direction cmd_dir) +u8 *upiu_flags,enum dma_data_direction cmd_dir) {struct utp_transfer_req_desc *req_desc = lrbp->utr_descriptor_ptr;u32 data_direction;
@@ -2286,7 +2286,7 @@ static void ufshcd_prepare_req_desc_hdr(struct ufshcd_lrb *lrbp,* @upiu_flags: flags */ static -void ufshcd_prepare_utp_scsi_cmd_upiu (struct ufshcd_lrb *lrbp,u32 upiu_flags) +void ufshcd_prepare_utp_scsi_cmd_upiu (struct ufshcd_lrb *lrbp,u8 upiu_flags) {struct scsi_cmnd *cmd = lrbp->cmd;struct utp_upiu_req *ucd_req_ptr = lrbp->ucd_req_ptr;
@@ -2319,7 +2319,7 @@ void ufshcd_prepare_utp_scsi_cmd_upiu(struct ufshcd_lrb *lrbp, u32 upiu_flags)* @upiu_flags: flags */ static void ufshcd_prepare_utp_query_req_upiu (struct ufs_hba *hba, -struct ufshcd_lrb *lrbp,u32 upiu_flags) +struct ufshcd_lrb *lrbp,u8 upiu_flags) {struct utp_upiu_req *ucd_req_ptr = lrbp->ucd_req_ptr;struct ufs_query *query = &hba->dev_cmd.query;
@@ -2376,7 +2376,7 @@ static inline void ufshcd_prepare_utp_nop_upiu(struct ufshcd_lrb *lrbp)static int ufshcd_compose_devman_upiu (struct ufs_hba *hba,struct ufshcd_lrb *lrbp) { -u32 upiu_flags; +u8 upiu_flags;int ret =0 ; if ((hba->ufs_version == UFSHCI_VERSION_10) ||
@@ -2404,7 +2404,7 @@ static int ufshcd_compose_devman_upiu(struct ufs_hba *hba,*/ static int ufshcd_comp_scsi_upiu (struct ufs_hba *hba,struct ufshcd_lrb *lrbp) { -u32 upiu_flags; +u8 upiu_flags;int ret =0 ; if ((hba->ufs_version == UFSHCI_VERSION_10) ||
@@ -6124,7 +6124,7 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,int tag;struct completion wait;unsigned long flags; -u32 upiu_flags; +u8 upiu_flags;down_read (&hba->clk_scaling_lock);
Signature · 1 line
2.17.1
Quoted 8 lines
From: Bean Huo <[email protected]>
According to the UFS Spec, the Flags in the UPIU is one-byte length, not 4 bytes. change it to be u8.
Signed-off-by Bean Huo <[email protected]>
Hi Bean
Quoted 10 lines
-----Original Message-----
From: Bean Huo <[email protected]>
Sent: 06 July 2020 18:10
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] scsi: ufs: changeupiu_flagsto be u8
Quoted 7 lines
From: Bean Huo <[email protected]>
According to the UFS Spec, the Flags in the UPIU is one-byte length, not 4 bytes. change it to be u8.
Signed-off-by Bean Huo <[email protected]>---
Booted and tested on exynos7 board, tested basic read/write, so
Thanks,
Quoted 48 lines
drivers/scsi/ufs/ufshcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/scsi/ufs/ufshcd.c index renamed from drivers/scsi/ufs/ufshcd.c +0
-0
96d830bb900f..d7fd5891e81f100644drivers/scsi/ufs/ufshcd.c +1
-1@@ -2240,7 +2240,7 @@ static void ufshcd_disable_intr(struct ufs_hba *hba,u32 intrs) * @cmd_dir: requests data direction */ static void ufshcd_prepare_req_desc_hdr (struct ufshcd_lrb *lrbp, -u32 *upiu_flags,enum dma_data_direction cmd_dir) +u8 *upiu_flags,enum dma_data_direction cmd_dir) {struct utp_transfer_req_desc *req_desc = lrbp->utr_descriptor_ptr;drivers/scsi/ufs/ufshcd.c +3
-1u32 data_direction;@@ -2286,7 +2286,7 @@ static void ufshcd_prepare_req_desc_hdr(structufshcd_lrb *lrbp, * @upiu_flags: flags */ static -void ufshcd_prepare_utp_scsi_cmd_upiu (struct ufshcd_lrb *lrbp,u32 upiu_flags) +void ufshcd_prepare_utp_scsi_cmd_upiu(struct ufshcd_lrb *lrbp, u8 +upiu_flags) {struct scsi_cmnd *cmd = lrbp->cmd; struct utp_upiu_req *ucd_req_ptr = lrbp->ucd_req_ptr; @@ -2319,7 +2319,7 @@ void ufshcd_prepare_utp_scsi_cmd_upiu(struct ufshcd_lrb *lrbp,u32
upiu_flags)
* @upiu_flags: flags
*/
static void ufshcd_prepare_utp_query_req_upiu(structufs_hba*hba,drivers/scsi/ufs/ufshcd.c +1
-1- struct ufshcd_lrb *lrbp, u32 upiu_flags) + struct ufshcd_lrb *lrbp, u8 upiu_flags) {struct utp_upiu_req *ucd_req_ptr = lrbp->ucd_req_ptr; struct ufs_query *query = &hba->dev_cmd.query; @@ -2376,7 +2376,7@@ static inline void
ufshcd_prepare_utp_nop_upiu(struct ufshcd_lrb *lrbp)static int ufshcd_compose_devman_upiu(structufs_hba*hba,drivers/scsi/ufs/ufshcd.c +1
-1struct ufshcd_lrb *lrbp) { -u32 upiu_flags; +u8 upiu_flags;int ret =0 ; if ((hba->ufs_version == UFSHCI_VERSION_10) || @@ -2404,7 +2404,7
Quoted 3 lines
@@ static int ufshcd_compose_devman_upiu(struct
ufs_hba*hba,
*/
static int ufshcd_comp_scsi_upiu(structufs_hba*hba, structufshcd_lrb
*lrbp) {
Quoted 16 lines
drivers/scsi/ufs/ufshcd.c +1
-1-u32 upiu_flags; +u8 upiu_flags;int ret =0 ; if ((hba->ufs_version == UFSHCI_VERSION_10) || @@ -6124,7 +6124,7@@ static int ufshcd_issue_devman_upiu_cmd(struct
ufs_hba*hba,drivers/scsi/ufs/ufshcd.c +1
-2int tag;struct completion wait;unsigned long flags; -u32 upiu_flags; +u8 upiu_flags;down_read (&hba->clk_scaling_lock); --2.17.1
Martin K. Petersen
AppliedQuoted 2 lines · Bean Huo
According to the UFS Spec, the Flags in the UPIU is one-byte length, not 4 bytes. change it to be u8.
Applied to 5.9/scsi-queue, thanks!
[1/1] scsi: ufs: Change upiu_flags to be u8
https://git.kernel.org/mkp/scsi/c/a23064c4123b
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering