Lines Matching refs:mfunc
258 u32 status = readl(&priv->mfunc.comm->slave_read); in comm_pending()
283 &priv->mfunc.comm->slave_write); in mlx4_comm_cmd_post()
516 struct mlx4_vhcr_cmd *vhcr = priv->mfunc.vhcr; in mlx4_slave_cmd()
957 slave_cap_mask = priv->mfunc.master.slave_state[slave].ib_cap_mask[port]; in mlx4_MAD_IFC_wrapper()
1666 struct mlx4_vhcr_cmd *vhcr_cmd = in_vhcr ? in_vhcr : priv->mfunc.vhcr; in mlx4_master_process_vhcr()
1683 ret = mlx4_ACCESS_MEM(dev, priv->mfunc.vhcr_dma, slave, in mlx4_master_process_vhcr()
1684 priv->mfunc.master.slave_state[slave].vhcr_dma, in mlx4_master_process_vhcr()
1820 ret = mlx4_ACCESS_MEM(dev, priv->mfunc.vhcr_dma, slave, in mlx4_master_process_vhcr()
1821 priv->mfunc.master.slave_state[slave].vhcr_dma, in mlx4_master_process_vhcr()
1829 mlx4_GEN_EQE(dev, slave, &priv->mfunc.master.cmd_eqe)) in mlx4_master_process_vhcr()
1851 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; in mlx4_master_immediate_activate_vlan_qos()
1852 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_master_immediate_activate_vlan_qos()
1861 if (!(priv->mfunc.master.slave_state[slave].active && in mlx4_master_immediate_activate_vlan_qos()
1932 queue_work(priv->mfunc.master.comm_wq, &work->work); in mlx4_master_immediate_activate_vlan_qos()
1942 port_qos_ctl = &priv->mfunc.master.qos_ctl[port]; in mlx4_set_default_port_qos()
1965 port_qos = &priv->mfunc.master.qos_ctl[port]; in mlx4_allocate_port_vpps()
2001 &priv->mfunc.master.slave_state[slave]; in mlx4_master_activate_admin_state()
2007 priv->mfunc.master.vf_oper[slave].smi_enabled[port] = in mlx4_master_activate_admin_state()
2008 priv->mfunc.master.vf_admin[slave].enable_smi[port]; in mlx4_master_activate_admin_state()
2009 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; in mlx4_master_activate_admin_state()
2010 vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_master_activate_admin_state()
2068 priv->mfunc.master.vf_oper[slave].smi_enabled[port] = in mlx4_master_deactivate_admin_state()
2070 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; in mlx4_master_deactivate_admin_state()
2088 struct mlx4_slave_state *slave_state = priv->mfunc.master.slave_state; in mlx4_master_do_cmd()
2136 priv->mfunc.master.slave_state[slave].cookie = 0; in mlx4_master_do_cmd()
2178 spin_lock_irqsave(&priv->mfunc.master.slave_state_lock, flags); in mlx4_master_do_cmd()
2183 spin_unlock_irqrestore(&priv->mfunc.master.slave_state_lock, flags); in mlx4_master_do_cmd()
2190 &priv->mfunc.comm[slave].slave_read); in mlx4_master_do_cmd()
2209 spin_lock_irqsave(&priv->mfunc.master.slave_state_lock, flags); in mlx4_master_do_cmd()
2212 spin_unlock_irqrestore(&priv->mfunc.master.slave_state_lock, flags); in mlx4_master_do_cmd()
2218 &priv->mfunc.comm[slave].slave_read); in mlx4_master_do_cmd()
2229 struct mlx4_mfunc *mfunc = in mlx4_master_comm_channel() local
2232 container_of(mfunc, struct mlx4_priv, mfunc); in mlx4_master_comm_channel()
2262 comm_cmd = swab32(readl(&mfunc->comm[slave].slave_write)); in mlx4_master_comm_channel()
2263 slt = swab32(readl(&mfunc->comm[slave].slave_read)) >> 31; in mlx4_master_comm_channel()
2297 wr_toggle = swab32(readl(&priv->mfunc.comm->slave_write)); in sync_toggles()
2304 rd_toggle = swab32(readl(&priv->mfunc.comm->slave_read)); in sync_toggles()
2319 wr_toggle = swab32(readl(&priv->mfunc.comm-> in sync_toggles()
2339 __raw_writel((__force u32) 0, &priv->mfunc.comm->slave_read); in sync_toggles()
2340 __raw_writel((__force u32) 0, &priv->mfunc.comm->slave_write); in sync_toggles()
2353 priv->mfunc.comm = in mlx4_multi_func_init()
2358 priv->mfunc.comm = in mlx4_multi_func_init()
2361 if (!priv->mfunc.comm) { in mlx4_multi_func_init()
2370 priv->mfunc.master.slave_state = in mlx4_multi_func_init()
2374 if (!priv->mfunc.master.slave_state) in mlx4_multi_func_init()
2377 priv->mfunc.master.vf_admin = in mlx4_multi_func_init()
2381 if (!priv->mfunc.master.vf_admin) in mlx4_multi_func_init()
2384 priv->mfunc.master.vf_oper = in mlx4_multi_func_init()
2388 if (!priv->mfunc.master.vf_oper) in mlx4_multi_func_init()
2391 priv->mfunc.master.next_slave = 0; in mlx4_multi_func_init()
2394 vf_admin = &priv->mfunc.master.vf_admin[i]; in mlx4_multi_func_init()
2395 vf_oper = &priv->mfunc.master.vf_oper[i]; in mlx4_multi_func_init()
2396 s_state = &priv->mfunc.master.slave_state[i]; in mlx4_multi_func_init()
2399 mutex_init(&priv->mfunc.master.gen_eqe_mutex[i]); in mlx4_multi_func_init()
2403 &priv->mfunc.comm[i].slave_write); in mlx4_multi_func_init()
2405 &priv->mfunc.comm[i].slave_read); in mlx4_multi_func_init()
2445 memset(&priv->mfunc.master.cmd_eqe, 0, sizeof(struct mlx4_eqe)); in mlx4_multi_func_init()
2446 priv->mfunc.master.cmd_eqe.type = MLX4_EVENT_TYPE_CMD; in mlx4_multi_func_init()
2447 INIT_WORK(&priv->mfunc.master.comm_work, in mlx4_multi_func_init()
2449 INIT_WORK(&priv->mfunc.master.slave_event_work, in mlx4_multi_func_init()
2451 INIT_WORK(&priv->mfunc.master.slave_flr_event_work, in mlx4_multi_func_init()
2453 spin_lock_init(&priv->mfunc.master.slave_state_lock); in mlx4_multi_func_init()
2454 spin_lock_init(&priv->mfunc.master.slave_eq.event_lock); in mlx4_multi_func_init()
2455 priv->mfunc.master.comm_wq = in mlx4_multi_func_init()
2457 if (!priv->mfunc.master.comm_wq) in mlx4_multi_func_init()
2473 destroy_workqueue(priv->mfunc.master.comm_wq); in mlx4_multi_func_init()
2477 kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]); in mlx4_multi_func_init()
2479 kfree(priv->mfunc.master.vf_oper); in mlx4_multi_func_init()
2481 kfree(priv->mfunc.master.vf_admin); in mlx4_multi_func_init()
2483 kfree(priv->mfunc.master.slave_state); in mlx4_multi_func_init()
2485 iounmap(priv->mfunc.comm); in mlx4_multi_func_init()
2486 priv->mfunc.comm = NULL; in mlx4_multi_func_init()
2489 priv->mfunc.vhcr, in mlx4_multi_func_init()
2490 priv->mfunc.vhcr_dma); in mlx4_multi_func_init()
2491 priv->mfunc.vhcr = NULL; in mlx4_multi_func_init()
2520 if (mlx4_is_mfunc(dev) && !priv->mfunc.vhcr) { in mlx4_cmd_init()
2521 priv->mfunc.vhcr = dma_alloc_coherent(&dev->persist->pdev->dev, in mlx4_cmd_init()
2523 &priv->mfunc.vhcr_dma, in mlx4_cmd_init()
2525 if (!priv->mfunc.vhcr) in mlx4_cmd_init()
2559 if (!priv->mfunc.comm) in mlx4_report_internal_err_comm_event()
2566 slave_read = swab32(readl(&priv->mfunc.comm[slave].slave_read)); in mlx4_report_internal_err_comm_event()
2569 &priv->mfunc.comm[slave].slave_read); in mlx4_report_internal_err_comm_event()
2579 destroy_workqueue(priv->mfunc.master.comm_wq); in mlx4_multi_func_cleanup()
2582 kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]); in mlx4_multi_func_cleanup()
2584 kfree(priv->mfunc.master.slave_state); in mlx4_multi_func_cleanup()
2585 kfree(priv->mfunc.master.vf_admin); in mlx4_multi_func_cleanup()
2586 kfree(priv->mfunc.master.vf_oper); in mlx4_multi_func_cleanup()
2590 iounmap(priv->mfunc.comm); in mlx4_multi_func_cleanup()
2591 priv->mfunc.comm = NULL; in mlx4_multi_func_cleanup()
2608 if (mlx4_is_mfunc(dev) && priv->mfunc.vhcr && in mlx4_cmd_cleanup()
2611 priv->mfunc.vhcr, priv->mfunc.vhcr_dma); in mlx4_cmd_cleanup()
2612 priv->mfunc.vhcr = NULL; in mlx4_cmd_cleanup()
2888 port_qos = &priv->mfunc.master.qos_ctl[port]; in mlx4_set_vport_qos()
2935 info = &priv->mfunc.master.qos_ctl[port]; in mlx4_is_vf_vst_and_prio_qos()
2993 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_mac()
3040 slave_state = &priv->mfunc.master.slave_state[slave]; in mlx4_set_vf_vlan()
3047 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_vlan()
3048 vf_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; in mlx4_set_vf_vlan()
3102 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_rate()
3135 if (priv->mfunc.master.slave_state[slave].active && in mlx4_set_vf_rate()
3155 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; in mlx4_get_slave_default_vlan()
3184 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_spoofchk()
3211 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_get_vf_config()
3273 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_link_state()
3381 return priv->mfunc.master.vf_oper[slave].smi_enabled[port] == in mlx4_vf_smi_enabled()
3397 return priv->mfunc.master.vf_admin[slave].enable_smi[port] == in mlx4_vf_get_enable_smi_admin()
3426 priv->mfunc.master.vf_admin[slave].enable_smi[port] = enabled; in mlx4_vf_set_enable_smi_admin()