From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 22 08:02:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 150BB16A4CE for ; Sun, 22 Feb 2004 08:02:04 -0800 (PST) Received: from mta08-svc.ntlworld.com (mta08-svc.ntlworld.com [62.253.162.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9552043D2D for ; Sun, 22 Feb 2004 08:02:03 -0800 (PST) (envelope-from scott@fishballoon.org) Received: from llama.fishballoon.org ([81.104.195.124]) by mta08-svc.ntlworld.comESMTP <20040222160203.HOJT21785.mta08-svc.ntlworld.com@llama.fishballoon.org>; Sun, 22 Feb 2004 16:02:03 +0000 Received: from tuatara.fishballoon.org ([192.168.1.6]) by llama.fishballoon.org with esmtp (Exim 4.30; FreeBSD) id 1Auw3O-000EZP-FW; Sun, 22 Feb 2004 16:02:02 +0000 Received: (from scott@localhost) by tuatara.fishballoon.org (8.12.10/8.12.10/Submit) id i1MG21AS083135; Sun, 22 Feb 2004 16:02:01 GMT (envelope-from scott) Date: Sun, 22 Feb 2004 16:02:00 +0000 From: Scott Mitchell To: rhett@alasir.com Message-ID: <20040222160200.GB443@tuatara.fishballoon.org> References: <20040221055830.52920.qmail@web25105.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040221055830.52920.qmail@web25105.mail.ukl.yahoo.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.9-STABLE i386 cc: hackers@freebsd.org Subject: Re: Xircom CEM56 problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 16:02:04 -0000 On Sat, Feb 21, 2004 at 05:58:30AM +0000, RMH wrote: > Hello hackers, > > I have a problem with Xircom CEM56 (Ethernet + Modem) PC Card. > I know it isn't really possible on 4.x to use both network & > modem parts at the same time, but how to switch between them > without rebooting? > > For example, if I've booted with pccardd configured for either, > then I edit pccard.conf (a symlink to a real network or modem > .conf file), and what next? kldunload if_xe.ko if loaded already, > kill -s HUP [pccardd_pid] or just kill -9 [pccardd_pid] and > restart don't seem to have a desired effect because kernel > (pccard) complaints that it cannot attach more than one child. > But upon rebooting it probes the hardware just fine. How may I > reset pccard on the fly? > > A working solution is to pull the card and install it into a > second slot, but I guess it's not the best idea, because after > several such "swaps" I've got a page fault an a kernel panic... Hi Rhett, I have a couple of scripts that I use when I need to swaps cards and/or drivers, when I'm working on the xe driver. This is on -CURRENT, but using the OLDCARD driver framework, so it will hopefully work on 4.x as well: To shutdown the card: ifconfig xe0 down kill `cat /var/run/dhclient.pid` pccardc power 0 0 sleep 2 kldunload if_xe To bring it back up again after recompiling the driver or swapping cards: kldload if_xe pccardc power 0 1 The 'pccardc power' commands simulate removing and re-inserting the card. In your case you'll obviously need to switch pccard.conf and bounce pccardd while the card is powered down. If this still triggers a panic, could you file a PR on it? If it's something in the xe driver I'll take a look at it. Cheers, Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon