<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><font size="2"><span style="font-size: 10pt;">  hi<br>
<br>
I'm currently trying to port an older kernel version (2.6.33-rc6 non realtime) to a newer one (2.6.33.9 with RT-PREEMPT 2.6.33.9).<br>
The initial support for USB and CAN was done by Denx.<br>
<br>
I've been working on moving this support to the new kernel which is nearly completed except from the a kernel panic in the USB setup. It has something to do with the fsl bus setup and the panic happens in drivers/usb/host/ehci-hcd.c::echi_run(struct usb_hcd
 *hcd):<br>
<br>
----------------------------------------------<br>
<br>
/* start HC running; it's halted, ehci_init() has been run (once) */<br>
static int ehci_run (struct usb_hcd *hcd)<br>
{<br>
    struct ehci_hcd        *ehci = hcd_to_ehci (hcd);<br>
    int            retval;<br>
    u32            temp;<br>
    u32            hcc_params;<br>
<br>
    hcd->uses_new_polling = 1;<br>
    hcd->poll_rh = 0;<br>
<br>
    /* EHCI spec section 4.1 */<br>
    if ((retval = ehci_reset(ehci)) != 0) {<br>
        ehci_mem_cleanup(ehci);<br>
        return retval;<br>
    }<br>
    ehci_writel(ehci, ehci->periodic_dma, &ehci->regs->frame_list);<br>
    ehci_writel(ehci, (u32)ehci->async->qh_dma, &ehci->regs->async_next);<br>
<br>
----------------------------------------------<br>
<br>
The panic happens every time the ehci_reset(ehci) is called. I've been trying to locate the problem and it seems so that I can't go any further because I expect the problem to be earlier in the process, e.g. I must be forgetting something earlier on.<br>
<br>
Here is the kernel boot output:<br>
<br>
----------------------------------------------<br>
<br>
[  261.521847] console [netcon0] enabled<br>
[  261.525493] netconsole: network logging started<br>
[  261.531162] eth0: fs_enet: 00:60:35:0d:dc:93<br>
[  261.536393] FEC MII Bus: probed<br>
[  261.540330] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver<br>
[  261.547065] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller<br>
[  261.553709] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1<br>
[  261.561165] fsl-ehci fsl-ehci.0: irq 44, io mem 0x80004000<br>
[  261.574366] Unable to handle kernel paging request for data at address 0x00000014<br>
[  261.581914] Faulting instruction address: 0xc02e4c48<br>
[  261.586924] Oops: Kernel access of bad area, sig: 11 [#1]<br>
[  261.592360] PREEMPT Marel v39<br>
[  261.595350] NIP: c02e4c48 LR: c02e488c CTR: c02c3a3c<br>
[  261.600358] REGS: cf831d10 TRAP: 0300   Not tainted  (2.6.33.9-rt31marel-svn934)<br>
[  261.607817] MSR: 00009032 <EE,ME,IR,DR>  CR: 24004022  XER: 20000000<br>
[  261.614229] DAR: 00000014, DSISR: 22000000<br>
[  261.618359] TASK = cf82fae0[1] 'swapper' THREAD: cf830000<br>
[  261.623624] GPR00: 00000000 cf831dc0 cf82fae0 0000001d 000026e8 ffffffff cf831d0e 00020000<br>
[  261.632054] GPR08: c0574d20 00000014 0001ffff 00000000 24004022 05011000 0ffb9000 00000000<br>
[  261.640485] GPR16: c4653600 00000000 00000000 00000000 00000000 00000000 00000000 c05a1938<br>
[  261.648916] GPR24: 0000002c 00000002 c055b9d8 cfa32c00 00000080 cfa39048 cfa39000 cfa390cc<br>
[  261.657544] NIP [c02e4c48] ehci_run+0x404/0x458<br>
[  261.662096] LR [c02e488c] ehci_run+0x48/0x458<br>
[  261.666479] Call Trace:<br>
[  261.668947] [cf831dc0] [c02e488c] ehci_run+0x48/0x458 (unreliable)<br>
[  261.675191] [cf831e30] [c02cd960] usb_add_hcd+0x2f8/0x600<br>
[  261.680627] [cf831e60] [c02e6024] usb_hcd_fsl_probe+0x234/0x394<br>
[  261.686598] [cf831e90] [c0272bb8] platform_drv_probe+0x20/0x30<br>
[  261.692491] [cf831ea0] [c0271798] driver_probe_device+0x88/0x180<br>
[  261.698541] [cf831ec0] [c027194c] __driver_attach+0xbc/0xc0<br>
[  261.704162] [cf831ee0] [c0270e94] bus_for_each_dev+0x70/0xac<br>
[  261.709870] [cf831f10] [c02715dc] driver_attach+0x24/0x34<br>
[  261.715314] [cf831f20] [c027062c] bus_add_driver+0xb4/0x278<br>
[  261.720935] [cf831f50] [c0271c88] driver_register+0x70/0x160<br>
[  261.726641] [cf831f70] [c0272f78] platform_driver_register+0x6c/0x7c<br>
[  261.733056] [cf831f80] [c051d860] ehci_hcd_init+0xf0/0x140<br>
[  261.738589] [cf831fa0] [c000389c] do_one_initcall+0x3c/0x1e0<br>
[  261.744295] [cf831fd0] [c0505204] kernel_init+0xe4/0x154<br>
[  261.749660] [cf831ff0] [c0010ed4] kernel_thread+0x4c/0x68<br>
[  261.755087] Instruction dump:<br>
[  261.758075] 4bfffd4c 7c0004ac 7d204c2c 0c090000 4c00012c 4bfffccc 39290018 7c0004ac<br>
[  261.765889] 7c004d2c 4bfffc8c 39290014 7c0004ac <7d604d2c> 4bfffc5c 801f0114 813f0004<br>
[  261.773988] ---[ end trace 364ef0f9c3fc06c7 ]---<br>
[  261.778597] Kernel panic - not syncing: Attempted to kill init!<br>
[  261.784550] Rebooting in 1 seconds..<br>
<br>
----------------------------------------------<br>
<br>
If there are any that are familiar with this and could perhaps point out the problem I hope to hear from you.<br>
<br>
Regards<br>
Einar M. Bjorgvinsson<br>
Embedded Software Engineer<br>
Marel<br>
Iceland</span></font></div>
</body>
</html>