NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: kern/55485: bwfm @ sdmmc hangs, with some diagnosis
more data. and some likely less broken behaviour fixes, if not
a full fix.
with some help from riastradh@ and jmcneill@ i've tracked down
that when the failure is occuring, the only thing looping is
an interrupt. we appear to be in dwc_mmc_exec_command() all
the time, but kernhist logging shows that we re-enter this
function many times (one time, 1000 times in 60ms.)
initially, byt checking what bits were set in the
BWFM_SDPCMD_INTSTATUS register, we determined that there was
the SDPCMD_INTSTATUS_XMTDATA_AVAIL bit set, which is not used
by our driver. then we noticed that the interrupt mask reg
was set to 0xffffffff, with commented version asking for 2
bits we are interested in. this allowed my test case to work
for about 10x longer than average before failing, and the
failure mode was less hard-hang of bwfm itself. eg, when
i ran 'ifconfig -a', it took 15 seconds, but it did complete,
and 'ifconfig bwfm down up' restored functionality. (there
are 3x5s slow periods here, each accompanied by a 'checksum
error' message on the console.)
the patch below helps a lot, but there are still stability.
.mrg.
Index: if_bwfm_sdio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/sdmmc/if_bwfm_sdio.c,v
retrieving revision 1.19
diff -p -u -r1.19 if_bwfm_sdio.c
--- if_bwfm_sdio.c 23 Jun 2020 10:09:33 -0000 1.19
+++ if_bwfm_sdio.c 18 Jul 2020 04:13:51 -0000
@@ -505,9 +505,12 @@ bwfm_sdio_attachhook(device_t self)
goto err;
}
-// bwfm_sdio_dev_write(sc, SDPCMD_HOSTINTMASK,
-// SDPCMD_INTSTATUS_HMB_SW_MASK | SDPCMD_INTSTATUS_CHIPACTIVE);
+#if 1
+ bwfm_sdio_dev_write(sc, SDPCMD_HOSTINTMASK,
+ SDPCMD_INTSTATUS_HMB_SW_MASK | SDPCMD_INTSTATUS_CHIPACTIVE);
+#else
bwfm_sdio_dev_write(sc, SDPCMD_HOSTINTMASK, 0xffffffff);
+#endif
bwfm_sdio_write_1(sc, BWFM_SDIO_WATERMARK, 8);
if (bwfm_chip_sr_capable(bwfm)) {
Home |
Main Index |
Thread Index |
Old Index