shivers | 29 Oct 2001 22:34
Picon
Favicon

hotplug & PCMCIA schemes

Please excuse me if this message is not addressed the proper mailing list.

I have just upgraded from RedHat 6.2 to RedHat 7.2, which introduces the
hotplug service. Unfortunately, the architecture of the system doesn't
seem to accomodate my useage patterns. I think my useage patterns are typical
for a common and growing class of users. I'd like to describe how I use
PCMCIA cards to this list, and see if there is some natural way to accomplish
it using the hotplug system, or if the hotplug system has problems.

I have a notebook computer. I use it in one of about five places: 
    1. My condo in Harvard Square
       Here I connect to the net using an old, pre-802.11 netwave card &
       DHCP. This requires non-standard flags to the driver for encryption.

    2. A little compay where I work
       Here I connect to the net using an 802.11 card, with a particular
       encryption key & network id, via DHCP.

    3. My office at MIT.
       Static IP, 802.11 card, different encryption key.

    3. My home in Atlanta
       DHCP, 802.11 card, different encryption key.

    4. My office at Georgia Tech.
       DHCP, 802.11 card, different encryption key.

(Clearly, I am a little more mobile than is really good for me. But I have
insane frequent-flyer miles.) 

(Continue reading)

David Brownell | 29 Oct 2001 23:01

Re: hotplug & PCMCIA schemes

From: <shivers <at> cc.gatech.edu>

> This all works fine under Hinds' standard pcmcia system -- I just use
> different "schemes" -- "home," "GT," "boston," "GT-static," etc. -- to
> determine DHCP or the static IP address, the proper encryption key, any
> funky-nonstandard options and so forth. But I see no way to do this under the
> hotplug system. 

Not the standard distro, but I believe all the necessary ingredients
are there.

>    The /etc/hotplug/net.agent script will invoke
> /etc/pcmcia/wireless if I use a wireless card, but it *won't* invoke
> /etc/pcmcia/network with a wireline network card. So it's scheme-insensitive
> in the wireline case.
> 
> The short summary here is that notebook users hook up to lots of different
> networks, depending (among other things) on location, as they cart their
> machines around. All the hotplug agent sees is "eth0". That's not enough.

The hotplug agent sees the whole filesystem, too.  Whatever tells
PCMCIA that the current "scheme" is "GT", for example, should
be accessible to hotplug agents too.

> Hind's system handles this by providing an extra user-configurable key
> in the form of the "scheme." How does one do this in hotplug?

Well, one could always submit a patch to teach hotplug that such
different schemes exist.  That facility isn't restricted to networking,
is it?  Seems to me that different kinds of docking setup would need
(Continue reading)

Miles Lane | 20 Oct 2001 06:52

[Fwd: Re: [patch] ip autoconfig for PCMCIA NICs]

This information may be relevant to the (long ago)
discussion of overhauling in-kernel PCMCIA support 
and integrating it with the hotplug framework in the
2.5 development cycle.

IIRC, David Woodhouse was considering spearheading this
work.  Not sure what the current plans might be in this
regard.

	Miles

-----Forwarded Message-----

> From: David Hinds <dhinds <at> sonic.net>
> To: Andrew Morton <akpm <at> zip.com.au>
> Cc: lkml <linux-kernel <at> vger.kernel.org>, David Woodhouse <dwmw2 <at> infradead.org>
> Subject: Re: [patch] ip autoconfig for PCMCIA NICs
> Date: 19 Oct 2001 20:24:42 -0700
> 
> On Fri, Oct 19, 2001 at 01:52:54PM -0700, Andrew Morton wrote:
> > 
> > This all works fine.  However it probably breaks something, but the rather
> > unilluminating comment
> > 
> > #ifdef CONFIG_PCMCIA
> >         init_pcmcia_ds();               /* Do this last */
> > #endif
> > 
> > doesn't tell us what.
> 
(Continue reading)

David Woodhouse | 21 Oct 2001 12:58
Favicon

Re: [Fwd: Re: [patch] ip autoconfig for PCMCIA NICs]


miles <at> megapathdsl.net said:
> This information may be relevant to the (long ago) discussion of
> overhauling in-kernel PCMCIA support  and integrating it with the
> hotplug framework in the 2.5 development cycle.

> IIRC, David Woodhouse was considering spearheading this work.  Not
> sure what the current plans might be in this regard. 

So far, I just haven't been able to find the time to really get on with it.
But it's right at the top of my TODO list now that Linus has the latest MTD
and JFFS2 code, and I've taken half of this coming week off for a camping
trip which has now been rained off. I may be able to put together something 
vaguely workable for discussion. 

