From: Holger Macht <hmacht@suse.de>
To: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Tejun Heo <htejun@gmail.com>,
Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Subject: Re: [PATCH] libata: Register for dock events when the drive is inside a dock station
Date: Thu, 14 Feb 2008 13:56:15 +0100 [thread overview]
Message-ID: <20080214125615.GD9708@homac.suse.de> (raw)
In-Reply-To: <20080214124048.GB9708@homac.suse.de>
On Thu 14. Feb - 13:40:48, Holger Macht wrote:
> If a device/bay is inside a docking station, we need to register for dock
> events additionally to bay events. If a dock event occurs, the dock driver
> will call the appropriate handler (ata_acpi_ap_notify() or
> ata_acpi_dev_notify()) for us.
>
> Signed-off-by: Holger Macht <hmacht@suse.de>
Updated patch which only includes the dock specific function if the dock
driver is actually compiled.
Signed-off-by: Holger Macht <hmacht@suse.de>
---
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 9e8ec19..5f16055 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -191,20 +191,33 @@ void ata_acpi_associate(struct ata_host *host)
else
ata_acpi_associate_ide_port(ap);
- if (ap->acpi_handle)
+ if (ap->acpi_handle) {
acpi_install_notify_handler (ap->acpi_handle,
ACPI_SYSTEM_NOTIFY,
ata_acpi_ap_notify,
ap);
+#ifdef CONFIG_ACPI_DOCK
+ /* we might be on a docking station */
+ register_hotplug_dock_device(ap->acpi_handle,
+ ata_acpi_ap_notify, ap);
+#endif
+ }
for (j = 0; j < ata_link_max_devices(&ap->link); j++) {
struct ata_device *dev = &ap->link.device[j];
- if (dev->acpi_handle)
+ if (dev->acpi_handle) {
acpi_install_notify_handler (dev->acpi_handle,
ACPI_SYSTEM_NOTIFY,
ata_acpi_dev_notify,
dev);
+#ifdef CONFIG_ACPI_DOCK
+ /* we might be on a docking station */
+ register_hotplug_dock_device(ap->acpi_handle,
+ ata_acpi_dev_notify,
+ ap);
+#endif
+ }
}
}
}
next prev parent reply other threads:[~2008-02-14 12:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 12:40 [PATCH] libata: Register for dock events when the drive is inside a dock station Holger Macht
2008-02-14 12:56 ` Holger Macht [this message]
2008-02-20 17:11 ` Jeff Garzik
2008-02-21 11:53 ` Holger Macht
2008-02-22 1:34 ` Tejun Heo
2008-02-26 10:15 ` Holger Macht
2008-02-28 9:35 ` Tejun Heo
2008-02-28 11:09 ` Holger Macht
2008-02-28 13:05 ` Tejun Heo
2008-02-28 15:58 ` Holger Macht
2008-02-28 18:32 ` Holger Macht
2008-02-28 23:36 ` Holger Macht
2008-03-04 4:12 ` Tejun Heo
2008-03-11 23:55 ` Holger Macht
2008-03-12 5:15 ` Tejun Heo
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=20080214125615.GD9708@homac.suse.de \
--to=hmacht@suse.de \
--cc=htejun@gmail.com \
--cc=kristen.c.accardi@intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).