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
  2000-12-29 15:09 ` Chas Williams
  0 siblings, 1 reply; 15+ 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] 15+ messages in thread
[parent not found: <j-jvNB.A.O4F.4jrR6@murphy>]

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

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-29  0:16 Re: Status of PCI-PCI bridge on UMAX S900 jingai
2000-12-29 15:09 ` Chas Williams
2001-01-04 19:19   ` Tibor Pausz
2001-01-04 20:41     ` Benjamin Herrenschmidt
2001-01-04 20:57       ` David Edelsohn
2001-01-04 21:17         ` Benjamin Herrenschmidt
2001-01-04 21:19           ` 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
2001-01-04 22:26     ` Chas Williams
2001-01-05 19:51       ` Tibor Pausz
     [not found] <j-jvNB.A.O4F.4jrR6@murphy>
2000-12-27 10:06 ` Benjamin Herrenschmidt
2000-12-27 23:12   ` jingai
2000-12-28  4:05   ` jingai

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