[lkml]   [2001]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectProblems with arch/i386/kernel/apm.c
Hi folks,

I've been debugging a problem I've been having with APM. When I
initiate an "apm --suspend" command, my Tulip card doesn't work
anymore. However, if I then execute "ifconfig eth0 down ; ifconfig eth0
up" then everything is fine again.

I initially thought the problem was on the Tulip driver side, so I
instrumented the code and found that the driver was correctly processing
incoming and outgoing packets, but it appeared the tx ring was out of
sync with the driver.

Since the tulip_suspend, and tulip_resume functions were basically doing
the same thing as what "ifconfig eth0 down/up" (WRT to the Tulip driver)
I began to look elsewhere. I think I've tracked the problem down to the
following code:

static int suspend(void)
int err;
struct apm_user *as;

err = apm_set_power_state(APM_STATE_SUSPEND);
return err;

So it seems that drivers are suspended before the cli(), yet they are
resumed before the sti(). It seems to me that the sti() should come
before apm::send_event(APM_NORMAL_RESUME), and, in fact, if I swap the
two, Tulip survives suspend/resume

Please let me know if this is correct, I can provide a simple patch if
needed. What I am really desiring to know is if there are any devices
that depend on the apm::send_event(APM_NORMAL_RESUME) happening while
interrupts are disabled.


Jeff Golds
Sr. Software Engineer
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.140 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site