On Oct 23, 2005, at 10:39, info wrote: > Junita > > Sorry to disturbed you. I find your question in the http:// > ozlabs.org mail list. > Have you fixed the bug in gianfar_phy.c? > tempval = gfar_read(&priv-> regs-> dmactrl); > tempval |= (DMACTRL_GRS | DMACTRL_GTS); > gfar_write(&priv-> regs-> dmactrl, tempval); > > while (!(gfar_read(&priv-> regs-> ievent) & (IEVENT_GRSC | > IEVENT_GTSC))) > cpu_relax(); > > /* Reset MAC layer */ > gfar_write(&priv-> regs-> maccfg1, MACCFG1_SOFT_RESET);
I'm a bit confused by the statement above. The code you present is from gianfar.c, and is certainly not a bug. It is possible you are using an older version of the code, which has a bug, which is fixed by adding these lines above the code you show: tempval = gfar_read(&priv->regs->dmactrl); tempval &= ~(DMACTRL_GRS | DMACTRL_GTS); gfar_write(&priv->regs->dmactrl, tempval); This fixes a problem where setting GRS and GTS when they're already set doesn't initiate the graceful stop. But if you are using 2.6.13, you should have this fix. I suspect that, like I told Junita, you need to make sure the platform code has the right CCSRBAR value set up. > > I buy a RMC-G8500 card from GDAtech, I try to build linux-2.6.13.4 > from kernel.org and meet the same problems as you had. I test the > same code on freescale 8540_ADS board, it is good.Can you share > some infomation of your progress? I'm not familiar with this card. Are you sure there's support for it in your source tree? Andy Fleming