Dino developments...
I've fixed up a couple of things in the kernel:
- PCI bus walking happens in the *right place*, pci_init().
- I've fixed the inventory code to handle hversion_rev and sversion_rev
- Multiple Dinos are detected properly now
- Card Mode Dino now seems to work for bus walking, the MMIO is a whole different story.
As a test, I packed in:
- a Symbios SCSI controller PCI card
- a GSC gigabit ethernet card (which uses a dino)
- another GSC gigabit ethernet card (which uses a dino)
(and if you're curious as to how I can pack three cards in an A class, you'll have to visit Ottawa to see)
The output I get is:
Dino version 3.1 (bridge mode) found at 0xfff80000
Dino version 3.0/3.1 (card mode) found at 0xfff84000
Found a PCI device, and the vendor is 0x107e, device 0x3
Dino version 3.0/3.1 (card mode) found at 0xfff88000
Found a PCI device, and the vendor is 0x12ae, device 0x1
PCI: Probing PCI
hardware
Found a PCI device, and the vendor is 0x104b, device 0x8130
Found a PCI device, and the vendor is 0x1011, device 0x19
So the first PCI device found is an "Interphase" gigE thing that's not in the PCI database, the second is an Alteon Acenic gigE, the third is the Symbios SCSI card, and the last is the onboard DEC tulip.
- Alex
Signature · 3 lines
Alex deVries Vice President of Engineering The Puffin Group
Alex - this is really cool.
Quoted 5 lines · Alex deVries
I've fixed up a couple of things in the kernel:
- PCI bus walking happens in the *right place*,
pci_init().
Ok. Were you able to salvage what I had submitted then?
I was under the impression pci_init() wouldn't work. Registration of the pci_bus_ops for each Dino looked like a problem.
Oh. I think I got it. Each dino registers pci_bus_ops when it's "discovered" and pci_init() is called later...is that right? (I'll be looking at the code anyway...may not have to answer)
Quoted 4 lines
- I've fixed the inventory code to handle
hversion_revandsversion_rev
- Multiple Dinos are detected properly now
- Card Mode Dino now seems to work for bus walking, the MMIO is a whole different story.
I'll start reviewing card-mode Dino initialization and see what we can do for MMIO. I have to understand more about what the "right" thing for linux is WRT I/O address management. This has to take place sometime between when card-mode Dino is "discovered" and when PCI bus walk completes. (So we know how much space is needed.)
What about interrupts?
Is alloc_irq() handing virtual IRQ's back to the PCI drivers for the respective dino irq_region?
I'm curios if/how it is supposed to work and might take a peek at this as well. Once this works, the box should be able to send mail - that's a key milestone for HP folks..
cheers,
grant
Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253
Quoted 7 lines · Grant Grundler
Quoted 2 lines · Alex deVries
I've fixed up a couple of things in the kernel:
- PCI bus walking happens in the *right place*,pci_init().Ok. Were you able to salvage what I had submitted then?
I was under the impressionpci_init()wouldn't work. Registration of thepci_bus_opsfor each Dino looked like a problem.
Yeah, I definitely re-used a lot of existing work. I got pci_init() to work properly.
Quoted 2 lines
Oh. I think I got it. Each dino registers
pci_bus_opswhen it's "discovered" andpci_init()is called later...is that right?
Yeah, although if I understand the kernel code properly, the first PCI bus scan is done from within pci_init(). All the others are called when the others are detected. Right now the dino_init() call is in the wrong place.
Quoted 5 lines
I'll start reviewing card-mode Dino initialization and see what we can do for MMIO. I have to understand more about what the "right" thing for linux is WRT I/O address management. This has to take place sometime between when card-mode Dino is "discovered" and when PCI bus walk completes. (So we know how much space is needed.)
Can we gather a memory IO map based on what we find in the inventory code with the mem_map() PDC calls?
Quoted 6 lines
What about interrupts?
Isalloc_irq()handing virtual IRQ's back to the PCI drivers for the respective dinoirq_region?
I'm curios if/how it is supposed to work and might take a peek at this as well. Once this works, the box should be able to send mail - that's a key milestone for HP folks..
I really havent' looked at interrupts at all yet in PCI, so please, have a look at it.
About sending mail: that'd require actually running a userland program (unless you want to embed something like elm or emacs into the kernel), and I'm not sure how close we are to that.
- Alex
Signature · 3 lines
Alex deVries Vice President of Engineering The Puffin Group
Alex,
First cut review notes on the v1.17 dino.c:
o card-mode is only supported by dino 3.x.
Only need to look for card-mode which is 3.0 or better. Look for DINO_MEM_DATA in the Dino ERS.
I know for a fact none were shipped and no HP-UX drivers were shipped to support it either.
o "struct hp_driver" is not named very well. Needed more beer? :^) I'd like to suggest "struct pa_iodc_driver" or something like that.
o I'm not sure any systems were shipped with 2.0 built-in dino. Anybody know? What about 2.1's?
I don't expect numbers to be posted here - just the existence.
o I see my long-ass comment about broken dino versions has been removed. Was it intentionally removed?
(It's ok...I wrote it because I thought it was either useful or interesting depending on why anyone bothers reading the code).
o "struct dino_version_mapping" doesn't appear to be used. Can this go?
o FYI: "ifdef USE_PCI_INTR_OPS" stuff is mine.
I want to save it for some experiments on interrupt path latency. May be able to run those by the end of this month at this pace.
o I'd like to move the card-mode initialization into a seperate routine. Makes the common initialization easier to read. I can already see some stuff is missing too.
o Before generic PCI bus walk occurs card-mode dino support must program PCI_INTERRUPT_LINE of each PCI device below it. Firmware does this for PCI devices below built-in Dino. For now, this can be a simple none-recursive bus walk since very few people will have the card-mode expansion chassis (which uses PCI-PCI bridges).
I'll take care of it this week but just wanted it noted in case anyone wonders why card-mode interrupts don't work now.
o is_buildtin_dino(). Typo and it's not needed right now.
o 0x05d. Need the workaround to eventually support J2240 firmware bug. This was included in the macros I had posted previously. Can just add another HPHW_BRIDGE entry instead.
That's enough for now....time to get some sleep.
later,
grant
Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253
Quoted 7 lines · Grant Grundler
First cut review notes on the v1.17
dino.c:o card-mode is only supported by dino 3.x.
Only need to look for card-mode which is 3.0 or better. Look forDINO_MEM_DATAin the Dino ERS.
I know for a fact none were shipped and no HP-UX drivers were shipped to support it either.
Ah, okay. This is info that's not in the docs.
Quoted 2 lines
o "struct
hp_driver" is not named very well. Needed more beer? :^) I'd like to suggest "structpa_iodc_driver" or something like that.
I agree.
Quoted 3 lines
o I'm not sure any systems were shipped with 2.0 built-in dino. Anybody know? What about 2.1's?
I don't expect numbers to be posted here - just the existence.
I'd say just leave those config lines in for now.
Quoted 4 lines
o I see my long-ass comment about broken dino versions has been removed. Was it intentionally removed?
(It's ok...I wrote it because I thought it was either useful or interesting depending on why anyone bothers reading the code).
That's now been moved to README.dino
Quoted 3 lines
o "struct
dino_version_mapping" doesn't appear to be used. Can this go?
Yes!
Quoted 3 lines
o FYI: "ifdef
USE_PCI_INTR_OPS" stuff is mine.
I want to save it for some experiments on interrupt path latency. May be able to run those by the end of this month at this pace.
Sounds good.
Quoted 3 lines
o I'd like to move the card-mode initialization into a seperate routine. Makes the common initialization easier to read. I can already see some stuff is missing too.
That's a good plan. I simply stole the config stuff out of the Dino docs' example, and it worked, I never actually figured out what it should be. I'm still stunned that it worked.
Quoted 8 lines
o Before generic PCI bus walk occurs card-mode dino support must program
PCI_INTERRUPT_LINEof each PCI device below it. Firmware does this for PCI devices below built-in Dino. For now, this can be a simple none-recursive bus walk since very few people will have the card-mode expansion chassis (which uses PCI-PCI bridges).
I'll take care of it this week but just wanted it noted in case anyone wonders why card-mode interrupts don't work now.
Sounds good.
Quoted 1 line
o
is_buildtin_dino(). Typo and it's not needed right now.
That should probably be removed then.
Quoted 3 lines
o
0x05d. Need the workaround to eventually support J2240 firmware bug. This was included in the macros I had posted previously. Can just add anotherHPHW_BRIDGEentry instead.
That's a good idea.
Grant, I'll leave it to you to commit these changes.
- Alex
Signature · 3 lines
Alex deVries Vice President of Engineering The Puffin Group