From owner-freebsd-current Thu Apr 22 9:17:24 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.is.co.za (apollo.is.co.za [196.4.160.2]) by hub.freebsd.org (Postfix) with ESMTP id 59469151B8 for ; Thu, 22 Apr 1999 09:17:18 -0700 (PDT) (envelope-from geoff@hangdog.is.co.za) Received: from admin.is.co.za (admin.is.co.za [196.23.0.9]) by apollo.is.co.za (8.8.6/8.7.5/IShub#2) with ESMTP id SAA05406 for ; Thu, 22 Apr 1999 18:14:48 +0200 (GMT) Received: from hangdog.is.co.za (hangdog.is.co.za [196.23.0.108]) by admin.is.co.za (8.8.6/8.7.3/ISsubsidiary#1) with ESMTP id SAA28783 for ; Thu, 22 Apr 1999 18:14:47 +0200 (GMT) Received: (from geoff@localhost) by hangdog.is.co.za (8.9.3/8.9.2) id SAA00933 for current@freebsd.org; Thu, 22 Apr 1999 18:14:46 +0200 (SAST) (envelope-from geoff) From: Geoff Rehmet Message-Id: <199904221614.SAA00933@hangdog.is.co.za> Subject: newbus - kernel compile failure (old + new PCI drivers) To: current@freebsd.org Date: Thu, 22 Apr 1999 18:14:46 +0200 (SAST) Reply-To: "Geoff Rehmet" X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Since the newbus changes, I have had kernel compile failures, due to the fact that I don't have any old style PCI drivers configured on my system. By #ifdef'ing out the code that wraperises the old driver code. Diffs are as follows (this requires defining "NOOLDPCIDRIVERS"). Obviously, this code should eventually all disappear, but is there a more elegant way of doing things at the moment? Are these changes worth committing? *** pci.c.orig Mon Apr 19 08:21:08 1999 --- pci.c Wed Apr 21 23:41:33 1999 *************** *** 846,851 **** --- 846,852 ---- #include "pci_if.h" + #if !defined(NOOLDPCIDRIVERS) /* * A simple driver to wrap the old pci driver mechanism for back-compat. */ *************** *** 921,928 **** --- 922,932 ---- { 0, 0 } }; + #endif + static devclass_t pci_devclass; + #if !defined(NOOLDPCIDRIVERS) /* * Create a new style driver around each old pci driver. */ *************** *** 946,951 **** --- 950,956 ---- devclass_add_driver(pci_devclass, driver); } } + #endif /* * New style pci driver. Parent device is either a pci-host-bridge or a *************** *** 1330,1336 **** --- 1335,1343 ---- { switch (what) { case MOD_LOAD: + #if !defined(NOOLDPCIDRIVERS) pci_wrap_old_drivers(); + #endif break; case MOD_UNLOAD: *** userconfig.c.orig Wed Apr 21 23:45:28 1999 --- userconfig.c Wed Apr 21 23:41:22 1999 *************** *** 570,575 **** --- 570,576 ---- insdev(&scratch,ap[i].id_enabled?active:inactive); } #if NPCI > 0 + #if !defined(NOOLDPCIDRIVERS) for (i = 0; i < pcidevice_set.ls_length; i++) { if (pcidevice_set.ls_items[i]) *************** *** 595,600 **** --- 596,602 ---- } } } + #endif #endif /* NPCI > 0 */ } -- Geoff Rehmet, The Internet Solution - Infrastructure tel: +27-11-283-5462, fax: +27-11-283-5401 mobile: +27-83-292-5800 email: geoffr@is.co.za URL: http://www.is.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message