View previous topic :: View next topic |
Author |
Message |
Mark Clegg Apprentice
Joined: 05 Jan 2004 Posts: 270 Location: ZZ9 Plural Z Alpha
|
Posted: Mon Mar 15, 2004 7:53 pm Post subject: Sun Mouse on Ultra 5 with 2.6 kernel |
|
|
Anybody else having problems with the Keyboard attached Sun Mouse on an Ultra 5?
I've got an Ultra 5 with type 6 UK keyboard and mouse.
On booting the kernel (2.6.3 and 2.6.4 development-sources) the keybaord and mouse are detected correctly
Code: |
su0 at 0x000001fff13062f8 (irq = 4,7ea) is a 16550A
su1 at 0x000001fff13083f8 (irq = 9,7e9) is a 16550A
....
mice: PS/2 mouse device common for all mice
input: su/serio1/input on su/serio1
input: Sun Mouse on su/serio0
|
... and the mouse is present on /dev/input/mouse0
However, the mouse does not work if I cold boot into 2.6.
I can only get the mouse to work if I, either
boot into 2.4 and then shutdown -r now into 2.6 - OR
boot into 2.6, unlug and re-attach the mouse
It gives the impression that 2.6 isn't initialising the mouse properly. Googling has revealed nothing so far, other than that it appears that sun dabbled in doing mice at either 1200 baud or 4800. When I boot 2.4 I get a dmesg entry that the mouse speed has been set to 1200 baud, so maybe 2.6 is guessing wrong?
cat'ting /dev/input/mouse0 yeilds the expected garbage when it's working properly, but from a cold boot, it only produces the occasional sporadic character if I'm lucky which sort of supports the baud rate theory.
Any ideas? |
|
Back to top |
|
|
cybrjackle Apprentice
Joined: 09 Jan 2003 Posts: 248 Location: USA
|
Posted: Tue Mar 16, 2004 5:09 pm Post subject: |
|
|
2.6 changed some things, so you might need to edit XF86Config. Here is what mine looks like on a ultra10
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/mouse"
Option "Protocol" "IMPS/2"
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "type5"
Option "XkbLayout" "us" |
|
Back to top |
|
|
Mark Clegg Apprentice
Joined: 05 Jan 2004 Posts: 270 Location: ZZ9 Plural Z Alpha
|
Posted: Tue Mar 16, 2004 6:42 pm Post subject: |
|
|
Sorry - it's more subtle than that. - The X config is fine, it's definately the mouse that's the problem.
I'm not even starting X, just doing a 'cat /dev/input/mouse0', or 'hexdump /dev/input/mouse0' gives no output unless I boot 2.4 before booting 2.6. Then it works fine, and I can load X with mouse support without any problems. It's only a cold boot into 2.6 that gives the problem.
I'm thinking I might have to sift through the differences between the 2.4 and 2.6 mouse kernel code to spot the differences, but I don't really fancy the idea.
Maybe I've missed something subtle in my kernel conf? |
|
Back to top |
|
|
cybrjackle Apprentice
Joined: 09 Jan 2003 Posts: 248 Location: USA
|
Posted: Tue Mar 16, 2004 6:55 pm Post subject: |
|
|
Don't know if this will help or not, but here is some of my .config searching for [mouse] :
# Input device support
#
CONFIG_INPUT=y
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_KEYBOARD_SUNKBD=y
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_SERIAL=y
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y |
|
Back to top |
|
|
Weeve Retired Dev
Joined: 30 Oct 2002 Posts: 641
|
Posted: Wed Mar 17, 2004 1:18 am Post subject: |
|
|
Note you'll want the mouse device to be /dev/input/mice. Also double check you have commented out KEYMAP in /etc/rc.conf or changed it to an x86 keyboard style keymap. I forgot to do this on a u5 and my mouse didn't work at all. |
|
Back to top |
|
|
smeets_marc Tux's lil' helper
Joined: 25 Oct 2002 Posts: 98 Location: NL
|
Posted: Thu Mar 18, 2004 9:55 pm Post subject: |
|
|
Having the same problem here with 2.6.4. Previously I ran 2.6.3 witch also gave problems now I think of it. I recompiled 2.6.3 about 10 times before the mouse worked. Onze running ok, it ran for over a week great until this morning when I booted my U60 and the mouse was not functioning. I knew a new kernel was there and I wanted to check something with alsa so I tryed 2.6.5-rc1 which exits with errors on alsa CS4231 module. 2.6.4 compiles ok, but has has problems with mouse. I recalled this topic and indeed...when I unplug and plugin the mouse it works.
No dual booting with 2.4 here, just unpluging.
Funny thing here is that 2.6.3 worked for over a week and suddenly it gave problems. |
|
Back to top |
|
|
Mark Clegg Apprentice
Joined: 05 Jan 2004 Posts: 270 Location: ZZ9 Plural Z Alpha
|
Posted: Fri Mar 19, 2004 9:02 am Post subject: |
|
|
I'm digging around in the sunsu code in the kernel at the moment. From what I gather Sun did different mice that ran at different baud rates (somebody might want to correct me here)
If the kernel code receives a line break from the mouse port it cycles to the next baud rate from a list until it stops getting breaks. That way it can auto detect the speed.
This technique worked ok in 2.4 but I'm wondering if 2.6 has problems with it.
I'll keep digging.... |
|
Back to top |
|
|
smeets_marc Tux's lil' helper
Joined: 25 Oct 2002 Posts: 98 Location: NL
|
Posted: Fri Mar 19, 2004 10:07 am Post subject: |
|
|
When I booted my sparc this morning the mouse was functioning perfect without unplugging....
Just out curiousity, do you also have a Crossbow mouse? |
|
Back to top |
|
|
Mark Clegg Apprentice
Joined: 05 Jan 2004 Posts: 270 Location: ZZ9 Plural Z Alpha
|
Posted: Fri Mar 19, 2004 12:42 pm Post subject: |
|
|
Yes it is, connected to a type 6 UK keyboard. |
|
Back to top |
|
|
Mark Clegg Apprentice
Joined: 05 Jan 2004 Posts: 270 Location: ZZ9 Plural Z Alpha
|
Posted: Fri Mar 19, 2004 7:12 pm Post subject: |
|
|
Ok more info....
I've added printk's in drivers/serial/suncore.c to log the return value from suncore_mouse_baud_detection, and the selected baudrate at the end of suncore_mouse_baud_cflag_next.
On boot up all I get in dmesg is..
Code: | suncore_mouse_baud_detection returned 0
|
If I unplug and re-attach the mouse I get
Code: | suncore_mouse_baud_detection returned 0
...
suncore_mouse_baud_detection returned 0
suncore_mouse_baud_detection returned 2
Adjusting mouse to 9600 baud
suncore_mouse_baud_detection returned 1
....
suncore_mouse_baud_detection returned 1
suncore_mouse_baud_detection returned 2
Adjusting mouse to 1200 baud
suncore_mouse_baud_detection returned 1
....
suncore_mouse_baud_detection returned 1
suncore_mouse_baud_detection returned 0
suncore_mouse_baud_detection returned 0
suncore_mouse_baud_detection returned 0
suncore_mouse_baud_detection returned 0
|
... where '...' indicates multiple repeats of the line above.
To me this sort of confirms the baud rate detection not working on boot up, as you can see it in action on a mouse re-attach (after which the mouse works). (I think the default starting baud is 4800) |
|
Back to top |
|
|
Mark Clegg Apprentice
Joined: 05 Jan 2004 Posts: 270 Location: ZZ9 Plural Z Alpha
|
Posted: Sat Mar 20, 2004 7:23 pm Post subject: |
|
|
It seems that under 2.6 the Serial Line Break isn't getting through, like it does in 2.4 so the mouse driver never changes speed to match the mouse. If I tweak the driver to start the mouse at 1200 baud which is what the crossbow needs, it still doesn't work for some reason.
It occurs to me, that if the UART isn't set to the same speed as the mouse, then we will also receive framing errors, so if we get the mouse driver to detect this as well, we might be in with a chance.
Initial testing of the patch below to linux-2.6.4/drivers/serial/sunsu.c seems to have some degree of success, but I need more test results before I can submit it to the kernel maintainers.
Any takers?
Code: | --- sunsu.c 2004-02-24 19:59:22.000000000 +0000
+++ new.sunsu.c 2004-03-20 19:07:33.275554791 +0000
@@ -498,6 +498,8 @@
sunsu_change_speed(&up->port, up->cflag, 0, quot);
spin_lock(&up->port.lock);
+
+ printk("Adjusted mouse to %d baud\n",new_baud);
}
static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *regs, int is_break)
@@ -537,9 +539,9 @@
if (!(serial_in(up, UART_IIR) & UART_IIR_NO_INT)) {
unsigned char status = serial_inp(up, UART_LSR);
- if ((status & UART_LSR_DR) || (status & UART_LSR_BI))
+ if ((status & UART_LSR_DR) || (status & UART_LSR_BI) || (status & UART_LSR_FE))
receive_kbd_ms_chars(up, regs,
- (status & UART_LSR_BI) != 0);
+ (status & (UART_LSR_BI | UART_LSR_FE)) != 0);
}
return IRQ_HANDLED;
|
|
|
Back to top |
|
|
creideiki n00b
Joined: 19 Feb 2003 Posts: 61 Location: Linköping, Sweden
|
|
Back to top |
|
|
Emphii n00b
Joined: 08 Oct 2004 Posts: 46
|
Posted: Mon Jul 04, 2005 10:49 pm Post subject: |
|
|
I have installed 2.6.11-gentoo-r4 following the "stage 1 on 3 " instruction couple of
months ago.
Well only thing so far which prevents to find out, what else won't work, is mouse.
I've tried to compile kernel several times by adding and removing drivers, with no
luck.
I found Mark Gleggs instructions, and got Gnome up, but mouse did nothing. If
I unplug/plug the mouse, I got major shutdown effect.
I tried also this patch, which creideiki show up, but now things went more interesting..
When I move the mouse (even accidentally), I get following message to command line
Code: | Kernel panic - not syncing: Aiee, killing interrupt handler! |
and power switch is the only answer.
I tried to boot my U10 and 'shake, rattle and roll' the mouse on boot. Following appears:
Code: | debug atyfb: 0x20E0: 7C004750 0080001D 00000000 00000000
debug atyfb: 0x20F0: 00000000 000064FE E17FFCF8 00000000
debug atyfb: Mach64 PLL register values:
debug atyfb: 0x00: ADD51F14 D80301AA 8E9E6501 A61B0000
debug atyfb: 0x10: 00008000 10ABCC10 00000000 00000000
debug atyfb: 0x20: ADD51F14 D80301AA 8E9E6501 A61B0000
debug atyfb: 0x30: 00008000 10ABCC10 00000000 00000000
Console: switching to colour frame buffer device 128x48
atyfb: fb0: ATY Mach64 frame buffer device on PCI
su0 at 0x000001fff13062f8 (irq = 4,7ea) is a 16550A
su1 at 0x000001fff13063f8 (irq = 9,7e9) is a 16550A
mice: PS/2 mouse device common for all mice
kernel BUG at kernel/sched.c:2652!
\|/ ____ \|/
"@'/ .. \'@"
/_| \__/ |_\
\__U_/
swapper(0): Kernel bad sw trap 5 [#1]
TSTATE: 0000000080f09606 TPC: 00000000004423a0 TNPC: 00000000004423a4 Y: 00000000 Not tainted
TPC: <sub_preempt_count+0x40/0x60>
g0: 0000000000400400 g1: 0000000000717000 g2: 0000000000000001 g3: 0000000000000001
g4: 000000000070ad40 g5: 0000000000000000 g6: 000000000070c080 g7: 0000000000000000
o0: 0000000000000023 o1: 00000000006c1dc8 o2: 0000000000000a5c o3: 0000000000001c10
o4: 0000000000001810 o5: 0000000000001410 sp: 000000000070f281 ret_pc: 0000000000442398
RPC: <sub_preempt_count+0x38/0x60>
l0: 00000000007fece0 l1: 0000000000000001 l2: 0000000000802208 l3: 000000000000000a
l4: 00000000007fec00 l5: 00000000007fec00 l6: 0000000000000001 l7: 0000000000801000
i0: 0000000000000001 i1: 000000000070fbfc i2: 0000000000000000 i3: 000000000070fd90
i4: 0000000000719000 i5: 0000000000772d14 i6: 000000000070f341 i7: 00000000005b5a50
I7: <sunsu_kbd_ms_interrupt+0x110/0x180>
Caller[00000000005b5a50]: sunsu_kbd_ms_interrupt+0x110/0x180
Caller[0000000000419080]: handler_irq+0x1c0/0x200
Caller[0000000000408894]: tl0_irq4+0x14/020
Caller[0000000000414494]: cpu_idle+0x34/0x60
Caller[00000000007ba660]: start_kernel+0x1c0/0x1e0
Caller[0000000000404674]: tlb_fixup_done+0x58/0x60
Caller[0000000000000000}: 0x0
Instruction DUMP: 11001b07 7fff4ee2 901221c8 <91d02005> 81cfe008 01000000 30680005 01000000 01000000
Kernel panic - not syncing: Aiee, killing interrupt handler!
<0>Press Stop-A (L1-A) to return to the boot prom
|
I just LoVE Kernel panics.
Any ideas to get forward? _________________ /tmp. |
|
Back to top |
|
|
|