linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Golds <jgolds@resilience.com>
To: linux-kernel@vger.kernel.org
Subject: Problems with arch/i386/kernel/apm.c
Date: Mon, 11 Jun 2001 10:57:31 -0700	[thread overview]
Message-ID: <3B25068B.53F2968A@resilience.com> (raw)

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;
 
	...
        cli();
        err = apm_set_power_state(APM_STATE_SUSPEND);
	...
        send_event(APM_NORMAL_RESUME);
        sti();
	...
        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

-- 
Jeff Golds
Sr. Software Engineer
jgolds@resilience.com

             reply	other threads:[~2001-06-11 17:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-11 17:57 Jeff Golds [this message]
2001-06-11 18:11 ` Jeff Garzik
2001-06-11 18:42   ` Alan Cox
2001-06-12 23:48     ` Patrick Mochel
2001-06-14  8:18       ` Alan Cox
2001-06-11 19:37 ` John Fremlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B25068B.53F2968A@resilience.com \
    --to=jgolds@resilience.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: Problems with arch/i386/kernel/apm.c' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).