All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: ibm-acpi: fix Kconfig entries for ibm-acpi bay and dock
       [not found] <20061230192618.13533.29790.stgit@thorin.khazad-dum.debian.net>
@ 2006-12-30 19:26 ` Henrique de Moraes Holschuh
  2006-12-30 19:55   ` Henrique de Moraes Holschuh
  0 siblings, 1 reply; 2+ messages in thread
From: Henrique de Moraes Holschuh @ 2006-12-30 19:26 UTC (permalink / raw)
  To: Len Brown, hmh; +Cc: linux-acpi, ibm-acpi-devel

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

Support for ACPI_BAY has not been merged in mainline yet.  Usage of
"depends on FOO=n" fails if FOO is undefined, thus ibm-acpi support
for bay was being made non-available in a kernel that has no other
sort of bay support.

Fix it to use "depends on ! FOO" instead, that does the right thing
when FOO is undefined.  Fix ACPI_IBM_DOCK accordingly as well while
at it, and also improve the help text.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
---

 drivers/acpi/Kconfig |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index aa884d8..95de81f 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -213,26 +213,29 @@ config ACPI_IBM
 config ACPI_IBM_DOCK
 	bool "Legacy Docking Station Support"
 	depends on ACPI_IBM
-	depends on ACPI_DOCK=n
-	default n
+	depends on ! ACPI_DOCK
+	default y
 	---help---
 	  Allows the ibm_acpi driver to handle docking station events.
 	  This support is obsoleted by CONFIG_HOTPLUG_PCI_ACPI.  It will
 	  allow locking and removing the laptop from the docking station,
 	  but will not properly connect PCI devices.
 
-	  If you are not sure, say N here.
+	  If you are not sure, select ACPI_DOCK instead.
 
 config ACPI_IBM_BAY
 	bool "Legacy Removable Bay Support"
 	depends on ACPI_IBM
-	depends on ACPI_BAY=n
-	default n
+	depends on ! ACPI_BAY
+	default y
 	---help---
 	  Allows the ibm_acpi driver to handle removable bays.
-	  This support is obsoleted by CONFIG_ACPI_BAY.
+	  This support is obsoleted by CONFIG_ACPI_BAY.  It will allow
+	  enabling and disabling devices in the removable bays, but it
+	  will not properly add or remove the devices from the kernel,
+	  which must be done manually by userspace scripts.
 
-	  If you are not sure, say N here.
+	  If you are not sure, select ACPI_BAY instead if it is available.
 
 config ACPI_TOSHIBA
 	tristate "Toshiba Laptop Extras"


--  
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: ibm-acpi: fix Kconfig entries for ibm-acpi bay and dock
  2006-12-30 19:26 ` [PATCH] ACPI: ibm-acpi: fix Kconfig entries for ibm-acpi bay and dock Henrique de Moraes Holschuh
@ 2006-12-30 19:55   ` Henrique de Moraes Holschuh
  0 siblings, 0 replies; 2+ messages in thread
From: Henrique de Moraes Holschuh @ 2006-12-30 19:55 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi, ibm-acpi-devel

On Sat, 30 Dec 2006, Henrique de Moraes Holschuh wrote:
> Support for ACPI_BAY has not been merged in mainline yet.  Usage of
> "depends on FOO=n" fails if FOO is undefined, thus ibm-acpi support
> for bay was being made non-available in a kernel that has no other
> sort of bay support.
> 
> Fix it to use "depends on ! FOO" instead, that does the right thing
> when FOO is undefined.  Fix ACPI_IBM_DOCK accordingly as well while
> at it, and also improve the help text.

Either this patch, or a different fix (see below), should to be sent to
Linus.  Otherwise, it causes a regression (lack of removable bay support in
ibm-acpi).

Unfortunately, I didn't notice the problem before because I had ACPI_BAY
applied to my 2.6.18 and 2.6.19 test trees.

The patch uses "depends on ! FOO", which means the legacy support in
ibm-acpi can be selected if ACPI_DOCK or ACPI_BAY is set to "m" (module).
Loading ACPI_DOCK or ACPI_BAY module along with ibm-acpi and ACPI_IBM_DOCK
or ACPI_IBM_BAY could cause weird behaviour (untested) on some systems.

There are alternate ways to fix this.  The easiest would be to revert commit
2df910b4c3edcce9a0c12394db6f5f4a6e69c712 from Linus' tree, and I'd submit it
again when ACPI_BAY is ready to be sent to mainline.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-12-30 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20061230192618.13533.29790.stgit@thorin.khazad-dum.debian.net>
2006-12-30 19:26 ` [PATCH] ACPI: ibm-acpi: fix Kconfig entries for ibm-acpi bay and dock Henrique de Moraes Holschuh
2006-12-30 19:55   ` Henrique de Moraes Holschuh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.