qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: qemulist@gmail.com
To: Gong Chen <clumsycg@gmail.com>
Cc: aliguori@us.ibm.com, pingfank@linux.vnet.ibm.com,
	seabios@seabios.org, qemu-devel@nongnu.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	shaohua.li@intel.com, dave@linux.vnet.ibm.com, lenb@kernel.org
Subject: Re: [Qemu-devel] [PATCH 1/1] ACPI: Call ACPI remove handler when handling ACPI eject event
Date: Thu, 20 Oct 2011 17:37:30 +0800	[thread overview]
Message-ID: <20111020093730.GA18393@oc8440477808.ibm.com> (raw)
In-Reply-To: <CAMJ_OhjLvsZ3Vir3hVX2Ha+jA-ORX=3PBapY=B+aZP-ynqbB6A@mail.gmail.com>

On Wed, Oct 19, 2011 at 09:35:46PM +0800, Gong Chen wrote:
> On Wed, Oct 19, 2011 at 10:47 AM,  <pingfank@linux.vnet.ibm.com> wrote:
> > From: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> >
> > Call the remove handler for ACPI_NOTIFY_EJECT_REQUEST
> >
> > Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> > ---
> >  drivers/acpi/bus.c      |    2 +-
> >  drivers/acpi/scan.c     |    2 +-
> >  include/acpi/acpi_bus.h |    2 ++
> >  3 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> > index 437ddbf..d06ec6d 100644
> > --- a/drivers/acpi/bus.c
> > +++ b/drivers/acpi/bus.c
> > @@ -764,7 +764,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
> >                break;
> >
> >        case ACPI_NOTIFY_EJECT_REQUEST:
> > -               /* TBD */
> > +               acpi_os_hotplug_execute(acpi_bus_hot_remove_device, handle);
> >                break;
> >
> >        case ACPI_NOTIFY_DEVICE_CHECK_LIGHT:
> > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> > index 449c556..3b97b61 100644
> > --- a/drivers/acpi/scan.c
> > +++ b/drivers/acpi/scan.c
> > @@ -83,7 +83,7 @@ acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, cha
> >  }
> >  static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL);
> >
> > -static void acpi_bus_hot_remove_device(void *context)
> > +void acpi_bus_hot_remove_device(void *context)
> >  {
> >        struct acpi_device *device;
> >        acpi_handle handle = context;
> > diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> > index 6cd5b64..b19c09d 100644
> > --- a/include/acpi/acpi_bus.h
> > +++ b/include/acpi/acpi_bus.h
> > @@ -310,6 +310,8 @@ extern int unregister_acpi_notifier(struct notifier_block *);
> >
> >  extern int register_acpi_bus_notifier(struct notifier_block *nb);
> >  extern void unregister_acpi_bus_notifier(struct notifier_block *nb);
> > +extern void acpi_bus_hot_remove_device(void *context);
> > +
> >  /*
> >  * External Functions
> >  */
> > --
> > 1.7.4.4
> >
> 
> I preferred the patch from Shen before. Here is the link:
> https://lkml.org/lkml/2011/9/24/15
> As Bjorn said, "long-term goal to move the hotplug flow out of drivers and into
> the ACPI core". An arbitrary change in the global level just mess up the codes.
Got it, thanks. And so will this feature emerge in upstream soon?

Thanks and regards,
pingfan

  reply	other threads:[~2011-10-20  9:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19  2:47 [Qemu-devel] [PATCH 0/1] ACPI: Call ACPI remove handler when handling ACPI eject pingfank
2011-10-19  2:47 ` [Qemu-devel] [PATCH 1/1] ACPI: Call ACPI remove handler when handling ACPI eject event pingfank
2011-10-19 13:35   ` Gong Chen
2011-10-20  9:37     ` qemulist [this message]
2011-10-21  1:37       ` Chen Gong
  -- strict thread matches above, loose matches on Subject: below --
2011-10-19  2:53 [Qemu-devel] [PATCH 0/1] ACPI: Call ACPI remove handler when handling ACPI eject pingfank
2011-10-19  2:53 ` [Qemu-devel] [PATCH 1/1] ACPI: Call ACPI remove handler when handling ACPI eject event pingfank
2011-10-19  3:50   ` canquan.shen
2011-10-20  8:08     ` liu ping fan
2011-10-20  8:34       ` canquan.shen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111020093730.GA18393@oc8440477808.ibm.com \
    --to=qemulist@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=clumsycg@gmail.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pingfank@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=shaohua.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).