Re: [2.6.24-rc1][BUG] Oops on battery removal
Alexey Starikovskiy wrote: > Rolf Eike Beer wrote: > > Alexey Starikovskiy wrote: > >> Rolf Eike Beer wrote: > >>> Alexey Starikovskiy wrote: > Rolf Eike Beer wrote: > > Rolf Eike Beer wrote: > >> Hi, > >> > >> this happened while I removed my battery on bootup. Complete dmesg > >> is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was > >> d919fd433b5823d1cf9d0688eb2eec183de9b74c). > > > > Ok, I found out that it has nothing to do with the actual removal as > > it seems. When I start the laptop with battery already detached I get > > the same error. > > Please check if this patch helps. > >>> > >>> It made things worse: > >> > >> How about this patch? > > > > Ehm, that is the same patch as before! > > Yes, sorry... Two patches in parallel -- not good. Tested-by: Rolf Eike Beer <[EMAIL PROTECTED]> It makes the crash go away. But there is something weird going on. Before I logged into X I did an "cat /proc/acpi/battery/BAT1/*" and it showed the battery as present with some (random?) values. Now I'm in X and everything looks fine there (as in "not present"). Eike signature.asc Description: This is a digitally signed message part.
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Please check if this patch helps. It made things worse: How about this patch? Ehm, that is the same patch as before! Yes, sorry... Two patches in parallel -- not good. Btw: it has an empty From: line I know, thanks. Eike Patch updated. ACPI: Battery: remove cycle from battery removal. From: <> get_property() should not call battery_update() on absent battery to avoid cycle and oops. Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]> --- drivers/acpi/battery.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index c2ce0ad..ca37db4 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -140,10 +140,11 @@ static int acpi_battery_get_property(struct power_supply *psy, { struct acpi_battery *battery = to_acpi_battery(psy); - if ((!acpi_battery_present(battery)) && - psp != POWER_SUPPLY_PROP_PRESENT) + if (acpi_battery_present(battery)) { + /* run battery update only if it is present */ + acpi_battery_update(battery); + } else if (psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; - acpi_battery_update(battery); switch (psp) { case POWER_SUPPLY_PROP_STATUS: if (battery->state & 0x01) @@ -457,6 +458,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery) return; device_remove_file(battery->bat.dev, _attr); power_supply_unregister(>bat); + battery->bat.dev = NULL; } static int acpi_battery_update(struct acpi_battery *battery)
Re: [2.6.24-rc1][BUG] Oops on battery removal
Alexey Starikovskiy wrote: > Rolf Eike Beer wrote: > > Alexey Starikovskiy wrote: > >> Rolf Eike Beer wrote: > >>> Rolf Eike Beer wrote: > Hi, > > this happened while I removed my battery on bootup. Complete dmesg is > attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was > d919fd433b5823d1cf9d0688eb2eec183de9b74c). > >>> > >>> Ok, I found out that it has nothing to do with the actual removal as it > >>> seems. When I start the laptop with battery already detached I get the > >>> same error. > >> > >> Please check if this patch helps. > > > > It made things worse: > > How about this patch? Ehm, that is the same patch as before! Btw: it has an empty From: line Eike signature.asc Description: This is a digitally signed message part.
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Please check if this patch helps. It made things worse: How about this patch? ACPI: Battery: remove cycle from battery removal. From: <> get_property() should not call battery_update() on absent battery to avoid cycle and oops. Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]> --- drivers/acpi/battery.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index c2ce0ad..50cdf6f 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -140,10 +140,11 @@ static int acpi_battery_get_property(struct power_supply *psy, { struct acpi_battery *battery = to_acpi_battery(psy); - if ((!acpi_battery_present(battery)) && - psp != POWER_SUPPLY_PROP_PRESENT) + if (acpi_battery_present(battery)) { + /* run battery update only if it is present */ + acpi_battery_update(battery); + } else if (psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; - acpi_battery_update(battery); switch (psp) { case POWER_SUPPLY_PROP_STATUS: if (battery->state & 0x01)
Re: [2.6.24-rc1][BUG] Oops on battery removal
Alexey Starikovskiy wrote: > Rolf Eike Beer wrote: > > Rolf Eike Beer wrote: > >> Hi, > >> > >> this happened while I removed my battery on bootup. Complete dmesg is > >> attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was > >> d919fd433b5823d1cf9d0688eb2eec183de9b74c). > > > > Ok, I found out that it has nothing to do with the actual removal as it > > seems. When I start the laptop with battery already detached I get the > > same error. > Please check if this patch helps. It made things worse: Nov 2 12:37:20 donald kernel: ACPI: EC: non-query interrupt received, switching to interrupt mode Nov 2 12:37:20 donald acpid: received event "battery BAT1 0080 " Nov 2 12:37:20 donald acpid: notifying client 2856[101:102] Nov 2 12:37:20 donald acpid: notifying client 2911[0:0] Nov 2 12:37:20 donald acpid: notifying client 3048[0:0] Nov 2 12:37:20 donald acpid: completed event "battery BAT1 0080 " Nov 2 12:37:20 donald kernel: WARNING: at /home/eike/repos/linux-2.6/lib/kref.c:33 kref_get() Nov 2 12:37:20 donald kernel: [] show_trace_log_lvl+0x1a/0x2f Nov 2 12:37:20 donald kernel: [] show_trace+0x12/0x14 Nov 2 12:37:20 donald kernel: [] dump_stack+0x16/0x18 Nov 2 12:37:20 donald kernel: [] kref_get+0x37/0x43 Nov 2 12:37:20 donald kernel: [] kobject_get+0x12/0x17 Nov 2 12:37:20 donald kernel: [] get_device+0x13/0x1d Nov 2 12:37:20 donald kernel: [] device_remove_file+0xe/0x2a Nov 2 12:37:20 donald kernel: [] sysfs_remove_battery+0x17/0x22 [battery] Nov 2 12:37:20 donald kernel: [] acpi_battery_update+0x3f/0x255 [battery] Nov 2 12:37:20 donald kernel: [] acpi_battery_read+0x11/0x20 [battery] Nov 2 12:37:20 donald powersaved[3048]: WARNING (filter_function:201) Hal service stopped. Battery information no longer available Nov 2 12:37:20 donald kernel: [] acpi_battery_read_state+0xf/0x11 [battery] Nov 2 12:37:20 donald kernel: [] seq_read+0xea/0x264 Nov 2 12:37:20 donald kernel: [] proc_reg_read+0x63/0x76 Nov 2 12:37:20 donald kernel: [] vfs_read+0xa6/0x12f Nov 2 12:37:20 donald kernel: [] sys_read+0x3d/0x61 Nov 2 12:37:20 donald kernel: [] sysenter_past_esp+0x5f/0x85 Nov 2 12:37:20 donald kernel: === Nov 2 12:37:20 donald kernel: WARNING: at /home/eike/repos/linux-2.6/lib/kref.c:33 kref_get() Nov 2 12:37:20 donald kernel: [] show_trace_log_lvl+0x1a/0x2f Nov 2 12:37:20 donald kernel: [] show_trace+0x12/0x14 Nov 2 12:37:20 donald kernel: [] dump_stack+0x16/0x18 Nov 2 12:37:20 donald kernel: [] kref_get+0x37/0x43 Nov 2 12:37:20 donald kernel: [] kobject_get+0x12/0x17 Nov 2 12:37:20 donald kernel: [] get_device+0x13/0x1d Nov 2 12:37:20 donald kernel: [] device_remove_file+0xe/0x2a Nov 2 12:37:20 donald kernel: [] power_supply_remove_attrs+0x16/0x37 [power_supply] Nov 2 12:37:20 donald kernel: [] power_supply_unregister+0x12/0x1d [power_supply] Nov 2 12:37:20 donald kernel: [] sysfs_remove_battery+0x1f/0x22 [battery] Nov 2 12:37:20 donald kernel: [] acpi_battery_update+0x3f/0x255 [battery] Nov 2 12:37:20 donald kernel: [] acpi_battery_read+0x11/0x20 [battery] Nov 2 12:37:20 donald kernel: [] acpi_battery_read_state+0xf/0x11 [battery] Nov 2 12:37:20 donald kernel: [] seq_read+0xea/0x264 Nov 2 12:37:20 donald kernel: [] proc_reg_read+0x63/0x76 Nov 2 12:37:20 donald kernel: [] vfs_read+0xa6/0x12f Nov 2 12:37:20 donald kernel: [] sys_read+0x3d/0x61 Nov 2 12:37:20 donald kernel: [] sysenter_past_esp+0x5f/0x85 Nov 2 12:37:20 donald kernel: === tons more of stuff like this, system us unusable with this kernel now. In the meantime I upgraded to current git, last commit is now b4d367fb20ed19be4a53fa88b407248aeb8bd461 Eike signature.asc Description: This is a digitally signed message part.
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Eike Please check if this patch helps. Thanks, Alex. ACPI: Battery: remove cycle from battery removal. From: <> get_property() should not call battery_update() on absent battery to avoid cycle and oops. Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]> --- drivers/acpi/battery.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index c2ce0ad..50cdf6f 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -140,10 +140,11 @@ static int acpi_battery_get_property(struct power_supply *psy, { struct acpi_battery *battery = to_acpi_battery(psy); - if ((!acpi_battery_present(battery)) && - psp != POWER_SUPPLY_PROP_PRESENT) + if (acpi_battery_present(battery)) { + /* run battery update only if it is present */ + acpi_battery_update(battery); + } else if (psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; - acpi_battery_update(battery); switch (psp) { case POWER_SUPPLY_PROP_STATUS: if (battery->state & 0x01)
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: > Hi, > > this happened while I removed my battery on bootup. Complete dmesg is > attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was > d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Eike signature.asc Description: This is a digitally signed message part.
Re: [2.6.24-rc1][BUG] Oops on battery removal
Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Please check if this patch helps. It made things worse: Nov 2 12:37:20 donald kernel: ACPI: EC: non-query interrupt received, switching to interrupt mode Nov 2 12:37:20 donald acpid: received event battery BAT1 0080 Nov 2 12:37:20 donald acpid: notifying client 2856[101:102] Nov 2 12:37:20 donald acpid: notifying client 2911[0:0] Nov 2 12:37:20 donald acpid: notifying client 3048[0:0] Nov 2 12:37:20 donald acpid: completed event battery BAT1 0080 Nov 2 12:37:20 donald kernel: WARNING: at /home/eike/repos/linux-2.6/lib/kref.c:33 kref_get() Nov 2 12:37:20 donald kernel: [c0104edd] show_trace_log_lvl+0x1a/0x2f Nov 2 12:37:20 donald kernel: [c010576e] show_trace+0x12/0x14 Nov 2 12:37:20 donald kernel: [c010585b] dump_stack+0x16/0x18 Nov 2 12:37:20 donald kernel: [c01d1d3c] kref_get+0x37/0x43 Nov 2 12:37:20 donald kernel: [c01d10af] kobject_get+0x12/0x17 Nov 2 12:37:20 donald kernel: [c0231509] get_device+0x13/0x1d Nov 2 12:37:20 donald kernel: [c02319e8] device_remove_file+0xe/0x2a Nov 2 12:37:20 donald kernel: [f8be7043] sysfs_remove_battery+0x17/0x22 [battery] Nov 2 12:37:20 donald kernel: [f8be71a2] acpi_battery_update+0x3f/0x255 [battery] Nov 2 12:37:20 donald kernel: [f8be73ed] acpi_battery_read+0x11/0x20 [battery] Nov 2 12:37:20 donald powersaved[3048]: WARNING (filter_function:201) Hal service stopped. Battery information no longer available Nov 2 12:37:20 donald kernel: [f8be741c] acpi_battery_read_state+0xf/0x11 [battery] Nov 2 12:37:20 donald kernel: [c01889ca] seq_read+0xea/0x264 Nov 2 12:37:20 donald kernel: [c019fddb] proc_reg_read+0x63/0x76 Nov 2 12:37:20 donald kernel: [c0172631] vfs_read+0xa6/0x12f Nov 2 12:37:20 donald kernel: [c0172a2a] sys_read+0x3d/0x61 Nov 2 12:37:20 donald kernel: [c0103f12] sysenter_past_esp+0x5f/0x85 Nov 2 12:37:20 donald kernel: === Nov 2 12:37:20 donald kernel: WARNING: at /home/eike/repos/linux-2.6/lib/kref.c:33 kref_get() Nov 2 12:37:20 donald kernel: [c0104edd] show_trace_log_lvl+0x1a/0x2f Nov 2 12:37:20 donald kernel: [c010576e] show_trace+0x12/0x14 Nov 2 12:37:20 donald kernel: [c010585b] dump_stack+0x16/0x18 Nov 2 12:37:20 donald kernel: [c01d1d3c] kref_get+0x37/0x43 Nov 2 12:37:20 donald kernel: [c01d10af] kobject_get+0x12/0x17 Nov 2 12:37:20 donald kernel: [c0231509] get_device+0x13/0x1d Nov 2 12:37:20 donald kernel: [c02319e8] device_remove_file+0xe/0x2a Nov 2 12:37:20 donald kernel: [f8b9b3dd] power_supply_remove_attrs+0x16/0x37 [power_supply] Nov 2 12:37:20 donald kernel: [f8b9b012] power_supply_unregister+0x12/0x1d [power_supply] Nov 2 12:37:20 donald kernel: [f8be704b] sysfs_remove_battery+0x1f/0x22 [battery] Nov 2 12:37:20 donald kernel: [f8be71a2] acpi_battery_update+0x3f/0x255 [battery] Nov 2 12:37:20 donald kernel: [f8be73ed] acpi_battery_read+0x11/0x20 [battery] Nov 2 12:37:20 donald kernel: [f8be741c] acpi_battery_read_state+0xf/0x11 [battery] Nov 2 12:37:20 donald kernel: [c01889ca] seq_read+0xea/0x264 Nov 2 12:37:20 donald kernel: [c019fddb] proc_reg_read+0x63/0x76 Nov 2 12:37:20 donald kernel: [c0172631] vfs_read+0xa6/0x12f Nov 2 12:37:20 donald kernel: [c0172a2a] sys_read+0x3d/0x61 Nov 2 12:37:20 donald kernel: [c0103f12] sysenter_past_esp+0x5f/0x85 Nov 2 12:37:20 donald kernel: === tons more of stuff like this, system us unusable with this kernel now. In the meantime I upgraded to current git, last commit is now b4d367fb20ed19be4a53fa88b407248aeb8bd461 Eike signature.asc Description: This is a digitally signed message part.
Re: [2.6.24-rc1][BUG] Oops on battery removal
Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Please check if this patch helps. It made things worse: How about this patch? Ehm, that is the same patch as before! Yes, sorry... Two patches in parallel -- not good. Tested-by: Rolf Eike Beer [EMAIL PROTECTED] It makes the crash go away. But there is something weird going on. Before I logged into X I did an cat /proc/acpi/battery/BAT1/* and it showed the battery as present with some (random?) values. Now I'm in X and everything looks fine there (as in not present). Eike signature.asc Description: This is a digitally signed message part.
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Please check if this patch helps. It made things worse: How about this patch? Ehm, that is the same patch as before! Yes, sorry... Two patches in parallel -- not good. Btw: it has an empty From: line I know, thanks. Eike Patch updated. ACPI: Battery: remove cycle from battery removal. From: get_property() should not call battery_update() on absent battery to avoid cycle and oops. Signed-off-by: Alexey Starikovskiy [EMAIL PROTECTED] --- drivers/acpi/battery.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index c2ce0ad..ca37db4 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -140,10 +140,11 @@ static int acpi_battery_get_property(struct power_supply *psy, { struct acpi_battery *battery = to_acpi_battery(psy); - if ((!acpi_battery_present(battery)) - psp != POWER_SUPPLY_PROP_PRESENT) + if (acpi_battery_present(battery)) { + /* run battery update only if it is present */ + acpi_battery_update(battery); + } else if (psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; - acpi_battery_update(battery); switch (psp) { case POWER_SUPPLY_PROP_STATUS: if (battery-state 0x01) @@ -457,6 +458,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery) return; device_remove_file(battery-bat.dev, alarm_attr); power_supply_unregister(battery-bat); + battery-bat.dev = NULL; } static int acpi_battery_update(struct acpi_battery *battery)
Re: [2.6.24-rc1][BUG] Oops on battery removal
Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Please check if this patch helps. It made things worse: How about this patch? Ehm, that is the same patch as before! Btw: it has an empty From: line Eike signature.asc Description: This is a digitally signed message part.
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: Alexey Starikovskiy wrote: Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Please check if this patch helps. It made things worse: How about this patch? ACPI: Battery: remove cycle from battery removal. From: get_property() should not call battery_update() on absent battery to avoid cycle and oops. Signed-off-by: Alexey Starikovskiy [EMAIL PROTECTED] --- drivers/acpi/battery.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index c2ce0ad..50cdf6f 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -140,10 +140,11 @@ static int acpi_battery_get_property(struct power_supply *psy, { struct acpi_battery *battery = to_acpi_battery(psy); - if ((!acpi_battery_present(battery)) - psp != POWER_SUPPLY_PROP_PRESENT) + if (acpi_battery_present(battery)) { + /* run battery update only if it is present */ + acpi_battery_update(battery); + } else if (psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; - acpi_battery_update(battery); switch (psp) { case POWER_SUPPLY_PROP_STATUS: if (battery-state 0x01)
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Eike Please check if this patch helps. Thanks, Alex. ACPI: Battery: remove cycle from battery removal. From: get_property() should not call battery_update() on absent battery to avoid cycle and oops. Signed-off-by: Alexey Starikovskiy [EMAIL PROTECTED] --- drivers/acpi/battery.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index c2ce0ad..50cdf6f 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -140,10 +140,11 @@ static int acpi_battery_get_property(struct power_supply *psy, { struct acpi_battery *battery = to_acpi_battery(psy); - if ((!acpi_battery_present(battery)) - psp != POWER_SUPPLY_PROP_PRESENT) + if (acpi_battery_present(battery)) { + /* run battery update only if it is present */ + acpi_battery_update(battery); + } else if (psp != POWER_SUPPLY_PROP_PRESENT) return -ENODEV; - acpi_battery_update(battery); switch (psp) { case POWER_SUPPLY_PROP_STATUS: if (battery-state 0x01)
Re: [2.6.24-rc1][BUG] Oops on battery removal
Rolf Eike Beer wrote: Hi, this happened while I removed my battery on bootup. Complete dmesg is attached. Kernel is 2.6.24-rc1-git of yesterday (last commit was d919fd433b5823d1cf9d0688eb2eec183de9b74c). Ok, I found out that it has nothing to do with the actual removal as it seems. When I start the laptop with battery already detached I get the same error. Eike signature.asc Description: This is a digitally signed message part.