diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2016-10-04 02:25:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-04 08:11:51 +0200 |
commit | c0cd1ba4f8bd8b5fef43bc51a2983673b8f086ff (patch) | |
tree | 7ea119581cb360706fa46c69678dcff8ded7b8dc /include/net/ncsi.h | |
parent | net/ncsi: Rework the channel monitoring (diff) | |
download | linux-c0cd1ba4f8bd8b5fef43bc51a2983673b8f086ff.tar.xz linux-c0cd1ba4f8bd8b5fef43bc51a2983673b8f086ff.zip |
net/ncsi: Introduce ncsi_stop_dev()
This introduces ncsi_stop_dev(), as counterpart to ncsi_start_dev(),
to stop the NCSI device so that it can be reenabled in future. This
API should be called when the network device driver is going to
shutdown the device. There are 3 things done in the function: Stop
the channel monitoring; Reset channels to inactive state; Report
NCSI link down.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ncsi.h')
-rw-r--r-- | include/net/ncsi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ncsi.h b/include/net/ncsi.h index 1dbf42f79750..68680baac0fd 100644 --- a/include/net/ncsi.h +++ b/include/net/ncsi.h @@ -31,6 +31,7 @@ struct ncsi_dev { struct ncsi_dev *ncsi_register_dev(struct net_device *dev, void (*notifier)(struct ncsi_dev *nd)); int ncsi_start_dev(struct ncsi_dev *nd); +void ncsi_stop_dev(struct ncsi_dev *nd); void ncsi_unregister_dev(struct ncsi_dev *nd); #else /* !CONFIG_NET_NCSI */ static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev, @@ -44,6 +45,10 @@ static inline int ncsi_start_dev(struct ncsi_dev *nd) return -ENOTTY; } +static void ncsi_stop_dev(struct ncsi_dev *nd) +{ +} + static inline void ncsi_unregister_dev(struct ncsi_dev *nd) { } |