Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2007 02:50:24 +0000
From:      "Wojciech A. Koszek" <wkoszek@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        simokawa@freebsd.org
Subject:   FireWire causes hang at boot
Message-ID:  <20071219025024.GA6966@FreeBSD.czest.pl>

next in thread | raw e-mail | index | archive | help
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 @ 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@FreeBSD.org
http://FreeBSD.czest.pl/dunstan/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071219025024.GA6966>