From owner-svn-src-head@freebsd.org Thu Aug 16 15:59:03 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 D2C97106BD5E; Thu, 16 Aug 2018 15:59:03 +0000 (UTC) (envelope-from ambrisko@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 8765D89CF4; Thu, 16 Aug 2018 15:59:03 +0000 (UTC) (envelope-from ambrisko@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 687131B8E5; Thu, 16 Aug 2018 15:59:03 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7GFx3Oa061597; Thu, 16 Aug 2018 15:59:03 GMT (envelope-from ambrisko@FreeBSD.org) Received: (from ambrisko@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7GFx3pg061595; Thu, 16 Aug 2018 15:59:03 GMT (envelope-from ambrisko@FreeBSD.org) Message-Id: <201808161559.w7GFx3pg061595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ambrisko set sender to ambrisko@FreeBSD.org using -f From: Doug Ambrisko Date: Thu, 16 Aug 2018 15:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337913 - in head/sys: dev/ipmi modules/ipmi X-SVN-Group: head X-SVN-Commit-Author: ambrisko X-SVN-Commit-Paths: in head/sys: dev/ipmi modules/ipmi X-SVN-Commit-Revision: 337913 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: Thu, 16 Aug 2018 15:59:04 -0000 Author: ambrisko Date: Thu Aug 16 15:59:02 2018 New Revision: 337913 URL: https://svnweb.freebsd.org/changeset/base/337913 Log: Fix a module Makefile error on amd64 so the IPMI HW interfaces are built. When the module is being unloaded and no HW interfaces were created don't clean up. This was exposed by the amd64 module build issue. Modified: head/sys/dev/ipmi/ipmi.c head/sys/modules/ipmi/Makefile Modified: head/sys/dev/ipmi/ipmi.c ============================================================================== --- head/sys/dev/ipmi/ipmi.c Thu Aug 16 15:54:12 2018 (r337912) +++ head/sys/dev/ipmi/ipmi.c Thu Aug 16 15:59:02 2018 (r337913) @@ -1053,6 +1053,8 @@ ipmi_unload(void *arg) int count; int i; + if (ipmi_devclass == NULL) + return; if (devclass_get_devices(ipmi_devclass, &devs, &count) != 0) return; for (i = 0; i < count; i++) Modified: head/sys/modules/ipmi/Makefile ============================================================================== --- head/sys/modules/ipmi/Makefile Thu Aug 16 15:54:12 2018 (r337912) +++ head/sys/modules/ipmi/Makefile Thu Aug 16 15:59:02 2018 (r337913) @@ -7,7 +7,7 @@ KMOD= ipmi SRCS= ipmi.c SRCS+= bus_if.h device_if.h -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "i386" +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" SRCS+= ipmi_kcs.c ipmi_smic.c ipmi_smbios.c ipmi_ssif.c SRCS+= ipmi_acpi.c ipmi_isa.c ipmi_pci.c ipmi_smbus.c SRCS+= opt_acpi.h