--
dwmw2
christophe barbe | 16 Oct 2001 18:13
Picon

aic7xxx and hotplug : part II

So I've proposed the patch to the driver author. The export table macro was
already in the pending patch for 2.4.12. So this should be solved soon.

Remains a problem, I get a OOPS when I do the following :
. insert card (card detected, module loaded)
. mount /dev/sdc0 /cdrw
. use /cdrw
. umount /cdrw
. remove the card
. mount /dev/sdc0 /cdrw (oops and mount segfault)

lspci show the adaptec card when inserted
...
00:13.0 CardBus bridge: Toshiba America Info Systems ToPIC95 (rev 07)
00:13.1 CardBus bridge: Toshiba America Info Systems ToPIC95 (rev 07)
14:00.0 SCSI storage controller: Adaptec AIC-1480 / APA-1480 (rev 03)
and no more after reemoving the card.

I see in /var/log/message that the 'PCI remove event' is not supported by
hotplug  
Oct 16 17:33:13 turing kernel: cs: cb_free(bus 20)
Oct 16 17:33:14 turing /etc/hotplug/pci.agent: PCI remove event not
supported

My understanding was that here the hotplug job was only to unload the
driver but because it can be used by another device, I understand it's not
so simple.

But the oops tells me that Something is required. It looks like the driver
still believe that the card is available. 
(Continue reading)

Greg KH | 16 Oct 2001 18:41
Gravatar

Re: aic7xxx and hotplug : part II

On Tue, Oct 16, 2001 at 06:13:26PM +0200, christophe barbe wrote:
> . mount /dev/sdc0 /cdrw (oops and mount segfault)

Please run the oops through ksymoops and send it to the driver's author.
We can't do much here :)

thanks,

greg k-h
christophe barbe | 16 Oct 2001 19:42
Picon

Re: aic7xxx and hotplug : part II


Le 2001.10.16 18:41:58 +0200, Greg KH a écrit :
> On Tue, Oct 16, 2001 at 06:13:26PM +0200, christophe barbe wrote:
> > . mount /dev/sdc0 /cdrw (oops and mount segfault)
> 
> Please run the oops through ksymoops and send it to the driver's author.
> We can't do much here :)

So do you suggest me that this is a problem with the driver.
I was convinced it was because nobody notified the driver that the device
was removed.

I need to do some other test but I guess that if I manually unload the
driver then I will avoid the oops.

Christophe

> thanks,
> 
> greg k-h
> 
> _______________________________________________
> Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
> 
--

-- 
Christophe Barbé <christophe.barbe <at> online.fr>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8  F67A 8F45 2F1E D72C B41E
(Continue reading)

David Brownell | 16 Oct 2001 20:15

Re: aic7xxx and hotplug : part II

> > Please run the oops through ksymoops and send it to the driver's author.
> > We can't do much here :)
> 
> So do you suggest me that this is a problem with the driver.

Nobody can do more than "suggest" without facts like
the ksymoops output ...

> I was convinced it was because nobody notified the driver that the device
> was removed.

The kernel tells the driver when the device goes away.
Of course that might be _after_ the CardBus device was
physically removed; the driver has to cope with that.

- Dave
christophe barbe | 16 Oct 2001 22:22
Picon

Re: aic7xxx and hotplug : part II

Ok sorry if it takes time for me to understand.
You start convinced me that the problem can be from the driver.

I attach the oops and the ksymoops output.

Christophe

Le 2001.10.16 20:15:27 +0200, David Brownell a écrit :
> > > Please run the oops through ksymoops and send it to the driver's
> author.
> > > We can't do much here :)
> > 
> > So do you suggest me that this is a problem with the driver.
> 
> Nobody can do more than "suggest" without facts like
> the ksymoops output ...
> 
> 
> > I was convinced it was because nobody notified the driver that the
> device
> > was removed.
> 
> The kernel tells the driver when the device goes away.
> Of course that might be _after_ the CardBus device was
> physically removed; the driver has to cope with that.
> 
> - Dave
> 
> 
> 
(Continue reading)

Greg KH | 16 Oct 2001 22:27
Gravatar

Re: aic7xxx and hotplug : part II

On Tue, Oct 16, 2001 at 10:22:49PM +0200, christophe barbe wrote:
> Ok sorry if it takes time for me to understand.
> You start convinced me that the problem can be from the driver.
> 
> I attach the oops and the ksymoops output.

You might want to send this to the author of the driver, along with the
steps that you did to get the oops.

thanks,

greg k-h

Gmane