Hi and sorry for the late answer.
Quick update on this issue:
On Tuesday 10 November 2009 16:06:37 Martin Hicks wrote:
>
> On Fri, Nov 06, 2009 at 10:26:50PM +0100, Thomas Renninger wrote:
> > On Monday 02 November 2009 03:57:52 pm Martin Hicks wrote:
> > > Okay, I found a bug that SGI has hacked around on our boxborough-EX
> > > machines that looks similar. The bug wasn't assigned to me, so I didn't
> > > know it was hacked around. :)
> > >
> > > Can you try this (may not apply. I cut & pasted)? Obviously it's a
> > > terribly patch, but it'll show us if it's the same problem.
> > I think I got it.
> > Below patch workarounds the problem.
> > I will verify on Mo.
>
> Did you manage to verify this patch?
Yes it works (around).
>
> > I expect this is related that these machines do not have a i8042 chip?
>
> Yes, I expect so.
Yes it is.
> > I wonder how sane it is to toggle the LEDs at init time at all
> > (especially because this is also done with kdb=off).
>
> It doesn't seem all that sane to me...Maybe a better approach is to just
> get rid of this code entirely, since we're likely to start seeing more
> and more machines with no i8042.
Yep, definitely (both: it's a good idea to get rid of it and we will see more
machines without i8042).
>
> > Do you consider this to be a "real safe fix"?
> > Does someone have better ideas (remove whole led toggling init code,
> > check for i8042,...).
> > For SLE11-SP1 we do a kernel version jump and it still takes some time,
> > for 11.2 and SLE11 I need something really trivial...
>
> I'm inclined to just dump the LED toggling code, but I"m open to
> opinions from others.
Ditto.
Let me summarize what I found out:
- This happens on specific recent x86 platforms/BIOSes which do
provide this BIOS feature/option:
"PORT 60/64 Emulation"
Disabling it helps.
- Unfortunately it must be enabled by default, otherwise a specific
add-on firmware which can get accessed via early boot does not work
as expected
- I tried to use the i8042 driver detection code to look whether there
is an i8042 or not (see example code below).
But this did not work. It looks as if the ports behave differently
that early and possibly something changes when acpi gets enabled and
the firmware configures quite some HW in the background?
- I am now going to throw out the blinking in sle11 and sle11-sp1 with
this simple patch:
--- linux-2.6.32-master.orig/arch/x86/kdb/kdba_io.c
+++ linux-2.6.32-master/arch/x86/kdb/kdba_io.c
@@ -23,7 +23,7 @@
#include "pc_keyb.h"
#ifdef CONFIG_VT_CONSOLE
-#define KDB_BLINK_LED 1
+#undef KDB_BLINK_LED
#else
#undef KDB_BLINK_LED
#endif
Hmm, Jeff has just upgraded kdb to v4.4-2.6.32-3, I'll give it a try...
Seem to work. So the "#undef KDB_BLINK_LED" only gets pushed into SLE11
maintenance...
Thomas
---------
Code that should detect "no i8042 controller" case, the same way
as i8042.c driver does it. But unlike in i8042.c which is executed
much later, it does not work:
+ * This functions is copied 1:1 (and then slighly adjusted) from i8042.c
+ * It's used there at early initialization to detect whether a i8042 exists,
+ * compare with i8042_controller_check(void) in i8042.c.
+ * But this happens much later -> reuse it here for a tested and save way
+ * to detect i8042 availability.
+ *
+ * i8042_flush() flushes all data that may be in the keyboard and mouse buffers
+ * of the i8042 down the toilet.
+ */
+#define KDB_I8042_BUFFER_SIZE 16
+
+static int i8042_flush(void)
+{
+ int i = 0;
+
+ while ((inb(KBD_STATUS_REG) & KBD_STAT_OBF) && (i <
KDB_I8042_BUFFER_SIZE)) {
+ udelay(50);
+ inb(KBD_DATA_REG);
+ i++;
+ }
+ return i;
+}
...
+ if (i8042_flush() == KDB_I8042_BUFFER_SIZE) {
+ printk (KERN_INFO "kdb: No i8042 controller found.\n");
+
> > From: Thomas Renninger <[email protected]>
> > Subject: X86 KDB: Reduce timeout for key blinking LEDs
> > Patch-Mainline: not yet
> > References: bnc#528811
> >
> > Looks like on some boards without i8042 chip, the
> > whole loop is gone through which takes several minutes.
> >
> > Signed-off-by: Thomas Renninger <[email protected]>
> >
> > ---
> > arch/x86/kdb/kdba_io.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Index: linux-2.6.31-master/arch/x86/kdb/kdba_io.c
> > ===================================================================
> > --- linux-2.6.31-master.orig/arch/x86/kdb/kdba_io.c
> > +++ linux-2.6.31-master/arch/x86/kdb/kdba_io.c
> > @@ -303,10 +303,10 @@ static void
> > kdb_kbdsend(unsigned char byte)
> > {
> > int timeout;
> > - for (timeout = 200 * 1000; timeout && (inb(KBD_STATUS_REG) &
> > KBD_STAT_IBF); timeout--);
> > + for (timeout = 200; timeout && (inb(KBD_STATUS_REG) & KBD_STAT_IBF);
> > timeout--);
> > outb(byte, KBD_DATA_REG);
> > udelay(40);
> > - for (timeout = 200 * 1000; timeout && (~inb(KBD_STATUS_REG) &
> > KBD_STAT_OBF); timeout--);
> > + for (timeout = 200; timeout && (~inb(KBD_STATUS_REG) & KBD_STAT_OBF);
> > timeout--);
> > inb(KBD_DATA_REG);
> > udelay(40);
> > }
>
_______________________________________________
kdb mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/kdb