* [2.6.20-rc4 regression] ibm-acpi: bay support disabled @ 2007-01-09 17:28 Henrique de Moraes Holschuh 2007-01-09 17:45 ` Adrian Bunk 0 siblings, 1 reply; 4+ messages in thread From: Henrique de Moraes Holschuh @ 2007-01-09 17:28 UTC (permalink / raw) To: Adrian Bunk, Len Brown; +Cc: linux-acpi, ibm-acpi-devel, linux-kernel A new one for you, it exists since 2.6.20-rc2. Subject : ThinkPad removable bay support disabled unconditionally References : http://marc.theaimsgroup.com/?l=linux-acpi&m=116750681901208&w=2 Caused-By : Henrique de Moraes Holschuh <hmh@hmh.eng.br> Handled-By : Henrique de Moraes Holschuh <hmh@hmh.eng.br> Status : patch attached -- "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 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br> ACPI: ibm-acpi: fix Kconfig entries for ibm-acpi bay and dock 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 1639998..34cc8d5 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -215,26 +215,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" -- 1.4.4.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [2.6.20-rc4 regression] ibm-acpi: bay support disabled 2007-01-09 17:28 [2.6.20-rc4 regression] ibm-acpi: bay support disabled Henrique de Moraes Holschuh @ 2007-01-09 17:45 ` Adrian Bunk 2007-01-09 18:54 ` Henrique de Moraes Holschuh 0 siblings, 1 reply; 4+ messages in thread From: Adrian Bunk @ 2007-01-09 17:45 UTC (permalink / raw) To: Henrique de Moraes Holschuh Cc: Len Brown, linux-acpi, ibm-acpi-devel, linux-kernel On Tue, Jan 09, 2007 at 03:28:45PM -0200, Henrique de Moraes Holschuh wrote: > A new one for you, it exists since 2.6.20-rc2. > > Subject : ThinkPad removable bay support disabled unconditionally > References : http://marc.theaimsgroup.com/?l=linux-acpi&m=116750681901208&w=2 > Caused-By : Henrique de Moraes Holschuh <hmh@hmh.eng.br> > Handled-By : Henrique de Moraes Holschuh <hmh@hmh.eng.br> > Status : patch attached Thanks, noted. > From: Henrique de Moraes Holschuh <hmh@hmh.eng.br> > > ACPI: ibm-acpi: fix Kconfig entries for ibm-acpi bay and dock > > 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 1639998..34cc8d5 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -215,26 +215,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 >... !ACPI_DOCK is wrong if the intention was ACPI_DOCK=n (since ACPI_DOCK is a tristate). I'd say the right fix is to remove the negative dependencies on unmerged options and reintroduce them once these options themselves got merged. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.6.20-rc4 regression] ibm-acpi: bay support disabled 2007-01-09 17:45 ` Adrian Bunk @ 2007-01-09 18:54 ` Henrique de Moraes Holschuh [not found] ` <20070109185422.GB3528-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Henrique de Moraes Holschuh @ 2007-01-09 18:54 UTC (permalink / raw) To: Adrian Bunk; +Cc: Len Brown, linux-acpi, ibm-acpi-devel, linux-kernel On Tue, 09 Jan 2007, Adrian Bunk wrote: > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > > index 1639998..34cc8d5 100644 > > --- a/drivers/acpi/Kconfig > > +++ b/drivers/acpi/Kconfig > > @@ -215,26 +215,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 > >... > > !ACPI_DOCK is wrong if the intention was ACPI_DOCK=n (since ACPI_DOCK is > a tristate). Actually, the intention is to give a sensible default AND to avoid ACPI_DOCK=y && ACPI_IBM_DOCK=y. The same goes for ACPI_BAY. An user is certainly entitled to have both as modules (e.g. to see if ACPI_DOCK or ACPI_BAY works in his ThinkPad). Even better would be to detect it at runtime, and disable the specific support in ibm-acpi if the generic support is loaded. But that's something to try in -mm and target 2.6.21 or 2.6.22. > I'd say the right fix is to remove the negative dependencies on unmerged > options and reintroduce them once these options themselves got merged. Well, as long as the regression is fixed, I am happy. Here is an alternative patch, that reverts the problematic commit, 2df910b4c3edcce9a0c12394db6f5f4a6e69c712. -- "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 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br> ACPI: ibm-acpi: allow bay support to work in mainline This patch reverts commit 2df910b4c3edcce9a0c12394db6f5f4a6e69c712. ACPI_BAY has not been merged into mainline yet, so the changes to ibm-acpi related Kconfig entries that depend on ACPI_BAY were permanently disabling ibm-acpi bay support. This is a serious regression for ThinkPad users. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> --- drivers/acpi/Kconfig | 11 ----------- drivers/acpi/ibm_acpi.c | 13 +------------ 2 files changed, 1 insertions(+), 23 deletions(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 1639998..f4f000a 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -225,17 +225,6 @@ config ACPI_IBM_DOCK If you are not sure, say N here. -config ACPI_IBM_BAY - bool "Legacy Removable Bay Support" - depends on ACPI_IBM - depends on ACPI_BAY=n - default n - ---help--- - Allows the ibm_acpi driver to handle removable bays. - This support is obsoleted by CONFIG_ACPI_BAY. - - If you are not sure, say N here. - config ACPI_TOSHIBA tristate "Toshiba Laptop Extras" depends on X86 diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index b72d13d..c6144ca 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c @@ -157,7 +157,6 @@ IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */ "\\_SB.PCI.ISA.SLCE", /* 570 */ ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */ #endif -#ifdef CONFIG_ACPI_IBM_BAY IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */ "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */ "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */ @@ -175,7 +174,6 @@ IBM_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */ IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */ "_EJ0", /* 770x */ ); /* all others */ -#endif /* don't list other alternatives as we install a notify handler on the 570 */ IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ @@ -1042,7 +1040,6 @@ static int light_write(char *buf) return 0; } -#if defined(CONFIG_ACPI_IBM_DOCK) || defined(CONFIG_ACPI_IBM_BAY) static int _sta(acpi_handle handle) { int status; @@ -1052,7 +1049,7 @@ static int _sta(acpi_handle handle) return status; } -#endif + #ifdef CONFIG_ACPI_IBM_DOCK #define dock_docked() (_sta(dock_handle) & 1) @@ -1118,7 +1115,6 @@ static void dock_notify(struct ibm_struct *ibm, u32 event) } #endif -#ifdef CONFIG_ACPI_IBM_BAY static int bay_status_supported; static int bay_status2_supported; static int bay_eject_supported; @@ -1194,7 +1190,6 @@ static void bay_notify(struct ibm_struct *ibm, u32 event) { acpi_bus_generate_event(ibm->device, event, 0); } -#endif static int cmos_read(char *p) { @@ -2354,7 +2349,6 @@ static struct ibm_struct ibms[] = { .type = ACPI_SYSTEM_NOTIFY, }, #endif -#ifdef CONFIG_ACPI_IBM_BAY { .name = "bay", .init = bay_init, @@ -2364,7 +2358,6 @@ static struct ibm_struct ibms[] = { .handle = &bay_handle, .type = ACPI_SYSTEM_NOTIFY, }, -#endif { .name = "cmos", .read = cmos_read, @@ -2650,9 +2643,7 @@ IBM_PARAM(light); #ifdef CONFIG_ACPI_IBM_DOCK IBM_PARAM(dock); #endif -#ifdef CONFIG_ACPI_IBM_BAY IBM_PARAM(bay); -#endif IBM_PARAM(cmos); IBM_PARAM(led); IBM_PARAM(beep); @@ -2735,14 +2726,12 @@ static int __init acpi_ibm_init(void) IBM_HANDLE_INIT(dock); #endif IBM_HANDLE_INIT(pci); -#ifdef CONFIG_ACPI_IBM_BAY IBM_HANDLE_INIT(bay); if (bay_handle) IBM_HANDLE_INIT(bay_ej); IBM_HANDLE_INIT(bay2); if (bay2_handle) IBM_HANDLE_INIT(bay2_ej); -#endif IBM_HANDLE_INIT(beep); IBM_HANDLE_INIT(ecrd); IBM_HANDLE_INIT(ecwr); -- 1.4.4.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <20070109185422.GB3528-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>]
* Re: [2.6.20-rc4 regression] ibm-acpi: bay support disabled [not found] ` <20070109185422.GB3528-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org> @ 2007-01-11 7:59 ` Len Brown 0 siblings, 0 replies; 4+ messages in thread From: Len Brown @ 2007-01-11 7:59 UTC (permalink / raw) To: Henrique de Moraes Holschuh Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA, ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Adrian Bunk Reverted. thanks, -Len On Tuesday 09 January 2007 13:54, Henrique de Moraes Holschuh wrote: > On Tue, 09 Jan 2007, Adrian Bunk wrote: > > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > > > index 1639998..34cc8d5 100644 > > > --- a/drivers/acpi/Kconfig > > > +++ b/drivers/acpi/Kconfig > > > @@ -215,26 +215,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 > > >... > > > > !ACPI_DOCK is wrong if the intention was ACPI_DOCK=n (since ACPI_DOCK is > > a tristate). > > Actually, the intention is to give a sensible default AND to avoid > ACPI_DOCK=y && ACPI_IBM_DOCK=y. The same goes for ACPI_BAY. An user is > certainly entitled to have both as modules (e.g. to see if ACPI_DOCK or > ACPI_BAY works in his ThinkPad). > > Even better would be to detect it at runtime, and disable the specific > support in ibm-acpi if the generic support is loaded. But that's something > to try in -mm and target 2.6.21 or 2.6.22. > > > I'd say the right fix is to remove the negative dependencies on unmerged > > options and reintroduce them once these options themselves got merged. > > Well, as long as the regression is fixed, I am happy. Here is an > alternative patch, that reverts the problematic commit, > 2df910b4c3edcce9a0c12394db6f5f4a6e69c712. > > -- > "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 > > From: Henrique de Moraes Holschuh <hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org> > > ACPI: ibm-acpi: allow bay support to work in mainline > > This patch reverts commit 2df910b4c3edcce9a0c12394db6f5f4a6e69c712. > > ACPI_BAY has not been merged into mainline yet, so the changes to ibm-acpi > related Kconfig entries that depend on ACPI_BAY were permanently disabling > ibm-acpi bay support. This is a serious regression for ThinkPad users. > > Signed-off-by: Henrique de Moraes Holschuh <hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org> > --- > drivers/acpi/Kconfig | 11 ----------- > drivers/acpi/ibm_acpi.c | 13 +------------ > 2 files changed, 1 insertions(+), 23 deletions(-) > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index 1639998..f4f000a 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -225,17 +225,6 @@ config ACPI_IBM_DOCK > > If you are not sure, say N here. > > -config ACPI_IBM_BAY > - bool "Legacy Removable Bay Support" > - depends on ACPI_IBM > - depends on ACPI_BAY=n > - default n > - ---help--- > - Allows the ibm_acpi driver to handle removable bays. > - This support is obsoleted by CONFIG_ACPI_BAY. > - > - If you are not sure, say N here. > - > config ACPI_TOSHIBA > tristate "Toshiba Laptop Extras" > depends on X86 > diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c > index b72d13d..c6144ca 100644 > --- a/drivers/acpi/ibm_acpi.c > +++ b/drivers/acpi/ibm_acpi.c > @@ -157,7 +157,6 @@ IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */ > "\\_SB.PCI.ISA.SLCE", /* 570 */ > ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */ > #endif > -#ifdef CONFIG_ACPI_IBM_BAY > IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */ > "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */ > "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */ > @@ -175,7 +174,6 @@ IBM_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */ > IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */ > "_EJ0", /* 770x */ > ); /* all others */ > -#endif > > /* don't list other alternatives as we install a notify handler on the 570 */ > IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ > @@ -1042,7 +1040,6 @@ static int light_write(char *buf) > return 0; > } > > -#if defined(CONFIG_ACPI_IBM_DOCK) || defined(CONFIG_ACPI_IBM_BAY) > static int _sta(acpi_handle handle) > { > int status; > @@ -1052,7 +1049,7 @@ static int _sta(acpi_handle handle) > > return status; > } > -#endif > + > #ifdef CONFIG_ACPI_IBM_DOCK > #define dock_docked() (_sta(dock_handle) & 1) > > @@ -1118,7 +1115,6 @@ static void dock_notify(struct ibm_struct *ibm, u32 event) > } > #endif > > -#ifdef CONFIG_ACPI_IBM_BAY > static int bay_status_supported; > static int bay_status2_supported; > static int bay_eject_supported; > @@ -1194,7 +1190,6 @@ static void bay_notify(struct ibm_struct *ibm, u32 event) > { > acpi_bus_generate_event(ibm->device, event, 0); > } > -#endif > > static int cmos_read(char *p) > { > @@ -2354,7 +2349,6 @@ static struct ibm_struct ibms[] = { > .type = ACPI_SYSTEM_NOTIFY, > }, > #endif > -#ifdef CONFIG_ACPI_IBM_BAY > { > .name = "bay", > .init = bay_init, > @@ -2364,7 +2358,6 @@ static struct ibm_struct ibms[] = { > .handle = &bay_handle, > .type = ACPI_SYSTEM_NOTIFY, > }, > -#endif > { > .name = "cmos", > .read = cmos_read, > @@ -2650,9 +2643,7 @@ IBM_PARAM(light); > #ifdef CONFIG_ACPI_IBM_DOCK > IBM_PARAM(dock); > #endif > -#ifdef CONFIG_ACPI_IBM_BAY > IBM_PARAM(bay); > -#endif > IBM_PARAM(cmos); > IBM_PARAM(led); > IBM_PARAM(beep); > @@ -2735,14 +2726,12 @@ static int __init acpi_ibm_init(void) > IBM_HANDLE_INIT(dock); > #endif > IBM_HANDLE_INIT(pci); > -#ifdef CONFIG_ACPI_IBM_BAY > IBM_HANDLE_INIT(bay); > if (bay_handle) > IBM_HANDLE_INIT(bay_ej); > IBM_HANDLE_INIT(bay2); > if (bay2_handle) > IBM_HANDLE_INIT(bay2_ej); > -#endif > IBM_HANDLE_INIT(beep); > IBM_HANDLE_INIT(ecrd); > IBM_HANDLE_INIT(ecwr); ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-11 7:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09 17:28 [2.6.20-rc4 regression] ibm-acpi: bay support disabled Henrique de Moraes Holschuh
2007-01-09 17:45 ` Adrian Bunk
2007-01-09 18:54 ` Henrique de Moraes Holschuh
[not found] ` <20070109185422.GB3528-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>
2007-01-11 7:59 ` Len Brown
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).