Re: Requirements for a shutdown function?
From: Timur Tabi <hidden>
Date: 2017-05-10 20:17:27
On 05/09/2017 02:06 PM, Florian Fainelli wrote:
On 05/09/2017 11:51 AM, Timur Tabi wrote:
quoted
Is it possible that the network stack detects a kexec and automatically stops all network devices?No. why would it? However the device driver model does call into your driver's remove function and that one does a right job already because it does an network device unregister, and so on.
I ran some more tests. When I launch kexec, the driver's net_device_ops.ndo_stop function is called, which already stops the interface. So it looks to me as if the network stack does close the interface during a kexec. With the interface closed, there's no point in having a shutdown function, is there?
quoted
My in-house driver stops the RX and TX queues. I'm guessing that's good enough, but I don't have a failing test case to prove it.That's probably good enough, yes.
Except that it turns out that the queues are already stopped by then because the emac_close() function has already been called. -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.