Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Feb 2004 16:02:00 +0000
From:      Scott Mitchell <scott+freebsd@fishballoon.org>
To:        rhett@alasir.com
Cc:        hackers@freebsd.org
Subject:   Re: Xircom CEM56 problem
Message-ID:  <20040222160200.GB443@tuatara.fishballoon.org>
In-Reply-To: <20040221055830.52920.qmail@web25105.mail.ukl.yahoo.com>
References:  <20040221055830.52920.qmail@web25105.mail.ukl.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040222160200.GB443>