Re: PCI Driver - Read/Write to Base Address



Can you utilize ioctl for a pci device driver? I know it can be used
for a char driver.

Is there a sample code with ioctl being utilized for a pci device
driver?

David Schwartz wrote:
elliotng.ee@xxxxxxxxx wrote:

Still awaiting a response to this question:
In addition, I eventually want to take the reading configuration
register, reading PCI memory, and writing PCI memory code out of the
probe function and set each one as a function. After the device driver
is loaded, how do I call those functions from another C program?

Whatever way makes the most sense for your driver. An 'ioctl' on a
device file might be one way. Manipulating a file in '/proc' might be
another.

DS

.



Relevant Pages

  • Re: How to read drivers VERSION_INFO resource?
    ... > Anyone know the answer or can point to some sample code? ... > would think that all drivers that have an IOCTL for returning ... > the version resource. ... and I also use it in selected parts of the driver code. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to read drivers VERSION_INFO resource?
    ... > Anyone know the answer or can point to some sample code? ... > would think that all drivers that have an IOCTL for returning ... > the version resource. ... and I also use it in selected parts of the driver code. ...
    (microsoft.public.development.device.drivers)
  • Re: [PATCH 1/5] Update Documentation/pci.txt
    ... the driver with a matching "description" will be notified. ... Once the driver knows about a PCI device and takes ownership, ... request MMIO/IOP resources ... With MSI and MSI-X the interrupt number is a CPU "vector". ...
    (Linux-Kernel)
  • Re: [PATCH] Update Documentation/pci.txt v7
    ... add section "Legacy I/O Port free driver" by Kenji Kaneshige ... when converting drivers from IO Port space to MMIO space. ... +Once the driver knows about a PCI device and takes ownership, ...
    (Linux-Kernel)
  • Re: [PATCH] Update Documentation/pci.txt v7
    ... add section "Legacy I/O Port free driver" by Kenji Kaneshige ... when converting drivers from IO Port space to MMIO space. ... +Once the driver knows about a PCI device and takes ownership, ...
    (Linux-Kernel)