diff mbox

[0/5] ACPI / scan: Make it possible to use the container hotplug with other scan handlers

Message ID 3321228.vG97AE80O6@vostro.rjw.lan (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Rafael Wysocki June 14, 2013, 11:20 p.m. UTC
On Friday, June 14, 2013 03:32:42 PM Tony Luck wrote:
> On Fri, Jun 14, 2013 at 3:23 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > Can you please just test patch [5/5] alone without patches [1-4/5]?  We believe
> > that this should work too and if that's the case, we'll only need that patch
> > and a reworked [1/5].
> 
> Your belief is sound - I popped all five patches and then applied just
> 5/5 ... and
> the system still works.

Great, thanks!

Can you please apply the appended patch on top of it and see if the system
still works then?

Rafael


---
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Subject: ACPI / scan: Do not bind ACPI drivers to objects with scan handlers

ACPI drivers must not be bound to device objects having scan handlers
attatched to them, so make acpi_device_probe() fail with -EINVAL if the
device object being probed has an ACPI scan handler.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/scan.c  |    3 +++
 drivers/acpi/video.c |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tony Luck June 19, 2013, 5:37 p.m. UTC | #1
> Can you please apply the appended patch on top of it and see if the system
> still works then?

Still works with this patch.

-Tony

> ---
>  drivers/acpi/scan.c  |    3 +++
>  drivers/acpi/video.c |    3 ---
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-pm/drivers/acpi/scan.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/scan.c
> +++ linux-pm/drivers/acpi/scan.c
> @@ -939,6 +939,9 @@ static int acpi_device_probe(struct devi
>         struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
>         int ret;
>
> +       if (acpi_dev->handler)
> +               return -EINVAL;
> +
>         if (!acpi_drv->ops.add)
>                 return -ENOSYS;
>
> Index: linux-pm/drivers/acpi/video.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/video.c
> +++ linux-pm/drivers/acpi/video.c
> @@ -1722,9 +1722,6 @@ static int acpi_video_bus_add(struct acp
>         int error;
>         acpi_status status;
>
> -       if (device->handler)
> -               return -EINVAL;
> -
>         status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
>                                 device->parent->handle, 1,
>                                 acpi_video_bus_match, NULL,
>
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki June 19, 2013, 10:24 p.m. UTC | #2
On Wednesday, June 19, 2013 10:37:27 AM Tony Luck wrote:
> > Can you please apply the appended patch on top of it and see if the system
> > still works then?
> 
> Still works with this patch.

Cool, thanks! :-)

If you don't mind, I'll queue up https://patchwork.kernel.org/patch/2712741/ and
this for 3.11.

Thanks,
Rafael


> > ---
> >  drivers/acpi/scan.c  |    3 +++
> >  drivers/acpi/video.c |    3 ---
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > Index: linux-pm/drivers/acpi/scan.c
> > ===================================================================
> > --- linux-pm.orig/drivers/acpi/scan.c
> > +++ linux-pm/drivers/acpi/scan.c
> > @@ -939,6 +939,9 @@ static int acpi_device_probe(struct devi
> >         struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
> >         int ret;
> >
> > +       if (acpi_dev->handler)
> > +               return -EINVAL;
> > +
> >         if (!acpi_drv->ops.add)
> >                 return -ENOSYS;
> >
> > Index: linux-pm/drivers/acpi/video.c
> > ===================================================================
> > --- linux-pm.orig/drivers/acpi/video.c
> > +++ linux-pm/drivers/acpi/video.c
> > @@ -1722,9 +1722,6 @@ static int acpi_video_bus_add(struct acp
> >         int error;
> >         acpi_status status;
> >
> > -       if (device->handler)
> > -               return -EINVAL;
> > -
> >         status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
> >                                 device->parent->handle, 1,
> >                                 acpi_video_bus_match, NULL,
> >
Tony Luck June 19, 2013, 10:40 p.m. UTC | #3
> If you don't mind, I'll queue up https://patchwork.kernel.org/patch/2712741/ and
> this for 3.11.

Mark them

Tested-by: Tony Luck <tony.luck@intel.com>

if you like.

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki June 19, 2013, 10:51 p.m. UTC | #4
On Wednesday, June 19, 2013 03:40:21 PM Tony Luck wrote:
> > If you don't mind, I'll queue up https://patchwork.kernel.org/patch/2712741/ and
> > this for 3.11.
> 
> Mark them
> 
> Tested-by: Tony Luck <tony.luck@intel.com>
> 
> if you like.

I will, thank you!

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Toshi Kani June 19, 2013, 11:22 p.m. UTC | #5
On Thu, 2013-06-20 at 00:24 +0200, Rafael J. Wysocki wrote:
> On Wednesday, June 19, 2013 10:37:27 AM Tony Luck wrote:
> > > Can you please apply the appended patch on top of it and see if the system
> > > still works then?
> > 
> > Still works with this patch.
> 
> Cool, thanks! :-)
> 
> If you don't mind, I'll queue up https://patchwork.kernel.org/patch/2712741/ and
> this for 3.11.

For both patches:

Acked-by: Toshi Kani <toshi.kani@hp.com>

Thanks,
-Toshi


> 
> Thanks,
> Rafael
> 
> 
> > > ---
> > >  drivers/acpi/scan.c  |    3 +++
> > >  drivers/acpi/video.c |    3 ---
> > >  2 files changed, 3 insertions(+), 3 deletions(-)
> > >
> > > Index: linux-pm/drivers/acpi/scan.c
> > > ===================================================================
> > > --- linux-pm.orig/drivers/acpi/scan.c
> > > +++ linux-pm/drivers/acpi/scan.c
> > > @@ -939,6 +939,9 @@ static int acpi_device_probe(struct devi
> > >         struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
> > >         int ret;
> > >
> > > +       if (acpi_dev->handler)
> > > +               return -EINVAL;
> > > +
> > >         if (!acpi_drv->ops.add)
> > >                 return -ENOSYS;
> > >
> > > Index: linux-pm/drivers/acpi/video.c
> > > ===================================================================
> > > --- linux-pm.orig/drivers/acpi/video.c
> > > +++ linux-pm/drivers/acpi/video.c
> > > @@ -1722,9 +1722,6 @@ static int acpi_video_bus_add(struct acp
> > >         int error;
> > >         acpi_status status;
> > >
> > > -       if (device->handler)
> > > -               return -EINVAL;
> > > -
> > >         status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
> > >                                 device->parent->handle, 1,
> > >                                 acpi_video_bus_match, NULL,
> > >


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki June 19, 2013, 11:35 p.m. UTC | #6
On Wednesday, June 19, 2013 05:22:04 PM Toshi Kani wrote:
> On Thu, 2013-06-20 at 00:24 +0200, Rafael J. Wysocki wrote:
> > On Wednesday, June 19, 2013 10:37:27 AM Tony Luck wrote:
> > > > Can you please apply the appended patch on top of it and see if the system
> > > > still works then?
> > > 
> > > Still works with this patch.
> > 
> > Cool, thanks! :-)
> > 
> > If you don't mind, I'll queue up https://patchwork.kernel.org/patch/2712741/ and
> > this for 3.11.
> 
> For both patches:
> 
> Acked-by: Toshi Kani <toshi.kani@hp.com>

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-pm/drivers/acpi/scan.c
===================================================================
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -939,6 +939,9 @@  static int acpi_device_probe(struct devi
 	struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
 	int ret;
 
+	if (acpi_dev->handler)
+		return -EINVAL;
+
 	if (!acpi_drv->ops.add)
 		return -ENOSYS;
 
Index: linux-pm/drivers/acpi/video.c
===================================================================
--- linux-pm.orig/drivers/acpi/video.c
+++ linux-pm/drivers/acpi/video.c
@@ -1722,9 +1722,6 @@  static int acpi_video_bus_add(struct acp
 	int error;
 	acpi_status status;
 
-	if (device->handler)
-		return -EINVAL;
-
 	status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
 				device->parent->handle, 1,
 				acpi_video_bus_match, NULL,