Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



On 01/23/17 08:34, Ryota Ozaki wrote:
On Mon, Jan 23, 2017 at 5:14 PM, Martin Husemann <martin%netbsd.org@localhost> wrote:
On Mon, Jan 23, 2017 at 11:51:48AM +0900, Ryota Ozaki wrote:
My bpi/rpi (and probably other machines) don't boot after this change


pserialize_perform's kpause never completes as softclk threads are blocked
(forever) on softnet_lock
pserialize_perform is now disabled by default as well as other places.
I think the problem should be fixed.
It does not hang anymore, but now reliably crashes when trying to use
the interface:

Waiting for DAD to complete for statically configured addresses...
Starting dhcpcd.
panic: kernel diagnostic assertion "ipq != NULL" failed: file "../../../../net/if.c", line 862

Seems like the per-cpu if_queue is NULL, how could that happen?
Interface is awge0, backtrace:

0xbff91e44: netbsd:if_percpuq_enqueue+0xe0
0xbff91e94: netbsd:dwc_gmac_intr+0x508
0xbff91ec4: netbsd:pic_dispatch+0x58
0xbff91f1c: netbsd:armgic_irq_handler+0xd4
0xbff91f84: netbsd:irq_idle_entry+0x34
0xbff91fac: netbsd:idle_loop+0x170
You need the following change to use percpuq correctly.

   ozaki-r

diff --git a/sys/dev/ic/dwc_gmac.c b/sys/dev/ic/dwc_gmac.c
index 9612560..95ed18c 100644
--- a/sys/dev/ic/dwc_gmac.c
+++ b/sys/dev/ic/dwc_gmac.c
@@ -1211,7 +1211,7 @@ dwc_gmac_rx_intr(struct dwc_gmac_softc *sc)
                 m_set_rcvif(m, ifp);
                 m->m_flags |= M_HASFCS;

-               if_percpuq_enqueue(ifp->if_percpuq, m);
+               if_percpuq_enqueue(sc->sc_ipq, m);

  skip:
                 bus_dmamap_sync(sc->sc_dmat, data->rd_map, 0,


Yeah, I'd realised my mistake and I've just fixed it. Sorry for the breakage.

Nick




Home | Main Index | Thread Index | Old Index