Malta + USB on 2.4, anyone?
Has anybody tried USB on malta with 2.4 kernel? I just found that I got 0xff IRQ number and kernel panics.
Will look further tomorrow, but want to see if anybody knows about it first.
Also, the kgdb seems to be flaky. Targets can send chars too fast so that chars get lost. It appears that the linux status register might be lying about "transmitter buffer empty".
Jun
Quoted 6 lines · Jun Sun
Has anybody tried USB on malta with 2.4 kernel? I just found that I got
0xffIRQ number and kernel panics.Also, the kgdb seems to be flaky. Targets can send chars too fast so that chars get lost. It appears that the linux status register might be lying about "transmitter buffer empty".
I regularly use gdb @ 115200 on Malta and haven't noticed any problems.
Chris
Signature · 2 lines
Chris Dearman The Fruit Farm, Ely Road voice +44 1223 706206 MIPS Technologies (UK) Chittering, Cambs, CB5 9PH fax +44 1223 706250
Quoted 10 lines · Chris Dearman
Quoted 6 lines · Jun Sun
Has anybody tried USB on malta with 2.4 kernel? I just found that I got
0xffIRQ number and kernel panics.Also, the kgdb seems to be flaky. Targets can send chars too fast so that chars get lost. It appears that the linux status register might be lying about "transmitter buffer empty".
I regularly use gdb @ 115200 on Malta and haven't noticed any problems.
Yes. I notice that kgdb generally works, but gets flaky when I hit this particular problem. That makes me wonder maybe something gets very wrong with the controller chip....
Keep debugging ...
Jun
Quoted 2 lines · Jun Sun
Has anybody tried USB on malta with 2.4 kernel? I just found that I got
0xffIRQ number and kernel panics.
Possibly IRQ routing is broken -- the PIIX4 uses INTD for its USB
controller's interrupt. For the Malta it should be routed to the IRQ11 input of the PIIX4's internal dual-8259A PIC. What does `/sbin/lspci -vv -s 00:0a.2' print?
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 10 lines · Maciej W. Rozycki
Quoted 2 lines · Jun Sun
Has anybody tried USB on malta with 2.4 kernel? I just found that I got
0xffIRQ number and kernel panics.Possibly IRQ routing is broken -- the PIIX4 uses INTD for its USB
controller's interrupt. For the Malta it should be routed to the IRQ11 input of the PIIX4's internal dual-8259A PIC. What does `/sbin/lspci -vv -s 00:0a.2' print?
The output seems to say the same thing:
[email protected]:~# lspci -vv -s 00:0a.2 00:0a.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01) (prog-if 00 [UHCI]) Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step ping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort - <MAbort- >SERR- <PERR- Latency: 32 Interrupt: pin D routed to IRQ 11 Region 4: I/O ports at 1220 [size=32]
Jun
Quoted 14 lines · Jun Sun
Quoted 10 lines · Maciej W. Rozycki
Quoted 2 lines · Jun Sun
Has anybody tried USB on malta with 2.4 kernel? I just found that I got
0xffIRQ number and kernel panics.Possibly IRQ routing is broken -- the PIIX4 uses INTD for its USB
controller's interrupt. For the Malta it should be routed to the IRQ11 input of the PIIX4's internal dual-8259A PIC. What does `/sbin/lspci -vv -s 00:0a.2' print?The output seems to say the same thing:
Quoted 11 lines
[email protected]:~# lspci -vv -s 00:0a.2 00:0a.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01) (prog-if 00 [UHCI]) Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step ping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort - <MAbort- >SERR- <PERR- Latency: 32 Interrupt: pin D routed to IRQ 11 Region 4: I/O ports at 1220 [size=32]
Using the alternative JE driver sovles the problem.
I suspect the main UHCI driver does not get cache flushing or bus/virt address right.
Jun
Quoted 4 lines · Jun Sun
Using the alternative JE driver sovles the problem.
I suspect the main UHCI driver does not get cache flushing or bus/virt address right.
Well, since the JE driver is the UHCI driver for 2.6, I wouldn't care.
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jun Sun
jsun> I suspect the main UHCI driver does not get cache flushing or jsun> bus/virt address right.
It seems usb_control_msg is not safe with an unaligned buffer. Is this patch solve your problem?
drivers/usb/usb.c +23 -0
@@ -1172,9 +1172,24 @@ {struct usb_ctrlrequest *dr =kmalloc (sizeof (struct usb_ctrlrequest ),GFP_KERNEL );int ret; +#ifdef __mips__/* BUG??? */ +void *tmpdata =NULL ; +#endif if (!dr)return -ENOMEM ; +#ifdef __mips__/* BUG??? */ +if (size) { + tmpdata =kmalloc (size,GFP_KERNEL ); +if (!data) { +kfree (dr); +return -ENOMEM ; + } +memcpy (tmpdata, data, size); + }else { + tmpdata = data; + } +#endif dr->bRequestType = requesttype; dr->bRequest = request;
@@ -1184,7 +1199,15 @@//dbg("usb_control_msg"); +#ifdef __mips__/* BUG??? */ + ret =usb_internal_control_msg (dev, pipe, dr, tmpdata, size, timeout); +if (size) { +memcpy (data, tmpdata, size); +kfree (tmpdata); + } +#else ret =usb_internal_control_msg (dev, pipe, dr, data, size, timeout); +#endif kfree (dr);
---
Atsushi Nemoto
Quoted 7 lines · Atsushi Nemoto
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jun Sun
jsun> I suspect the main UHCI driver does not get cache flushing or jsun> bus/virt address right.
It seems
usb_control_msgis not safe with an unaligned buffer. Is this patch solve your problem?
Nope.
The symptoms of erractic hw behavior seems to suggest maybe addressing is wrong in physical space. Just a guess. I don't think I will spend more time on this though. :)
Thanks for the patch.
Jun