lkml.org 
[lkml]   [2021]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/8] scsi: ufshpb: Cache HPB Control mode on init
On Wed, Jan 27, 2021 at 05:12:10PM +0200, Avri Altman wrote:
> We will use it later, when we'll need to differentiate between device
> and host control modes.
>
> Signed-off-by: Avri Altman <avri.altman@wdc.com>
> ---
> drivers/scsi/ufs/ufshpb.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
> index d3e6c5b32328..183bdf35f2d0 100644
> --- a/drivers/scsi/ufs/ufshpb.c
> +++ b/drivers/scsi/ufs/ufshpb.c
> @@ -26,6 +26,8 @@ static int tot_active_srgn_pages;
>
> static struct workqueue_struct *ufshpb_wq;
>
> +static enum UFSHPB_MODE ufshpb_mode;

How are you allowed to have a single variable for a device-specific
thing? What happens when you have two controllers or disks or whatever
you are binding to here? How does this work at all?

This should be per-device, right?

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-01-27 16:24    [W:1.906 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site