Module Name: src
Committed By: jmcneill
Date: Thu May 3 02:08:52 UTC 2018
Modified Files:
src/sys/dev/i2c: gttwsi_core.c
Log Message:
Use IPL_VM for bus lock so we can do i2c xfers from interrupt context
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/gttwsi_core.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/i2c/gttwsi_core.c
diff -u src/sys/dev/i2c/gttwsi_core.c:1.3 src/sys/dev/i2c/gttwsi_core.c:1.4
--- src/sys/dev/i2c/gttwsi_core.c:1.3 Sun Oct 29 14:59:05 2017
+++ src/sys/dev/i2c/gttwsi_core.c Thu May 3 02:08:52 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: gttwsi_core.c,v 1.3 2017/10/29 14:59:05 jmcneill Exp $ */
+/* $NetBSD: gttwsi_core.c,v 1.4 2018/05/03 02:08:52 jmcneill Exp $ */
/*
* Copyright (c) 2008 Eiji Kawauchi.
* All rights reserved.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.3 2017/10/29 14:59:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.4 2018/05/03 02:08:52 jmcneill Exp $");
#include "locators.h"
#include <sys/param.h>
@@ -148,7 +148,7 @@ gttwsi_attach_subr(device_t self, bus_sp
if (sc->sc_reg_write == NULL)
sc->sc_reg_write = gttwsi_default_write_4;
- mutex_init(&sc->sc_buslock, MUTEX_DEFAULT, IPL_NONE);
+ mutex_init(&sc->sc_buslock, MUTEX_DEFAULT, IPL_VM);
mutex_init(&sc->sc_mtx, MUTEX_DEFAULT, IPL_BIO);
cv_init(&sc->sc_cv, device_xname(self));