RE: ISR not triggered upon the interrupts and OS hangs
Hi Mike et al., The bug was solved and it was because the BIOS advertises wrong interrupt line. It should be 5, not 12. So I registered ISR for line 12, of course never triggered. On the other hand, if no one registers for an interrupt line, how come the OS just hangs, is this a feature or bug? I know that Linux would disable that interrupt line if no driver ever registers a certain intr line when the first interrupt comes in. Thanks for your information! -Howie -Original Message- From: Howie Xu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 11:01 AM To: Mike Smith Cc: [EMAIL PROTECTED] Subject: RE: ISR not triggered upon the interrupts and OS hangs I am using FreeBSD 3.2, and all the sample drivers in /usr/src/sys/pci/*.c uses pci_map_int(). How can I debug it in 3.2 to know what the OS thinks when the interrupts come in and OS hangs? Thanks again, -Howie -Original Message- From: Mike Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 2:20 AM To: Howie Xu Cc: [EMAIL PROTECTED] Subject: Re: ISR not triggered upon the interrupts and OS hangs Dear Freebsd Hackers, Here is a question regarding my bsd device drivers: I used the pci_map_int() to register an interrupt handler for my PCI device (intline = 12). But when the interrupt comes in, the handler (ISR) is not triggered at all. But the OS hangs and I can see continuous interrupts coming in on the PCI sniffer. You don't use pci_map_int() on any modern version of FreeBSD; you use bus_alloc_resource() and bus_setup_intr(). Since you don't mention which FreeBSD version you're using, it's hard to be of any more assistance. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: ISR not triggered upon the interrupts and OS hangs
The bug was solved and it was because the BIOS advertises wrong interrupt line. It should be 5, not 12. So I registered ISR for line 12, of course never triggered. Er, can you be more specific here? Where is the interrupt line "advertised"? Is the BIOS incorrectly populating the intline register? Are you certain that the BIOS is doing this? (It would completely violate the PCI specification and cause the system to fail under almost every OS in existence.) On the other hand, if no one registers for an interrupt line, how come the OS just hangs, is this a feature or bug? I know that Linux would disable that interrupt line if no driver ever registers a certain intr line when the first interrupt comes in. FreeBSD doesn't do this, so you get an interrupt storm (PCI interrupts are a persistent condition). It's a violation of the PCI specification for a device to interrupt until it's initialised, so it should be unncessary. Arguably, we could do this. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RE: ISR not triggered upon the interrupts and OS hangs
I am developing a device driver for a network processor. Using pci_cfgread(intline), I read intline 12, but after using DDB to debug the situation, I was convinced that the device actually generates inline 5. After registering my ISR with intline 5, everything is perfect now. Btw, the device was initialized, but I just didn't register the ISR on the right intline. Thanks, -Howie -Original Message- From: Mike Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, January 19, 2001 8:03 PM To: Howie Xu Cc: [EMAIL PROTECTED] Subject: Re: ISR not triggered upon the interrupts and OS hangs The bug was solved and it was because the BIOS advertises wrong interrupt line. It should be 5, not 12. So I registered ISR for line 12, of course never triggered. Er, can you be more specific here? Where is the interrupt line "advertised"? Is the BIOS incorrectly populating the intline register? Are you certain that the BIOS is doing this? (It would completely violate the PCI specification and cause the system to fail under almost every OS in existence.) On the other hand, if no one registers for an interrupt line, how come the OS just hangs, is this a feature or bug? I know that Linux would disable that interrupt line if no driver ever registers a certain intr line when the first interrupt comes in. FreeBSD doesn't do this, so you get an interrupt storm (PCI interrupts are a persistent condition). It's a violation of the PCI specification for a device to interrupt until it's initialised, so it should be unncessary. Arguably, we could do this. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
RE: ISR not triggered upon the interrupts and OS hangs
I am using FreeBSD 3.2, and all the sample drivers in /usr/src/sys/pci/*.c uses pci_map_int(). How can I debug it in 3.2 to know what the OS thinks when the interrupts come in and OS hangs? Thanks again, -Howie -Original Message- From: Mike Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 2:20 AM To: Howie Xu Cc: [EMAIL PROTECTED] Subject: Re: ISR not triggered upon the interrupts and OS hangs Dear Freebsd Hackers, Here is a question regarding my bsd device drivers: I used the pci_map_int() to register an interrupt handler for my PCI device (intline = 12). But when the interrupt comes in, the handler (ISR) is not triggered at all. But the OS hangs and I can see continuous interrupts coming in on the PCI sniffer. You don't use pci_map_int() on any modern version of FreeBSD; you use bus_alloc_resource() and bus_setup_intr(). Since you don't mention which FreeBSD version you're using, it's hard to be of any more assistance. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: ISR not triggered upon the interrupts and OS hangs
Dear Freebsd Hackers, Here is a question regarding my bsd device drivers: I used the pci_map_int() to register an interrupt handler for my PCI device (intline = 12). But when the interrupt comes in, the handler (ISR) is not triggered at all. But the OS hangs and I can see continuous interrupts coming in on the PCI sniffer. You don't use pci_map_int() on any modern version of FreeBSD; you use bus_alloc_resource() and bus_setup_intr(). Since you don't mention which FreeBSD version you're using, it's hard to be of any more assistance. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message