Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-26 Thread Toshi Kani
On Fri, 2012-10-26 at 13:43 +0800, Tang Chen wrote: > Hi Toshi, > > On 10/26/2012 01:20 AM, Toshi Kani wrote: > ... > Why do you need to call acpi_bus_trim(device,0) to stop the container > device first? > >>> > >>> This issue was introduced by Lu Yinghai, I think he could give a better

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-25 Thread Tang Chen
Hi Toshi, On 10/26/2012 01:20 AM, Toshi Kani wrote: ... Why do you need to call acpi_bus_trim(device,0) to stop the container device first? This issue was introduced by Lu Yinghai, I think he could give a better answer than me. :) Please refer to the following url: http://www.spinics.net/list

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-25 Thread Toshi Kani
On Thu, 2012-10-25 at 09:47 +0800, Jiang Liu wrote: > On 2012-10-25 9:31, Tang Chen wrote: > > Hi Toshi, > > > > On 10/25/2012 01:14 AM, Toshi Kani wrote: > >> On Wed, 2012-10-24 at 14:05 +0800, Tang Chen wrote: > >>> +static int container_device_remove(struct acpi_device *device) > >>> +{ > >>> +

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-24 Thread Jiang Liu
On 2012-10-25 9:31, Tang Chen wrote: > Hi Toshi, > > On 10/25/2012 01:14 AM, Toshi Kani wrote: >> On Wed, 2012-10-24 at 14:05 +0800, Tang Chen wrote: >>> +static int container_device_remove(struct acpi_device *device) >>> +{ >>> +int ret; >>> +struct acpi_eject_event *ej_event; >>> + >>> +

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-24 Thread Tang Chen
Hi Toshi, On 10/25/2012 01:14 AM, Toshi Kani wrote: On Wed, 2012-10-24 at 14:05 +0800, Tang Chen wrote: +static int container_device_remove(struct acpi_device *device) +{ + int ret; + struct acpi_eject_event *ej_event; + + /* stop container device at first */ + ret = acp

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-24 Thread Jiang Liu
On 2012-10-25 2:02, Bjorn Helgaas wrote: > On Wed, Oct 24, 2012 at 11:14 AM, Toshi Kani wrote: >> On Wed, 2012-10-24 at 14:05 +0800, Tang Chen wrote: > >>> + result = container_device_remove(device); >>> + if (result) { >>> + printk(KERN_WARNING "Failed

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-24 Thread Bjorn Helgaas
On Wed, Oct 24, 2012 at 11:14 AM, Toshi Kani wrote: > On Wed, 2012-10-24 at 14:05 +0800, Tang Chen wrote: >> + result = container_device_remove(device); >> + if (result) { >> + printk(KERN_WARNING "Failed to remove container\n"); > > Please use pr_warn(

Re: [PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-24 Thread Toshi Kani
On Wed, 2012-10-24 at 14:05 +0800, Tang Chen wrote: > This patch introduces a new function container_device_remove() to do > the container hot-remove job. It works like the following: > > 1. call acpi_bus_trim(device, 0) to stop the container device. > 2. generate the KOBJ_OFFLINE uevent. (Did I d

[PATCH v2 2/2] Improve container_notify_cb() to support container hot-remove.

2012-10-23 Thread Tang Chen
This patch introduces a new function container_device_remove() to do the container hot-remove job. It works like the following: 1. call acpi_bus_trim(device, 0) to stop the container device. 2. generate the KOBJ_OFFLINE uevent. (Did I do this correct ?) 3. call acpi_bus_hot_remove_device(), which