Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci This driver sleeps during iwi_media_change(), an...
details: https://anonhg.NetBSD.org/src/rev/36ca8cd1d548
branches: trunk
changeset: 1008353:36ca8cd1d548
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Mar 20 13:33:23 2020 +0000
description:
This driver sleeps during iwi_media_change(), and thus requires an
adaptive mutex for the media lock.
diffstat:
sys/dev/pci/if_iwi.c | 10 +++++++---
sys/dev/pci/if_iwivar.h | 4 +++-
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r 9a2b1100fbbb -r 36ca8cd1d548 sys/dev/pci/if_iwi.c
--- a/sys/dev/pci/if_iwi.c Fri Mar 20 12:29:09 2020 +0000
+++ b/sys/dev/pci/if_iwi.c Fri Mar 20 13:33:23 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwi.c,v 1.113 2020/01/30 06:03:34 thorpej Exp $ */
+/* $NetBSD: if_iwi.c,v 1.114 2020/03/20 13:33:23 thorpej Exp $ */
/* $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $ */
/*-
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.113 2020/01/30 06:03:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.114 2020/03/20 13:33:23 thorpej Exp $");
/*-
* Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -375,7 +375,11 @@
/* override state transition machine */
sc->sc_newstate = ic->ic_newstate;
ic->ic_newstate = iwi_newstate;
- ieee80211_media_init(ic, iwi_media_change, iwi_media_status);
+
+ /* XXX media locking needs revisiting */
+ mutex_init(&sc->sc_media_mtx, MUTEX_DEFAULT, IPL_SOFTNET);
+ ieee80211_media_init_with_lock(ic,
+ iwi_media_change, iwi_media_status, &sc->sc_media_mtx);
/*
* Allocate rings.
diff -r 9a2b1100fbbb -r 36ca8cd1d548 sys/dev/pci/if_iwivar.h
--- a/sys/dev/pci/if_iwivar.h Fri Mar 20 12:29:09 2020 +0000
+++ b/sys/dev/pci/if_iwivar.h Fri Mar 20 13:33:23 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwivar.h,v 1.19 2017/02/02 10:05:35 nonaka Exp $ */
+/* $NetBSD: if_iwivar.h,v 1.20 2020/03/20 13:33:23 thorpej Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -148,6 +148,8 @@
bus_size_t sc_sz;
void *sc_soft_ih;
+ kmutex_t sc_media_mtx; /* XXX */
+
struct sysctllog *sc_sysctllog;
int antenna;
Home |
Main Index |
Thread Index |
Old Index