Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-18 Thread Jiang Liu
On 11/17/2012 08:25 AM, Toshi Kani wrote: > On Fri, 2012-11-16 at 16:22 -0800, Greg Kroah-Hartman wrote: >> On Fri, Nov 16, 2012 at 05:08:53PM -0700, Toshi Kani wrote: >> So the question is, does the ACPI core have to do that and if so, >> then why? > > The problem

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Toshi Kani
On Fri, 2012-11-16 at 16:22 -0800, Greg Kroah-Hartman wrote: > On Fri, Nov 16, 2012 at 05:08:53PM -0700, Toshi Kani wrote: > > > > > > > > > So the question is, does the ACPI core have to do that and if > > > > > > > > > so, then why? > > > > > > > > > > > > > > > > The problem is that acpi_memor

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Greg Kroah-Hartman
On Fri, Nov 16, 2012 at 05:08:53PM -0700, Toshi Kani wrote: > > > > > > > > So the question is, does the ACPI core have to do that and if > > > > > > > > so, then why? > > > > > > > > > > > > > > The problem is that acpi_memory_devcie_remove() can fail. > > > > > > > However, > > > > > > > devi

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Toshi Kani
> > > > > > > So the question is, does the ACPI core have to do that and if so, > > > > > > > then why? > > > > > > > > > > > > The problem is that acpi_memory_devcie_remove() can fail. However, > > > > > > device_release_driver() is a void function, so it cannot report its > > > > > > error. H

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Greg Kroah-Hartman
On Fri, Nov 16, 2012 at 04:35:06PM -0700, Toshi Kani wrote: > On Fri, 2012-11-16 at 15:33 -0800, Greg Kroah-Hartman wrote: > > On Fri, Nov 16, 2012 at 04:14:44PM -0700, Toshi Kani wrote: > > > On Fri, 2012-11-16 at 15:01 -0800, Greg Kroah-Hartman wrote: > > > > On Fri, Nov 16, 2012 at 03:45:43PM -0

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Toshi Kani
On Fri, 2012-11-16 at 15:33 -0800, Greg Kroah-Hartman wrote: > On Fri, Nov 16, 2012 at 04:14:44PM -0700, Toshi Kani wrote: > > On Fri, 2012-11-16 at 15:01 -0800, Greg Kroah-Hartman wrote: > > > On Fri, Nov 16, 2012 at 03:45:43PM -0700, Toshi Kani wrote: > > > > On Fri, 2012-11-16 at 22:43 +0100, Ra

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Greg Kroah-Hartman
On Fri, Nov 16, 2012 at 04:14:44PM -0700, Toshi Kani wrote: > On Fri, 2012-11-16 at 15:01 -0800, Greg Kroah-Hartman wrote: > > On Fri, Nov 16, 2012 at 03:45:43PM -0700, Toshi Kani wrote: > > > On Fri, 2012-11-16 at 22:43 +0100, Rafael J. Wysocki wrote: > > > > On Thursday, November 15, 2012 11:22:4

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Toshi Kani
On Fri, 2012-11-16 at 15:01 -0800, Greg Kroah-Hartman wrote: > On Fri, Nov 16, 2012 at 03:45:43PM -0700, Toshi Kani wrote: > > On Fri, 2012-11-16 at 22:43 +0100, Rafael J. Wysocki wrote: > > > On Thursday, November 15, 2012 11:22:47 AM Vasilis Liaskovitis wrote: > > > > As discussed in https://patc

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Greg Kroah-Hartman
On Fri, Nov 16, 2012 at 03:45:43PM -0700, Toshi Kani wrote: > On Fri, 2012-11-16 at 22:43 +0100, Rafael J. Wysocki wrote: > > On Thursday, November 15, 2012 11:22:47 AM Vasilis Liaskovitis wrote: > > > As discussed in https://patchwork.kernel.org/patch/1581581/ > > > the driver core remove function

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Toshi Kani
On Fri, 2012-11-16 at 22:43 +0100, Rafael J. Wysocki wrote: > On Thursday, November 15, 2012 11:22:47 AM Vasilis Liaskovitis wrote: > > As discussed in https://patchwork.kernel.org/patch/1581581/ > > the driver core remove function needs to always succeed. This means we need > > to know that the de

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Rafael J. Wysocki
On Thursday, November 15, 2012 11:22:47 AM Vasilis Liaskovitis wrote: > As discussed in https://patchwork.kernel.org/patch/1581581/ > the driver core remove function needs to always succeed. This means we need > to know that the device can be successfully removed before acpi_bus_trim / > acpi_bus_

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Rafael J. Wysocki
On Friday, November 16, 2012 01:33:10 PM Greg Kroah-Hartman wrote: > On Fri, Nov 16, 2012 at 10:17:17PM +0100, Rafael J. Wysocki wrote: > > On Thursday, November 15, 2012 11:22:47 AM Vasilis Liaskovitis wrote: > > > As discussed in https://patchwork.kernel.org/patch/1581581/ > > > the driver core r

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Greg Kroah-Hartman
On Fri, Nov 16, 2012 at 10:17:17PM +0100, Rafael J. Wysocki wrote: > On Thursday, November 15, 2012 11:22:47 AM Vasilis Liaskovitis wrote: > > As discussed in https://patchwork.kernel.org/patch/1581581/ > > the driver core remove function needs to always succeed. This means we need > > to know that

Re: [RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-16 Thread Rafael J. Wysocki
On Thursday, November 15, 2012 11:22:47 AM Vasilis Liaskovitis wrote: > As discussed in https://patchwork.kernel.org/patch/1581581/ > the driver core remove function needs to always succeed. This means we need > to know that the device can be successfully removed before acpi_bus_trim / > acpi_bus_

[RFC PATCH v2 0/3] acpi: Introduce prepare_remove device operation

2012-11-15 Thread Vasilis Liaskovitis
As discussed in https://patchwork.kernel.org/patch/1581581/ the driver core remove function needs to always succeed. This means we need to know that the device can be successfully removed before acpi_bus_trim / acpi_bus_hot_remove_device are called. This can cause panics when OSPM-initiated eject