LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-19-2009, 06:25 AM   #1
Mahmoud_eltahawy
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Problem in writing to PCI BAR


Hi all



I am developing a PCIe device driver on a machine 64 bit and using Suse 10 , for testing my driver I tried to do loopback on the driver by writing then reading from configuration space of the PCI (BAR) which is already is implemented in the Hardware. I used BAR2 for doing loop back,

I used memcpy_fromio and memcpy_toio to read/write form/to configuration space of my PCI board

I fail to read successfully from the BAR2 .. I don’t how why?????????

Here are samples of data sent/received:

Tx(memcpy_toio)
=============
0xAABBCCDD00FF00FF
0x1122334455667788

Rx(memcpy_fromio)
================
0x1122334411223344
0x1122334411223344


As apparent above, it read the LSB of 2nd 64bit and repeat it in MSB ..!!!!..which is strange behavior .. So please if anyone could provide me with comment/suggestion/solution to my problem

Appreciate your help

Thanks
Regards
Mahmoud
 
  


Reply



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
PCI (for writing device driver) related information... Devika99 Linux - Hardware 8 09-23-2009 02:32 AM
reading and writing to configuration register of PCI device giri_blr Linux - Kernel 0 08-14-2008 12:43 AM
[SOLVED] lost task bar and status bar how to get them back devmohan786 Linux - Software 2 07-13-2008 04:00 AM
foo@bar:~$ <- how to change bar? JussiKp Linux - Newbie 4 08-03-2006 05:46 AM
KDE task bar / menu bar has dissaspeared! KingofBLASH SUSE / openSUSE 1 03-05-2006 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:33 AM.

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