diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-08-12 09:56:48 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-08-12 09:56:48 +0000 |
commit | d2d875919bfabb67d598b776e348a83eb1adccb3 (patch) | |
tree | 96a5917b4e67f9d15c3dd94f56c9efd0682f1f42 /sys/dev/ipmi.c | |
parent | 293be95b2d791960cc33be836d82e2988b99817b (diff) |
Remlve command mutex. It is unnecessary since commands are already
serialized by the use of a taskq and it prevents sendmsg/endmsg from
being able to sleep. This hurts when implementing SSIF since some
i2c controllers sleep while waiting for transactions on the i2c bus to
complete.
ok jmatthew@, deraadt@
Diffstat (limited to 'sys/dev/ipmi.c')
-rw-r--r-- | sys/dev/ipmi.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c index 65eeb846b86..b8f71700287 100644 --- a/sys/dev/ipmi.c +++ b/sys/dev/ipmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipmi.c,v 1.102 2018/06/15 12:21:41 yasuoka Exp $ */ +/* $OpenBSD: ipmi.c,v 1.103 2019/08/12 09:56:47 kettenis Exp $ */ /* * Copyright (c) 2015 Masao Uebayashi @@ -1037,14 +1037,10 @@ ipmi_cmd(struct ipmi_cmd *c) void ipmi_cmd_poll(struct ipmi_cmd *c) { - mtx_enter(&c->c_sc->sc_cmd_mtx); - if ((c->c_ccode = ipmi_sendcmd(c))) printf("%s: sendcmd fails\n", DEVNAME(c->c_sc)); else c->c_ccode = ipmi_recvcmd(c); - - mtx_leave(&c->c_sc->sc_cmd_mtx); } void @@ -1653,7 +1649,6 @@ ipmi_match(struct device *parent, void *match, void *aux) /* XXX local softc is wrong wrong wrong */ sc = malloc(sizeof(*sc), M_TEMP, M_WAITOK | M_ZERO); - mtx_init(&sc->sc_cmd_mtx, IPL_MPFLOOR); strlcpy(sc->sc_dev.dv_xname, "ipmi0", sizeof(sc->sc_dev.dv_xname)); /* Map registers */ @@ -1726,7 +1721,6 @@ ipmi_attach(struct device *parent, struct device *self, void *aux) c->c_ccode = -1; sc->sc_cmd_taskq = taskq_create("ipmicmd", 1, IPL_NONE, TASKQ_MPSAFE); - mtx_init(&sc->sc_cmd_mtx, IPL_MPFLOOR); } int |