Lines Matching refs:sparx5
23 void sparx5_xtr_flush(struct sparx5 *sparx5, u8 grp) in sparx5_xtr_flush() argument
26 spx5_wr(QS_XTR_FLUSH_FLUSH_SET(BIT(grp)), sparx5, QS_XTR_FLUSH); in sparx5_xtr_flush()
32 spx5_wr(0, sparx5, QS_XTR_FLUSH); in sparx5_xtr_flush()
59 static void sparx5_xtr_grp(struct sparx5 *sparx5, u8 grp, bool byte_swap) in sparx5_xtr_grp() argument
72 ifh[i] = spx5_rd(sparx5, QS_XTR_RD(grp)); in sparx5_xtr_grp()
79 sparx5->ports[fi.src_port] : NULL; in sparx5_xtr_grp()
81 dev_err(sparx5->dev, "Data on inactive port %d\n", fi.src_port); in sparx5_xtr_grp()
82 sparx5_xtr_flush(sparx5, grp); in sparx5_xtr_grp()
90 sparx5_xtr_flush(sparx5, grp); in sparx5_xtr_grp()
91 dev_err(sparx5->dev, "No skb allocated\n"); in sparx5_xtr_grp()
99 u32 val = spx5_rd(sparx5, QS_XTR_RD(grp)); in sparx5_xtr_grp()
131 *rxbuf = spx5_rd(sparx5, QS_XTR_RD(grp)); in sparx5_xtr_grp()
153 if (test_bit(port->portno, sparx5->bridge_mask)) in sparx5_xtr_grp()
159 sparx5_ptp_rxtstamp(sparx5, skb, fi.timestamp); in sparx5_xtr_grp()
166 static int sparx5_inject(struct sparx5 *sparx5, in sparx5_inject() argument
175 val = spx5_rd(sparx5, QS_INJ_STATUS); in sparx5_inject()
185 sparx5, QS_INJ_CTRL(grp)); in sparx5_inject()
189 spx5_wr(ifh[w], sparx5, QS_INJ_WR(grp)); in sparx5_inject()
196 spx5_wr(val, sparx5, QS_INJ_WR(grp)); in sparx5_inject()
201 spx5_wr(0, sparx5, QS_INJ_WR(grp)); in sparx5_inject()
209 sparx5, QS_INJ_CTRL(grp)); in sparx5_inject()
212 spx5_wr(0, sparx5, QS_INJ_WR(grp)); in sparx5_inject()
215 val = spx5_rd(sparx5, QS_INJ_STATUS); in sparx5_inject()
233 struct sparx5 *sparx5 = port->sparx5; in sparx5_port_xmit_impl() local
240 if (sparx5->ptp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) { in sparx5_port_xmit_impl()
251 spin_lock(&sparx5->tx_lock); in sparx5_port_xmit_impl()
252 if (sparx5->fdma_irq > 0) in sparx5_port_xmit_impl()
253 ret = sparx5_fdma_xmit(sparx5, ifh, skb); in sparx5_port_xmit_impl()
255 ret = sparx5_inject(sparx5, ifh, skb, dev); in sparx5_port_xmit_impl()
256 spin_unlock(&sparx5->tx_lock); in sparx5_port_xmit_impl()
265 sparx5->tx.packets++; in sparx5_port_xmit_impl()
275 sparx5->tx.dropped++; in sparx5_port_xmit_impl()
292 val = spx5_rd(port->sparx5, QS_INJ_STATUS); in sparx5_injection_timeout()
298 port->sparx5, in sparx5_injection_timeout()
305 int sparx5_manual_injection_mode(struct sparx5 *sparx5) in sparx5_manual_injection_mode() argument
314 sparx5, QS_XTR_GRP_CFG(XTR_QUEUE)); in sparx5_manual_injection_mode()
317 sparx5, QS_INJ_GRP_CFG(INJ_QUEUE)); in sparx5_manual_injection_mode()
325 sparx5, ASM_PORT_CFG(portno)); in sparx5_manual_injection_mode()
330 sparx5, in sparx5_manual_injection_mode()
336 sparx5, in sparx5_manual_injection_mode()
343 sparx5, in sparx5_manual_injection_mode()
351 struct sparx5 *s5 = _sparx5; in sparx5_xtr_handler()