Re: Bug#28383: Ejecting PCMCIA cards at suspend time
Avery Pennarun <email@example.com> wrote:
> On Thu, Oct 22, 1998 at 12:58:26PM -0400, Brian Mays wrote:
> > The PCMCIA utilities are supposed to have APM support to automatically
> > suspend/resume the cards when the system is suspended. I'll check
> > that it is actually being compiled into the Debian packages before
> > I make a new release.
> Is this new? I don't have the bleeding-edge pcmcia packages.
No. APM support has been around for awhile. It is compiled into the
pcmcia_core module and depends on whether the kernel has APM support
compiled in. That is, if the modules are compiled for a kernel with APM
support, then pcmcia_core has APM support. To see whether your system has
APM support in its modules, you can look at the /var/log/messages file.
It should have something like the following:
Oct 22 12:07:35 xxxx kernel: unloading PCMCIA Card Services
Oct 22 12:07:49 xxxx kernel: Linux PCMCIA Card Services 3.0.5
Oct 22 12:07:49 xxxx kernel: kernel build: 2.0.35 unknown
Oct 22 12:07:49 xxxx kernel: options: [apm]
The "[apm]" indicates that APM support was compiled into pcmcia_core.
The pcmcia-modules-* packages provided by Debian do not have APM
support, since the kernel-image-* packages do not have APM support.
But if you recompile the kernel with APM, you also must recompile the
PCMCIA modules, and these new modules will have APM. When the kernel
receives a suspend event, it supposedly signals the pcmcia_core module
which suspends/resumes all PCMCIA cards.
> > Unfortunately, some cards (most notably SCSI cards) can't do a
> > suspend/resume cycle, so eject/insert needs to be done. But you are
> > correct, it is more appropriate for cards like network cards to do
> > a suspend/resume rather than an eject/insert. That is why the apmd
> > scripts should be optional.
> I guess the best solution is to fix the pcmcia drivers, but without the
> hardware I couldn't help with that. Anyway, if you do have an option,
> I suggest allowing three modes: none, suspend, and eject.
This is an old problem, documented in the PCMCIA-HOWTO, which I don't
expect to go away anytime soon. Therefore, I suppose that the automatic
"eject" option should be available, even if it is rarely needed. Those
systems which use SCSI cards along with other cards, should probably
not automatically "eject" all cards when the system is suspended.
Instead, its administrator should remember to issue a "cardctl eject"
command to the socket with the SCSI card before suspending the system.
If the SCSI card is always in the same socket, then the administrator can
write his own script to have apmd automatically "eject" that particular
socket on suspend.