diff mbox series

[v3,3/6] can: c_can: fix control interface used by c_can_do_tx

Message ID 20210228103856.4089-4-dariobin@libero.it
State New
Headers show
Series can: c_can: add support to 64 message objects | expand

Commit Message

Dario Binacchi Feb. 28, 2021, 10:38 a.m. UTC
According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use
IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX).

Signed-off-by: Dario Binacchi <dariobin@libero.it>
---

(no changes since v1)

 drivers/net/can/c_can/c_can.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kurt Van Dijck March 2, 2021, 6:44 p.m. UTC | #1
On Sun, 28 Feb 2021 11:38:52 +0100, Dario Binacchi wrote:
> According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use
> IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX).
> 
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
> ---
> 
> (no changes since v1)
> 
>  drivers/net/can/c_can/c_can.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
> index dbcc1c1c92d6..69526c3a671c 100644
> --- a/drivers/net/can/c_can/c_can.c
> +++ b/drivers/net/can/c_can/c_can.c
> @@ -732,7 +732,7 @@ static void c_can_do_tx(struct net_device *dev)
>  		idx--;
>  		pend &= ~(1 << idx);
>  		obj = idx + C_CAN_MSG_OBJ_TX_FIRST;
> -		c_can_inval_tx_object(dev, IF_RX, obj);
> +		c_can_inval_tx_object(dev, IF_TX, obj);

Right. I had a similar effort last year to increase the reception
throughput, but I ended with some sporadic strange tx echo problems.
This fix may have fixed my problem as wel.

>  		can_get_echo_skb(dev, idx, NULL);
>  		bytes += priv->dlc[idx];
>  		pkts++;
> -- 
> 2.17.1
>
Dario Binacchi March 3, 2021, 7:22 a.m. UTC | #2
Hi Kurt,

> Il 02/03/2021 19:44 Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> ha scritto:

> 

>  

> On Sun, 28 Feb 2021 11:38:52 +0100, Dario Binacchi wrote:

> > According to commit 640916db2bf7 ("can: c_can: Make it SMP safe") let RX use

> > IF1 (i.e. IF_RX) and TX use IF2 (i.e. IF_TX).

> > 

> > Signed-off-by: Dario Binacchi <dariobin@libero.it>

> > ---

> > 

> > (no changes since v1)

> > 

> >  drivers/net/can/c_can/c_can.c | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> > 

> > diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c

> > index dbcc1c1c92d6..69526c3a671c 100644

> > --- a/drivers/net/can/c_can/c_can.c

> > +++ b/drivers/net/can/c_can/c_can.c

> > @@ -732,7 +732,7 @@ static void c_can_do_tx(struct net_device *dev)

> >  		idx--;

> >  		pend &= ~(1 << idx);

> >  		obj = idx + C_CAN_MSG_OBJ_TX_FIRST;

> > -		c_can_inval_tx_object(dev, IF_RX, obj);

> > +		c_can_inval_tx_object(dev, IF_TX, obj);

> 

> Right. I had a similar effort last year to increase the reception

> throughput, but I ended with some sporadic strange tx echo problems.

> This fix may have fixed my problem as well.


Take a look at https://lore.kernel.org/patchwork/patch/1384649/

Thanks and regards,
Dario
> 

> >  		can_get_echo_skb(dev, idx, NULL);

> >  		bytes += priv->dlc[idx];

> >  		pkts++;

> > -- 

> > 2.17.1

> >
diff mbox series

Patch

diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index dbcc1c1c92d6..69526c3a671c 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -732,7 +732,7 @@  static void c_can_do_tx(struct net_device *dev)
 		idx--;
 		pend &= ~(1 << idx);
 		obj = idx + C_CAN_MSG_OBJ_TX_FIRST;
-		c_can_inval_tx_object(dev, IF_RX, obj);
+		c_can_inval_tx_object(dev, IF_TX, obj);
 		can_get_echo_skb(dev, idx, NULL);
 		bytes += priv->dlc[idx];
 		pkts++;