RE: [PATCH v7 09/11] scsi: ufs: connect to RPMB subsystem

2017-03-22 Thread Winkler, Tomas
> 
> On Mon, Nov 07, 2016 at 07:27:38PM +, Winkler, Tomas wrote:
> > I  value your opinion but I'm not responsible for inventing RPMB
> > and/or its  implementation storage devices (eMMC, UFC, NVMe), it's pretty
> much done deal out there in the wild.
> > I'm just trying to provide common API above it.

Somehow I've missed that answer, now I got back when search for comments before 
I'll post a new series.
 
> And the common API must go through the SCSI midlayer.  

I've actually tried to do  a midlayer, but I found it's too UFS specific, so 
there is no point to this abstraction.  
As not all needed data are accessible via scsi calls.  The solution I propose 
fits with what is done in eMMC (emmc specific  IOCTL).
There is already some code that breaks that layering in  
ufshcd_set_dev_pwr_mode when talking to the special sdev_ufs.
Maybe I need more hint for the correct directions.

If it can't we won't
> support it, so please drop the UFS patches from the series.

If you have more constructive comments, I'll be glad to hear and address. 

Thanks
Tomas

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

2017-02-22 Thread Winkler, Tomas

> 
> On Wed, Feb 22, 2017 at 4:14 PM, Winkler, Tomas <tomas.wink...@intel.com>
> wrote:
> > On Wed, 2017-02-22 at 15:22 +0800, f...@ikuai8.com wrote:
> >> From: Gao Feng <f...@ikuai8.com>
> >>
> >> When make allyesconfig, there is one compile error on my platform
> >> "gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4".
> >> The following is the output.
> >>
> >> Documentation/misc-devices/mei/mei-amt-version.c: In function ‘main’:
> >> Documentation/misc-devices/mei/mei-amt-version.c:103:5: warning:
> >> ‘acmd.fd’
> >> is used uninitialized in this function [-Wuninitialized]
> >>   if (cl->fd != -1)
> >>  ^
> >> Documentation/misc-devices/mei/mei-amt-version.c:443:21: note:
> >> ‘acmd.fd’
> >> was declared here
> >>   struct amt_host_if acmd;
> >>  ^
> >> This commit fixes this compile error.
> >>
> >> Signed-off-by: Gao Feng <f...@ikuai8.com>
> >
> > This is false positive, as the variable is assined in mei_init(), in
> > any case, the code has moved under samples diretory in the current
> > kernel. Anything need to be fixed there first
> >
> > Thanks
> > Tomas
> 
> I think it is not false positive.
> The function stack is main->amt_host_if_init->mei_init->mei_deinit.
> There is one check "if (cl->fd != -1)".

Isn't  the first line in mei_init me->fd = open("/dev/mei", O_RDWR); ? 
I don't see mei_deinit called w/o mei_init called first. 
 
> Because this fd is not initialized to -1, so it may hit the condition, and 
> execute
> close.
> 
> So it should be fixed, although these codes would be moved to sample
> director.

Please try with the master branch first in case  I'm still wrong.
Thanks
 
> Regards
> Feng
> 
> >
> >> ---
> >>  Documentation/misc-devices/mei/mei-amt-version.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/Documentation/misc-devices/mei/mei-amt-version.c
> >> b/Documentation/misc-devices/mei/mei-amt-version.c
> >> index 49e4f77..ca035cb 100644
> >> --- a/Documentation/misc-devices/mei/mei-amt-version.c
> >> +++ b/Documentation/misc-devices/mei/mei-amt-version.c
> >> @@ -297,6 +297,7 @@ static bool amt_host_if_init(struct amt_host_if
> >> *acmd,
> >> unsigned long send_timeout, bool verbose)  {
> >>   acmd->send_timeout = (send_timeout) ? send_timeout : 2;
> >> + acmd->mei_cl.fd = -1;
> >>   acmd->initialized = mei_init(>mei_cl, _IAMTHIF, 0,
> >> verbose);
> >>   return acmd->initialized;
> >>  }


Re: [PATCH kernel 1/1] powerpc/Documentation/misc-devices/: Fix one compile error

