Results 1 to 2 of 2
I am rather new to Linux and driver programming. I am in the process of writing a driver for a new PCIe device. Everything seems fine until I attempt to ...
- 11-30-2010 #1Just Joined!
- Join Date
- Nov 2010
- Location
- Allen, TX
- Posts
- 4
Need PCI Driver Help!
I am rather new to Linux and driver programming. I am in the process of writing a driver for a new PCIe device. Everything seems fine until I attempt to open the device.
I am able to build and install the driver. I am creating a char device and accessing the driver through ioctl calls. The device can be seen in the /dev directory.
ls - l /dev | grep pxm:
crw-rw-r-- 1 root staff 125, 0 2010-11-29 09:01 pxmuio96a
All resources requested have been successfully obtained.
When I execute
dev_handle = open(device_id, O_RDWR) // device_id = "/dev/pxmuio96a"
the return value is -1. I am getting errno = 6 (ENXIO), which is "No such device or address". Don't understand this since I can see the device and am using the same name in the open statement.
The device structure is:
struct file_operations pxmuio96_fops = {
owner: THIS_MODULE,
open: pci_device_open,
release: pci_device_release,
ioctl: pci_device_ioctl,
};
I have been chasing this for days. Any help would be greatly appreciated. Thanks.
- 11-30-2010 #2forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,095
Hello and welcome!

Sorry, but duplicate threads are not allowed:
http://www.linuxforums.org/forum/lin...ums-rules.html
You'll need to continue any discussion on this topic in your other thread.oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.


