PCI driver

I 'm desperately trying to write a driver for a PCI ATM NIC.
My ISR nevers seems to be called.
I 've attached the ISR to IRQ 9.Is this a good IRQ number for my case
(provided that no other device is using it )?Should I also set the
respective PCI slot (in which the NIC is plugged) -through the BIOS
settings- to use this IRQ?In the source code which is responsible fot the
card configuration-initialization I 've included the pci_write utility,
modified, so that it sets the device’s Interrupt Line to the value 0x09
(same as the IRQ).The “sin irqs” command shows that my ISR is properly
attached to IRQ 9!
Is it legal to use a printf function inside the ISR’s code so that I can
check (by a specific message appearing on the screen) weather the ISR is
ever called?
Why everytime I run the show_pci ,without having configured the card before
I get the “No Connection” indication in the Interrupt Line filed of this
card?The other PCI devices found by the utility are always assigned a proper
IRQ.
The show_pci displays 3 devices , but there is only one card on a PCI
slot!Why do I get that?One of them is reffered as a “Mass Storage”
device.What does the hard disk have to do with the PCI bus?
Are there any files with the source code for PCI drivers?It would be really
helpful if I had one!
Thank you very much in advance…

I am not an expert on PCI, but I would suggest using Trace functions inside
irq handler.

Pavol Kycina


“Akis” <romeoita@yahoo.com> wrote in message
news:9r1sr6$1i6$1@inn.qnx.com

I 'm desperately trying to write a driver for a PCI ATM NIC.
My ISR nevers seems to be called.
I 've attached the ISR to IRQ 9.Is this a good IRQ number for my case
(provided that no other device is using it )?Should I also set the
respective PCI slot (in which the NIC is plugged) -through the BIOS
settings- to use this IRQ?In the source code which is responsible fot the
card configuration-initialization I 've included the pci_write utility,
modified, so that it sets the device’s Interrupt Line to the value 0x09
(same as the IRQ).The “sin irqs” command shows that my ISR is properly
attached to IRQ 9!
Is it legal to use a printf function inside the ISR’s code so that I can
check (by a specific message appearing on the screen) weather the ISR is
ever called?
Why everytime I run the show_pci ,without having configured the card
before
I get the “No Connection” indication in the Interrupt Line filed of this
card?The other PCI devices found by the utility are always assigned a
proper
IRQ.
The show_pci displays 3 devices , but there is only one card on a PCI
slot!Why do I get that?One of them is reffered as a “Mass Storage”
device.What does the hard disk have to do with the PCI bus?
Are there any files with the source code for PCI drivers?It would be
really
helpful if I had one!
Thank you very much in advance…

“Akis” <romeoita@yahoo.com> wrote in message
news:9r1sr6$1i6$1@inn.qnx.com

I 'm desperately trying to write a driver for a PCI ATM NIC.
My ISR nevers seems to be called.
I 've attached the ISR to IRQ 9.Is this a good IRQ number for my case
(provided that no other device is using it )?

Yes that ok, if that is the interrupt to which the PCI card is assigned to.
That is usualy obtained via the CA_PCI set of functions.

Should I also set the
respective PCI slot (in which the NIC is plugged) -through the BIOS
settings- to use this IRQ?

In the source code which is responsible fot the
card configuration-initialization I 've included the pci_write utility,
modified, so that it sets the device’s Interrupt Line to the value 0x09
(same as the IRQ).

Unless you have a system with no PCI BIOS you shouldn’t do
that. Let the BIOS deal with this and then query what the BIOS
has done via CA_PCI_XXX

The “sin irqs” command shows that my ISR is properly
attached to IRQ 9!

That doesn’t indicate hardware is connected to IRQ9, it
only indicated a handler is hook to IRQ 9 (which is good I guess)

Is it legal to use a printf function inside the ISR’s code so that I can
check (by a specific message appearing on the screen) weather the ISR is
ever called?

No, in fact there is very little function you can call from an ISR.
Look at the trace() familly of function.

Why everytime I run the show_pci ,without having configured the card
before
I get the “No Connection” indication in the Interrupt Line filed of this
card?

I think this means the card has not requested an interrupt.
Is this an off the shelf card? That’s odd for a network card…

The other PCI devices found by the utility are always assigned a proper
IRQ.

The show_pci displays 3 devices , but there is only one card on a PCI
slot!Why do I get that?One of them is reffered as a “Mass Storage”
device.What does the hard disk have to do with the PCI bus?

The harddisk controller is internalty connected to the PCI bus, you
probably are also seing video card.

Are there any files with the source code for PCI drivers?It would be
really
helpful if I had one!

Again the _CA_PCI set of

Thank you very much in advance…

Akis <romeoita@yahoo.com> wrote:

I 'm desperately trying to write a driver for a PCI ATM NIC.
My ISR nevers seems to be called.
I 've attached the ISR to IRQ 9.Is this a good IRQ number for my case
(provided that no other device is using it )?Should I also set the
respective PCI slot (in which the NIC is plugged) -through the BIOS
settings- to use this IRQ?In the source code which is responsible fot the
card configuration-initialization I 've included the pci_write utility,
modified, so that it sets the device’s Interrupt Line to the value 0x09
(same as the IRQ).The “sin irqs” command shows that my ISR is properly
attached to IRQ 9!

One other thing that you can do is get a copy of sysmon and put it into
“IRQ Monitoring Mode” – this will at least show you if the kernel records
that the IRQ has been hit and dispatched.

To do this, type:

sysmon m=int

You can get a copy of sysmon from www.parse.com in the “Free stuff”
section. Note that you want the “command line” version as opposed to the
Photon version – the photon version doesn’t have all the bells and whistles.

Cheers,
-RK

Is it legal to use a printf function inside the ISR’s code so that I can
check (by a specific message appearing on the screen) weather the ISR is
ever called?
Why everytime I run the show_pci ,without having configured the card before
I get the “No Connection” indication in the Interrupt Line filed of this
card?The other PCI devices found by the utility are always assigned a proper
IRQ.
The show_pci displays 3 devices , but there is only one card on a PCI
slot!Why do I get that?One of them is reffered as a “Mass Storage”
device.What does the hard disk have to do with the PCI bus?
Are there any files with the source code for PCI drivers?It would be really
helpful if I had one!
Thank you very much in advance…


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Consulting and Training at www.parse.com
Email my initials at parse dot com