]> git.pld-linux.org Git - packages/kernel.git/blob - linux-via-fixes.patch
- added description of djurban's branch
[packages/kernel.git] / linux-via-fixes.patch
1 This path contains the following (from the ac patch):
2
3 - VIA timer bugfix
4
5 --- linux.org/arch/i386/kernel/time.c.orig      Sat Jun  2 16:06:59 2001
6 +++ linux/arch/i386/kernel/time.c       Sat Jun  2 16:07:20 2001
7 @@ -178,6 +178,15 @@
8         jiffies_t = jiffies;
9  
10         count |= inb_p(0x40) << 8;
11 +       
12 +        /* VIA686a test code... reset the latch if count > max + 1 */
13 +        if (count > LATCH) {
14 +                outb_p(0x34, 0x43);
15 +                outb_p(LATCH & 0xff, 0x40);
16 +                outb(LATCH >> 8, 0x40);
17 +                count = LATCH - 1;
18 +        }
19 +       
20         spin_unlock(&i8253_lock);
21  
22         /*
23 @@ -492,6 +501,24 @@
24  
25                 count = inb_p(0x40);    /* read the latched count */
26                 count |= inb(0x40) << 8;
27 +               
28 +
29 +                /* VIA686a test code... reset the latch if count > max */
30 +                if (count > LATCH-1) {
31 +                        static int last_whine;
32 +                        outb_p(0x34, 0x43);   
33 +                        outb_p(LATCH & 0xff, 0x40);
34 +                        outb(LATCH >> 8, 0x40);
35 +                        count = LATCH - 1;
36 +                        if(time_after(jiffies, last_whine))
37 +                        {
38 +                                printk(KERN_WARNING "probable hardware bug: clock timer configuration lost - probably a VIA686a motherboard.\n");
39 +                                printk(KERN_WARNING "probable hardware bug: restoring chip configuration.\n");
40 +                                last_whine = jiffies + HZ;
41 +                        }                       
42 +                }                               
43 +
44 +               
45                 spin_unlock(&i8253_lock);
46  
47                 count = ((LATCH-1) - count) * TICK_SIZE;
This page took 1.134531 seconds and 3 git commands to generate.