LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Closed Thread
 
Search this Thread
Old 07-17-2008, 07:09 AM   #1
kine920
LQ Newbie
 
Registered: Mar 2008
Posts: 10

Rep: Reputation: 0
Question 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
 
Old 07-17-2008, 08:52 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,944
Blog Entries: 54

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
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.
 
Old 07-17-2008, 08:58 PM   #3
kine920
LQ Newbie
 
Registered: Mar 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
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!
 
Old 07-18-2008, 09:39 AM   #4
kine920
LQ Newbie
 
Registered: Mar 2008
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 07-20-2008, 10:18 PM   #5
kine920
LQ Newbie
 
Registered: Mar 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Nobody knows?
Oh,my god
 
  


Closed Thread

Tags
driver, nic, polling


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclamation The smsc9115 driver can't receive normally kine920 Linux - Embedded & Single-board computer 3 07-17-2008 11:24 PM
The smsc9115 driver can't receive normally kine920 Linux - Newbie 2 07-17-2008 09:25 PM
smsc9115 driver can't receive normally kine920 Linux - Networking 1 07-17-2008 05:28 PM
In console program,how to receive mouse event from driver wangchaoye Linux - Embedded & Single-board computer 2 07-15-2008 05:00 AM
Im cant receive mails!!!! emilioestevezz Linux - Networking 6 05-11-2004 03:34 AM


All times are GMT -5. The time now is 07:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration