smsc9115 driver can't receive normally
Recently I had to drive smsc9115 in our develop board, it is a bootloader based non-pci NIC driver. It can only use poll because the bootloader can't support interrupt. I refered SRC-118-LINUX-SIMPLE code in smsc website, it adopt interrupt method.
Now the 9115 can normally send ping packet to the PC NIC card, but it can't receive the reply packet from PC. The PC NIC card ping 9115 and 9115 can receive ping packet, but the received data is longer than the sent.Why? What padding value should be of readfifo function? Now I use(dwPacketLength+2+3)>>2. Debug message as follows: Board send ping packet 44bytes 0xff 0xff 0xff 0xff 0xff 0xff 0x20 0x2f 0x03 0x4c 0xe0 0x00 0x08 0x 06 0x00 0x01 0x08 0x00 0x06 0x04 0x00 0x01 0x20 0x2f 0x03 0x4c 0xe0 0x00 0xc0 0xa8 0x0a 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xa8 0x0a 0x15 0xff 0xf7 And PC receive 60bytes ff ff ff ff ff ff 20 2f 03 4c e0 00 08 06 00 01 08 00 06 04 00 01 20 2f 03 4c e0 00 c0 a8 0a 38 00 00 00 00 00 00 c0 a8 0a 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 PC send ping packet 42bytes 0000 ff ff ff ff ff ff 00 1d 09 13 48 39 08 06 00 01 0010 08 00 06 04 00 01 00 1d 09 13 48 39 c0 a8 0a 15 0020 00 00 00 00 00 00 c0 a8 0a 38 And board receive 64bytes SMSC: simp911x_ether_read() buffer->buf_ioctlcmd = 0x0 SMSC: simp911x_ether_read() buffer->buf_length = 0x5ea SMSC: simp911x_ether_read() buffer->buf_offset = 0x81fbcae8 SMSC: simp911x_ether_read() buffer->buf_ptr = 0x81ebf2d8 SMSC: simp911x_ether_read() buffer->buf_retlen = 0x1 Rx_ProcessPackets() entering SMSC: Rx_PopRxStatus() value of RX_STATUS_FIFO = 0x402420 Rx_ProcessPackets() value of RX_STATUS_FIFO = 0x402420 dwPacketLength = 0x40 MAC_CR is 0x1010000C Rx_ReadFifo() entering dwDwordCount = 0x10 0xff 0xff 0xff 0xff 0xff 0xff 0x00 0x1d 0x09 0x13 0x48 0x39 0x08 0x 06 0x00 0x01 0x08 0x00 0x06 0x04 0x00 0x01 0x00 0x1d 0x09 0x13 0x48 0x39 0xc0 0xa8 0x0a 0x15 0x00 0x00 0x00 0x00 0x00 0x00 0xc0 0xa8 0x0a 0x38 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x 00 0x00 0x00 0x00 0x00 0x00 0x00 0xbc 0xdc 0xa0 0xc6 |
Please post your thread once and in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate.
|
Quote:
I decided to post my question in this forum, but I don't know how to delete the duplicate thread in other place. Please do not close it , I do need help. Thank you! |
Now the most confused problem is that smsc9115 always received more data than the sent data.
Because the packet length is got from register RX_STATUS_FIFO, I wonder why the incoming RX_STATUS_FIFO value is wrong? The other strange problem is that smsc9115 can't receive icmp message , but it can receive udp and arp message. I am not sure it's connected with addres filtering, should I open promiscuous mode? I will appreciate any help or suggestion. |
Nobody knows?
Oh,my god |
All times are GMT -5. The time now is 09:30 PM. |