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()
235 READ_ONCE(nsim_dev->nsim_bus_dev->max_vfs)); in nsim_bus_dev_max_vfs_read()
281 WRITE_ONCE(nsim_dev->nsim_bus_dev->max_vfs, val); in nsim_bus_dev_max_vfs_write()
304 sprintf(dev_ddir_name, DRV_NAME "%u", nsim_dev->nsim_bus_dev->dev.id); in nsim_dev_debugfs_init()
394 struct nsim_bus_dev *nsim_bus_dev = nsim_dev->nsim_bus_dev; in nsim_dev_port_debugfs_init() local
405 sprintf(dev_link_name, "../../../" DRV_NAME "%u", nsim_bus_dev->dev.id); in nsim_dev_port_debugfs_init()
1460 struct nsim_bus_dev *nsim_bus_dev = nsim_dev->nsim_bus_dev; in nsim_dev_reload_create() local
1498 err = nsim_dev_port_add_all(nsim_dev, nsim_bus_dev->port_count); in nsim_dev_reload_create()
1524 int nsim_drv_probe(struct nsim_bus_dev *nsim_bus_dev) in nsim_drv_probe() argument
1531 nsim_bus_dev->initial_net, &nsim_bus_dev->dev); in nsim_drv_probe()
1536 nsim_dev->nsim_bus_dev = nsim_bus_dev; in nsim_drv_probe()
1546 dev_set_drvdata(&nsim_bus_dev->dev, nsim_dev); in nsim_drv_probe()
1548 nsim_dev->vfconfigs = kcalloc(nsim_bus_dev->max_vfs, in nsim_drv_probe()
1604 err = nsim_dev_port_add_all(nsim_dev, nsim_bus_dev->port_count); in nsim_drv_probe()
1640 dev_set_drvdata(&nsim_bus_dev->dev, NULL); in nsim_drv_probe()
1653 nsim_bus_dev_set_vfs(nsim_dev->nsim_bus_dev, 0); in nsim_dev_reload_destroy()
1667 void nsim_drv_remove(struct nsim_bus_dev *nsim_bus_dev) in nsim_drv_remove() argument
1669 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_remove()
1685 dev_set_drvdata(&nsim_bus_dev->dev, NULL); in nsim_drv_remove()
1701 int nsim_drv_port_add(struct nsim_bus_dev *nsim_bus_dev, enum nsim_dev_port_type type, in nsim_drv_port_add() argument
1704 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_port_add()
1716 int nsim_drv_port_del(struct nsim_bus_dev *nsim_bus_dev, enum nsim_dev_port_type type, in nsim_drv_port_del() argument
1719 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_port_del()
1733 int nsim_drv_configure_vfs(struct nsim_bus_dev *nsim_bus_dev, in nsim_drv_configure_vfs() argument
1736 struct nsim_dev *nsim_dev = dev_get_drvdata(&nsim_bus_dev->dev); in nsim_drv_configure_vfs()
1741 if (nsim_bus_dev->num_vfs == num_vfs) in nsim_drv_configure_vfs()
1743 if (nsim_bus_dev->num_vfs && num_vfs) { in nsim_drv_configure_vfs()
1747 if (nsim_bus_dev->max_vfs < num_vfs) { in nsim_drv_configure_vfs()
1752 nsim_bus_dev_set_vfs(nsim_bus_dev, num_vfs); in nsim_drv_configure_vfs()
1757 nsim_bus_dev_set_vfs(nsim_bus_dev, 0); in nsim_drv_configure_vfs()