Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-04-2004, 11:49 PM   #1
LQ Newbie
Registered: Mar 2004
Location: Ahemdabad
Distribution: Red Hat
Posts: 6

Rep: Reputation: 0
Question Bus Mastering over PCI under RedHat7.1

Hi ,

I am a new member to this mailing list. I am currently in 8th semester of B.E. Computer Science. Currently I am doing my project on High Speed Data Acquisition on cPCI under RTLinux.

I am new to device driver concept and also to the PCI bus mastering concept. Actually I have to do DMA (bus mastering ) over PCI bus. But I got stuck here. I am having RedHat7.1 installed on my computer and there is a network card on PCI slot. I want to transfer some amount of data from the other computer through hyperterminal to the memory buffer on my computer through DMA .But I am not able to get this done.

The steps that I did are like this....

1). Identified the device on PCI bus by using "pci_find_device()" function.

2). Then I checked whether the device supports the DMA operation or not. It gives me the positive result i.e. it supports it.

3). Then I made the device bus master using "pci_set_master()".

4). Then I allocated a DMA buffer using "kmalloc" with flag GFP_DMA flag of 1KB.

5). Then I did streaming mapping of the buffer using "pci_map_single()" function which gave me the bus address.

6).Then I unmapped the buffer after some time.... and tried to access the buffer, but it gave me some core dump and automatically restarted the computer..

Here I have not installed any irq. I am just sending a string to the memory and I want that to be produced on the other machine on network.

I read some material on DMA over PCI. There also I am confused that during DMA how to specify both the source address and destination address. As I think is that if we want to transfer the data from memory to i/o then we need to specify only source address(memory address) and it takes the destination address(i/o address) by itself or vice - versa.

Also one thing more is that some tutorials talk abt. a step as "Do DMA operation". What doed it mean? Whether we have to do it by some functions like "memcpy_toio" etc. or device itself does this for me.

Please help me regarding this.
Thanks in advance
Ashutosh Sharma


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
Enabling bus mastering. luger Linux - General 2 09-14-2005 07:01 AM
Need to make bus mastering setting permanent using "setpci". Zombie13 Fedora 0 09-01-2005 09:01 AM
PCI-E bus motherboard satimis Linux - Hardware 1 05-14-2004 10:02 AM
PCI NICs and bus-mastering?? 5aboy Linux - Hardware 1 08-09-2003 10:03 AM
PCI NICs and bus-mastering???? 5aboy Linux - Networking 1 08-08-2003 01:36 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:14 PM.

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