I have a Transmonde Vivante laptop with a PCMCIA modem running Debian 2.1.
I recompiled kernel 2.0.36 to use apm, and recompiled the kernel modules
as well.  For the most part, my modem is fine.  If I type 'cardctl suspend', 
all is well.  However, if I then type

% cardctl resume; cardctl resume

then my machine crashes.  (I think cardctl forks to the background, so this
is like running two copies at about the same time.)  The crashes come
in different flavors, but almost always happen.  Occasionally I get
what is probably the correct behavior, namely an error message
"ioctl(): Device or resource busy".  But most of the time I get a
crash.  Usually thousands of lines of numbers scroll by (if I'm logged
into a virtual terminal when running cardctl), including things like
"Call Trace: ..." and "Code: ..." and "Aiee, killing interrupt
handler".  Then the machine freezes, and won't respond to anything
but the power off switch.  

Once I managed to get syslog to capture a bit of info.  In my 
/var/log/syslog is

  May  8 19:36:03 scratchy kernel:  out during reset 
  May  8 19:36:03 scratchy kernel: cs: socket 0 timed out during reset 

(This is followed by 14 null characters, and then a fragment of the
directory listing of /dev.  This probably indicates some filesystem
corruption from the crash.)

In case you are wondering how I discovered this, it comes up because
of the way the apmd package is set-up.  In /etc/apm/resume.d/pcmcia is
a script which runs 'cardctl resume' if a file /etc/pcmcia/apm.opts
exists and contains the line "APM=suspend".  It occured to me that I
should suspend and resume my cards when suspending and resuming my
machine, so I created a file apm.opts containing that line.  This is
when the crashes started.  I think what is happening is that apmd is
running the equivalent of 'cardctl resume' already.  Thus I think that
those scripts should be removed from the distribution, as they cause
serious problems when used.  Please correct me if I am
misunderstanding something.

The more fundamental problem is with cardctl, which should never
cause the machine to crash.  Could people test this with their machine?
I recommend unmounting unused filesystems and typing sync before doing so.

Anyways, the workaround is simply to not run two copies of 
'cardctl resume' at the same time, but I thought I would report
this to the list in the hopes that the root of the problem is
fixed.

Comments or requests for further information, to the list or
directly to me, are welcome.  Should I submit this to the bug-tracking
system?  I've never done this -- is it self-explanatory?

Dan

-- 
Dan Christensen
[EMAIL PROTECTED]

Reply via email to