[PATCH can-next 12/21] can: rockchip_canfd: add TX PATH

Marc Kleine-Budde mkl at pengutronix.de
Wed Jul 31 01:01:36 PDT 2024


On 30.07.2024 17:44:01, Simon Horman wrote:
> On Mon, Jul 29, 2024 at 03:05:43PM +0200, Marc Kleine-Budde wrote:
> > The IP core has a TX event FIFO. In other IP cores, this type of FIFO
> > normally contains the event that a CAN frame has been successfully
> > sent. However, the IP core on the rk3568v2 the FIFO also holds events
> > of unsuccessful transmission attempts.
> > 
> > It turned out that the best way to work around this problem is to set
> > the IP core to self-receive mode (RXSTX), filter out the self-received
> > frames and insert them into the complete TX path.
> > 
> > Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
> 
> ...
> 
> > diff --git a/drivers/net/can/rockchip/rockchip_canfd-tx.c b/drivers/net/can/rockchip/rockchip_canfd-tx.c
> 
> ...
> 
> > +void rkcanfd_handle_tx_done_one(struct rkcanfd_priv *priv, const u32 ts,
> > +				unsigned int *frame_len_p)
> > +{
> > +	struct net_device_stats *stats = &priv->ndev->stats;
> > +	unsigned int tx_tail;
> > +	struct sk_buff *skb;
> > +
> > +	tx_tail = rkcanfd_get_tx_tail(priv);
> > +	skb = priv->can.echo_skb[tx_tail];
> 
> nit: skb is set but otherwise unused in this function.

Moved into the appropriate patch.

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20240731/7417c3eb/attachment.sig>


More information about the Linux-rockchip mailing list