Lines Matching refs:pi
48 struct port_info *pi = netdev2pinfo(dev); in cxgb4_dcb_state_init() local
49 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_dcb_state_init()
58 __func__, pi->port_id); in cxgb4_dcb_state_init()
63 struct port_info *pi = netdev2pinfo(dev); in cxgb4_dcb_version_init() local
64 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_dcb_version_init()
74 struct port_info *pi = netdev2pinfo(dev); in cxgb4_dcb_cleanup_apps() local
75 struct adapter *adap = pi->adapter; in cxgb4_dcb_cleanup_apps()
76 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_dcb_cleanup_apps()
114 struct port_info *pi = netdev2pinfo(dev); in cxgb4_dcb_state_fsm() local
115 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_dcb_state_fsm()
116 struct adapter *adap = pi->adapter; in cxgb4_dcb_state_fsm()
257 struct port_info *pi = netdev_priv(dev); in cxgb4_dcb_handle_fw_update() local
258 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_dcb_handle_fw_update()
391 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getstate() local
393 return pi->dcb.enabled; in cxgb4_getstate()
400 struct port_info *pi = netdev2pinfo(dev); in cxgb4_setstate() local
403 if (pi->dcb.state == CXGB4_DCB_STATE_HOST) { in cxgb4_setstate()
404 pi->dcb.enabled = enabled; in cxgb4_setstate()
410 if (enabled != (pi->dcb.state == CXGB4_DCB_STATE_FW_ALLSYNCED)) in cxgb4_setstate()
421 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getpgtccfg() local
422 struct adapter *adap = pi->adapter; in cxgb4_getpgtccfg()
428 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
430 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
441 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
443 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpgtccfg()
484 struct port_info *pi = netdev2pinfo(dev); in cxgb4_setpgtccfg_tx() local
485 struct adapter *adap = pi->adapter; in cxgb4_setpgtccfg_tx()
495 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
509 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
520 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
532 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpgtccfg_tx()
533 if (pi->dcb.state == CXGB4_DCB_STATE_HOST) in cxgb4_setpgtccfg_tx()
546 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getpgbwgcfg() local
547 struct adapter *adap = pi->adapter; in cxgb4_getpgbwgcfg()
551 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_getpgbwgcfg()
553 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpgbwgcfg()
580 struct port_info *pi = netdev2pinfo(dev); in cxgb4_setpgbwgcfg_tx() local
581 struct adapter *adap = pi->adapter; in cxgb4_setpgbwgcfg_tx()
584 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_setpgbwgcfg_tx()
596 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpgbwgcfg_tx()
597 if (pi->dcb.state == CXGB4_DCB_STATE_HOST) in cxgb4_setpgbwgcfg_tx()
612 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getpfccfg() local
613 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_getpfccfg()
619 *pfccfg = (pi->dcb.pfcen >> (7 - priority)) & 1; in cxgb4_getpfccfg()
628 struct port_info *pi = netdev2pinfo(dev); in cxgb4_setpfccfg() local
629 struct adapter *adap = pi->adapter; in cxgb4_setpfccfg()
632 if (!cxgb4_dcb_state_synced(pi->dcb.state) || in cxgb4_setpfccfg()
636 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in cxgb4_setpfccfg()
637 if (pi->dcb.state == CXGB4_DCB_STATE_HOST) in cxgb4_setpfccfg()
641 pcmd.u.dcb.pfc.pfcen = pi->dcb.pfcen; in cxgb4_setpfccfg()
654 pi->dcb.pfcen = pcmd.u.dcb.pfc.pfcen; in cxgb4_setpfccfg()
666 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getcap() local
694 *caps = pi->dcb.supported; in cxgb4_getcap()
708 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getnumtcs() local
712 if (pi->dcb.msgs & CXGB4_DCB_FW_PGRATE) in cxgb4_getnumtcs()
713 *num = pi->dcb.pg_num_tcs_supported; in cxgb4_getnumtcs()
742 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getpfcstate() local
744 if (!cxgb4_dcb_state_synced(pi->dcb.state)) in cxgb4_getpfcstate()
747 return pi->dcb.pfcen != 0; in cxgb4_getpfcstate()
764 struct port_info *pi = netdev2pinfo(dev); in __cxgb4_getapp() local
765 struct adapter *adap = pi->adapter; in __cxgb4_getapp()
768 if (!cxgb4_dcb_state_synced(pi->dcb.state)) in __cxgb4_getapp()
776 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in __cxgb4_getapp()
778 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in __cxgb4_getapp()
817 struct port_info *pi = netdev2pinfo(dev); in __cxgb4_setapp() local
818 struct adapter *adap = pi->adapter; in __cxgb4_setapp()
822 if (!cxgb4_dcb_state_synced(pi->dcb.state)) in __cxgb4_setapp()
830 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in __cxgb4_setapp()
857 INIT_PORT_DCB_WRITE_CMD(pcmd, pi->port_id); in __cxgb4_setapp()
858 if (pi->dcb.state == CXGB4_DCB_STATE_HOST) in __cxgb4_setapp()
907 struct port_info *pi = netdev2pinfo(dev); in cxgb4_ieee_negotiation_complete() local
908 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_ieee_negotiation_complete()
921 struct port_info *pi = netdev2pinfo(dev); in cxgb4_ieee_read_ets() local
922 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_ieee_read_ets()
923 struct adapter *adap = pi->adapter; in cxgb4_ieee_read_ets()
935 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
937 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
950 INIT_PORT_DCB_READ_LOCAL_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
952 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_ieee_read_ets()
981 struct port_info *pi = netdev2pinfo(dev); in cxgb4_ieee_get_pfc() local
982 struct port_dcb_info *dcb = &pi->dcb; in cxgb4_ieee_get_pfc()
1052 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getdcbx() local
1055 return pi->dcb.supported; in cxgb4_getdcbx()
1062 struct port_info *pi = netdev2pinfo(dev); in cxgb4_setdcbx() local
1072 if (!cxgb4_dcb_state_synced(pi->dcb.state)) in cxgb4_setdcbx()
1080 if (dcb_request != pi->dcb.supported) in cxgb4_setdcbx()
1083 pi->dcb.supported = dcb_request; in cxgb4_setdcbx()
1091 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getpeer_app() local
1092 struct adapter *adap = pi->adapter; in cxgb4_getpeer_app()
1095 if (!cxgb4_dcb_state_synced(pi->dcb.state)) in cxgb4_getpeer_app()
1103 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpeer_app()
1125 struct port_info *pi = netdev2pinfo(dev); in cxgb4_getpeerapp_tbl() local
1126 struct adapter *adap = pi->adapter; in cxgb4_getpeerapp_tbl()
1129 if (!cxgb4_dcb_state_synced(pi->dcb.state)) in cxgb4_getpeerapp_tbl()
1133 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_getpeerapp_tbl()
1162 struct port_info *pi = netdev2pinfo(dev); in cxgb4_cee_peer_getpg() local
1163 struct adapter *adap = pi->adapter; in cxgb4_cee_peer_getpg()
1172 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_cee_peer_getpg()
1184 INIT_PORT_DCB_READ_PEER_CMD(pcmd, pi->port_id); in cxgb4_cee_peer_getpg()
1205 struct port_info *pi = netdev2pinfo(dev); in cxgb4_cee_peer_getpfc() local
1213 pfc->pfc_en = bitswap_1(pi->dcb.pfcen); in cxgb4_cee_peer_getpfc()
1215 pfc->tcs_supported = pi->dcb.pfc_num_tcs_supported; in cxgb4_cee_peer_getpfc()