Re: FireWire causes hang at boot

From: Joao Barros <joao.barros_at_gmail.com>
Date: Wed, 19 Dec 2007 11:38:49 +0000
I was bitten by this particular problem some time ago.
More details here:
- http://www.FreeBSD.org/cgi/query-pr.cgi?pr=69218&cat=
- http://lists.freebsd.org/pipermail/freebsd-current/2005-October/056810.html

I don't have that motherboard anymore but would be really happy to see
it go away :D

On Dec 19, 2007 7:31 AM, Hidetoshi Shimokawa <simokawa_at_freebsd.org> wrote:
> Oops, could you replace the line "u_int max_node;" in firewirereg.h
> with  "int max_node;".
> This should prevent too many loops. However, I don't know why we cannot
> get correct max_node value from self-id packets.
>
> Thanks,
>
>
> On 12/19/07, Wojciech A. Koszek <wkoszek_at_freebsd.org> wrote:
> > Hello,
> >
> > This report is about -CURRENT (20071217).  Kernel on my ASUS A7N8X
> > motherboard (with FireWire controller) hangs after disk has been
> > detected and GEOM_LABEL labels are probed:
> >
> > GEOM: new disk ad2
> > ad2: nVidia check1 failed
> > ad2: Adaptec check1 failed
> > ad2: LSI (v3) check1 failed
> > ad2: LSI (v2) check1 failed
> > ad2: FreeBSD check1 failed
> > GEOM_LABEL: Label for provider ad2s2a is label/daemon.fs.
> > GEOM_LABEL: Label for provider ad2s2b is label/daemon.swap.
> >
> > <hang>
> >
> > Sometimes, if I plug and unplug the FireWire cable (several times), boot
> > continues. Hardware:
> >
> > fwohci0: <1394 Open Host Controller Interface> mem 0xe8086000-0xe80867ff,0xe8087000-0xe808703f irq 9 at device 13.0 on pci0
> > fwohci0: [FILTER]
> > fwohci0: OHCI version 1.10 (ROM=0)
> > fwohci0: No. of Isochronous channels is 4.
> > fwohci0: EUI64 00:e0:18:00:00:6c:d5:4a
> > fwohci0: Phy 1394a available S400, 2 ports.
> > fwohci0: Link S400, max_rec 2048 bytes.
> > firewire0: <IEEE1394(FireWire) bus> on fwohci0
> > dcons_crom0: <dcons configuration ROM> on firewire0
> > dcons_crom0: bus_addr 0xbf6460
> > fwe0: <Ethernet over FireWire> on firewire0
> > if_fwe0: Fake Ethernet address: 02:e0:18:6c:d5:4a
> > fwe0: Ethernet address: 02:e0:18:6c:d5:4a
> > fwip0: <IP over FireWire> on firewire0
> > fwip0: Firewire address: 00:e0:18:00:00:6c:d5:4a _at_ 0xfffe00000000, S400, maxrec 2048
> > sbp0: <SBP-2/SCSI over FireWire> on firewire0
> > fwohci0: Initiate bus reset
> > fwohci0: BUS reset
> > fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
> >
> > After reboot, I jumped to the debugger, set firewire_debug = 1 and this
> > time I saw a huge number of messages coming from:
> >
> >         static void
> >         fw_explore(struct firewire_comm *fc):
> >
> > Citation of firewire.c:
> >
> > [cut]
> >
> >         for (node = 0; node <= fc->max_node; node ++) {
> >                 /* We don't probe myself and linkdown nodes */
> >                 if (node == fc->nodeid)
> >                         continue;
> >                 fwsid = fw_find_self_id(fc, node);
> >                 if (!fwsid || !fwsid->p0.link_active) {
> >                         if (firewire_debug)
> >                                 printf("node%d: link down\n", node);
> >                         continue;
> >                 }
> >                 nodes[todo++] = node;
> >         }
> >
> > [cut]
> >
> > It's iterating infinitely on my system. I set some breakpoints and:
> >
> > db> c
> > node258: link down
> > [thread pid 19 tid 100030 ]
> > Breakpoint at   fw_bus_probe_thread+304:        addl    $1,4294966116(%ebp)
> > db> step
> > [thread pid 19 tid 100030 ]
> > Stopped at      fw_bus_probe_thread+311:        movl    4294966116(%ebp),%ecx
> > db> step
> > [thread pid 19 tid 100030 ]
> > Stopped at      fw_bus_probe_thread+317:        movl    4294966104(%ebp),%eax
> > db> step
> > [thread pid 19 tid 100030 ]
> > Stopped at      fw_bus_probe_thread+323:        cmpl    %ecx,32(%eax)
> > db> step
> > [thread pid 19 tid 100030 ]
> > Stopped at      fw_bus_probe_thread+326:        jnb     fw_bus_probe_thread+192
> > db> p/x $eax
> > c2eda000              <- fc
> > db> p/x $eax+32
> > c2eda020              <- fc->max_node
> > db> p/x *0xc2eda020
> > ffffffff              <- it looks like it's wrong
> >
> > db> p/x $ecx
> >      103
> > db> p/d $ecx          <- it's "node" it that context.
> >         259
> >
> >
> > --
> > Wojciech A. Koszek
> > wkoszek_at_FreeBSD.org
> > http://FreeBSD.czest.pl/dunstan/
> >
> >
>
>
> --
> /\ Hidetoshi Shimokawa
> \/  simokawa_at_FreeBSD.ORG
>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>



-- 
Joao Barros
Received on Wed Dec 19 2007 - 10:38:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:24 UTC