Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-11 Thread Michal Suchánek
On Fri, 11 Aug 2017 12:28:57 -0300 Henrique de Moraes Holschuh wrote: > On Fri, 11 Aug 2017, Michal Suchánek wrote: > > On 2017-08-10 18:30, Jason Gunthorpe wrote: > > > On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > > > > > Existing bus implementations

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-11 Thread Michal Suchánek
On Fri, 11 Aug 2017 12:28:57 -0300 Henrique de Moraes Holschuh wrote: > On Fri, 11 Aug 2017, Michal Suchánek wrote: > > On 2017-08-10 18:30, Jason Gunthorpe wrote: > > > On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > > > > > Existing bus implementations do properly chain

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-11 Thread Henrique de Moraes Holschuh
On Fri, 11 Aug 2017, Michal Suchánek wrote: > On 2017-08-10 18:30, Jason Gunthorpe wrote: > > On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > > > > Existing bus implementations do properly chain to driver shutdown (eg > > > > look at mmc_bus_shutdown) and it appears to have been

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-11 Thread Henrique de Moraes Holschuh
On Fri, 11 Aug 2017, Michal Suchánek wrote: > On 2017-08-10 18:30, Jason Gunthorpe wrote: > > On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > > > > Existing bus implementations do properly chain to driver shutdown (eg > > > > look at mmc_bus_shutdown) and it appears to have been

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-11 Thread Jarkko Sakkinen
On Wed, Aug 09, 2017 at 03:52:02PM -0600, Jason Gunthorpe wrote: > On Wed, Aug 09, 2017 at 11:34:20PM +0200, Michal Suchanek wrote: > > Disabling the driver hook by setting class hook is totally sound design > > not prone to error as evidenced by the single implementation of the > > class hook. >

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-11 Thread Jarkko Sakkinen
On Wed, Aug 09, 2017 at 03:52:02PM -0600, Jason Gunthorpe wrote: > On Wed, Aug 09, 2017 at 11:34:20PM +0200, Michal Suchanek wrote: > > Disabling the driver hook by setting class hook is totally sound design > > not prone to error as evidenced by the single implementation of the > > class hook. >

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-10 Thread Michal Suchánek
On 2017-08-10 18:30, Jason Gunthorpe wrote: On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > Existing bus implementations do properly chain to driver shutdown (eg > look at mmc_bus_shutdown) and it appears to have been written like Neither isa nor ibmebus does. These are

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-10 Thread Michal Suchánek
On 2017-08-10 18:30, Jason Gunthorpe wrote: On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > Existing bus implementations do properly chain to driver shutdown (eg > look at mmc_bus_shutdown) and it appears to have been written like Neither isa nor ibmebus does. These are

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-10 Thread Jason Gunthorpe
On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > > The bus disables the driver callback, on the expectation that the bus > > implementation will do it. > > Which is totally sound design not prone to errors. Well, I agree it isn't the easiest... > > Existing bus implementations

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-10 Thread Jason Gunthorpe
On Thu, Aug 10, 2017 at 12:18:11PM +0200, Michal Suchánek wrote: > > The bus disables the driver callback, on the expectation that the bus > > implementation will do it. > > Which is totally sound design not prone to errors. Well, I agree it isn't the easiest... > > Existing bus implementations

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-10 Thread Michal Suchánek
On Wed, 9 Aug 2017 15:52:02 -0600 Jason Gunthorpe wrote: > On Wed, Aug 09, 2017 at 11:34:20PM +0200, Michal Suchanek wrote: > > Disabling the driver hook by setting class hook is totally sound > > design not prone to error as evidenced by the single

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-10 Thread Michal Suchánek
On Wed, 9 Aug 2017 15:52:02 -0600 Jason Gunthorpe wrote: > On Wed, Aug 09, 2017 at 11:34:20PM +0200, Michal Suchanek wrote: > > Disabling the driver hook by setting class hook is totally sound > > design not prone to error as evidenced by the single implementation > > of the class hook. > >

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-09 Thread Jason Gunthorpe
On Wed, Aug 09, 2017 at 11:34:20PM +0200, Michal Suchanek wrote: > Disabling the driver hook by setting class hook is totally sound design > not prone to error as evidenced by the single implementation of the > class hook. It was done this was for consistency, if you look at the full code:

Re: [PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-09 Thread Jason Gunthorpe
On Wed, Aug 09, 2017 at 11:34:20PM +0200, Michal Suchanek wrote: > Disabling the driver hook by setting class hook is totally sound design > not prone to error as evidenced by the single implementation of the > class hook. It was done this was for consistency, if you look at the full code:

[PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-09 Thread Michal Suchanek
Disabling the driver hook by setting class hook is totally sound design not prone to error as evidenced by the single implementation of the class hook. Fixes: d1bd4a792d39 ("tpm: Issue a TPM2_Shutdown for TPM2 devices.") Fixes: f77af1516584 ("Add "shutdown" to "struct class".") Signed-off-by:

[PATCH] Do not disable driver and bus shutdown hook when class shutdown hook is set.

2017-08-09 Thread Michal Suchanek
Disabling the driver hook by setting class hook is totally sound design not prone to error as evidenced by the single implementation of the class hook. Fixes: d1bd4a792d39 ("tpm: Issue a TPM2_Shutdown for TPM2 devices.") Fixes: f77af1516584 ("Add "shutdown" to "struct class".") Signed-off-by: