Commit a23064c4 authored by Bean Huo's avatar Bean Huo Committed by Martin K. Petersen

scsi: ufs: Change upiu_flags to be u8

According to the UFS Spec, the Flags field in the UPIU is one byte in size,
not 4. Change it to be u8.

Link: https://lore.kernel.org/r/20200706123936.24799-1-huobean@gmail.comTested-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Signed-off-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9133d27e
...@@ -2240,7 +2240,7 @@ static void ufshcd_disable_intr(struct ufs_hba *hba, u32 intrs) ...@@ -2240,7 +2240,7 @@ static void ufshcd_disable_intr(struct ufs_hba *hba, u32 intrs)
* @cmd_dir: requests data direction * @cmd_dir: requests data direction
*/ */
static void ufshcd_prepare_req_desc_hdr(struct ufshcd_lrb *lrbp, 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; struct utp_transfer_req_desc *req_desc = lrbp->utr_descriptor_ptr;
u32 data_direction; u32 data_direction;
...@@ -2286,7 +2286,7 @@ static void ufshcd_prepare_req_desc_hdr(struct ufshcd_lrb *lrbp, ...@@ -2286,7 +2286,7 @@ static void ufshcd_prepare_req_desc_hdr(struct ufshcd_lrb *lrbp,
* @upiu_flags: flags * @upiu_flags: flags
*/ */
static 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 scsi_cmnd *cmd = lrbp->cmd;
struct utp_upiu_req *ucd_req_ptr = lrbp->ucd_req_ptr; 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) ...@@ -2319,7 +2319,7 @@ void ufshcd_prepare_utp_scsi_cmd_upiu(struct ufshcd_lrb *lrbp, u32 upiu_flags)
* @upiu_flags: flags * @upiu_flags: flags
*/ */
static void ufshcd_prepare_utp_query_req_upiu(struct ufs_hba *hba, 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 utp_upiu_req *ucd_req_ptr = lrbp->ucd_req_ptr;
struct ufs_query *query = &hba->dev_cmd.query; struct ufs_query *query = &hba->dev_cmd.query;
...@@ -2375,7 +2375,7 @@ static inline void ufshcd_prepare_utp_nop_upiu(struct ufshcd_lrb *lrbp) ...@@ -2375,7 +2375,7 @@ static inline void ufshcd_prepare_utp_nop_upiu(struct ufshcd_lrb *lrbp)
*/ */
static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
{ {
u32 upiu_flags; u8 upiu_flags;
int ret = 0; int ret = 0;
if ((hba->ufs_version == UFSHCI_VERSION_10) || if ((hba->ufs_version == UFSHCI_VERSION_10) ||
...@@ -2403,7 +2403,7 @@ static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) ...@@ -2403,7 +2403,7 @@ static int ufshcd_comp_devman_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
*/ */
static int ufshcd_comp_scsi_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) static int ufshcd_comp_scsi_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
{ {
u32 upiu_flags; u8 upiu_flags;
int ret = 0; int ret = 0;
if ((hba->ufs_version == UFSHCI_VERSION_10) || if ((hba->ufs_version == UFSHCI_VERSION_10) ||
...@@ -6121,7 +6121,7 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba, ...@@ -6121,7 +6121,7 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,
int tag; int tag;
struct completion wait; struct completion wait;
unsigned long flags; unsigned long flags;
u32 upiu_flags; u8 upiu_flags;
down_read(&hba->clk_scaling_lock); down_read(&hba->clk_scaling_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment