SuckyIO still doesn't work
PATCH 1/1 SuckyIO still doesn't work
This patch doesn't make suckyio serial work. But I think it's along the right lines. Anybody else want to play with this, go ahead.
Without the
+ serial8250_console_init();
line in superio.c, we get:
SuperIO: USB regulator enabled
parport0: PC-style at 0x378, irq 101 [PCSPP(,...)]
Registering serial 0
Registering serial 1superio_probe(0000:00:0e.2) ven 0x100b dev 0x12 sv 0x0 sd 0x0 class 0xc0310
SuperIO: probe of 0000:00:0e.2 failed with error -1
Soft power switch enabled, polling @ 0xf0400804.
Console: switching to colour frame buffer device 128x48
pty: 256 Unix98 ptys configured
lp0: using parport0 (interrupt-driven).
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 13 ports, IRQ sharing enabled ttyS0 at I/O 0x3f8 (irq = 99) is a 16550A
(garbage)
With it:
SuperIO: USB regulator enabled
parport0: PC-style at 0x378, irq 101 [PCSPP(,...)] Registering serial 0
(garbage)
I wonder if possibly we're not unregistering the PDC console properly so they're both trying to drive the serial port with awful consequences.
Index: arch/parisc/kernel/inventory.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/inventory.c,v retrieving revision 1.2
parisc/kernel/inventory.c +1 -1
@@ -526,7 +526,7 @@ static void __init system_map_inventory(int i;long status =PDC_OK ; -#if defined(CONFIG_IOMMU_SBA ) && defined(CONFIG_SUPERIO ) +#if defined(CONFIG_IOMMU_SBA ) && defined(CONFIG_SUPERIO ) &&0 /* * Stop the suckyio usb controller on Astro based systems. * Otherwise the machine might crash during iommu setup.
Index: arch/parisc/kernel/pdc_cons.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/pdc_cons.c,v retrieving revision 1.4
parisc/kernel/pdc_cons.c +1 -1
@@ -12,7 +12,7 @@/* Define EARLY_BOOTUP_DEBUG to debug kernel related boot problems. * On production kernels EARLY_BOOTUP_DEBUG should be undefined. */ -#undef EARLY_BOOTUP_DEBUG +#define EARLY_BOOTUP_DEBUG #include <linux/config.h>
Index: drivers/parisc/superio.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/parisc/superio.c,v retrieving revision 1.3
parisc/superio.c +29 -39
120 lines not on this page · raw message
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
Quoted 2 lines · Matthew Wilcox
This patch doesn't make suckyio serial work. But I think it's along the right lines. Anybody else want to play with this, go ahead.
I did. My resulting patch cleans up a few more things and still needs yet more cleanup. But gets alot further now. Problems are starting to look generic.
Current patch on ftp.p-l.o:patches/diff-2.6.0-suckyio-serial-03
I do like the static initializers much better.
And I've moved the pdc_io_reset() calls to sba driver where they belong. I do need to add more code to:
(1) determine when we need to reset (ie is USB active) (2a) unregister pdc_console (ie don't try to talk to it) (2b) resurrect serial config after reset (try to keep pdc_cons working)
Main problem I was seeing is a divide by zero trap when setting up the baud rate.
parisc/superio.c int superio_fixup_irq(struct pci_dev *pc · line 399
Quoted 8 lines
parisc/superio.c +8
-0+static struct uart_port serial[] = { + { + .iotype =UPIO_PORT , + .line =0 , + .type =PORT_16550A , + .uartclk =115200 , + .fifosize =16 , + },
/me whacks willy's hand with a ruler...
(ok, not really called for, silly me didn't see the semi-obvious and burned over 6 hours on Sunday+Monday night tracking this down)
Should read:
.uartclk = 115200*16,
uartclk/16 is used to determine the max baud rate.
baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
and since 9600 > 115200/16, uart_get_baud_rate() returns 0...
My c3k now gets to:
....
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 364k freed
_______________________________
< Your System ate a SPARC! Gah! >
-------------------------------
\ ^__^
\ (xx)\_______
(__)\ )\/\
U ||----w |
|| ||swapper (pid 1): Breakpoint (code 0)
YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00000000000001001111011100001111 Not tainted
r00-03 00000000 10339430 101f4044 00000003 r04-07 00000063 10212568 00000000 103062f0 r08-11 00000002 000f41fa 4e4da280 103d9404 r12-15 3ccbf700 1034e810 103d9010 f0400004 r16-19 f00008c4 f000017c f0000174 00000000 r20-23 00000003 00000000 101f3fec 103062f0 r24-27 000000d3 00000003 10355848 10330010 r28-31 00000060 10f0e940 4ffa8580 10104bfc sr0-3 00000000 00000000 00000000 00000000 sr4-7 00000000 00000000 00000000 00000000
IASQ: 00000000 00000000 IAOQ: 1037c748 1037c74c
IIR: 00000000 ISR: 00000000 IOR: 00000000
CPU: 0 CR30: 4ffa8000 CR31: 10367000
ORIG_R28: 00000034
<2><2><0>Kernel panic: Attempted to kill init!
IOAQ: 0x1037c748 superio_init+0
GR02: 0x101f4044 superio_enable_irq+58
...superio_init(superio_device *sio)
{
struct pci_dev *pdev = sio->lio_pdev;...
Mystery #1: Don't understand why sio is invalid.
Commenting out the superio_init() call from superio_enable_irq() lets the machine boot though.
...
md: ... autorun DONE.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 364k freed superio_enable_irq(10355848, 3)superio_enable_irq(10355848, 3)superio_enable_irq(10355848, 3)superio_enable_irq(10355848, 3)superio_enable_irq(10355848, 3)superio_enable_irq(10355848, 3)
Adding 263144k swap on /dev/sda1. Priority:-1 extents:1
EXT3 FS on sda3, internal journalip_conntrack version 2.1 (8081 buckets, 64648 max) - 300 bytes per conntrack kjournald starting. Commit interval 5 seconds
EXT3 FS on sda4, internal journal
EXT3-fs: mounted filesystem with ordered data mode. drivers/usb/core/usb.c: registered new driver usbfs drivers/usb/core/usb.c: registered new driver hub drivers/usb/core/usb.c: deregistering driver usbfs drivers/usb/core/usb.c: deregistering driver hubip_tables: (C) 2000-2002 Netfilter core team
...drivers/usb/core/usb.c: deregistering driver usbfs drivers/usb/core/usb.c: deregistering driver hubip_tables: (C) 2000-2002 Netfilter core team
eth0: Setting full-duplex based on MII#1 link partner capability of 45e1. <end of output>
Mystery #2: why is superio_enable_irq() getting called so often?
Waiting patiently for login prompt...can ping the machine but can't ssh into it (yet)...bedtime. Probably need to TOC the machine to see what it's spinning on. Another day.
hth,
grant
Hi Grant,
Quoted 1 line
Current patch on ftp.p-l.o:patches/diff-2.6.0-suckyio-serial-03
I apply your patch against 2.6.0-test9-pa4 but not yet boot on the b2k :( I stopped at another place now and not any more on a div by zero:
[...]
Installing knfsd (copyright (C) 1996 [email protected]). Initializing Cryptographic APIsuperio_probe(0000:00:0e.0) ven 0x100b dev 0x2 sv 0x0 sd 0x0 class 0x1018a
SuperIO: Found NS87560 Legacy I/O device at 0000:00:0e.1 (IRQ 64)
SuperIO: Serial port 1 at 0x3f8
SuperIO: Serial port 2 at 0x2f8
SuperIO: Parallel port at 0x378
SuperIO: Floppy controller at 0x3f0
SuperIO: ACPI at 0x7e0
SuperIO: USB regulator enabledsuperio_probe: IDE 87415superio_probe(0000:00:0e.1) ven 0x100b dev 0xe sv 0x0 sd 0x0 class 0x68000
parport0: PC-style at 0x378, irq 101 [PCSPP(,...)]
Registering serial 0
Registering serial 1superio_probe(0000:00:0e.2) ven 0x100b dev 0x12 sv 0x0 sd 0x0 class 0xc0310superio_probe: USB OHCI controller
Soft power switch enabled, polling @ 0xf0400804.
pty: 256 Unix98 ptys configured
lp0: using parport0 (interrupt-driven).
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 13 ports, IRQ sharing enabled ttyS0 at I/O 0x3f8 (irq = 99) is a 16550A
flags= 0 (uart_get_baud_rate() ).
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
[...]
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 504k freed
_______________________________
< Your System ate a SPARC! Gah! >
-------------------------------
\ ^__^
\ (xx)\_______
(__)\ )\/\
U ||----w |
|| ||swapper (pid 1): Breakpoint (code 0)
YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00000000000001001111111100001111 Not tainted
r00-03 00000000 103eb800 101f83d8 0000001c r04-07 00000063 10216a60 00000000 1034e4a4 r08-11 00000002 0098963a 4df21500 10461844 r12-15 3b9aca00 1038f810 10461810 f0400004 r16-19 f00008c4 f000017c f0000174 00000000 r20-23 00000003 00000000 101f8380 1034e4a4 r24-27 000000d3 00000003 10396d28 10378010 r28-31 00000060 1fe5f940 10718580 10107014 sr0-3 00000000 00000000 00000000 00000000 sr4-7 00000000 00000000 00000000 00000000
IASQ: 00000000 00000000 IAOQ: 103ebdbc 103ebdc0
IIR: 00000000 ISR: 00000000 IOR: 00000000
CPU: 0 CR30: 10718000 CR31: 103d1000
ORIG_R28: 1fe9a48c
IAOQ[0]: superio_init+0x0/0x410
IAOQ[1]: superio_init+0x4/0x410
RP(r2): superio_enable_irq+0x58/0x84
Kernel panic: Attempted to kill init!
But I never encounter such do_page_fault().
Thanks in advance for additional help,
Joel
-------------------------------------------------------------------------
Tiscali ADSL: 3 mois GRATUITS! L'Internet rapide, c'est pour tout le monde.