All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* PCI-PCI bridges
@ 1999-01-20 19:28 Ranjit Deshpande
  1999-01-20 21:09 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ranjit Deshpande @ 1999-01-20 19:28 UTC (permalink / raw
  To: linuxppc-dev


Hello all,

I've been trying to get my ethernet card on work on my Starmax 5500. The
card is a Znyx 345 which has the DEC (Now Intel) 21140 chipset.

After some investigation I've found that the card which is on bus #1 is
not seen by the kernel because support of PCI-PCI bridges has been
omitted in the 2.1.125 kernel.

Specifically the pci_*_config_* routines do not use the bus number when
reading from config space. So I went and looked at the 2.1.24 kernel and
changed the following in arch/ppc/kernel/pmac_pci.c in the above mentioned
routines...

out_le32(bp->cfg_addr, (bus << 16) + (dev_fn << 8) + (offset & ~3) +1);
                       ^^^^^^^^^^^
That seemed to make the kernel see my ethernet card.

Now the pcibios_fixup code was not fixing the card's interrupt so I looked
into that as well. The problem there was that the fixup code searches
through the device tree looking for the OF device node at only the fist
level. So if this is the arrangement...

/bandit
	/ohare
	/ATY,RAGEII_M
	/pci-bridge
		/pci1011,9 (my ethernet card)


then the fixup code only looks at the top-level children of bandit(ohare,
the ATI card and the pci-bridge) and misses my ethernet card. 

So I changed the code to search children of nodes called "pci-bridge".

That seemed to fix the interrupt correctly.

Now the problem is that the tulip code cannot read the EEPROM from the
card.  I've checked the DEC (Intel) 21140 datasheet and spec on how to
read the EEPROM and of course Donald Becker's tulip driver is spot on. But
somehow I'm reading a string of 0xff's from the EEPROM. 


Now my questions are...

1. Are the changes I made valid ? I don't claim to be an expert on PPC
   hardware. And this was my first hack of the Linux kernel on any
   architecture.

2. Is there a reason for PCI-PCI bridges not being supported by the newer  
   kernels ?

3. Why is the tulip code not reading the EEROM ? I'm using the standard
   drivers/net/tulip.c. Does it require any PMAC specific changes ?

I could move the card ahead of the PCI bridge but that just wouldn't be
any fun would it ? :-)

Anyone care to answer ? Paul ? Cort ?

Thanks,

Ranjit


[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI-PCI bridges
  1999-01-20 19:28 PCI-PCI bridges Ranjit Deshpande
@ 1999-01-20 21:09 ` Geert Uytterhoeven
  1999-01-20 21:53   ` Ranjit Deshpande
  1999-01-21  7:00 ` Cort Dougan
  1999-01-21 11:05 ` Paul Mackerras
  2 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 1999-01-20 21:09 UTC (permalink / raw
  To: Ranjit Deshpande; +Cc: linuxppc-dev


On Wed, 20 Jan 1999, Ranjit Deshpande wrote:
> 3. Why is the tulip code not reading the EEROM ? I'm using the standard
>    drivers/net/tulip.c. Does it require any PMAC specific changes ?

Does it help if you use the de4x5 driver instead of tulip? On my 21041, tulip
doesn't work, de4x5 does. On Intel both drivers work with the same board.

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium


[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI-PCI bridges
  1999-01-20 21:09 ` Geert Uytterhoeven
@ 1999-01-20 21:53   ` Ranjit Deshpande
  0 siblings, 0 replies; 5+ messages in thread
From: Ranjit Deshpande @ 1999-01-20 21:53 UTC (permalink / raw
  To: Geert Uytterhoeven; +Cc: linuxppc-dev



Cool. de4x5 works great. Thanks Geert.

But I still need some answers about the PCI-PCI bridges issue. Was support
omitted by design ?

While my changes work on my Starmax is that the generic solution ?

Ranjit

On Wed, 20 Jan 1999, Geert Uytterhoeven wrote:

> On Wed, 20 Jan 1999, Ranjit Deshpande wrote:
> > 3. Why is the tulip code not reading the EEROM ? I'm using the standard
> >    drivers/net/tulip.c. Does it require any PMAC specific changes ?
> 
> Does it help if you use the de4x5 driver instead of tulip? On my 21041, tulip
> doesn't work, de4x5 does. On Intel both drivers work with the same board.
> 
> Greetings,
> 
> 						Geert
> 
> --
> Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
> Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
> Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium
> 
> 


[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI-PCI bridges
  1999-01-20 19:28 PCI-PCI bridges Ranjit Deshpande
  1999-01-20 21:09 ` Geert Uytterhoeven
@ 1999-01-21  7:00 ` Cort Dougan
  1999-01-21 11:05 ` Paul Mackerras
  2 siblings, 0 replies; 5+ messages in thread
From: Cort Dougan @ 1999-01-21  7:00 UTC (permalink / raw
  To: Ranjit Deshpande; +Cc: linuxppc-dev


They appear to be.  I'm trying them out now.

}1. Are the changes I made valid ? I don't claim to be an expert on PPC
}   hardware. And this was my first hack of the Linux kernel on any
}   architecture.

I'm just speaking for myself, it was an oversight.  Paul may have left it
out for a reason, though.

}2. Is there a reason for PCI-PCI bridges not being supported by the newer  
}   kernels ?

It shouldn't need any changes.  Does access to the other registers work?

}3. Why is the tulip code not reading the EEROM ? I'm using the standard
}   drivers/net/tulip.c. Does it require any PMAC specific changes ?


[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI-PCI bridges
  1999-01-20 19:28 PCI-PCI bridges Ranjit Deshpande
  1999-01-20 21:09 ` Geert Uytterhoeven
  1999-01-21  7:00 ` Cort Dougan
@ 1999-01-21 11:05 ` Paul Mackerras
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Mackerras @ 1999-01-21 11:05 UTC (permalink / raw
  To: ranjitd; +Cc: linuxppc-dev


Ranjit Deshpande <ranjitd@sco.COM> wrote:

> Specifically the pci_*_config_* routines do not use the bus number when
> reading from config space. So I went and looked at the 2.1.24 kernel and
> changed the following in arch/ppc/kernel/pmac_pci.c in the above mentioned
> routines...
> 
> out_le32(bp->cfg_addr, (bus << 16) + (dev_fn << 8) + (offset & ~3) +1);
>                        ^^^^^^^^^^^
> That seemed to make the kernel see my ethernet card.

Your fix is correct.  As to how the (bus << 16) got lost, I don't
know, it's beyond the event horizon now :-).

> Now the pcibios_fixup code was not fixing the card's interrupt so I looked
> into that as well. The problem there was that the fixup code searches
> through the device tree looking for the OF device node at only the fist
> level. So if this is the arrangement...
> 
> /bandit
> 	/ohare
> 	/ATY,RAGEII_M
> 	/pci-bridge
> 		/pci1011,9 (my ethernet card)
> 
> 
> then the fixup code only looks at the top-level children of bandit(ohare,
> the ATI card and the pci-bridge) and misses my ethernet card. 
> 
> So I changed the code to search children of nodes called "pci-bridge".

That sounds reasonable.  A slightly better fix might be to look at the
device_type property (which is probably also "pci-bridge" or something
like that) rather than the name, or alternatively at the class-code
property, which might be better still.

Paul.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-01-21 11:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-20 19:28 PCI-PCI bridges Ranjit Deshpande
1999-01-20 21:09 ` Geert Uytterhoeven
1999-01-20 21:53   ` Ranjit Deshpande
1999-01-21  7:00 ` Cort Dougan
1999-01-21 11:05 ` Paul Mackerras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.