linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: Re: Status of PCI-PCI bridge on UMAX S900
@ 2000-12-29  0:16 jingai
  0 siblings, 0 replies; 8+ messages in thread
From: jingai @ 2000-12-29  0:16 UTC (permalink / raw)
  To: debian-powerpc, linuxppc-dev


> just a short followup to the message i sent to debian-powerpc, i applied
> the following diff and was able to move my usb board to the other side of
the
>
> umax/s900 bridge w/o any ill effect:
>
> --- prom.c.000  Thu Dec 28 08:43:12 2000
> +++ prom.c      Thu Dec 28 09:06:16 2000
> @@ -1563,8 +1563,8 @@
>         }
>
>         ip = (int *) get_property(np, "AAPL,interrupts", &l);
> -       if (ip == 0)
> -               ip = (int *) get_property(np, "interrupts", &l);
> +       if (ip == 0 && np->parent != NULL)
> +               ip = (int *) get_property(np->parent, "AAPL,interrupts",
> &l);
>         if (ip != 0) {
>                 np->intrs = (struct interrupt_info *) mem_start;
>                 np->n_intrs = l / sizeof(int);

Doh!  I didn't even think to check if the second get_property() call
was returning > 0.. this fixes it!  Thanks bunches for spotting that!

> on a related, note, shouldnt the 'right' code be:
>
>     ip = (int *) get_property(np, "interrupts", &l);
>     if (ip > 0)
>     {
>         /* find and assign interrupt -- see above */
>     }
>
> pci boards should only get an interrupt if they have the interrupt
> property (which seems to be the number of interrupts, not the interrupt
number)

Seems correct to me, but I'm no kernel guru, so I'll let someone else
answer
authoritatively.

-j


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Status of PCI-PCI bridge on UMAX S900
@ 2001-01-04 19:19 Tibor Pausz
  2001-01-04 20:41 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Tibor Pausz @ 2001-01-04 19:19 UTC (permalink / raw)
  To: Chas Williams, jingai; +Cc: debian-powerpc, linuxppc-dev


On Fre, 29. Dez 2000, Chas Williams <chas@cmf.nrl.navy.mil> wrote:

>In message <200012290016.SAA25126@lists.linuxppc.org>,jingai writes:
>>Doh!  I didn't even think to check if the second get_property() call
>>was returning > 0.. this fixes it!  Thanks bunches for spotting that!
>
>it seems like someone was confused about the meaning of the 'interrupts'
>property when they wrote prom.c.  its basically the number of interrupts
>supported by this pci device.  interpret_dbdma_props() also has the
>same confusion, so the following would be a more complete patch to
>prom.c.  note that it checks to see if a pci node has an interrupt
>property before assigning one, otherwise devices on the far side of
>a pci bridge (that shares interrupts) would be assigned interrupts
>when they dont need them.

Today I tried your patch. Well, I breaks the hole interrupt stuff.
Now, even Mesh has trouble with interrupts (kernel crash), the
console=ttyS0 doesn't work so no output from the booting ...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Status of PCI-PCI bridge on UMAX S900
  2001-01-04 22:48   ` jingai
@ 2001-01-04 22:53 David Edelsohn
  2001-01-05 12:58 ` jingai
  -1 siblings, 1 reply; 8+ messages in thread
From: David Edelsohn @ 2001-01-04 22:53 UTC (permalink / raw)
  To: jingai; +Cc: Benjamin Herrenschmidt, linuxppc-dev


	Do you only need to look at the immediate parent and not the
entire ancestor tree?

David

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2001-01-05 14:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <j-jvNB.A.O4F.4jrR6@murphy>
2000-12-27 10:06 ` Status of PCI-PCI bridge on UMAX S900 Benjamin Herrenschmidt
2000-12-27 23:12   ` jingai
2000-12-28  4:05   ` jingai
2000-12-28 14:13     ` Chas Williams
2000-12-29  0:16 jingai
  -- strict thread matches above, loose matches on Subject: below --
2001-01-04 19:19 Tibor Pausz
2001-01-04 20:41 ` Benjamin Herrenschmidt
2001-01-04 22:48   ` jingai
2001-01-04 22:53 David Edelsohn
2001-01-05 12:58 ` jingai
2001-01-05 14:24   ` Benjamin Herrenschmidt

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).