[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] xilinx_emac crash when using NAND flash



Hello,

 

I am using jffs2 on a NAND flash on a custom board.  There appears to be an issue with either the mtd or the nand code in which it causes the Xilinx full Ethernet implementation to die.  I’m not entirely sure what causes this.  Here is a description of the test that I am doing to bring about the failure:

 

At boot time there is a startup script that mounts a jffs2 file-system on flash (on the /usr mount point).  This occurs before the Ethernet is initialized.  Then the Ethernet is initialized.  I then issue a ping flood from the host machine to the target’s IP address.   The Ethernet keeps up with the ping flood nicely.  Then I do a “cp /bin/* /usr” and the ping flood begins to lag behind slowly at first, then faster, then Ethernet completely dies.

 

I believe that accessing the nand device causes interrupts to be disabled for a long duration of time, which appears to cause the interference with the Ethernet, but I am not absolutely sure that this is what is causing the problem.  It could be that some kernel memory is being stomped on somewhere or some other elusive problem.  The reason I believe that it is caused by the mtd-nand code is that if I turn mtd debug on, the debug print statements appear to cause enough of a delay between interrupts being disabled to reduce the problem.  The ping flood shows that the Ethernet starts to lag, but not nearly as bad as with no debug (though after a more significant amount of time the Ethernet does eventually die). 

 

Has anyone experienced anything like this?  I’m going to test my interrupt theory by writing a simple device driver that periodically disables interrupts for a long duration of time and check to see if I get similar results from the ping flood.

 

Also note that if I remove jffs2 from the picture I can produce the same results by using nandwrite to write raw data to the flash partition.

 

Thanks

-David