diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2016-07-19 11:54:19 +1000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-19 20:49:17 -0700 |
commit | e6f44ed6d04d3185dcd8e8e98af8742d87bdffcc (patch) | |
tree | 23f27bdac3262327102758adbded3886a209ba7b /include/net/ncsi.h | |
parent | 138635cc27c9737f940c3aa80912ff7a61c825af (diff) | |
download | blackbird-op-linux-e6f44ed6d04d3185dcd8e8e98af8742d87bdffcc.tar.gz blackbird-op-linux-e6f44ed6d04d3185dcd8e8e98af8742d87bdffcc.zip |
net/ncsi: Package and channel management
This manages NCSI packages and channels:
* The available packages and channels are enumerated in the first
time of calling ncsi_start_dev(). The channels' capabilities are
probed in the meanwhile. The NCSI network topology won't change
until the NCSI device is destroyed.
* There in a queue in every NCSI device. The element in the queue,
channel, is waiting for configuration (bringup) or suspending
(teardown). The channel's state (inactive/active) indicates the
futher action (configuration or suspending) will be applied on the
channel. Another channel's state (invisible) means the requested
action is being applied.
* The hardware arbitration will be enabled if all available packages
and channels support it. All available channels try to provide
service when hardware arbitration is enabled. Otherwise, one channel
is selected as the active one at once.
* When channel is in active state, meaning it's providing service, a
timer started to retrieve the channe's link status. If the channel's
link status fails to be updated in the determined period, the channel
is going to be reconfigured. It's the error handling implementation
as defined in NCSI spec.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Acked-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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/ncsi.h b/include/net/ncsi.h index 70d14ee1ef84..1dbf42f79750 100644 --- a/include/net/ncsi.h +++ b/include/net/ncsi.h @@ -30,6 +30,7 @@ struct ncsi_dev { #ifdef CONFIG_NET_NCSI 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_unregister_dev(struct ncsi_dev *nd); #else /* !CONFIG_NET_NCSI */ static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev, @@ -38,6 +39,11 @@ static inline struct ncsi_dev *ncsi_register_dev(struct net_device *dev, return NULL; } +static inline int ncsi_start_dev(struct ncsi_dev *nd) +{ + return -ENOTTY; +} + static inline void ncsi_unregister_dev(struct ncsi_dev *nd) { } |