linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@cs.anu.edu.au>
To: ranjitd@sco.COM
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: PCI-PCI bridges
Date: Thu, 21 Jan 1999 22:05:13 +1100	[thread overview]
Message-ID: <199901211105.WAA06985@tango.anu.edu.au> (raw)
In-Reply-To: <Pine.SCO.3.96.990120111039.13973A-100000@mammoth.sco.com> (message from Ranjit Deshpande on Wed, 20 Jan 1999 11:28:21 -0800 (PST))


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 ]]

      parent reply	other threads:[~1999-01-21 11:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199901211105.WAA06985@tango.anu.edu.au \
    --to=paulus@cs.anu.edu.au \
    --cc=Paul.Mackerras@cs.anu.edu.au \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=ranjitd@sco.COM \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).