Lines Matching full:vio
32 #include <asm/vio.h>
62 ldc_disconnect(port->vio.lp); in vnet_handle_unknown()
69 int sunvnet_send_attr_common(struct vio_driver_state *vio) in sunvnet_send_attr_common() argument
71 struct vnet_port *port = to_vnet_port(vio); in sunvnet_send_attr_common()
77 err = vnet_port_alloc_tx_ring(to_vnet_port(vio)); in sunvnet_send_attr_common()
85 pkt.tag.sid = vio_send_sid(vio); in sunvnet_send_attr_common()
86 if (vio_version_before(vio, 1, 2)) in sunvnet_send_attr_common()
94 if (vio_version_after(vio, 1, 3)) { in sunvnet_send_attr_common()
102 if (vio_version_after_eq(vio, 1, 6)) in sunvnet_send_attr_common()
104 } else if (vio_version_before(vio, 1, 3)) { in sunvnet_send_attr_common()
111 if (vio_version_after_eq(vio, 1, 7) && port->tso) { in sunvnet_send_attr_common()
128 return vio_ldc_send(vio, &pkt, sizeof(pkt)); in sunvnet_send_attr_common()
132 static int handle_attr_info(struct vio_driver_state *vio, in handle_attr_info() argument
135 struct vnet_port *port = to_vnet_port(vio); in handle_attr_info()
148 pkt->tag.sid = vio_send_sid(vio); in handle_attr_info()
152 if (vio_version_before(vio, 1, 2) && xfer_mode == VIO_DRING_MODE) in handle_attr_info()
161 if (vio_version_before(vio, 1, 3)) { in handle_attr_info()
163 } else if (vio_version_after(vio, 1, 3)) { in handle_attr_info()
173 if (vio_version_after_eq(vio, 1, 7)) in handle_attr_info()
194 if (vio_version_after_eq(vio, 1, 6)) { in handle_attr_info()
206 (void)vio_ldc_send(vio, pkt, sizeof(*pkt)); in handle_attr_info()
222 return vio_ldc_send(vio, pkt, sizeof(*pkt)); in handle_attr_info()
225 static int handle_attr_ack(struct vio_driver_state *vio, in handle_attr_ack() argument
233 static int handle_attr_nack(struct vio_driver_state *vio, in handle_attr_nack() argument
241 int sunvnet_handle_attr_common(struct vio_driver_state *vio, void *arg) in sunvnet_handle_attr_common() argument
247 return handle_attr_info(vio, pkt); in sunvnet_handle_attr_common()
250 return handle_attr_ack(vio, pkt); in sunvnet_handle_attr_common()
253 return handle_attr_nack(vio, pkt); in sunvnet_handle_attr_common()
261 void sunvnet_handshake_complete_common(struct vio_driver_state *vio) in sunvnet_handshake_complete_common() argument
265 dr = &vio->drings[VIO_DRIVER_RX_RING]; in sunvnet_handshake_complete_common()
269 dr = &vio->drings[VIO_DRIVER_TX_RING]; in sunvnet_handshake_complete_common()
402 err = ldc_copy(port->vio.lp, LDC_COPY_IN, in vnet_rx_one()
414 if (vio_version_after_eq(&port->vio, 1, 8)) { in vnet_rx_one()
478 .sid = vio_send_sid(&port->vio), in vnet_send_ack()
491 err = vio_ldc_send(&port->vio, &hdr, sizeof(hdr)); in vnet_send_ack()
523 struct vio_net_desc *desc = port->vio.desc_buf; in get_rx_desc()
526 err = ldc_get_dring_entry(port->vio.lp, desc, dr->entry_size, in get_rx_desc()
542 err = ldc_put_dring_entry(port->vio.lp, desc, dr->entry_size, in put_rx_desc()
556 struct vio_driver_state *vio = &port->vio; in vnet_walk_rx_one() local
577 trace_vnet_rx_one(port->vio._local_sid, port->vio._peer_sid, in vnet_walk_rx_one()
590 struct vio_driver_state *vio = &port->vio; in vnet_walk_rx() local
629 trace_vnet_tx_send_stopped_ack(port->vio._local_sid, in vnet_walk_rx()
630 port->vio._peer_sid, in vnet_walk_rx()
635 trace_vnet_tx_defer_stopped_ack(port->vio._local_sid, in vnet_walk_rx()
636 port->vio._peer_sid, in vnet_walk_rx()
648 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_RX_RING]; in vnet_rx()
649 struct vio_driver_state *vio = &port->vio; in vnet_rx() local
688 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_ack()
709 trace_vnet_rx_stopped_ack(port->vio._local_sid, in vnet_ack()
710 port->vio._peer_sid, end); in vnet_ack()
774 struct vio_driver_state *vio = &vnet->vio; in sunvnet_port_is_up_common() local
776 return !!(vio->hs_state & VIO_HS_COMPLETE); in sunvnet_port_is_up_common()
783 struct vio_driver_state *vio = &port->vio; in vnet_event_napi() local
801 vio_link_state_change(vio, LDC_EVENT_RESET); in vnet_event_napi()
803 vio_port_up(vio); in vnet_event_napi()
828 vio_link_state_change(vio, LDC_EVENT_UP); in vnet_event_napi()
846 &port->vio.drings[VIO_DRIVER_RX_RING]; in vnet_event_napi()
856 err = ldc_read(vio->lp, &msgbuf, sizeof(msgbuf)); in vnet_event_napi()
859 vio_conn_reset(vio); in vnet_event_napi()
869 err = vio_validate_sid(vio, &msgbuf.tag); in vnet_event_napi()
900 err = vio_control_pkt_engine(vio, &msgbuf); in vnet_event_napi()
917 struct vio_driver_state *vio = &port->vio; in sunvnet_poll_common() local
923 vio_set_intr(vio->vdev->rx_ino, HV_INTR_ENABLED); in sunvnet_poll_common()
932 struct vio_driver_state *vio = &port->vio; in sunvnet_event_common() local
935 vio_set_intr(vio->vdev->rx_ino, HV_INTR_DISABLED); in sunvnet_event_common()
942 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in __vnet_tx_trigger()
948 .sid = vio_send_sid(&port->vio), in __vnet_tx_trigger()
958 trace_vnet_tx_pending_stopped_ack(port->vio._local_sid, in __vnet_tx_trigger()
959 port->vio._peer_sid, in __vnet_tx_trigger()
962 &port->vio.drings[VIO_DRIVER_RX_RING], in __vnet_tx_trigger()
972 err = vio_ldc_send(&port->vio, &hdr, sizeof(hdr)); in __vnet_tx_trigger()
983 trace_vnet_tx_trigger(port->vio._local_sid, in __vnet_tx_trigger()
984 port->vio._peer_sid, start, err); in __vnet_tx_trigger()
992 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_clean_tx_ring()
1022 ldc_unmap(port->vio.lp, in vnet_clean_tx_ring()
1226 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_handle_offloads()
1351 if (vio_version_after_eq(&port->vio, 1, 3)) in sunvnet_start_xmit_common()
1378 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in sunvnet_start_xmit_common()
1405 err = vnet_skb_map(port->vio.lp, skb, port->tx_bufs[txi].cookies, 2, in sunvnet_start_xmit_common()
1429 if (vio_version_after_eq(&port->vio, 1, 7)) { in sunvnet_start_xmit_common()
1438 if (vio_version_after_eq(&port->vio, 1, 8) && in sunvnet_start_xmit_common()
1473 trace_vnet_skip_tx_trigger(port->vio._local_sid, in sunvnet_start_xmit_common()
1474 port->vio._peer_sid, dr->cons); in sunvnet_start_xmit_common()
1597 info.tag.sid = vio_send_sid(&port->vio); in __send_mc_list()
1610 (void)vio_ldc_send(&port->vio, &info, in __send_mc_list()
1617 (void)vio_ldc_send(&port->vio, &info, sizeof(info)); in __send_mc_list()
1635 (void)vio_ldc_send(&port->vio, &info, in __send_mc_list()
1645 (void)vio_ldc_send(&port->vio, &info, sizeof(info)); in __send_mc_list()
1676 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in sunvnet_port_free_tx_bufs_common()
1690 ldc_unmap(port->vio.lp, in sunvnet_port_free_tx_bufs_common()
1697 ldc_free_exp_dring(port->vio.lp, dr->base, in sunvnet_port_free_tx_bufs_common()
1725 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vnet_port_alloc_tx_ring()
1729 if (vio_version_after_eq(&port->vio, 1, 7)) in vnet_port_alloc_tx_ring()
1734 dring = ldc_alloc_exp_dring(port->vio.lp, len, in vnet_port_alloc_tx_ring()