Source-Changes archive

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

CVS commit: [netbsd-9] src/sys/dev



Module Name:    src
Committed By:   martin
Date:           Sun Aug  9 14:03:08 UTC 2020

Modified Files:
        src/sys/dev/ic [netbsd-9]: bwfm.c
        src/sys/dev/sdmmc [netbsd-9]: if_bwfm_sdio.c ld_sdmmc.c sdmmc.c
            sdmmc_io.c sdmmc_ioreg.h sdmmc_mem.c sdmmcvar.h

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1042):

        sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.19
        sys/dev/sdmmc/ld_sdmmc.c: revision 1.38
        sys/dev/sdmmc/sdmmcvar.h: revision 1.35
        sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.5
        sys/dev/ic/bwfm.c: revision 1.26
        sys/dev/ic/bwfm.c: revision 1.27
        sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.20
        sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.21
        sys/dev/sdmmc/sdmmc_io.c: revision 1.20
        sys/dev/sdmmc/sdmmc_mem.c: revision 1.72
        sys/dev/sdmmc/sdmmc.c: revision 1.40
        sys/dev/sdmmc/sdmmc_ioreg.h: revision 1.6
        sys/dev/sdmmc/if_bwfm_sdio.c: revision 1.16

Don't pass empty mbufs to the network stack.

Avoid changing signedness bit with << in sdmmc_ioreg.h
Reported by <prlw1>

If the controller doesn't support switch func (opcode 6) then skip
setting this but continue with other settings.  This allows us to use
a card, albeit at a lower speed.

Fix races in sdmmc tasks and teach ld@sdmmc to abort xfers on detach.
- Teach sdmmc_add_task to queue it only if not already queued.
- Remove now-redundant logic to avoid repeated queueing elsewhere.
- Teach sdmmc_del_task to wait until task has completed.
- Call sdmmc_del_task in various needful places.
- Replace abuse of pcq by a lock and a tailq.
  (pcq is multi-producer, _single_-consumer, but there are potentially
  multiple consumers here and really only one producer.)
- Teach ld_sdmmc to abort xfers on detach.
  (Mechanism is kinda kludgey but it'll do for now; any effort one is
  tempted to spend overhauling this should be spent overhauling sdmmc
  to support proper asynchronous commands.)
- Make sure ld_sdmmc_discard either returns failure or eventually calls
  ldenddiscard.

XXX Currently ld_sdmmc_detach aborts xfers _before_ ldbegindetach has
has committed to detaching or not.  This is currently necessary to
avoid a deadlock because ldbegindetach waits for xfers to drain --
which strikes me as wrong; ldbegindetach shouldn't wait for anything,
and should only make the decision to commit to detaching or not so
the caller can decide whether to abort xfers before we actually wait
for them in ldenddetach.

XXX pullup -- although this changes some kernel symbols (sdmmc_add_task
and sdmmc_del_task), it shouldn't affect any existing modules; the only
module that uses sdmmc is ld_sdmmc.kmod, which is `.if 0' in the build
so there shouldn't be any of them floating around.

Make this work on big endian machines

move some of the patching of callbacks and other data after
ieee80211_ifattach() but before if_deferred_start_init().
may fix panic i saw in after restarting wpa_supplicant.
from mlelstv.

only ask for SDPCMD_INTSTATUS_HMB_SW_MASK and SDPCMD_INTSTATUS_CHIPACTIVE
interrupts, not all of them.  we only ack these ones.
mostly fixes pinebookpro wifi hard hangs.  still is problematic and can
trigger interrupt storm that appears as a hard hang without NET_MPSAFE,
and a follow up, less clearly right, change will reduce that to a soft
hang of the interface that can be cleared with 'ifconfig bwfm0 down up',
and even often recovers itself now.

clear all interrupts, not just those we expect from the hostintmask.
this removes the final hard hang i have seen in pinebookpro wifi,
though one may still need to 'ifconfig bwfm0 down up' occasionally,
so we still have bugs to fix here (the hang is usually associated
with 'checksum error' from bwfm/sdio.)

Sort #includes.  Nix trailing whitespace.
No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.14.6.1 -r1.14.6.2 src/sys/dev/ic/bwfm.c
cvs rdiff -u -r1.3.8.2 -r1.3.8.3 src/sys/dev/sdmmc/if_bwfm_sdio.c
cvs rdiff -u -r1.36 -r1.36.4.1 src/sys/dev/sdmmc/ld_sdmmc.c
cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/sys/dev/sdmmc/sdmmc.c
cvs rdiff -u -r1.14.4.1 -r1.14.4.2 src/sys/dev/sdmmc/sdmmc_io.c
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/sys/dev/sdmmc/sdmmc_ioreg.h
cvs rdiff -u -r1.68.2.1 -r1.68.2.2 src/sys/dev/sdmmc/sdmmc_mem.c
cvs rdiff -u -r1.30.4.1 -r1.30.4.2 src/sys/dev/sdmmc/sdmmcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index