pci functions and stale info?

If I call pci_map_irq() and change the interrupt of a device
to one different from that which the BIOS assigned, it works
fine. This change is also persistent until a reboot. However, a ‘pci -v’ continues to report the
original
irq, as do the ‘pci_’ functions that discover the device. Why is this
info stale?


Art Hays
National Institutes of Health
avhays@nih.gov

Previously, Art Hays wrote in qdn.public.qnxrtp.os:

If I call pci_map_irq() and change the interrupt of a device
to one different from that which the BIOS assigned, it works
fine. This change is also persistent until a reboot. However, a ‘pci -v’ continues to report the
original
irq, as do the ‘pci_’ functions that discover the device. Why is this
info stale?

The pci server only scans the bus(es) once at startup and gathers all the
information for the devices. If the pci server has to assign resources for
a device, this will be shown when you do a ‘pci -v’. If however, you do
a pci_write_config() and change the address/irq of a device, this will
not be updated in the pci server. If you do a ‘pci -vr’ you will see the
changed information, as this does a raw read of all devices.


Art Hays
National Institutes of Health
avhays@nih.gov

“Hugh Brown” <hsbrown@qnx.com> wrote in message
news:Voyager.030623074731.6067A@node90.ott.qnx.com

The pci server only scans the bus(es) once at startup and gathers all the
information for the devices. If the pci server has to assign resources for
a device, this will be shown when you do a ‘pci -v’. If however, you do
a pci_write_config() and change the address/irq of a device, this will
not be updated in the pci server. If you do a ‘pci -vr’ you will see the
changed information, as this does a raw read of all devices.

Would calling ‘pci_rescan_bus()’ after I change the IRQ
cause the info in the pci server to be updated? I want programs
that run after I change the IRQ that do PCI discovery calling the
“pci_” functions to see the correct IRQ.

Previously, Art Hays wrote in qdn.public.qnxrtp.os:

“Hugh Brown” <> hsbrown@qnx.com> > wrote in message
news:> Voyager.030623074731.6067A@node90.ott.qnx.com> …
The pci server only scans the bus(es) once at startup and gathers all the
information for the devices. If the pci server has to assign resources for
a device, this will be shown when you do a ‘pci -v’. If however, you do
a pci_write_config() and change the address/irq of a device, this will
not be updated in the pci server. If you do a ‘pci -vr’ you will see the
changed information, as this does a raw read of all devices.

Would calling ‘pci_rescan_bus()’ after I change the IRQ
cause the info in the pci server to be updated? I want programs
that run after I change the IRQ that do PCI discovery calling the
“pci_” functions to see the correct IRQ.

No, the pci_rescan_bus() function only looks for devices that have been
removed/inserted. I will take a look at this sometime and see if I can
intercept the return of the pci_map_irq() function and plug the irq into
the devices structure, so that a pci_attach_device() will get the
correct irq.