RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-08 Thread Winkler, Tomas
> > On Tue, Feb 06, 2018 at 09:26:15PM +, Winkler, Tomas wrote: > > > > > > On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > > > > > > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > > > > > > > diff --git a/include/linux/tpm.h

RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-08 Thread Winkler, Tomas
> > On Tue, Feb 06, 2018 at 09:26:15PM +, Winkler, Tomas wrote: > > > > > > On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > > > > > > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > > > > > > > diff --git a/include/linux/tpm.h

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-08 Thread Jarkko Sakkinen
On Tue, Feb 06, 2018 at 09:26:15PM +, Winkler, Tomas wrote: > > > > On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > > > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > > > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-08 Thread Jarkko Sakkinen
On Tue, Feb 06, 2018 at 09:26:15PM +, Winkler, Tomas wrote: > > > > On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > > > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > > > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h

RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-06 Thread Winkler, Tomas
> > On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h index > > > > bcdd3790e94d..06639fb6ab85 100644 > > > > +++ b/include/linux/tpm.h

RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-06 Thread Winkler, Tomas
> > On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h index > > > > bcdd3790e94d..06639fb6ab85 100644 > > > > +++ b/include/linux/tpm.h

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-06 Thread Jarkko Sakkinen
On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h index > > > bcdd3790e94d..06639fb6ab85 100644 > > > +++ b/include/linux/tpm.h > > > @@ -44,7

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-02-06 Thread Jarkko Sakkinen
On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h index > > > bcdd3790e94d..06639fb6ab85 100644 > > > +++ b/include/linux/tpm.h > > > @@ -44,7

RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-29 Thread Winkler, Tomas
> On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > I think if a driver can fail reliquish then it needs some kind of > > > strategy to recover. > > > Maybe some driver can and some not, but if it doesn't succeed it > > should return an error. > > But you can't just leave

RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-29 Thread Winkler, Tomas
> On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > > > I think if a driver can fail reliquish then it needs some kind of > > > strategy to recover. > > > Maybe some driver can and some not, but if it doesn't succeed it > > should return an error. > > But you can't just leave

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-29 Thread Jason Gunthorpe
On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > I think if a driver can fail reliquish then it needs some kind of strategy > > to > > recover. > Maybe some driver can and some not, but if it doesn't succeed it > should return an error. But you can't just leave the driver in

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-29 Thread Jason Gunthorpe
On Sun, Jan 28, 2018 at 09:17:53PM +, Winkler, Tomas wrote: > > I think if a driver can fail reliquish then it needs some kind of strategy > > to > > recover. > Maybe some driver can and some not, but if it doesn't succeed it > should return an error. But you can't just leave the driver in

RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-28 Thread Winkler, Tomas
> > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h index > > bcdd3790e94d..06639fb6ab85 100644 > > +++ b/include/linux/tpm.h > > @@ -44,7 +44,7 @@ struct tpm_class_ops { > > bool (*update_timeouts)(struct tpm_chip

RE: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-28 Thread Winkler, Tomas
> > On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > > > diff --git a/include/linux/tpm.h b/include/linux/tpm.h index > > bcdd3790e94d..06639fb6ab85 100644 > > +++ b/include/linux/tpm.h > > @@ -44,7 +44,7 @@ struct tpm_class_ops { > > bool (*update_timeouts)(struct tpm_chip

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-28 Thread Jason Gunthorpe
On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > diff --git a/include/linux/tpm.h b/include/linux/tpm.h > index bcdd3790e94d..06639fb6ab85 100644 > +++ b/include/linux/tpm.h > @@ -44,7 +44,7 @@ struct tpm_class_ops { > bool (*update_timeouts)(struct tpm_chip *chip, >

Re: [PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-28 Thread Jason Gunthorpe
On Sun, Jan 28, 2018 at 09:51:00AM +0200, Tomas Winkler wrote: > diff --git a/include/linux/tpm.h b/include/linux/tpm.h > index bcdd3790e94d..06639fb6ab85 100644 > +++ b/include/linux/tpm.h > @@ -44,7 +44,7 @@ struct tpm_class_ops { > bool (*update_timeouts)(struct tpm_chip *chip, >

[PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-27 Thread Tomas Winkler
The correct sequence is to first request locality and only after that perform cmd_ready handshake, otherwise the hardware will drop the subsequent message as from the device point of view the cmd_ready handshake wasn't performed. Symmetrically locality has to be relinquished only after going idle

[PATCH 1/2 v2] tpm: cmd_ready command can be issued only after granting locality

2018-01-27 Thread Tomas Winkler
The correct sequence is to first request locality and only after that perform cmd_ready handshake, otherwise the hardware will drop the subsequent message as from the device point of view the cmd_ready handshake wasn't performed. Symmetrically locality has to be relinquished only after going idle