]> git.baikalelectronics.ru Git - kernel.git/commit
net/ncsi: Rework the channel monitoring
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Tue, 4 Oct 2016 00:25:52 +0000 (11:25 +1100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Oct 2016 06:11:51 +0000 (02:11 -0400)
commit2db8623d3cf0d8a7025a8961d7b6e62cdbf5f315
treeadd1f527f3a3957e4f2a0c4ca5d7673ef5d8898a
parent7c7ebce6caef215b8b0284cbf0fa57b42a4369d8
net/ncsi: Rework the channel monitoring

The original NCSI channel monitoring was implemented based on a
backoff algorithm: the GLS response should be received in the
specified interval. Otherwise, the channel is regarded as dead
and failover should be taken if current channel is an active one.
There are several problems in the implementation: (A) On BCM5718,
we found when the IID (Instance ID) in the GLS command packet
changes from 255 to 1, the response corresponding to IID#1 never
comes in. It means we cannot make the unfair judgement that the
channel is dead when one response is missed. (B) The code's
readability should be improved. (C) We should do failover when
current channel is active one and the channel monitoring should
be marked as disabled before doing failover.

This reworks the channel monitoring to address all above issues.
The fields for channel monitoring is put into separate struct
and the state of channel monitoring is predefined. The channel
is regarded alive if the network controller responses to one of
two GLS commands or both of them in 5 seconds.

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>
net/ncsi/internal.h
net/ncsi/ncsi-manage.c
net/ncsi/ncsi-rsp.c