2017-02-22 Thread Winkler, Tomas
On Wed, 2017-02-22 at 15:22 +0800, f...@ikuai8.com wrote:
> From: Gao Feng 
> 
> When make allyesconfig, there is one compile error on my platform
> "gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4".
> The following is the output.
> 
> Documentation/misc-devices/mei/mei-amt-version.c: In function ‘main’:
> Documentation/misc-devices/mei/mei-amt-version.c:103:5: warning:
> ‘acmd.fd’
> is used uninitialized in this function [-Wuninitialized]
>   if (cl->fd != -1)
>  ^
> Documentation/misc-devices/mei/mei-amt-version.c:443:21: note:
> ‘acmd.fd’
> was declared here
>   struct amt_host_if acmd;
>  ^
> This commit fixes this compile error.
> 
> Signed-off-by: Gao Feng 

This is false positive, as the variable is assined in mei_init(), in
any case, the code has moved under samples diretory in the current
kernel. Anything need to be fixed there first

Thanks 
Tomas

> ---
>  Documentation/misc-devices/mei/mei-amt-version.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/misc-devices/mei/mei-amt-version.c
> b/Documentation/misc-devices/mei/mei-amt-version.c
> index 49e4f77..ca035cb 100644
> --- a/Documentation/misc-devices/mei/mei-amt-version.c
> +++ b/Documentation/misc-devices/mei/mei-amt-version.c
> @@ -297,6 +297,7 @@ static bool amt_host_if_init(struct amt_host_if
> *acmd,
>     unsigned long send_timeout, bool verbose)
>  {
>   acmd->send_timeout = (send_timeout) ? send_timeout : 2;
> + acmd->mei_cl.fd = -1;
>   acmd->initialized = mei_init(>mei_cl, _IAMTHIF, 0,
> verbose);
>   return acmd->initialized;
>  }

RE: [PATCH v7 09/11] scsi: ufs: connect to RPMB subsystem

2016-11-07 Thread Winkler, Tomas
> 
> On Mon, Nov 07, 2016 at 09:53:12PM +0200, Tomas Winkler wrote:
> > Register UFS RPMB LUN with the RPMB subsystem and provide
> > implementation for the RPMB access operations. RPMB partition is
> > accessed via a sequence of security protocol in and security protocol
> > out commands with UFS specific parameters. This multi step process is
> > abstracted into 4 basic RPMB commands.
> 
> This is a giant layering violation - the security protocol is not something 
> up to
> the LLDD but the core code.
> 
> And honestly the idea of defintining a security protocol in the UFS spec is 
> just
> as braindead.  If you care about this please take it up with T10 to get RPMB
> support into one of the core SCSI specs instead of a transport.

I  value your opinion but I'm not responsible for inventing RPMB 
and/or its  implementation storage devices (eMMC, UFC, NVMe), it's pretty much 
done deal out there in the wild. 
I'm just trying to provide common API above it.

Thanks
Tomas

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v2 1/4] samples: move misc-devices/mei example code from Documentation

2016-09-21 Thread Winkler, Tomas
> 
> Move misc-devices/mei examples to samples/mei and remove it from
> Documentation Makefile. Delete misc-devices/Makefile.
> 
> Create a new Makefile to build samples/mei. It can be built from top level
> directory or from mei directory:
> 
> Run make -C samples/mei or cd samples/mei; make
> 
> Acked-by: Jonathan Corbet 
> Signed-off-by: Shuah Khan 


Acked-by: Tomas Winkler  


