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

From: Marc Kleine-Budde
Date: Wed Jul 31 2024 - 04:02:09 EST


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@xxxxxxxxxxxxxx>
>
> ...
>
> > 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 |

Attachment: signature.asc
Description: PGP signature