svn commit: r237773 - stable/9/sys/dev/adb
Justin Hibbits
jhibbits at FreeBSD.org
Fri Jun 29 10:39:43 UTC 2012
Author: jhibbits
Date: Fri Jun 29 10:39:42 2012
New Revision: 237773
URL: http://svn.freebsd.org/changeset/base/237773
Log:
MFC r237480
Release the ADB keyboard mutex when handling the power button
press/release. Found by WITNESS.
Approved by: nwhitehorn (mentor)
Modified:
stable/9/sys/dev/adb/adb_kbd.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/adb/adb_kbd.c
==============================================================================
--- stable/9/sys/dev/adb/adb_kbd.c Fri Jun 29 10:31:26 2012 (r237772)
+++ stable/9/sys/dev/adb/adb_kbd.c Fri Jun 29 10:39:42 2012 (r237773)
@@ -426,8 +426,10 @@ adb_kbd_receive_packet(device_t dev, u_c
/* 0x7f is always the power button */
if (data[0] == 0x7f && devctl_process_running()) {
devctl_notify("PMU", "Button", "pressed", NULL);
+ mtx_unlock(&sc->sc_mutex);
return (0);
} else if (data[0] == 0xff) {
+ mtx_unlock(&sc->sc_mutex);
return (0); /* Ignore power button release. */
}
if ((data[0] & 0x7f) == 57 && sc->buffers < 7) {
More information about the svn-src-stable-9
mailing list