diff mbox series

[v2,7/9] scsi: ufs: Add max_lu_supported in struct ufs_dev_info

Message ID 20200116215914.16015-8-huobean@gmail.com (mailing list archive)
State Superseded
Headers show
Series Use UFS device indicated maximum LU number | expand

Commit Message

Bean Huo Jan. 16, 2020, 9:59 p.m. UTC
From: Bean Huo <beanhuo@micron.com>

Add one new parameter max_lu_supported in struct ufs_dev_info,
which will be used to express exactly how many general LUs being
supported by UFS device.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Bean Huo <beanhuo@micron.com>
---
 drivers/scsi/ufs/ufs.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bart Van Assche Jan. 17, 2020, 4:02 a.m. UTC | #1
On 2020-01-16 13:59, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
> 
> Add one new parameter max_lu_supported in struct ufs_dev_info,
> which will be used to express exactly how many general LUs being
> supported by UFS device.
> 
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
> Signed-off-by: Bean Huo <beanhuo@micron.com>
> ---
>  drivers/scsi/ufs/ufs.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
> index fcc9b4d4e56f..c982bcc94662 100644
> --- a/drivers/scsi/ufs/ufs.h
> +++ b/drivers/scsi/ufs/ufs.h
> @@ -530,6 +530,8 @@ struct ufs_dev_info {
>  	bool f_power_on_wp_en;
>  	/* Keeps information if any of the LU is power on write protected */
>  	bool is_lu_power_on_wp;
> +	/* Maximum number of general LU supported by the UFS device */
> +	u8 max_lu_supported;
>  	u16 wmanufacturerid;
>  	/*UFS device Product Name */
>  	u8 *model;

There is a strong tradition in the Linux kernel community of introducing
structure members in the same patch that introduces the first user of
such a structure member. I think patch 8/9 is the first patch that uses
this structure member. Please consider combining patches 7/9 and 8/9
into a single patch.

Thanks,

Bart.
Bean Huo Jan. 17, 2020, 1:17 p.m. UTC | #2
Hi, Bart

> > Add one new parameter max_lu_supported in struct ufs_dev_info, which
> > will be used to express exactly how many general LUs being supported
> > by UFS device.
> >
> > Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> > Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
> > Signed-off-by: Bean Huo <beanhuo@micron.com>
> > ---
> >  drivers/scsi/ufs/ufs.h | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h index
> > fcc9b4d4e56f..c982bcc94662 100644
> > --- a/drivers/scsi/ufs/ufs.h
> > +++ b/drivers/scsi/ufs/ufs.h
> > @@ -530,6 +530,8 @@ struct ufs_dev_info {
> >  	bool f_power_on_wp_en;
> >  	/* Keeps information if any of the LU is power on write protected */
> >  	bool is_lu_power_on_wp;
> > +	/* Maximum number of general LU supported by the UFS device */
> > +	u8 max_lu_supported;
> >  	u16 wmanufacturerid;
> >  	/*UFS device Product Name */
> >  	u8 *model;
> 
> There is a strong tradition in the Linux kernel community of introducing structure
> members in the same patch that introduces the first user of such a structure
> member. I think patch 8/9 is the first patch that uses this structure member.
> Please consider combining patches 7/9 and 8/9 into a single patch.
> 
Thanks, I split it in order to review easilier. I will combine these two into a single one in the next version.

//Bean
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index fcc9b4d4e56f..c982bcc94662 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -530,6 +530,8 @@  struct ufs_dev_info {
 	bool f_power_on_wp_en;
 	/* Keeps information if any of the LU is power on write protected */
 	bool is_lu_power_on_wp;
+	/* Maximum number of general LU supported by the UFS device */
+	u8 max_lu_supported;
 	u16 wmanufacturerid;
 	/*UFS device Product Name */
 	u8 *model;