Subject: Re: APM bugs!
To: Alicia da Conceicao <>
From: None <carrel@NetBSD.ORG>
List: port-i386
Date: 12/19/1997 20:48:46
I'm not sure I would call this a bug in APM.  When your laptop suspends it
removes power from the PCMCIA cards.  If you don't tell the kernel to stop
using these cards BEFORE that, then it will be very unhappy.  APM will call
a suspend script (/etc/apm/suspend) before it suspends and you should put a
line in there to ifconfig the interface down.

As for PPP, what do you do before a suspend?  Do you kill pppd and ifconfig
the ppp interface down?  When you resume, can you talk to the modem
directly with kermit or tip and get responses to AT commands??

You should be able to create a suspend script that cleans everything up
properly before the suspend and then you can restart the ethernet or PPP
interfaces as needed after resuming.  I have a suspend script I use to
clean things up.  It takes care of removing routes, killing amd and a bunch
of other stuff.  But it doesn't deal with PPP since I don't use it on that
box.  I can mail it to you if you like.


> Greetings NetBSD users:
> There seems to be some serious problems with (Advanced Power Management)
> APM included in NetBSD 1.3.  Basically, after a computer wakes up from
> sleep mode, any attempts to use the PCMCIA ethernet or PPP from a PCMCIA
> modem card will cause the OS to completely crash.  (It freezes up
> completely, interrupts and all, and must be rebooted.)  Anyways a simple
> "ifconfig ep0 down" prior to sleep, and "ifconfig ep0 up" after sleep
> added to the APM will allow one to use the PCMCIA ethernet after sleep
> mode without any troubles.  However, I can't seem to find any way to use
> PPP on the modem card after sleep mode without crashing the OS.  Does
> anyone have any ideas?  (BTW, "ifconfig ppp0 down" will not prevent a
> crash after sleep mode.)  Perhaps there is some way to shut down the
> modem's TTY, or the PCMCIA card prior to sleeping?
>      It seems to be quite pathetic to have to reboot my laptop ever time
> I wish to use PPP, since I usually have to close the lid and leave it in
> sleep mode (to conserve power) for transportation.
>      I realize that it is too late to include any APM fixes into 1.3,
> but I would appreciate if anyone has any work-arounds, suggestions, etc.
> that might allow me to use PPP after sleep mode.
> Thanks in advance.  Sincerely, Alicia.
> PS. I am running NetBSD 1.3 on a Digital HiNote Ultra II laptop, with
> 	a 3Com 3C589D ethernet & a IBM 28.8Kbps International Data/Fax
> 	Modem PCMCIA cards.
> PPS. As an aside, the only freely available irqs that I have available
> 	for my PCMCIA cards are: irq 10 (used by fax/modem) & irq 11
> 	(used by ethernet).  All others are being used by other
> 	devices, so I had to modify the PCMCIA code in the kernel to
> 	allow me to use irq 10.