Lines Matching refs:vio
61 ldc_disconnect(port->vio.lp); in vnet_handle_unknown()
68 int sunvnet_send_attr_common(struct vio_driver_state *vio) in sunvnet_send_attr_common() argument
70 struct vnet_port *port = to_vnet_port(vio); in sunvnet_send_attr_common()
76 err = vnet_port_alloc_tx_ring(to_vnet_port(vio)); in sunvnet_send_attr_common()
84 pkt.tag.sid = vio_send_sid(vio); in sunvnet_send_attr_common()
85 if (vio_version_before(vio, 1, 2)) in sunvnet_send_attr_common()
93 if (vio_version_after(vio, 1, 3)) { in sunvnet_send_attr_common()
101 if (vio_version_after_eq(vio, 1, 6)) in sunvnet_send_attr_common()
103 } else if (vio_version_before(vio, 1, 3)) { in sunvnet_send_attr_common()
110 if (vio_version_after_eq(vio, 1, 7) && port->tso) { in sunvnet_send_attr_common()
127 return vio_ldc_send(vio, &pkt, sizeof(pkt)); in sunvnet_send_attr_common()
131 static int handle_attr_info(struct vio_driver_state *vio, in handle_attr_info() argument
134 struct vnet_port *port = to_vnet_port(vio); in handle_attr_info()
147 pkt->tag.sid = vio_send_sid(vio); in handle_attr_info()
151 if (vio_version_before(vio, 1, 2) && xfer_mode == VIO_DRING_MODE) in handle_attr_info()
160 if (vio_version_before(vio, 1, 3)) { in handle_attr_info()
162 } else if (vio_version_after(vio, 1, 3)) { in handle_attr_info()
172 if (vio_version_after_eq(vio, 1, 7)) in handle_attr_info()
193 if (vio_version_after_eq(vio, 1, 6)) { in handle_attr_info()
205 (void)vio_ldc_send(vio, pkt, sizeof(*pkt)); in handle_attr_info()
221 return vio_ldc_send(vio, pkt, sizeof(*pkt)); in handle_attr_info()
224 static int handle_attr_ack(struct vio_driver_state *vio, in handle_attr_ack() argument
232 static int handle_attr_nack(struct vio_driver_state *vio, in handle_attr_nack() argument
240 int sunvnet_handle_attr_common(struct vio_driver_state *vio, void *arg) in sunvnet_handle_attr_common() argument
246 return handle_attr_info(vio, pkt); in sunvnet_handle_attr_common()
249 return handle_attr_ack(vio, pkt); in sunvnet_handle_attr_common()
252 return handle_attr_nack(vio, pkt); in sunvnet_handle_attr_common()
260 void sunvnet_handshake_complete_common(struct vio_driver_state *vio) in sunvnet_handshake_complete_common() argument
264 dr = &vio->drings[VIO_DRIVER_RX_RING]; in sunvnet_handshake_complete_common()
268 dr = &vio->drings[VIO_DRIVER_TX_RING]; in sunvnet_handshake_complete_common()
401 err = ldc_copy(port->vio.lp, LDC_COPY_IN, in vnet_rx_one()
413 if (vio_version_after_eq(&port->vio, 1, 8)) { in vnet_rx_one()
477 .sid = vio_send_sid(&port->vio), in vnet_send_ack()
490 err = vio_ldc_send(&port->vio, &hdr, sizeof(hdr)); in vnet_send_ack()
522 struct vio_net_desc *desc = port->vio.desc_buf; in get_rx_desc()
525 err = ldc_get_dring_entry(port->vio.lp, desc, dr->entry_size, in get_rx_desc()
541 err = ldc_put_dring_entry(port->vio.lp, desc, dr->entry_size, in put_rx_desc()
555 struct vio_driver_state *vio = &port->vio; in vnet_walk_rx_one() local
576 trace_vnet_rx_one(port->vio._local_sid, port->vio._peer_sid, in vnet_walk_rx_one()
589 struct vio_driver_state *vio = &port->vio; in vnet_walk_rx() local
628 trace_vnet_tx_send_stopped_ack(port->vio._local_sid, in vnet_walk_rx()
629 port->vio._peer_sid, in vnet_walk_rx()
634 trace_vnet_tx_defer_stopped_ack(port->vio._local_sid, in vnet_walk_rx()
635 port->vio._peer_sid, in vnet_walk_rx()
647 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_RX_RING]; in vnet_rx()
648 struct vio_driver_state *vio = &port->vio; in vnet_rx() local
687 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_ack()
708 trace_vnet_rx_stopped_ack(port->vio._local_sid, in vnet_ack()
709 port->vio._peer_sid, end); in vnet_ack()
773 struct vio_driver_state *vio = &vnet->vio; in sunvnet_port_is_up_common() local
775 return !!(vio->hs_state & VIO_HS_COMPLETE); in sunvnet_port_is_up_common()
782 struct vio_driver_state *vio = &port->vio; in vnet_event_napi() local
800 vio_link_state_change(vio, LDC_EVENT_RESET); in vnet_event_napi()
802 vio_port_up(vio); in vnet_event_napi()
827 vio_link_state_change(vio, LDC_EVENT_UP); in vnet_event_napi()
845 &port->vio.drings[VIO_DRIVER_RX_RING]; in vnet_event_napi()
855 err = ldc_read(vio->lp, &msgbuf, sizeof(msgbuf)); in vnet_event_napi()
858 vio_conn_reset(vio); in vnet_event_napi()
868 err = vio_validate_sid(vio, &msgbuf.tag); in vnet_event_napi()
899 err = vio_control_pkt_engine(vio, &msgbuf); in vnet_event_napi()
916 struct vio_driver_state *vio = &port->vio; in sunvnet_poll_common() local
922 vio_set_intr(vio->vdev->rx_ino, HV_INTR_ENABLED); in sunvnet_poll_common()
931 struct vio_driver_state *vio = &port->vio; in sunvnet_event_common() local
934 vio_set_intr(vio->vdev->rx_ino, HV_INTR_DISABLED); in sunvnet_event_common()
941 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in __vnet_tx_trigger()
947 .sid = vio_send_sid(&port->vio), in __vnet_tx_trigger()
957 trace_vnet_tx_pending_stopped_ack(port->vio._local_sid, in __vnet_tx_trigger()
958 port->vio._peer_sid, in __vnet_tx_trigger()
961 &port->vio.drings[VIO_DRIVER_RX_RING], in __vnet_tx_trigger()
971 err = vio_ldc_send(&port->vio, &hdr, sizeof(hdr)); in __vnet_tx_trigger()
982 trace_vnet_tx_trigger(port->vio._local_sid, in __vnet_tx_trigger()
983 port->vio._peer_sid, start, err); in __vnet_tx_trigger()
991 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_clean_tx_ring()
1021 ldc_unmap(port->vio.lp, in vnet_clean_tx_ring()
1225 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_handle_offloads()
1350 if (vio_version_after_eq(&port->vio, 1, 3)) in sunvnet_start_xmit_common()
1377 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in sunvnet_start_xmit_common()
1404 err = vnet_skb_map(port->vio.lp, skb, port->tx_bufs[txi].cookies, 2, in sunvnet_start_xmit_common()
1428 if (vio_version_after_eq(&port->vio, 1, 7)) { in sunvnet_start_xmit_common()
1437 if (vio_version_after_eq(&port->vio, 1, 8) && in sunvnet_start_xmit_common()
1472 trace_vnet_skip_tx_trigger(port->vio._local_sid, in sunvnet_start_xmit_common()
1473 port->vio._peer_sid, dr->cons); in sunvnet_start_xmit_common()
1596 info.tag.sid = vio_send_sid(&port->vio); in __send_mc_list()
1609 (void)vio_ldc_send(&port->vio, &info, in __send_mc_list()
1616 (void)vio_ldc_send(&port->vio, &info, sizeof(info)); in __send_mc_list()
1634 (void)vio_ldc_send(&port->vio, &info, in __send_mc_list()
1644 (void)vio_ldc_send(&port->vio, &info, sizeof(info)); in __send_mc_list()
1675 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in sunvnet_port_free_tx_bufs_common()
1689 ldc_unmap(port->vio.lp, in sunvnet_port_free_tx_bufs_common()
1696 ldc_free_exp_dring(port->vio.lp, dr->base, in sunvnet_port_free_tx_bufs_common()
1724 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_port_alloc_tx_ring()
1728 if (vio_version_after_eq(&port->vio, 1, 7)) in vnet_port_alloc_tx_ring()
1733 dring = ldc_alloc_exp_dring(port->vio.lp, len, in vnet_port_alloc_tx_ring()