LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 01-06-2007, 09:59 AM   #1
sudeepd
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Rep: Reputation: 0
Thumbs up PCI_MAP_SINGLE & DMA system hang at 6Mbps


Please find an overview of what i am trying below.
I am working on Linux kernel 2.4-20.8 using Excalibur EPXA10F
processor.
I do a dev_alloc_skb in our ethernet driver and then do a netif_rx(skb) to give the skbuff to bridge.

Once skbuff is received from the bridge i need to give the pointer skbuff->data to the DMA hardware. There are two things i need to take care of. First of all i need to ensure that the contents of
skbuff->data is consistent since we have Icache and Dcache enabled. For this i am doing a
pci_map_single( NULL, skbuff->data, datalen,PCI_DMA_TODEVICE).

Secondly i need to ensure that the physical address of the pointer
skbuff->data is provided just before giving it to the hardware for which I am using virt_to_bus().

Finally I am doing a pci_unmap_single( NULL, phy_addr, datalen,
PCI_DMA_TODEVICE).

However i see a complete system hang when we transfer data at higher rates. I am still not being able to comprehend whether there is some
limitation on the number of times pci_map and pci_unmap can be used?

Can you tell us whether there is some limitation on this number or what could be a safe manner to proceed for our problem which will
definitely work in all architectures?
To sum up these are the steps we are following currently. Please correct wherever necessary :-

-> pci_map_single( NULL, skbuff->data, datalen,PCI_DMA_TODEVICE) to
ensure cache and system memory coherency.
-> Give phy_addr to the DMA hardware using virt_to_bus().
-> pci_unmap_single (NULL, phy_addr, datalen, PCI_DMA_TODEVICE).
This is being done each time a packet comes from the ethernet and has to be given to the hardware DMA. Kindle suggest the reason or the changes required to avoid the memory corruption being seen at higher data rates.
 
Old 01-06-2007, 11:31 AM   #2
sudeepd
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: 0
It would be nice if someone can tell me the right place where i can post this query on the net to get a solution to my problem.
Thanks
 
  


Reply


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
My System gets hang... khattaking Linux - General 9 05-24-2006 09:21 AM
Mandriva Linux 2006 Free BOOT FAILED, system hang after LILO menu (WinXP&Linux) js703 Mandriva 1 04-13-2006 12:46 PM
Firefox Speed issues 6mbps feels like 6kbps byen Linux - Software 2 06-02-2005 05:18 PM
Suse 8.2 change my DMA setting on my DVD-R drive to off & IDE DMA MODE NOT SHOWING IT maximalred Linux - General 0 08-23-2003 04:58 AM
System Hang BxBoy Linux - General 3 05-09-2003 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 11:13 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration