From owner-svn-src-all@FreeBSD.ORG Thu Mar 11 08:03:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BBA1106566B; Thu, 11 Mar 2010 08:03:58 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B44F8FC12; Thu, 11 Mar 2010 08:03:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2B83wYk008556; Thu, 11 Mar 2010 08:03:58 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2B83weK008554; Thu, 11 Mar 2010 08:03:58 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201003110803.o2B83weK008554@svn.freebsd.org> From: Andrew Thompson Date: Thu, 11 Mar 2010 08:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205003 - head/sys/dev/siba X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 08:03:58 -0000 Author: thompsa Date: Thu Mar 11 08:03:56 2010 New Revision: 205003 URL: http://svn.freebsd.org/changeset/base/205003 Log: Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug and non-debug cases. Modified: head/sys/dev/siba/siba_core.c Modified: head/sys/dev/siba/siba_core.c ============================================================================== --- head/sys/dev/siba/siba_core.c Thu Mar 11 07:46:17 2010 (r205002) +++ head/sys/dev/siba/siba_core.c Thu Mar 11 08:03:56 2010 (r205003) @@ -2031,11 +2031,13 @@ siba_pcie_mdio_write(struct siba_pci *sp uint32_t siba_dma_translation(device_t dev) { +#ifdef INVARIANTS + struct siba_dev_softc *sd = device_get_ivars(dev); + struct siba_softc *siba = sd->sd_bus; - KASSERT(device_get_ivars(dev)->sd_bus->siba_type == SIBA_TYPE_PCI, - ("unsupported bustype %d\n", - device_get_ivars(dev)->sd_bus->siba_type)); - + KASSERT(siba->siba_type == SIBA_TYPE_PCI, + ("unsupported bustype %d\n", siba->siba_type)); +#endif return (SIBA_PCI_DMA); }