linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Jiang Liu <jiang.liu@huawei.com>
Cc: "Rafael J . Wysocki" <rjw@sisk.pl>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Alexander E . Patrakov" <patrakov@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Yijing Wang <wangyijing@huawei.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Jiang Liu <liuj97@gmail.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [BUGFIX v2 1/4] ACPI, DOCK: initialize dock subsystem before scanning PCI root buses
Date: Fri, 14 Jun 2013 23:51:38 -0700	[thread overview]
Message-ID: <CAE9FiQWOMF4HWdQRfxF68BBYC4ONcr8wOHWvVGt6Jvb_-p6S8w@mail.gmail.com> (raw)
In-Reply-To: <1371238081-32260-2-git-send-email-jiang.liu@huawei.com>

On Fri, Jun 14, 2013 at 12:27 PM, Jiang Liu <jiang.liu@huawei.com> wrote:
> Changeset "3b63aaa70e1 PCI: acpiphp: Do not use ACPI PCI subdriver
> mechanism" causes a regression which breaks ACPI dock support,
> please refer to https://bugzilla.kernel.org/show_bug.cgi?id=59501
>
> The root cause is that changeset 3b63aaa70e1 changed the relative
> initialization order of ACPI dock subsystem and acpiphp driver,
> and acpiphp driver has dependency on ACPI dock subsystem's
> initialization result, so that acpiphp can't correctly detect ACPI
> dock stations now.
>
> On the other hand, ACPI dock is a built-in driver, so we could
> explicitly initialize it before the acpiphp driver is used.
>
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
> Reported-by: Alexander E. Patrakov <patrakov@gmail.com>
> Tested-by: Alexander E. Patrakov <patrakov@gmail.com>
> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
> Cc: linux-acpi@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: <stable@vger.kernel.org> # 3.9+
> ---
>  drivers/acpi/dock.c     | 7 +------
>  drivers/acpi/internal.h | 5 +++++
>  drivers/acpi/scan.c     | 1 +
>  3 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
> index 4fdea38..02b0563 100644
> --- a/drivers/acpi/dock.c
> +++ b/drivers/acpi/dock.c
> @@ -1033,7 +1033,7 @@ find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
>         return AE_OK;
>  }
>
> -static int __init dock_init(void)
> +int __init acpi_dock_init(void)
>  {
>         if (acpi_disabled)
>                 return 0;
> @@ -1062,9 +1062,4 @@ static void __exit dock_exit(void)
>                 dock_remove(dock_station);
>  }
>
> -/*
> - * Must be called before drivers of devices in dock, otherwise we can't know
> - * which devices are in a dock
> - */
> -subsys_initcall(dock_init);
>  module_exit(dock_exit);

why not remove dock_exit?

> diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
> index 297cbf4..c610a76 100644
> --- a/drivers/acpi/internal.h
> +++ b/drivers/acpi/internal.h
> @@ -40,6 +40,11 @@ void acpi_container_init(void);
>  #else
>  static inline void acpi_container_init(void) {}
>  #endif
> +#ifdef CONFIG_ACPI_DOCK
> +void acpi_dock_init(void);
> +#else
> +static inline void acpi_dock_init(void) {}
> +#endif
>  #ifdef CONFIG_ACPI_HOTPLUG_MEMORY
>  void acpi_memory_hotplug_init(void);
>  #else
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 44225cb..4148163 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -2045,6 +2045,7 @@ int __init acpi_scan_init(void)
>         acpi_lpss_init();
>         acpi_container_init();
>         acpi_memory_hotplug_init();
> +       acpi_dock_init();
>
>         mutex_lock(&acpi_scan_lock);
>         /*
> --
> 1.8.1.2
>

  reply	other threads:[~2013-06-15  6:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14 19:27 [BUGFIX v2 0/4] fix bug 56531, 59501 and 59581 Jiang Liu
2013-06-14 19:27 ` [BUGFIX v2 1/4] ACPI, DOCK: initialize dock subsystem before scanning PCI root buses Jiang Liu
2013-06-15  6:51   ` Yinghai Lu [this message]
2013-06-15 10:05     ` Jiang Liu
2013-06-15 20:03       ` Rafael J. Wysocki
2013-06-14 19:27 ` [BUGFIX v2 2/4] ACPI, DOCK: resolve possible deadlock scenarios Jiang Liu
2013-06-14 22:21   ` Rafael J. Wysocki
2013-06-15  1:44     ` Jiang Liu
2013-06-15 20:17       ` Rafael J. Wysocki
2013-06-15 21:20         ` Rafael J. Wysocki
2013-06-15 22:54           ` Rafael J. Wysocki
2013-06-16 17:12             ` Jiang Liu
2013-06-17 11:40               ` Rafael J. Wysocki
2013-06-18 16:03                 ` Jiang Liu
2013-06-18 21:25                   ` Rafael J. Wysocki
2013-06-16 17:01           ` Jiang Liu
2013-06-17 11:39             ` Rafael J. Wysocki
2013-06-17 12:54               ` Rafael J. Wysocki
2013-06-18 15:36               ` Jiang Liu
2013-06-18 21:12                 ` Rafael J. Wysocki
2013-06-16 16:27         ` Jiang Liu
2013-06-14 19:28 ` [BUGFIX v2 3/4] PCI, ACPI: fix device destroying order issue when handling dock notification Jiang Liu
2013-06-15  6:50   ` Yinghai Lu
2013-06-14 19:28 ` [BUGFIX v2 4/4] ACPIPHP: fix bug 56531 Sony VAIO VPCZ23A4R: can't assign mem/io after docking Jiang Liu
2013-06-14 21:03   ` Yinghai Lu
2013-06-17 11:57   ` Rafael J. Wysocki
2013-06-15  6:42 ` [BUGFIX v2 0/4] fix bug 56531, 59501 and 59581 Alexander E. Patrakov
2013-06-15  7:25   ` Alexander E. Patrakov
2013-06-18 21:35     ` Rafael J. Wysocki
2013-06-19  5:18       ` Alexander E. Patrakov
2013-06-20 19:06         ` Rafael J. Wysocki
2013-06-21  4:36           ` Alexander E. Patrakov
2013-06-21  4:37             ` Alexander E. Patrakov
2013-06-21 13:06               ` Rafael J. Wysocki
2013-06-21 12:47             ` Rafael J. Wysocki
2013-06-21 13:02               ` Alexander E. Patrakov
2013-06-21 16:54           ` Jiang Liu
2013-06-22  0:13             ` Rafael J. Wysocki
2013-06-22  2:47               ` Jiang Liu
2013-06-22 19:59                 ` Rafael J. Wysocki
2013-06-23 15:57                   ` Jiang Liu
2013-06-23 21:51                     ` Rafael J. Wysocki
2013-06-23 21:52                     ` Rafael J. Wysocki
2013-06-16 17:33   ` Jiang Liu
2013-06-17  3:27     ` Alexander E. Patrakov
2013-06-17 17:07       ` Alexander E. Patrakov
2013-06-18 15:13         ` Jiang Liu

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=CAE9FiQWOMF4HWdQRfxF68BBYC4ONcr8wOHWvVGt6Jvb_-p6S8w@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiang.liu@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.com \
    --cc=patrakov@gmail.com \
    --cc=rjw@sisk.pl \
    --cc=stable@vger.kernel.org \
    --cc=wangyijing@huawei.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).