[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3 PCI NIC's on OpenBSD 2.6(x86) sharing IRQ's



Hi,

Thanks for your FANTASTIC answer.

I am sure it will open alot of peoples eyes.  It sure opened 
mine.  ( I know what you mean about the day the PC shipped, I was
working on CP/M at the time & thought the PC wasn't going to go
anywhere! )

Thanks again,
> It isn't the days that were the problem, it is the technology used.
> 
> You CAN NOT share interrupts on the ISA bus.
> Not this today, not fifteen years ago, not the day the IBM PC shipped.
> (I suddenly feel old.)
> 
> However, you most certainly CAN share interrupts on the PCI bus.  That
> was one of the points of the PCI bus (personally, while they were at
> it, I wish they would have ganged up another IRQ controller, but they
> didn't ask me).
> 
> You can not share IRQs between the ISA and the PCI bus.  If IRQ 5 is
> being used by a device on the ISA bus, you can not use it on the PCI
> bus, and visa versa.
> 
> There is nothing wrong with using IRQ 9, as long as nothing else is
> using it that can't share (see preceeding paragraph, nothing special
> about IRQ 2/9 here).
> 
> There is nothing wrong with using IRQ 2, as long as your software was
> written in the last 15 years and knows that on an AT (or better) class
> machine, hardware that uses IRQ 2 is really "hitting" IRQ 9.  This
> *could* create a problem, as on an 8088-based PC, hardware that hit
> the IRQ2 line hit IRQ 2.  Same card plugged into a 286 or better
> system would have the software experiencing an IRQ 9.  Haven't come
> across software that stupid in a very long time (I don't ever recall
> having come across software that stupid, actually, but I expect that
> pre-AT hardware could well have had -- must have had! -- driver
> problems with this).  Being that OpenBSD requires a minimum of a 386
> to run, I rather suspect there is no concept of IRQ2 on the ISA bus in
> OpenBSD.
> 
> I've heard that bull about "can't use 2/9" almost since the AT came
> out.  Untrue.  I believe the misinformation came from the fact that
> many ISA video cards utilized IRQ 2/9 as the video interrupt, but
> virtually no software used it, and none of the software-based
> "diagnostic" programs found any software linking to IRQ2/9, so many
> people forgot that 2/9 was occupied, even if unutilized, and they
> assumed that the cascade interrupt was the problem -- it wasn't.  This
> is not an issue with PCI video cards, which register their IRQ usage,
> you don't end up with PCI cards sitting on "hidden" resources.
> 
> As far as I am aware, there is no significant penalty for sharing
> interrupts on the PCI bus.  The code has to be in place to identify
> which card fired the IRQ anyway, otherwise the application would be
> unable to share IRQs, and thus, be in violation of PCI design
> standards.  PCI drivers don't just assume that IRQ was "for them" --
> they gotta check and make sure -- even if they are the only device on
> the IRQ (for next week, they may not be).  Yeah, you could probably
> gain a small amount of performance if you wrote your drivers assuming
> non-shared IRQs, but you would probably find yourself being lynched if
> you were to try to pull something like that.
> 
> NOW...all that being said...Long ago on software platforms we would
> rather not think about, there are legends of some PCI card
> manufacturers which mearly took source for their ISA card drivers and
> slightly modified it for their "new" PCI cards and thus, IRQ sharing
> wouldn't work.  A more common issue is that some early PCI machines
> were, well, brain dead in hardware.  They didn't do much of anything
> right, sharing IRQs was the least of the problems.  Also early on,
> supposedly you could have troubles sharing IRQs between different
> drivers -- (say) Adaptec's SCSI card driver might battle with (say)
> 3Com's NIC driver over the IRQs, as the authors never talked to each
> other, but that all happened on OSs that are not the subject of this
> mail list -- and you can start to see some of the wonders of
> Open-Source software (and more importantly, an OS developed by a small
> core of very skilled people).
> 
> Nick.
> (a.k.a., "Sid")
> 
> 
> Steve Williams wrote:
> > 
> > Hi,
> > 
> > I am adding another(third) NIC into an OpenBSD(x86) box that is
> > running 2.6.
> > 
> > This will make three Intel 10/100 NIC's in this box.  They are all
> > PCI.
> > 
> > When I rebooted after installing the third NIC, dmesg shows that
> > two of the NIC's are using the same IRQ.
> > 
> > Humm... I haven't done hardware since back in the "old" days, when it
> > was critical that nothing share IRQ's.
> > 
> > Is this still the case?
> > 
> > Is it OK that these two cards are sharing an IRQ?
> > 
> > fxp0 at pci0 dev 13 function 0 "Intel 82557" rev 0x05: irq 11, address ...
> > fxp1 at pci0 dev 15 function 0 "Intel 82557" rev 0x05: irq 9, address ...
> > fxp2 at pci0 dev 17 function 0 "Intel 82557" rev 0x08: irq 11, address ...
> > 
> > Thanks for any assistance!
> > --
> >         Steve Williams, Calgary, Alberta, Canada
> >         Genie Computer Systems Inc.
> >         steve@genie96.com
> > 
> > "A man doesn't begin to attain wisdom until he recognizes that he is
> >  no longer indispensable."
> > - Admiral Richard E. Byrd ( 1888-1957 )
> 
> -- 
> http://www.holland-consulting.net/
> 


-- 
	Steve Williams, Calgary, Alberta, Canada
	Genie Computer Systems Inc.
	steve@genie96.com

"A man doesn't begin to attain wisdom until he recognizes that he is 
 no longer indispensable."
- Admiral Richard E. Byrd ( 1888-1957 )