> ---
>  Documentation/Makefile   |   2 +-
>  Documentation/misc-devices/Makefile  |   1 -
>  Documentation/misc-devices/mei/.gitignore|   1 -
>  Documentation/misc-devices/mei/Makefile  |   5 -
>  Documentation/misc-devices/mei/TODO  |   2 -
>  Documentation/misc-devices/mei/mei-amt-version.c | 479 
> ---
>  MAINTAINERS  |   1 +
>  samples/mei/.gitignore   |   1 +
>  samples/mei/Makefile |   9 +
>  samples/mei/TODO |   2 +
>  samples/mei/mei-amt-version.c| 479
> +++
>  11 files changed, 493 insertions(+), 489 deletions(-)  delete mode 100644
> Documentation/misc-devices/Makefile
>  delete mode 100644 Documentation/misc-devices/mei/.gitignore
>  delete mode 100644 Documentation/misc-devices/mei/Makefile
>  delete mode 100644 Documentation/misc-devices/mei/TODO
>  delete mode 100644 Documentation/misc-devices/mei/mei-amt-version.c
>  create mode 100644 samples/mei/.gitignore  create mode 100644
> samples/mei/Makefile  create mode 100644 samples/mei/TODO  create
> mode 100644 samples/mei/mei-amt-version.c
> 
> diff --git a/Documentation/Makefile b/Documentation/Makefile index
> 80b5bdc..3c2a207 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -1,2 +1,2 @@
>  subdir-y := accounting auxdisplay blackfin \
> - laptops misc-devices pcmcia timers watchdog
> + laptops pcmcia timers watchdog
> diff --git a/Documentation/misc-devices/Makefile b/Documentation/misc-
> devices/Makefile
> deleted file mode 100644
> index e2b7aa4..000
> --- a/Documentation/misc-devices/Makefile
> +++ /dev/null
> @@ -1 +0,0 @@
> -subdir-y := mei
> diff --git a/Documentation/misc-devices/mei/.gitignore
> b/Documentation/misc-devices/mei/.gitignore
> deleted file mode 100644
> index f356b81..000
> --- a/Documentation/misc-devices/mei/.gitignore
> +++ /dev/null
> @@ -1 +0,0 @@
> -mei-amt-version
> diff --git a/Documentation/misc-devices/mei/Makefile
> b/Documentation/misc-devices/mei/Makefile
> deleted file mode 100644
> index d758047..000
> --- a/Documentation/misc-devices/mei/Makefile
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -# List of programs to build
> -hostprogs-y := mei-amt-version
> -HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include -# Tell kbuild
> to always build the programs -always := $(hostprogs-y) diff --git
> a/Documentation/misc-devices/mei/TODO b/Documentation/misc-
> devices/mei/TODO
> deleted file mode 100644
> index 6b3625d..000
> --- a/Documentation/misc-devices/mei/TODO
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -TODO:
> - - Cleanup and split the timer function
> diff --git a/Documentation/misc-devices/mei/mei-amt-version.c
> b/Documentation/misc-devices/mei/mei-amt-version.c
> deleted file mode 100644
> index 57d0d87..000
> --- a/Documentation/misc-devices/mei/mei-amt-version.c
> +++ /dev/null
> @@ -1,479 +0,0 @@
> -
> /**
> 
> - * Intel Management Engine Interface (Intel MEI) Linux driver
> - * Intel MEI Interface Header
> - *
> - * This file is provided under a dual BSD/GPLv2 license.  When using or
> - * redistributing this file, you may do so under either license.
> - *
> - * GPL LICENSE SUMMARY
> - *
> - * Copyright(c) 2012 Intel Corporation. All rights reserved.
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of version 2 of the GNU General Public License as
> - * published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> GNU
> - * General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
> - * USA
> - *
> - * The full GNU General Public License is included in this distribution
> - * in the file called LICENSE.GPL.
> - *
> - * Contact Information:
> - *   Intel Corporation.
> - *   linux-...@linux.intel.com
> - *   http://www.intel.com
> - *
> - * BSD LICENSE
> - *
> - * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved.
> - * All rights 

RE: [PATCH 5/8] samples: move misc-devices/mei example code from Documentation

2016-09-20 Thread Winkler, Tomas


> -Original Message-
> From: Jonathan Corbet [mailto:cor...@lwn.net]
> Sent: Monday, September 19, 2016 19:14
> To: Shuah Khan <shua...@osg.samsung.com>
> Cc: Dutt, Sudeep <sudeep.d...@intel.com>; Dixit, Ashutosh
> <ashutosh.di...@intel.com>; Winkler, Tomas <tomas.wink...@intel.com>;
> t...@linutronix.de; w...@iguana.be; li...@roeck-us.net;
> elfr...@users.sourceforge.net; nicolas.dich...@6wind.com;
> da...@davemloft.net; gre...@linuxfoundation.org; Chandramouli,
> Dasaratharaman <dasaratharaman.chandramo...@intel.com>;
> maheshkhanwal...@gmail.com; mikedan...@google.com;
> b...@decadent.org.uk; ghackm...@google.com; linux-doc@vger.kernel.org;
> linux-ker...@vger.kernel.org; linux-pcm...@lists.infradead.org; linux-
> watch...@vger.kernel.org
> Subject: Re: [PATCH 5/8] samples: move misc-devices/mei example code
> from Documentation
> 
> On Mon, 19 Sep 2016 08:47:36 -0600
> Shuah Khan <shua...@osg.samsung.com> wrote:
> 
> > Move misc-devices/mei examples to samples/mei and remove it from
> > Documentation Makefile. Delete misc-devices/Makefile.
> >
> > Create a new Makefile to build samples/mei. It can be built from top
> > level directory or from mei directory:
> 
> This one still has a fair amount of code hiding in the .txt files, but that's 
> a
> separate job.
> 
> Acked-by: Jonathan Corbet <cor...@lwn.net>

Shouldn't  this update also the  MAINTAINERS file?
Tomas

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html