[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR04MB657566F1BB8C808EFBF9FBB9FCAB0@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Mon, 11 Jan 2021 09:20:32 +0000
From: Avri Altman <Avri.Altman@....com>
To: Jaegeuk Kim <jaegeuk@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"kernel-team@...roid.com" <kernel-team@...roid.com>
CC: "cang@...eaurora.org" <cang@...eaurora.org>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"bvanassche@....org" <bvanassche@....org>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
Jaegeuk Kim <jaegeuk@...gle.com>
Subject: RE: [PATCH v2] scsi: ufs: WB is not allowed in RPMB_LUN
> static inline bool ufs_is_valid_unit_desc_lun(struct ufs_dev_info *dev_info,
> - u8 lun)
> + u8 lun, u8 param_offset)
> {
> if (!dev_info || !dev_info->max_lu_supported) {
> pr_err("Max General LU supported by UFS isn't initialized\n");
> return false;
> }
> -
> + /* WB is not allowed in RPMB_WLUN */
/* wb is only allowed to either a sha*/
> + if (param_offset == UNIT_DESC_PARAM_WB_BUF_ALLOC_UNITS)
> + return lun < dev_info->max_lu_supported;
I think here you should use UFS_UPIU_MAX_WB_LUN_ID and not dev_info->max_lu_supported.
Thanks,
Avri
Powered by blists - more mailing lists