Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-17-2008, 07:09 AM
|
#1
|
|
LQ Newbie
Registered: Mar 2008
Posts: 10
Rep:
|
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
|
|
|
|
07-17-2008, 08:52 AM
|
#2
|
|
Moderator
Registered: May 2001
Posts: 24,969
|
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.
|
|
|
|
07-17-2008, 08:58 PM
|
#3
|
|
LQ Newbie
Registered: Mar 2008
Posts: 10
Original Poster
Rep:
|
Quote:
Originally Posted by unSpawn
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.
|
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!
|
|
|
|
07-18-2008, 09:39 AM
|
#4
|
|
LQ Newbie
Registered: Mar 2008
Posts: 10
Original Poster
Rep:
|
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.
|
|
|
|
07-20-2008, 10:18 PM
|
#5
|
|
LQ Newbie
Registered: Mar 2008
Posts: 10
Original Poster
Rep:
|
Nobody knows?
Oh,my god
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:29 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|