Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > Help in Finding PCI IRQ Number.

Forgot Password?
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 01-05-2010   #1 (permalink)
Just Joined!
 
Join Date: Nov 2009
Posts: 9
Smile Help in Finding PCI IRQ Number.

Hi....Good Afternoon

i bought usb mass storage card from one company . the interface of my usb mass storage card with motheboard is PCI.

the Design is smthing like this......

pci-Pci Bridge --------------->pci/USB2 bridge ----------> usb2/NAND

controller----------------->NAND CHIPS.


the hardware manual of this card tells PCI Interrupt (INTB) is passed to PCI Slot.


Now i wrote the pci Device Driver to know the vendor id, device id ,int line, int pin etc... i got the vendor id ,device id but on INT LINE i am getting 0XFF; i am not able to undestand tht why i am not getting the exact IRQ for this card...

is this is correct way what i am doing if not please suggest me how to get the correct IRQ no....

thanks in advance
Mark.s
shunty123 is offline  



Reply With Quote
Old 01-05-2010   #2 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 30
does your device support interrupts?

Have you tried to read the PCI_INTERRUPT_PIN (register 61)? If it's 0 then your device does not support interrupts.

Also, it's a longshot and highly improbably but PCI does support 256 (0xff) interrupts. Is what it's returning actually correct?

Cheers!!
bloggins666 is offline   Reply With Quote
Old 01-06-2010   #3 (permalink)
Just Joined!
 
Join Date: Nov 2009
Posts: 9
Help in Finding PCI IRQ Number

Quote:
Originally Posted by bloggins666 View Post
Have you tried to read the PCI_INTERRUPT_PIN (register 61)? If it's 0 then your device does not support interrupts.

Also, it's a longshot and highly improbably but PCI does support 256 (0xff) interrupts. Is what it's returning actually correct?

Cheers!!
Hello Good Evening sir

thanks for reply..

I studied the pci header It is telling that "int pin" =0x01; that mean our Card support Interrupts.



[coreOS] -> pciHeaderShow (0x1000003,1,0)

PCI Configuration Header, (0x01000003,1,0)
vendor ID = 0x1131
device ID = 0x1561
command register = 0x0006
status register = 0x0210
revision ID = 0x11
class code = 0x0c
sub class code = 0x03
programming interface = 0x10
cache line = 0x08
latency time = 0xfc
header type = 0x80
BIST = 0x00
base address 0 = 0x58000000
base address 1 = 0x00000000
base address 2 = 0x00000000
base address 3 = 0x00000000
base address 4 = 0x00000000
base address 5 = 0x00000000
cardBus CIS pointer = 0x00000000
sub system vendor ID = 0x1131
sub system ID = 0x1561
expansion ROM base address = 0x00000000
interrupt line = 0xff (Default value = 0x00)
interrupt Pin = 0x01



Now i checked the hardware manual for my mass storage card. it is written in hardware manual that INTB,INTC lines are coming to pci slots from my pci/usb bridge which generates interrupts.

Now i want an IRQ no: specific to that INTB line for my mass storage card.
but i do not know the way to get the IRQ no: for This INTB line.

so please tell me how to get the IRQ number.

thanks for help

mark.S
shunty123 is offline   Reply With Quote
Old 01-06-2010   #4 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 30
Quote:
Originally Posted by shunty123 View Post
Hello Good Evening sir

Now i checked the hardware manual for my mass storage card. it is written in hardware manual that INTB,INTC lines are coming to pci slots from my pci/usb bridge which generates interrupts.

Now i want an IRQ no: specific to that INTB line for my mass storage card.
but i do not know the way to get the IRQ no: for This INTB line.

so please tell me how to get the IRQ number.

thanks for help

mark.S
Just for my own education I put the line:
pci_read_config_byte(dev,PCI_INTERRUPT_LINE,&myirq );

into a driver I'm currently working on and printed out the result. I did get what looks like a valid value of 11. I verified this by running the command "lspci -v" and seeing the device in the list of devices found on the PCI bus.

This is a released driver and it does work as an interrupt driven device but in no way does it need to know what the IRQ number is. I had to add the code to it in order to print out the information.

I guess what I'm saying is that I don't know how to get your information and I'm not even sure that you need to know what the IRQ is. The PCI bus will administer to it when your "probe" function is called and an IRQ will be allocated. Even your interrupt service routine is installed by calling the appropriate PCI API function and it will take care of it.

Sorry sir, it's a pretty inadequate answer to your problem. Good Luck.

Cheers!!
bloggins666 is offline   Reply With Quote
Old 01-07-2010   #5 (permalink)
Just Joined!
 
Join Date: Nov 2009
Posts: 9
Help in Finding PCI IRQ Number

Quote:
Originally Posted by bloggins666 View Post
Just for my own education I put the line:
pci_read_config_byte(dev,PCI_INTERRUPT_LINE,&myirq );

into a driver I'm currently working on and printed out the result. I did get what looks like a valid value of 11. I verified this by running the command "lspci -v" and seeing the device in the list of devices found on the PCI bus.

This is a released driver and it does work as an interrupt driven device but in no way does it need to know what the IRQ number is. I had to add the code to it in order to print out the information.

I guess what I'm saying is that I don't know how to get your information and I'm not even sure that you need to know what the IRQ is. The PCI bus will administer to it when your "probe" function is called and an IRQ will be allocated. Even your interrupt service routine is installed by calling the appropriate PCI API function and it will take care of it.

Sorry sir, it's a pretty inadequate answer to your problem. Good Luck.

Cheers!!
Hi....Good Afternoon

sir actually i am not using the Intel X-86 Board and LINUX OS. i am Working on

powerPC with HPCNET8641D Board and VXworks OS.


In intel x-86 BIOS assigns the specific irq to externel cards.. i plugged my card with
motherboard in PCI Slot during Booting time it assigned irq no: 3 to my card....


but in VXworks its not like that. i think acc. to my knowledge we have to give this IRQ no manually. then we have to check whether cpu is interrupted or not .

so now still i am confused with irq numbers ....


if possible should i send the architecture of hardware ? may be then u can help me better.
shunty123 is offline   Reply With Quote
Old 01-07-2010   #6 (permalink)
Just Joined!
 
Join Date: Jul 2009
Posts: 30
Quote:
Originally Posted by shunty123 View Post

but in VXworks its not like that. i think acc. to my knowledge we have to give this IRQ no manually. then we have to check whether cpu is interrupted or not .
My experience with any board that was custom built for PPC and using VxWorks was a few years ago but usually the H/W engineers would only have 1 IRQ for all h/w interrupts and then they would implement a mask register which had a bit for each device that could generate an interrupt. This implementation is fairly standard. I would certainly need your h/w architecture to figure it out but I have to point out that this is a Linux forum, not a VxWorks forum and you really should be looking for answers somwhere else. I think we are done here. Good luck.

Cheers!!
bloggins666 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 03:15 PM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1