[tlinux-users:08154] Re: New release of omnibook module soon: testing welcome

Mathieu Bérard <[email protected]>
Newsgroups gmane.linux.hardware.toshiba
Message-ID <[email protected]>
Renato S. Yamane a écrit :


> Still is impossible use HotKeys and Fn+Fx keys in Toshiba M45-S355.
> I have a question:
> Is possible omnibook do not leave turn-off my laptop? I turn-off my
> laptop at 17:39h, but 6 minutes later it turn-on automatically!
>
>
> In the morning my laptop stay with battery in 0%, because it restart
> automatically and I leave it unplugged.
>
> This problem is fix if I unload omnibook before turn-off laptop.
>
>   
Please try 2 things:
-> echo "off" > /proc/omnibook/hotkeys befor turning your laptop off
-> this patch:

--- trunk/nbsmi.c    2006-09-15 11:02:24.953530294 +0200
+++ renato/nbsmi.c    2006-09-15 11:02:33.951157650 +0200
@@ -174,12 +174,14 @@
 {
     int count;
     u32 retval = 0;
-
+    unsigned long flags;   
+   
+    spin_lock_irqsave(&rtc_lock,flags);
     for (count = 0; count < BUFFER_SIZE; count++) {
         outb(count + start_offset, RTC_PORT(2));
         outb(*(inputbuffer + count), RTC_PORT(3));
     }
-
+    spin_unlock_irqrestore(&rtc_lock,flags);
 /*
  * We have to write 0xe4XX to smi_port
  * where XX is the SMI function code
@@ -201,10 +203,12 @@
     if (retval)
         printk(O_ERR "smi_command failed with error %u.\n", retval);
 
+    spin_lock_irqsave(&rtc_lock,flags);
     for (count = 0; count < BUFFER_SIZE; count++) {
         outb(count + start_offset, RTC_PORT(2));
         *(outputbuffer + count) = inb(RTC_PORT(3));
     }
+    spin_unlock_irqrestore(&rtc_lock,flags);
 
     return retval;
 }

Thanks.

-- 
Mathieu Bérard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.