http://bugzilla.kernel.org/show_bug.cgi?id=12011

           Summary: battery info sometimes not available - bug already
                    solved (9823) is back again in 2.6.27.5
           Product: ACPI
           Version: 2.5
     KernelVersion: 2.6.27.5
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: Power-Battery
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED], [EMAIL PROTECTED],
                    [EMAIL PROTECTED]


Latest working kernel version: 2.6.27.4
Earliest failing kernel version: 
Distribution: not related as it is already in
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.5.tar.bz2
Hardware Environment: MSI GX700, EX600 laptops, maybe others from MSI
Software Environment:
Problem Description: battery again is not visible by acpi

Steps to reproduce: install newest kernel 2.6.27.5 and problem is back again

I checked what you have done in patch for 2.6.26 (patch:
http://bugzilla.kernel.org/show_bug.cgi?id=9823#c53
http://bugzilla.kernel.org/attachment.cgi?id=17174&action=view ) and it was
working ok as patch for 2.6.26 as well as early 2.6.27 kernels
but since 2.6.27.5 this DISAPPEARED from ec.c !!!

it was:
static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int
force_poll)
{
        atomic_set(&ec->irq_count, 0);
        if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) &&
            likely(!force_poll)) {
                if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec,
event),
                                       msecs_to_jiffies(ACPI_EC_DELAY)))
                        return 0;
                clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                if (acpi_ec_check_status(ec, event)) {
                        /* missing GPEs, switch back to poll mode */
                        if (printk_ratelimit())
                                pr_info(PREFIX "missing confirmations, "
                                                "switch off interrupt
mode.\n");
                        ec_switch_to_poll_mode(ec);
                        ec_schedule_ec_poll(ec);
                        return 0;
                }
        } else {
                unsigned long delay = jiffies +
msecs_to_jiffies(ACPI_EC_DELAY);
                clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                while (time_before(jiffies, delay)) {
                        if (acpi_ec_check_status(ec, event))
                                return 0;
                        msleep(1);
                }
                if (acpi_ec_check_status(ec,event))
                        return 0;
        }
        pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n",
                acpi_ec_read_status(ec),
                (event == ACPI_EC_EVENT_OBF_1) ? "\"b0=1\"" : "\"b1=0\"");
        return -ETIME;
}

now it is: 


static int acpi_ec_wait(struct acpi_ec *ec)
{
        if (wait_event_timeout(ec->wait, ec_transaction_done(ec),
                               msecs_to_jiffies(ACPI_EC_DELAY)))
                return 0;
        /* missing GPEs, switch back to poll mode */
        if (printk_ratelimit())
                pr_info(PREFIX "missing confirmations, "
                                "switch off interrupt mode.\n");
        set_bit(EC_FLAGS_NO_GPE, &ec->flags);
        clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
        return 1;
}


I'm not developer, but it BREAKS my acpi events: 
2.6.27.5:
cat /proc/acpi/battery/BAT1/info  
present:                 no 


while with 2.6.27.4:
cat /proc/acpi/battery/BAT1/info 
present:                 yes
design capacity:         4400 mAh
last full capacity:      3201 mAh
battery technology:      rechargeable
design voltage:          10800 mV
design capacity warning: 0 mAh
design capacity low:     0 mAh
capacity granularity 1:  1 mAh
capacity granularity 2:  1 mAh
model number:            MS-1719

serial number:           

battery type:            LION

OEM info:                MSI Corp.

shit, I was waiting almost 1 year to see my battery properly working under
Linux and few days ago problem came back ;-(


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to