From owner-svn-src-head@freebsd.org Sun Aug 12 20:33:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBF60107B797; Sun, 12 Aug 2018 20:33:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DC0878295; Sun, 12 Aug 2018 20:33:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3ED012AF09; Sun, 12 Aug 2018 20:33:56 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7CKXu0d096336; Sun, 12 Aug 2018 20:33:56 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7CKXu6i096335; Sun, 12 Aug 2018 20:33:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201808122033.w7CKXu6i096335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 12 Aug 2018 20:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337689 - head/sys/dev/ipmi X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/ipmi X-SVN-Commit-Revision: 337689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 20:33:56 -0000 Author: jhibbits Date: Sun Aug 12 20:33:55 2018 New Revision: 337689 URL: https://svnweb.freebsd.org/changeset/base/337689 Log: ipmi/opal: Enable polled mode and proper callback Fix a NULL dereference that would occur any time an ioctl() was done, due to a missing ipmi_enqueue_request callback. Just use the default for now, until we decide to properly enable IPMI interrupts. Reported by: kbowling Modified: head/sys/dev/ipmi/ipmi_opal.c Modified: head/sys/dev/ipmi/ipmi_opal.c ============================================================================== --- head/sys/dev/ipmi/ipmi_opal.c Sun Aug 12 14:05:15 2018 (r337688) +++ head/sys/dev/ipmi/ipmi_opal.c Sun Aug 12 20:33:55 2018 (r337689) @@ -210,6 +210,8 @@ opal_ipmi_attach(device_t dev) } sc->ipmi.ipmi_startup = opal_ipmi_startup; sc->ipmi.ipmi_driver_request = opal_ipmi_driver_request; + sc->ipmi.ipmi_enqueue_request = ipmi_polled_enqueue_request; + sc->ipmi.ipmi_driver_requests_polled = 1; sc->ipmi.ipmi_dev = dev; sc->sc_msg = malloc(sizeof(struct opal_ipmi_msg) + IPMI_MAX_RX, M_IPMI,