* Malta + USB on 2.4, anyone? @ 2003-07-31 2:12 Jun Sun 2003-07-31 9:53 ` Chris Dearman 2003-07-31 10:26 ` Maciej W. Rozycki 0 siblings, 2 replies; 9+ messages in thread From: Jun Sun @ 2003-07-31 2:12 UTC (permalink / raw) To: linux-mips; +Cc: jsun 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-07-31 2:12 Malta + USB on 2.4, anyone? Jun Sun @ 2003-07-31 9:53 ` Chris Dearman 2003-07-31 17:37 ` Jun Sun 2003-07-31 10:26 ` Maciej W. Rozycki 1 sibling, 1 reply; 9+ messages in thread From: Chris Dearman @ 2003-07-31 9:53 UTC (permalink / raw) To: Jun Sun; +Cc: linux-mips Jun Sun wrote: > Has anybody tried USB on malta with 2.4 kernel? I just found that > I got 0xff IRQ 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 -- Chris Dearman The Fruit Farm, Ely Road voice +44 1223 706206 MIPS Technologies (UK) Chittering, Cambs, CB5 9PH fax +44 1223 706250 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-07-31 9:53 ` Chris Dearman @ 2003-07-31 17:37 ` Jun Sun 0 siblings, 0 replies; 9+ messages in thread From: Jun Sun @ 2003-07-31 17:37 UTC (permalink / raw) To: Chris Dearman; +Cc: linux-mips, jsun On Thu, Jul 31, 2003 at 10:53:06AM +0100, Chris Dearman wrote: > Jun Sun wrote: > > Has anybody tried USB on malta with 2.4 kernel? I just found that > > I got 0xff IRQ 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-07-31 2:12 Malta + USB on 2.4, anyone? Jun Sun 2003-07-31 9:53 ` Chris Dearman @ 2003-07-31 10:26 ` Maciej W. Rozycki 2003-07-31 17:36 ` Jun Sun 1 sibling, 1 reply; 9+ messages in thread From: Maciej W. Rozycki @ 2003-07-31 10:26 UTC (permalink / raw) To: Jun Sun; +Cc: linux-mips On Wed, 30 Jul 2003, Jun Sun wrote: > Has anybody tried USB on malta with 2.4 kernel? I just found that > I got 0xff IRQ 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? -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-07-31 10:26 ` Maciej W. Rozycki @ 2003-07-31 17:36 ` Jun Sun 2003-07-31 18:15 ` Jun Sun 0 siblings, 1 reply; 9+ messages in thread From: Jun Sun @ 2003-07-31 17:36 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: linux-mips, jsun On Thu, Jul 31, 2003 at 12:26:44PM +0200, Maciej W. Rozycki wrote: > On Wed, 30 Jul 2003, Jun Sun wrote: > > > Has anybody tried USB on malta with 2.4 kernel? I just found that > > I got 0xff IRQ 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: root@10.0.18.6:~# 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-07-31 17:36 ` Jun Sun @ 2003-07-31 18:15 ` Jun Sun 2003-08-01 7:58 ` Maciej W. Rozycki 2003-08-01 8:26 ` Atsushi Nemoto 0 siblings, 2 replies; 9+ messages in thread From: Jun Sun @ 2003-07-31 18:15 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: linux-mips, jsun On Thu, Jul 31, 2003 at 10:36:29AM -0700, Jun Sun wrote: > On Thu, Jul 31, 2003 at 12:26:44PM +0200, Maciej W. Rozycki wrote: > > On Wed, 30 Jul 2003, Jun Sun wrote: > > > > > Has anybody tried USB on malta with 2.4 kernel? I just found that > > > I got 0xff IRQ 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: > > root@10.0.18.6:~# 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-07-31 18:15 ` Jun Sun @ 2003-08-01 7:58 ` Maciej W. Rozycki 2003-08-01 8:26 ` Atsushi Nemoto 1 sibling, 0 replies; 9+ messages in thread From: Maciej W. Rozycki @ 2003-08-01 7:58 UTC (permalink / raw) To: Jun Sun; +Cc: linux-mips On Thu, 31 Jul 2003, Jun Sun wrote: > 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. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-07-31 18:15 ` Jun Sun 2003-08-01 7:58 ` Maciej W. Rozycki @ 2003-08-01 8:26 ` Atsushi Nemoto 2003-08-01 17:47 ` Jun Sun 1 sibling, 1 reply; 9+ messages in thread From: Atsushi Nemoto @ 2003-08-01 8:26 UTC (permalink / raw) To: jsun; +Cc: macro, linux-mips >>>>> On Thu, 31 Jul 2003 11:15:06 -0700, Jun Sun <jsun@mvista.com> said: 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? diff -u linux-2.4.21/drivers/usb/usb.c linux/drivers/usb/usb.c --- linux-2.4.21/drivers/usb/usb.c Tue Jul 15 13:49:34 2003 +++ linux/drivers/usb/usb.c Tue Jul 15 21:20:44 2003 @@ -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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Malta + USB on 2.4, anyone? 2003-08-01 8:26 ` Atsushi Nemoto @ 2003-08-01 17:47 ` Jun Sun 0 siblings, 0 replies; 9+ messages in thread From: Jun Sun @ 2003-08-01 17:47 UTC (permalink / raw) To: Atsushi Nemoto; +Cc: macro, linux-mips, jsun On Fri, Aug 01, 2003 at 05:26:23PM +0900, Atsushi Nemoto wrote: > >>>>> On Thu, 31 Jul 2003 11:15:06 -0700, Jun Sun <jsun@mvista.com> said: > 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? > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-08-01 17:47 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-07-31 2:12 Malta + USB on 2.4, anyone? Jun Sun 2003-07-31 9:53 ` Chris Dearman 2003-07-31 17:37 ` Jun Sun 2003-07-31 10:26 ` Maciej W. Rozycki 2003-07-31 17:36 ` Jun Sun 2003-07-31 18:15 ` Jun Sun 2003-08-01 7:58 ` Maciej W. Rozycki 2003-08-01 8:26 ` Atsushi Nemoto 2003-08-01 17:47 ` Jun Sun
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.