Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Use correct function to verify if a task has b...
details: https://anonhg.NetBSD.org/src/rev/08156add10d9
branches: trunk
changeset: 454689:08156add10d9
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Wed Sep 25 16:21:14 2019 +0000
description:
Use correct function to verify if a task has been queued. Avoids race
that can corrupt the task queue.
diffstat:
sys/dev/sdmmc/if_bwfm_sdio.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (22 lines):
diff -r 2a4ffde07afc -r 08156add10d9 sys/dev/sdmmc/if_bwfm_sdio.c
--- a/sys/dev/sdmmc/if_bwfm_sdio.c Wed Sep 25 15:51:37 2019 +0000
+++ b/sys/dev/sdmmc/if_bwfm_sdio.c Wed Sep 25 16:21:14 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bwfm_sdio.c,v 1.5 2019/09/13 11:21:03 mlelstv Exp $ */
+/* $NetBSD: if_bwfm_sdio.c,v 1.6 2019/09/25 16:21:14 mlelstv Exp $ */
/* $OpenBSD: if_bwfm_sdio.c,v 1.1 2017/10/11 17:19:50 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
@@ -1267,10 +1267,9 @@
DPRINTF(("%s: sdio_intr\n", DEVNAME(sc)));
mutex_enter(&sc->sc_intr_lock);
- if (!sc->sc_task_queued) {
- sc->sc_task_queued = true;
+ if (!sdmmc_task_pending(&sc->sc_task))
sdmmc_add_task(sc->sc_sf[1]->sc, &sc->sc_task);
- }
+ sc->sc_task_queued = true;
mutex_exit(&sc->sc_intr_lock);
return 1;
}
Home |
Main Index |
Thread Index |
Old Index