Lines Matching full:vp

74 	return port->vp->msg_enable;  in vsw_get_msglevel()
81 port->vp->msg_enable = value; in vsw_set_msglevel()
124 return sunvnet_set_rx_mode_common(dev, port->vp); in vsw_set_rx_mode()
145 return sunvnet_poll_controller_common(dev, port->vp); in vsw_poll_controller()
170 struct vnet *vp; in vsw_get_vnet() local
195 vp = NULL; in vsw_get_vnet()
199 vp = iter; in vsw_get_vnet()
204 if (!vp) { in vsw_get_vnet()
205 vp = kzalloc(sizeof(*vp), GFP_KERNEL); in vsw_get_vnet()
206 if (unlikely(!vp)) { in vsw_get_vnet()
211 spin_lock_init(&vp->lock); in vsw_get_vnet()
212 INIT_LIST_HEAD(&vp->port_list); in vsw_get_vnet()
213 INIT_LIST_HEAD(&vp->list); in vsw_get_vnet()
214 vp->local_mac = *local_mac; in vsw_get_vnet()
215 list_add(&vp->list, &vnet_list); in vsw_get_vnet()
222 return vp; in vsw_get_vnet()
280 struct vnet *vp; in vsw_port_probe() local
309 vp = vsw_get_vnet(hp, vdev->mp, &handle); in vsw_port_probe()
310 if (IS_ERR(vp)) { in vsw_port_probe()
311 err = PTR_ERR(vp); in vsw_port_probe()
333 port->vp = vp; in vsw_port_probe()
361 spin_lock_irqsave(&vp->lock, flags); in vsw_port_probe()
362 list_add_rcu(&port->list, &vp->port_list); in vsw_port_probe()
363 spin_unlock_irqrestore(&vp->lock, flags); in vsw_port_probe()
373 spin_lock_irqsave(&vp->lock, flags); in vsw_port_probe()
375 spin_unlock_irqrestore(&vp->lock, flags); in vsw_port_probe()
420 spin_lock_irqsave(&port->vp->lock, flags); in vsw_port_remove()
422 spin_unlock_irqrestore(&port->vp->lock, flags); in vsw_port_remove()
435 struct vnet *vp; in vsw_cleanup() local
440 vp = list_first_entry(&vnet_list, struct vnet, list); in vsw_cleanup()
441 list_del(&vp->list); in vsw_cleanup()
443 if (!list_empty(&vp->port_list)) in vsw_cleanup()
445 kfree(vp); in vsw_cleanup()