summaryrefslogtreecommitdiffstats
path: root/net/ncsi/ncsi-manage.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-11-16 15:51:57 +1100
committerDavid S. Miller <davem@davemloft.net>2018-11-17 21:09:49 -0800
commit0b970e1b040c10d0e2a252943a2feaa6ee3cacdf (patch)
treeba87a5c6ec065e98939bc2afbd5506f1253323d0 /net/ncsi/ncsi-manage.c
parentcd09ab095c6dc4b2b0860f968a0f3ae8d752e76a (diff)
downloadlinux-0b970e1b040c10d0e2a252943a2feaa6ee3cacdf.tar.bz2
net/ncsi: Don't mark configured channels inactive
The concepts of a channel being 'active' and it having link are slightly muddled in the NCSI driver. Tweak this slightly so that NCSI_CHANNEL_ACTIVE represents a channel that has been configured and enabled, and NCSI_CHANNEL_INACTIVE represents a de-configured channel. This distinction is important because a channel can be 'active' but have its link down; in this case the channel may still need to be configured so that it may receive AEN link-state-change packets. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ncsi/ncsi-manage.c')
-rw-r--r--net/ncsi/ncsi-manage.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index b8b4e765a04c..b9de5b78c4e9 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -916,12 +916,11 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
break;
}
+ nc->state = NCSI_CHANNEL_ACTIVE;
if (nc->modes[NCSI_MODE_LINK].data[2] & 0x1) {
hot_nc = nc;
- nc->state = NCSI_CHANNEL_ACTIVE;
} else {
hot_nc = NULL;
- nc->state = NCSI_CHANNEL_INACTIVE;
netdev_dbg(ndp->ndev.dev,
"NCSI: channel %u link down after config\n",
nc->id);