From: Florian Fainelli <f.fainelli@gmail.com>
To: Timur Tabi <timur@codeaurora.org>, netdev@vger.kernel.org
Subject: Re: Requirements for a shutdown function?
Date: Wed, 10 May 2017 15:17:34 -0700 [thread overview]
Message-ID: <e12ce1e7-6cc4-4b66-05db-674839733044@gmail.com> (raw)
In-Reply-To: <54c18ee6-d748-59f7-fd6f-451559b86c0b@codeaurora.org>
On 05/10/2017 03:11 PM, Timur Tabi wrote:
> On 05/10/2017 04:47 PM, Florian Fainelli wrote:
>> AFAIR kexec takes care of shutting down network devices explicitly
>> (unless instructed otherwise with -x/--no-ifdown) so this may be where
>> this is coming from.
>>
>> Reading through drivers/base/core.c it does not appear that ->remove()
>> is called and then ->shutdown() gets called, only ->shutdown() gets
>> called from device_shutdown() called from kernel/reboot.c. It seems to
>> me like if you want to be on the safe side you would want to implement a
>> shutdown function that is identical to what your remove function does.
>
> I finally found a testcase where the shutdown function is useful. If you do
> a "reboot -f", it will call shutdown but not close.
Correct yes. Sorry, I did not recall which one of kexec or reboot would
call it, but both would actually now that I looked at what happens on
one of my systems again.
--
Florian
prev parent reply other threads:[~2017-05-10 22:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 16:58 Requirements for a shutdown function? Timur Tabi
2017-05-09 18:46 ` Florian Fainelli
2017-05-09 18:51 ` Timur Tabi
2017-05-09 19:06 ` Florian Fainelli
2017-05-10 20:17 ` Timur Tabi
2017-05-10 21:47 ` Florian Fainelli
2017-05-10 22:11 ` Timur Tabi
2017-05-10 22:17 ` Florian Fainelli [this message]
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=e12ce1e7-6cc4-4b66-05db-674839733044@gmail.com \
--to=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=timur@codeaurora.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;
as well as URLs for NNTP newsgroup(s).