Lines Matching refs:port_index

97     unsigned int port_index; /* dual port RAM index */  member
117 static void *txbuf_ptr(XlnxXpsEthLite *s, unsigned port_index) in txbuf_ptr() argument
119 return memory_region_get_ram_ptr(&s->port[port_index].txbuf); in txbuf_ptr()
122 static void *rxbuf_ptr(XlnxXpsEthLite *s, unsigned port_index) in rxbuf_ptr() argument
124 return memory_region_get_ram_ptr(&s->port[port_index].rxbuf); in rxbuf_ptr()
130 unsigned port_index = addr_to_port_index(addr); in port_tx_read() local
135 r = s->port[port_index].reg.tx_len; in port_tx_read()
138 r = s->port[port_index].reg.tx_gie; in port_tx_read()
141 r = s->port[port_index].reg.tx_ctrl; in port_tx_read()
154 unsigned port_index = addr_to_port_index(addr); in port_tx_write() local
158 s->port[port_index].reg.tx_len = value; in port_tx_write()
161 s->port[port_index].reg.tx_gie = value; in port_tx_write()
166 txbuf_ptr(s, port_index), in port_tx_write()
167 s->port[port_index].reg.tx_len); in port_tx_write()
168 if (s->port[port_index].reg.tx_ctrl & CTRL_I) { in port_tx_write()
172 memcpy(&s->conf.macaddr.a[0], txbuf_ptr(s, port_index), 6); in port_tx_write()
173 if (s->port[port_index].reg.tx_ctrl & CTRL_I) { in port_tx_write()
181 s->port[port_index].reg.tx_ctrl = value & ~(CTRL_P | CTRL_S); in port_tx_write()
208 unsigned port_index = addr_to_port_index(addr); in port_rx_read() local
213 r = s->port[port_index].reg.rx_ctrl; in port_rx_read()
226 unsigned port_index = addr_to_port_index(addr); in port_rx_write() local
233 s->port[port_index].reg.rx_ctrl = value; in port_rx_write()
261 return !(s->port[s->port_index].reg.rx_ctrl & CTRL_S); in eth_can_rx()
267 unsigned int port_index = s->port_index; in eth_rx() local
273 if (s->port[port_index].reg.rx_ctrl & CTRL_S) { in eth_rx()
274 trace_ethlite_pkt_lost(s->port[port_index].reg.rx_ctrl); in eth_rx()
282 memcpy(rxbuf_ptr(s, port_index), buf, size); in eth_rx()
284 s->port[port_index].reg.rx_ctrl |= CTRL_S; in eth_rx()
285 if (s->port[port_index].reg.rx_ctrl & CTRL_I) { in eth_rx()
290 s->port_index ^= s->c_rx_pingpong; in eth_rx()
298 s->port_index = 0; in xilinx_ethlite_reset()