lkml.org 
[lkml]   [2001]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] Re: joypad bug
On Thu, Oct 18, 2001 at 08:53:29AM -0400, James D Strandboge wrote:

> On Wed, Oct 17, 2001 at 11:51:12PM +0200 or thereabouts, Vojtech Pavlik wrote:
> > But if you could provide some more detail about when it stopped to work
> > exactly (did it work with 2.4.9?) that might help.
>
> I posted a message to the kernel mailing list and you a few minutes ago
> regarding the driver working in 2.4.9. It did, however, when I made the
> original post, I was using vanilla 2.4.10 and 2.4.12. However, I just
> tried 2.4.12-ac3 and it is in fact working. Hope this helps.

It's because a fix didn't make it into Linus's tree. Fix is attached.
Linus: Please apply it. Thanks.

--
Vojtech Pavlik
SuSE Labs


--- linux/drivers/char/joystick/analog.c Fri Sep 14 23:40:00 2001
+++ linux-fixed/drivers/char/joystick/analog.c Thu Oct 18 17:57:06 2001
@@ -138,7 +138,7 @@

#ifdef __i386__
#define TSC_PRESENT (test_bit(X86_FEATURE_TSC, &boot_cpu_data.x86_capability))
-#define GET_TIME(x) do { if (TSC_PRESENT) rdtscl(x); else outb(0, 0x43); x = inb(0x40); x |= inb(0x40) << 8; } while (0)
+#define GET_TIME(x) do { if (TSC_PRESENT) rdtscl(x); else { outb(0, 0x43); x = inb(0x40); x |= inb(0x40) << 8; } } while (0)
#define DELTA(x,y) (TSC_PRESENT?((y)-(x)):((x)-(y)+((x)<(y)?1193180L/HZ:0)))
#define TIME_NAME (TSC_PRESENT?"TSC":"PIT")
#elif __x86_64__
@@ -499,7 +499,9 @@
else
printk(" [%s timer, %d %sHz clock, %d ns res]\n", TIME_NAME,
port->speed > 10000 ? (port->speed + 800) / 1000 : port->speed,
- port->speed > 10000 ? "M" : "k", (port->loop * 1000000) / port->speed);
+ port->speed > 10000 ? "M" : "k",
+ port->speed > 10000 ? (port->loop * 1000) / (port->speed / 1000)
+ : (port->loop * 1000000) / port->speed);
}

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:08    [W:0.048 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site