Hardware:
DM8148 EVM @ 600 MHz, DDR2
Started with SDK 5.x linux source code. I have been working on a QNX BSP. The QNX BSP I started with did not have an ethernet driver. So I have looked at the linux cpsw ethernet driver and am trying to port it to QNX.
The driver works in the sense that pings can be done and I can use the QNX IDE to remotely download and debug a program.
Sometimes, the transmission side of the driver hangs. When it hangs, there is a value in TX_HDP[0] but the buffer it is pointing to is not transmitted. Subsequent packets are just added to the buffer chain. Packets are still being received.
The previous packet is completely finished before the stall packet is written to TX_HDP[0]. This is not an EOQ handshaking problem. I can see that the previous packet has been recovered.
There are different scenarios when this happens. One is very reliable. The reliable method is to start up QNET. The first packet sent is not an IP packet. It is for a different ethernet protocol. The packet contents are:
0x0000 FF FF FF FF FF FF 00 50-C2 49 DE 09 82 04 00 00 ÿÿÿÿÿÿ.PÂIÞ.‚... 0x0010 2A 0B 03 02 00 00 00 00-00 00 00 00 00 00 00 00 *............... 0x0020 00 00 00 00 00 00 00 00-00 00 00 00 70 00 00 00 ............p... 0x0030 00 80 00 00 01 00 01 00-70 00 00 00 04 00 00 00 .€......p....... 0x0040 08 00 00 00 0C 00 00 00-0A 00 00 00 16 00 00 00 ................ 0x0050 10 00 00 00 26 00 00 00-08 00 00 00 2E 00 00 00 ....&........... 0x0060 0A 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 0x0070 45 41 34 39 64 65 39 00-6E 65 74 2E 69 6E 74 72 EA49de9.net.intr 0x0080 61 00 10 01 00 50 C2 49-DE 09 00 00 00 00 00 00 a....PÂIÞ....... 0x0090 00 00 45 41 34 39 64 65-39 00 6E 65 74 2E 69 6E ..EA49de9.net.in 0x00A0 74 72 61 00 tra. Sending out this packet also causes other QNX systems to send back packets for the same ethernet protocol (0x8204) After this packet is sent, the transmitter no longer makes progress. I have tried looking at the emac registers before and after the stall and except for TX_HDP[0] staying stuck on the next packet, I don't see a difference. I was going to try to send the above packet when linux is running on the EVM board but I am not sure how to use PF_PACKET or SOCK_RAW to get access and put out a packet with the exact contents above. The socket call fails when I try. I don't completely understand how some parts of the device work (address lookup entries, switch part and using ports 0, 1, 2...) but it works for a while so it seems to be mostly right. When it is working, I have used ping -f with different packet sizes and it runs as long as I let it run. It does seem to have trouble running as a ttcp receiver but it does not appear to be the same stall problem. Suggestions would be appreciated.