Xircom CEM56 problem

Scott Mitchell scott+freebsd at fishballoon.org
Sun Feb 22 08:02:04 PST 2004


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


More information about the freebsd-hackers mailing list