Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2c Use IPL_VM for bus lock so we can d...



details:   https://anonhg.NetBSD.org/src/rev/92ecc24a70a0
branches:  trunk
changeset: 318673:92ecc24a70a0
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu May 03 02:08:52 2018 +0000
description:
Use IPL_VM for bus lock so we can do i2c xfers from interrupt context

diffstat:

 sys/dev/i2c/gttwsi_core.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 42b512cc0c7b -r 92ecc24a70a0 sys/dev/i2c/gttwsi_core.c
--- a/sys/dev/i2c/gttwsi_core.c Thu May 03 01:32:17 2018 +0000
+++ b/sys/dev/i2c/gttwsi_core.c Thu May 03 02:08:52 2018 +0000
@@ -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 @@
        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));
 



Home | Main Index | Thread Index | Old Index