Lines Matching +full:2 +full:nd

30 	return !!(channel->modes[NCSI_MODE_LINK].data[2] & 0x1);  in ncsi_channel_has_link()
53 struct ncsi_dev *nd = &ndp->ndev; in ncsi_report_link() local
58 nd->state = ncsi_dev_state_functional; in ncsi_report_link()
60 nd->link_up = 0; in ncsi_report_link()
64 nd->link_up = 0; in ncsi_report_link()
77 nd->link_up = 1; in ncsi_report_link()
86 nd->handler(nd); in ncsi_report_link()
150 ncm->data[2] &= ~0x1; in ncsi_channel_monitor()
469 struct ncsi_dev *nd = &ndp->ndev; in ncsi_suspend_channel() local
480 switch (nd->state) { in ncsi_suspend_channel()
482 nd->state = ncsi_dev_state_suspend_select; in ncsi_suspend_channel()
504 nd->state = ncsi_dev_state_suspend_gls; in ncsi_suspend_channel()
506 nd->state = ncsi_dev_state_suspend_dcnt; in ncsi_suspend_channel()
518 nd->state = ncsi_dev_state_suspend_dcnt; in ncsi_suspend_channel()
534 nd->state = ncsi_dev_state_suspend_dc; in ncsi_suspend_channel()
548 nd->state = ncsi_dev_state_suspend_deselect; in ncsi_suspend_channel()
558 nd->state = ncsi_dev_state_suspend_done; in ncsi_suspend_channel()
570 nd->state = ncsi_dev_state_suspend_done; in ncsi_suspend_channel()
581 ncsi_reset_dev(nd); in ncsi_suspend_channel()
586 netdev_warn(nd->dev, "Wrong NCSI state 0x%x in suspend\n", in ncsi_suspend_channel()
587 nd->state); in ncsi_suspend_channel()
592 nd->state = ncsi_dev_state_functional; in ncsi_suspend_channel()
997 struct ncsi_dev *nd = &ndp->ndev; in ncsi_configure_channel() local
998 struct net_device *dev = nd->dev; in ncsi_configure_channel()
1006 switch (nd->state) { in ncsi_configure_channel()
1026 nd->state = ncsi_dev_state_config_cis; in ncsi_configure_channel()
1042 nd->state = ncsi_dev_state_config_oem_gma; in ncsi_configure_channel()
1045 nd->state = ncsi_dev_state_config_clear_vids; in ncsi_configure_channel()
1076 if (nd->state == ncsi_dev_state_config_clear_vids) { in ncsi_configure_channel()
1079 nd->state = ncsi_dev_state_config_svf; in ncsi_configure_channel()
1084 nd->state = ncsi_dev_state_config_clear_vids; in ncsi_configure_channel()
1086 } else if (nd->state == ncsi_dev_state_config_svf) { in ncsi_configure_channel()
1089 nd->state = ncsi_dev_state_config_ev; in ncsi_configure_channel()
1094 nd->state = ncsi_dev_state_config_svf; in ncsi_configure_channel()
1096 } else if (nd->state == ncsi_dev_state_config_ev) { in ncsi_configure_channel()
1103 nd->state = ncsi_dev_state_config_sma; in ncsi_configure_channel()
1104 } else if (nd->state == ncsi_dev_state_config_sma) { in ncsi_configure_channel()
1114 nd->state = ncsi_dev_state_config_ebf; in ncsi_configure_channel()
1115 } else if (nd->state == ncsi_dev_state_config_ebf) { in ncsi_configure_channel()
1124 nd->state = ncsi_dev_state_config_dgmf; in ncsi_configure_channel()
1126 nd->state = ncsi_dev_state_config_ecnt; in ncsi_configure_channel()
1128 nd->state = ncsi_dev_state_config_ec; in ncsi_configure_channel()
1129 } else if (nd->state == ncsi_dev_state_config_dgmf) { in ncsi_configure_channel()
1132 nd->state = ncsi_dev_state_config_ecnt; in ncsi_configure_channel()
1134 nd->state = ncsi_dev_state_config_ec; in ncsi_configure_channel()
1135 } else if (nd->state == ncsi_dev_state_config_ecnt) { in ncsi_configure_channel()
1142 nd->state = ncsi_dev_state_config_ec; in ncsi_configure_channel()
1143 } else if (nd->state == ncsi_dev_state_config_ec) { in ncsi_configure_channel()
1146 nd->state = ncsi_dev_state_config_ae; in ncsi_configure_channel()
1148 nd->state = ncsi_dev_state_config_gls; in ncsi_configure_channel()
1149 } else if (nd->state == ncsi_dev_state_config_ae) { in ncsi_configure_channel()
1153 nd->state = ncsi_dev_state_config_gls; in ncsi_configure_channel()
1154 } else if (nd->state == ncsi_dev_state_config_gls) { in ncsi_configure_channel()
1156 nd->state = ncsi_dev_state_config_done; in ncsi_configure_channel()
1177 ncsi_reset_dev(nd); in ncsi_configure_channel()
1199 if (nc->modes[NCSI_MODE_LINK].data[2] & 0x1) { in ncsi_configure_channel()
1219 nd->state); in ncsi_configure_channel()
1269 if (ncm->data[2] & 0x1) { in ncsi_choose_active_channel()
1287 ncm->data[2] & 0x1 ? "up" : "down"); in ncsi_choose_active_channel()
1351 struct ncsi_dev *nd = &ndp->ndev; in ncsi_probe_channel() local
1360 switch (nd->state) { in ncsi_probe_channel()
1362 nd->state = ncsi_dev_state_probe_deselect; in ncsi_probe_channel()
1377 nd->state = ncsi_dev_state_probe_package; in ncsi_probe_channel()
1389 nd->state = ncsi_dev_state_probe_channel; in ncsi_probe_channel()
1396 nd->state = ncsi_dev_state_probe_dp; in ncsi_probe_channel()
1400 nd->state = ncsi_dev_state_probe_cis; in ncsi_probe_channel()
1403 nd->state = ncsi_dev_state_probe_mlx_gma; in ncsi_probe_channel()
1418 nd->state = ncsi_dev_state_probe_mlx_smaf; in ncsi_probe_channel()
1430 nd->state = ncsi_dev_state_probe_cis; in ncsi_probe_channel()
1446 nd->state = ncsi_dev_state_probe_gvi; in ncsi_probe_channel()
1448 nd->state = ncsi_dev_state_probe_keep_phy; in ncsi_probe_channel()
1461 nd->state = ncsi_dev_state_probe_gvi; in ncsi_probe_channel()
1471 if (nd->state == ncsi_dev_state_probe_gvi) in ncsi_probe_channel()
1473 else if (nd->state == ncsi_dev_state_probe_gc) in ncsi_probe_channel()
1486 if (nd->state == ncsi_dev_state_probe_gvi) in ncsi_probe_channel()
1487 nd->state = ncsi_dev_state_probe_gc; in ncsi_probe_channel()
1488 else if (nd->state == ncsi_dev_state_probe_gc) in ncsi_probe_channel()
1489 nd->state = ncsi_dev_state_probe_gls; in ncsi_probe_channel()
1491 nd->state = ncsi_dev_state_probe_dp; in ncsi_probe_channel()
1511 nd->state = ncsi_dev_state_probe_package; in ncsi_probe_channel()
1515 netdev_warn(nd->dev, "Wrong NCSI state 0x%0x in enumeration\n", in ncsi_probe_channel()
1516 nd->state); in ncsi_probe_channel()
1537 struct ncsi_dev *nd = &ndp->ndev; in ncsi_dev_work() local
1539 switch (nd->state & ncsi_dev_state_major) { in ncsi_dev_work()
1550 netdev_warn(nd->dev, "Wrong NCSI state 0x%x in workqueue\n", in ncsi_dev_work()
1551 nd->state); in ncsi_dev_work()
1616 struct ncsi_dev *nd = &ndp->ndev; in ncsi_kick_channels() local
1636 netdev_dbg(nd->dev, in ncsi_kick_channels()
1656 netdev_dbg(nd->dev, "NCSI: kicked channel %p\n", nc); in ncsi_kick_channels()
1669 struct ncsi_dev *nd; in ncsi_vlan_rx_add_vid() local
1675 nd = ncsi_find_dev(dev); in ncsi_vlan_rx_add_vid()
1676 if (!nd) { in ncsi_vlan_rx_add_vid()
1681 ndp = TO_NCSI_DEV_PRIV(nd); in ncsi_vlan_rx_add_vid()
1719 struct ncsi_dev *nd; in ncsi_vlan_rx_kill_vid() local
1725 nd = ncsi_find_dev(dev); in ncsi_vlan_rx_kill_vid()
1726 if (!nd) { in ncsi_vlan_rx_kill_vid()
1731 ndp = TO_NCSI_DEV_PRIV(nd); in ncsi_vlan_rx_kill_vid()
1757 struct ncsi_dev *nd; in ncsi_register_dev() local
1764 nd = ncsi_find_dev(dev); in ncsi_register_dev()
1765 if (nd) in ncsi_register_dev()
1766 return nd; in ncsi_register_dev()
1773 nd = &ndp->ndev; in ncsi_register_dev()
1774 nd->state = ncsi_dev_state_registered; in ncsi_register_dev()
1775 nd->dev = dev; in ncsi_register_dev()
1776 nd->handler = handler; in ncsi_register_dev()
1811 return nd; in ncsi_register_dev()
1815 int ncsi_start_dev(struct ncsi_dev *nd) in ncsi_start_dev() argument
1817 struct ncsi_dev_priv *ndp = TO_NCSI_DEV_PRIV(nd); in ncsi_start_dev()
1819 if (nd->state != ncsi_dev_state_registered && in ncsi_start_dev()
1820 nd->state != ncsi_dev_state_functional) in ncsi_start_dev()
1825 nd->state = ncsi_dev_state_probe; in ncsi_start_dev()
1830 return ncsi_reset_dev(nd); in ncsi_start_dev()
1834 void ncsi_stop_dev(struct ncsi_dev *nd) in ncsi_stop_dev() argument
1836 struct ncsi_dev_priv *ndp = TO_NCSI_DEV_PRIV(nd); in ncsi_stop_dev()
1866 int ncsi_reset_dev(struct ncsi_dev *nd) in ncsi_reset_dev() argument
1868 struct ncsi_dev_priv *ndp = TO_NCSI_DEV_PRIV(nd); in ncsi_reset_dev()
1877 switch (nd->state & ncsi_dev_state_major) { in ncsi_reset_dev()
1894 switch (nd->state) { in ncsi_reset_dev()
1947 nd->state = ncsi_dev_state_suspend; in ncsi_reset_dev()
1952 void ncsi_unregister_dev(struct ncsi_dev *nd) in ncsi_unregister_dev() argument
1954 struct ncsi_dev_priv *ndp = TO_NCSI_DEV_PRIV(nd); in ncsi_unregister_dev()