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()
2208 spin_lock_irqsave(&priv->mfunc.master.slave_state_lock, flags); in mlx4_master_do_cmd()
2211 spin_unlock_irqrestore(&priv->mfunc.master.slave_state_lock, flags); in mlx4_master_do_cmd()
2217 &priv->mfunc.comm[slave].slave_read); in mlx4_master_do_cmd()
2228 struct mlx4_mfunc *mfunc = in mlx4_master_comm_channel() local
2231 container_of(mfunc, struct mlx4_priv, mfunc); in mlx4_master_comm_channel()
2261 comm_cmd = swab32(readl(&mfunc->comm[slave].slave_write)); in mlx4_master_comm_channel()
2262 slt = swab32(readl(&mfunc->comm[slave].slave_read)) >> 31; in mlx4_master_comm_channel()
2296 wr_toggle = swab32(readl(&priv->mfunc.comm->slave_write)); in sync_toggles()
2303 rd_toggle = swab32(readl(&priv->mfunc.comm->slave_read)); in sync_toggles()
2318 wr_toggle = swab32(readl(&priv->mfunc.comm-> in sync_toggles()
2338 __raw_writel((__force u32) 0, &priv->mfunc.comm->slave_read); in sync_toggles()
2339 __raw_writel((__force u32) 0, &priv->mfunc.comm->slave_write); in sync_toggles()
2352 priv->mfunc.comm = in mlx4_multi_func_init()
2357 priv->mfunc.comm = in mlx4_multi_func_init()
2360 if (!priv->mfunc.comm) { in mlx4_multi_func_init()
2369 priv->mfunc.master.slave_state = in mlx4_multi_func_init()
2373 if (!priv->mfunc.master.slave_state) in mlx4_multi_func_init()
2376 priv->mfunc.master.vf_admin = in mlx4_multi_func_init()
2380 if (!priv->mfunc.master.vf_admin) in mlx4_multi_func_init()
2383 priv->mfunc.master.vf_oper = in mlx4_multi_func_init()
2387 if (!priv->mfunc.master.vf_oper) in mlx4_multi_func_init()
2390 priv->mfunc.master.next_slave = 0; in mlx4_multi_func_init()
2393 vf_admin = &priv->mfunc.master.vf_admin[i]; in mlx4_multi_func_init()
2394 vf_oper = &priv->mfunc.master.vf_oper[i]; in mlx4_multi_func_init()
2395 s_state = &priv->mfunc.master.slave_state[i]; in mlx4_multi_func_init()
2398 mutex_init(&priv->mfunc.master.gen_eqe_mutex[i]); in mlx4_multi_func_init()
2402 &priv->mfunc.comm[i].slave_write); in mlx4_multi_func_init()
2404 &priv->mfunc.comm[i].slave_read); in mlx4_multi_func_init()
2444 memset(&priv->mfunc.master.cmd_eqe, 0, sizeof(struct mlx4_eqe)); in mlx4_multi_func_init()
2445 priv->mfunc.master.cmd_eqe.type = MLX4_EVENT_TYPE_CMD; in mlx4_multi_func_init()
2446 INIT_WORK(&priv->mfunc.master.comm_work, in mlx4_multi_func_init()
2448 INIT_WORK(&priv->mfunc.master.slave_event_work, in mlx4_multi_func_init()
2450 INIT_WORK(&priv->mfunc.master.slave_flr_event_work, in mlx4_multi_func_init()
2452 spin_lock_init(&priv->mfunc.master.slave_state_lock); in mlx4_multi_func_init()
2453 spin_lock_init(&priv->mfunc.master.slave_eq.event_lock); in mlx4_multi_func_init()
2454 priv->mfunc.master.comm_wq = in mlx4_multi_func_init()
2456 if (!priv->mfunc.master.comm_wq) in mlx4_multi_func_init()
2472 destroy_workqueue(priv->mfunc.master.comm_wq); in mlx4_multi_func_init()
2476 kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]); in mlx4_multi_func_init()
2478 kfree(priv->mfunc.master.vf_oper); in mlx4_multi_func_init()
2480 kfree(priv->mfunc.master.vf_admin); in mlx4_multi_func_init()
2482 kfree(priv->mfunc.master.slave_state); in mlx4_multi_func_init()
2484 iounmap(priv->mfunc.comm); in mlx4_multi_func_init()
2485 priv->mfunc.comm = NULL; in mlx4_multi_func_init()
2488 priv->mfunc.vhcr, in mlx4_multi_func_init()
2489 priv->mfunc.vhcr_dma); in mlx4_multi_func_init()
2490 priv->mfunc.vhcr = NULL; in mlx4_multi_func_init()
2519 if (mlx4_is_mfunc(dev) && !priv->mfunc.vhcr) { in mlx4_cmd_init()
2520 priv->mfunc.vhcr = dma_alloc_coherent(&dev->persist->pdev->dev, in mlx4_cmd_init()
2522 &priv->mfunc.vhcr_dma, in mlx4_cmd_init()
2524 if (!priv->mfunc.vhcr) in mlx4_cmd_init()
2558 if (!priv->mfunc.comm) in mlx4_report_internal_err_comm_event()
2565 slave_read = swab32(readl(&priv->mfunc.comm[slave].slave_read)); in mlx4_report_internal_err_comm_event()
2568 &priv->mfunc.comm[slave].slave_read); in mlx4_report_internal_err_comm_event()
2578 destroy_workqueue(priv->mfunc.master.comm_wq); in mlx4_multi_func_cleanup()
2581 kfree(priv->mfunc.master.slave_state[i].vlan_filter[port]); in mlx4_multi_func_cleanup()
2583 kfree(priv->mfunc.master.slave_state); in mlx4_multi_func_cleanup()
2584 kfree(priv->mfunc.master.vf_admin); in mlx4_multi_func_cleanup()
2585 kfree(priv->mfunc.master.vf_oper); in mlx4_multi_func_cleanup()
2589 iounmap(priv->mfunc.comm); in mlx4_multi_func_cleanup()
2590 priv->mfunc.comm = NULL; in mlx4_multi_func_cleanup()
2607 if (mlx4_is_mfunc(dev) && priv->mfunc.vhcr && in mlx4_cmd_cleanup()
2610 priv->mfunc.vhcr, priv->mfunc.vhcr_dma); in mlx4_cmd_cleanup()
2611 priv->mfunc.vhcr = NULL; in mlx4_cmd_cleanup()
2887 port_qos = &priv->mfunc.master.qos_ctl[port]; in mlx4_set_vport_qos()
2934 info = &priv->mfunc.master.qos_ctl[port]; in mlx4_is_vf_vst_and_prio_qos()
2992 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_mac()
3039 slave_state = &priv->mfunc.master.slave_state[slave]; in mlx4_set_vf_vlan()
3046 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_vlan()
3047 vf_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; in mlx4_set_vf_vlan()
3101 vf_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_rate()
3134 if (priv->mfunc.master.slave_state[slave].active && in mlx4_set_vf_rate()
3154 vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; in mlx4_get_slave_default_vlan()
3183 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_spoofchk()
3210 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_get_vf_config()
3272 s_info = &priv->mfunc.master.vf_admin[slave].vport[port]; in mlx4_set_vf_link_state()
3380 return priv->mfunc.master.vf_oper[slave].smi_enabled[port] == in mlx4_vf_smi_enabled()
3396 return priv->mfunc.master.vf_admin[slave].enable_smi[port] == in mlx4_vf_get_enable_smi_admin()
3425 priv->mfunc.master.vf_admin[slave].enable_smi[port] = enabled; in mlx4_vf_set_enable_smi_admin()