Lines Matching refs:nsim_bus_dev
64 return nsim_dev->nsim_bus_dev->num_vfs; in nsim_dev_get_vfs()
68 nsim_bus_dev_set_vfs(struct nsim_bus_dev *nsim_bus_dev, unsigned int num_vfs) in nsim_bus_dev_set_vfs() argument
71 nsim_bus_dev->num_vfs = num_vfs; in nsim_bus_dev_set_vfs()
238 READ_ONCE(nsim_dev->nsim_bus_dev->max_vfs)); in nsim_bus_dev_max_vfs_read()
284 WRITE_ONCE(nsim_dev->nsim_bus_dev->max_vfs, val); in nsim_bus_dev_max_vfs_write()
307 sprintf(dev_ddir_name, DRV_NAME "%u", nsim_dev->nsim_bus_dev->dev.id); in nsim_dev_debugfs_init()
397 struct nsim_bus_dev *nsim_bus_dev = nsim_dev->nsim_bus_dev; in nsim_dev_port_debugfs_init() local
408 sprintf(dev_link_name, "../../../" DRV_NAME "%u", nsim_bus_dev->dev.id); in nsim_dev_port_debugfs_init()
1468 struct nsim_bus_dev *nsim_bus_dev = nsim_dev->nsim_bus_dev; in nsim_dev_reload_create() local
1506 err = nsim_dev_port_add_all(nsim_dev, nsim_bus_dev->port_count); in nsim_dev_reload_create()
1532 int nsim_drv_probe(struct nsim_bus_dev *nsim_bus_dev) in nsim_drv_probe() argument
1539 nsim_bus_dev->initial_net, &nsim_bus_dev->dev); in nsim_drv_probe()
1544 nsim_dev->nsim_bus_dev = nsim_bus_dev; in nsim_drv_probe()
1554 dev_set_drvdata(&nsim_bus_dev->dev, nsim_dev); in nsim_drv_probe()
1556 nsim_dev->vfconfigs = kcalloc(nsim_bus_dev->max_vfs, in nsim_drv_probe()
1608 err = nsim_dev_port_add_all(nsim_dev, nsim_bus_dev->port_count); in nsim_drv_probe()
1644 dev_set_drvdata(&nsim_bus_dev->dev, NULL); in nsim_drv_probe()
1657 nsim_bus_dev_set_vfs(nsim_dev->nsim_bus_dev, 0); in nsim_dev_reload_destroy()
1671 void nsim_drv_remove(struct nsim_bus_dev *nsim_bus_dev) in nsim_drv_remove() argument
1673 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_remove()
1689 dev_set_drvdata(&nsim_bus_dev->dev, NULL); in nsim_drv_remove()
1705 int nsim_drv_port_add(struct nsim_bus_dev *nsim_bus_dev, enum nsim_dev_port_type type, in nsim_drv_port_add() argument
1708 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_port_add()
1720 int nsim_drv_port_del(struct nsim_bus_dev *nsim_bus_dev, enum nsim_dev_port_type type, in nsim_drv_port_del() argument
1723 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_port_del()
1737 int nsim_drv_configure_vfs(struct nsim_bus_dev *nsim_bus_dev, in nsim_drv_configure_vfs() argument
1740 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_configure_vfs()
1745 if (nsim_bus_dev->num_vfs == num_vfs) in nsim_drv_configure_vfs()
1747 if (nsim_bus_dev->num_vfs && num_vfs) { in nsim_drv_configure_vfs()
1751 if (nsim_bus_dev->max_vfs < num_vfs) { in nsim_drv_configure_vfs()
1756 nsim_bus_dev_set_vfs(nsim_bus_dev, num_vfs); in nsim_drv_configure_vfs()
1761 nsim_bus_dev_set_vfs(nsim_bus_dev, 0); in nsim_drv_configure_vfs()