mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Simon White" <s_a_white@email.com>
To: linux-kernel@vger.kernel.org
Subject: Detecting kernel shutdown in a kernel driver
Date: Thu, 10 Feb 2005 15:05:37 -0500	[thread overview]
Message-ID: <20050210200537.AD4754BE65@ws1-1.us4.outblaze.com> (raw)

Hi,

I've been writing a device driver for a piece of hardware that we recently found the pci bridge has an issue on software reset (kernel 2.6.8.1, hardware reset is fine).  The bridge appears to corrupt the subvendor/device ids on next boot.  We have found a software work around in that I can write to the bridge on module exit and it will always detect correctly next boot (through module_exit when rmmod'd).

However on shutting down a machine with the module loaded it never works next time, so is module_exit actually called?

Secondly I searched through some code and on google to determine if I could detect a shutdown notification in the kernel.  I thougt I'd found something using:

static struct pci_driver hsid_driver =
{
    .name     = HSID_NAME,
    .id_table = id_table,
    .probe    = hsid_probe,
    .driver   =
    {
        .shutdown = hsid_shutdown,
    },
};

However that also appears not to work.  I wondered what the correct solution was for detecting system shutdown in the kernel even if the application using the device has locked up on un-interruptible sleep, so I may try to clean the hardware up a little.

Thankyou for any assistance,
Simon

Please CC me.

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


             reply	other threads:[~2005-02-10 20:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-10 20:05 Simon White [this message]
2005-02-10 21:48 ` Stephen Hemminger
2005-02-11 15:14 ` Andi Kleen

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=20050210200537.AD4754BE65@ws1-1.us4.outblaze.com \
    --to=s_a_white@email.com \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®