[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e12ce1e7-6cc4-4b66-05db-674839733044@gmail.com>
Date: Wed, 10 May 2017 15:17:34 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Timur Tabi <timur@...eaurora.org>, netdev@...r.kernel.org
Subject: Re: Requirements for a shutdown function?
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
Powered by blists - more mailing lists