From owner-freebsd-stable@FreeBSD.ORG Fri Apr 28 04:59:53 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69B8516A400; Fri, 28 Apr 2006 04:59:53 +0000 (UTC) (envelope-from gene@nttmcl.com) Received: from mx2.nttmcl.com (MX2.nttmcl.com [216.69.68.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 017D043D46; Fri, 28 Apr 2006 04:59:52 +0000 (GMT) (envelope-from gene@nttmcl.com) Received: from [216.69.70.43] (bbq.nttmcl.com [216.69.70.43]) by mx2.nttmcl.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3S4xmVf018199; Thu, 27 Apr 2006 21:59:49 -0700 Message-ID: <4451A140.7090100@nttmcl.com> Date: Thu, 27 Apr 2006 21:59:44 -0700 From: "Eugene M. Kim" User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: John-Mark Gurney References: <44518421.60408@nttmcl.com> <20060428032115.GP728@funkthat.com> In-Reply-To: <20060428032115.GP728@funkthat.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.3 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on mx2.nttmcl.com Cc: scottl@freebsd.org, freebsd-stable@freebsd.org Subject: Re: link_elf: symbol cam_simq_alloc undefined X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 04:59:53 -0000 Thanks, that fixed it! : ) scottl: Could you commit (and MFC) the fix? It's as simple as adding a MODULE_DEPEND line: MODULE_DEPEND(amr, cam, 1, 1, 1); after the DRIVER_MODULE line in src/sys/dev/amr/amr_pci.c I'm not sure about amr_linux though; it seems that there's no CAM reference in amr_linux.c, but that amr_linux is just a compatibility layer on top of amr. In that light, perhaps: MODULE_DEPEND(amr_linux, amr, 1, 1, 1); is in order. Also, the existing MODULE_DEPEND line probably should be changed to: MODULE_DEPEND(amr_linux, linux, 1, 1, 1); Cheers, Eugene John-Mark Gurney wrote: > Eugene M. Kim wrote this message on Thu, Apr 27, 2006 at 19:55 -0700: >> I'm trying to upgrade from 5-stable to 6-stable; after rebooting to the >> new kernel, the amr(4) module (amr.ko) refuses to load with this message: >> >> link_elf: symbol cam_simq_alloc undefined >> >> However, a quick nm(1) on /boot/kernel/cam.ko does show: >> >> ... >> 0000f0ac T cam_sim_set_path >> 0000efc4 T cam_simq_alloc >> 0000efd4 T cam_simq_free >> ... >> >> and cam.ko is already loaded before amr.ko. >> >> What am I missing here? *scratches head 'o 'a* > > amr is missing a: > MODULE_DEPEND(amr, cam, 1, 1, 1); > > which means the module doesn't get cam's symbols... might as well add > that line to amr_linux.c next to MODULE_DEPEND already there... >