Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2478658pxb; Sun, 28 Feb 2021 02:39:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRVW618/bXsjO1F0MG9gWnAHV7cVZsiGIkpQEkUvt4eOwxeCjCJvJBkrxCUSOARqXVzBvr X-Received: by 2002:a17:906:c405:: with SMTP id u5mr1844364ejz.341.1614508753709; Sun, 28 Feb 2021 02:39:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614508753; cv=none; d=google.com; s=arc-20160816; b=kdldDFex3intsCDKYYwizvh39o7+a9oO7FFTVNGc7KvLapW+prRJfJSRCd01L4RrUq xCNvazoH9FSX6NquqREGaGVmBLMQftT36TVPKzno53OHqz7w1KiSeGK7aQhXn7b2q9oO g/YqBjJwySgJrlFa9+YRr/QnfOwIWnRHcHLFMU1QljdT7sQuzOriPo+5iTOt2bH06q1I tstCiZKe2bF5UicReO2HDKbW8BJxkQCxXM6V/O6clzqFlIJ1ImB1O5e5nJxRpAfXUxlb EHWEfdS+YDxTTxwVMiXaV0q8RuypqyxLSC/so0RdkMKPtJqry+pNbKQlWJ5k7es/qxYw 87rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=NULIkYeOU4BLtqTrd/JisnRnJK17Ka3rz6+/RjLJu1E=; b=rrecQc+TNtcs1G0J3nzue5N8uU+wDmUzLiiZKq0duYpUJVhPmx7TtPrpLvF2DWE2hh /B96gXyfD4g5UdFVpuFjuHty5dvW3oH2NBSOY1JHarOL00MAjW7n0XKsrvWJCMhH4uL/ 3KIskYQoZU/uBFriF/LMZTPHcLCPwPfOgEYiFM+RKSTNLnDG2BMOZ3cuhN81jWdAGlDp Ok/7cqGN4KSBgBZdlKhO3xiyYJ6fIGcu6U0cNxxi6Cwwy/DJsPUCPxlNWF+ddaFJzxqD qxE2J4oR5j7CrRL4V7WAcVLmxOgVflg0zNs6VpFiq9Imou/Gin3s09DlPiM/+zjKeSxW s1Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@libero.it header.s=s2021 header.b="XlBgs/Db"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=libero.it Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si9793308ejr.614.2021.02.28.02.38.33; Sun, 28 Feb 2021 02:39:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@libero.it header.s=s2021 header.b="XlBgs/Db"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=libero.it Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbhB1KgP (ORCPT + 99 others); Sun, 28 Feb 2021 05:36:15 -0500 Received: from smtp-16-i2.italiaonline.it ([213.209.12.16]:37843 "EHLO libero.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230019AbhB1KgN (ORCPT ); Sun, 28 Feb 2021 05:36:13 -0500 Received: from oxapps-31-138.iol.local ([10.101.8.184]) by smtp-16.iol.local with ESMTPA id GJQBlDtyRf2ANGJQBlYPxt; Sun, 28 Feb 2021 11:35:31 +0100 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1614508531; bh=NULIkYeOU4BLtqTrd/JisnRnJK17Ka3rz6+/RjLJu1E=; h=From; b=XlBgs/DbEu+yzqG7MVn3XEM4GofJHYbTXAgLceb//gy1GwfHBKuKKbUE58SWk0z4g lgjc7zXBtJJ8MstLKi40unP3EalXxoggRq3rlyPhL6jHckX50Z0Dpqb+43Z+rTOsDK +xm18/IcqZrAO8EV5ChZ1raALiWYwHg+qaZlHqedwqhPKWZeMNQFBYzhTldAWaM3O4 abHsT3f4VQchjCRm+9DG5+DJF2gycde1NHbPQE47gVDMxS9AvLbLx14GJpJS/tGdlY wm9QSbxvWOmCyHJfQcN4Z4BAV4vu75PJjLzlz3Ks4gOJpJqWf+7xr46YmKEJV2S3eb 72QDH/xsyXKRw== X-CNFS-Analysis: v=2.4 cv=Adt0o1bG c=1 sm=1 tr=0 ts=603b71f3 cx=a_exe a=SkAuTGSu9wVn7tcq8ZjrZA==:117 a=UPWQtH3J-JgA:10 a=IkcTkHD0fZMA:10 a=_gZzKa99_6AA:10 a=bGNZPXyTAAAA:8 a=bAF_0_vCazFOC95qmekA:9 a=QEXdDO2ut3YA:10 a=yL4RfsBhuEsimFDS2qtJ:22 Date: Sun, 28 Feb 2021 11:35:31 +0100 (CET) From: Dario Binacchi To: Marc Kleine-Budde Cc: linux-kernel@vger.kernel.org, Alexander Stein , Federico Vaga , "David S. Miller" , Jakub Kicinski , Oliver Hartkopp , Vincent Mailhol , Wolfgang Grandegger , YueHaibing , Zhang Qilong , linux-can@vger.kernel.org, netdev@vger.kernel.org Message-ID: <942251933.544595.1614508531322@mail1.libero.it> In-Reply-To: <20210226084456.l2oztlesjzl6t2nm@pengutronix.de> References: <20210225215155.30509-1-dariobin@libero.it> <20210225215155.30509-4-dariobin@libero.it> <20210226084456.l2oztlesjzl6t2nm@pengutronix.de> Subject: Re: [PATCH v2 3/6] can: c_can: fix control interface used by c_can_do_tx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.3-Rev27 X-Originating-IP: 87.20.116.197 X-Originating-Client: open-xchange-appsuite x-libjamsun: +PaVVzVYPsxtI6fuW52eUtkgvkZv4krf x-libjamv: tKu69u0FWKo= X-CMAE-Envelope: MS4xfCq2BupWIOcmOjxc/q9eTplgcRRy+xMPwEufQ0d542+HiWMee4f6K6biashIngg0bOfcMPHzRUfKLFwFeY3rbjHVdgfs7V4B4LvJKZXzv5GiZXez9OBj CDsIlK8WGY69XyPLJd2OYH4ADNiQuXrj+D1nFuHxwH2kw40qLohHw5KlSGQBwpfcgjaCHnFDcGuwYEC7KYuktnlwzrZFH0M4SZFoESdxRj/azWE278ZRheAd G3VvKFKN/f+4ZcGHJhmDcgZC9v0FNmT9iFjQzO6D0RPOHFzMpEVHEuOiv0ZOfqRNCNHr7wzgiksfUAt0vI6WW9+7Tj/thWqKX+v0yd4sJTl0N6P9Dm2Dqmpk c66A4L8T9Uo+A4OMJ5ONbBliZxn4xwq2d8cDns5VqHpH94MkWAQ7i9tMdsL5hUp8Ty8V5PR9dQ7kD4jtgsXRTcvgAHPsD6PIs07cF60yPmLciG3DvXm+i46U nMZhmqcq+F+OlT4xhIkyus+pupVGCGGWU+84uyXAJ91M8CltI8bY7EOwJEWAvQtF1/mKBJrTjcujPvufyfOA30YdSjWZNaC8w6vaZ3OjPDx8vKnWn3JadZhZ YFHV0okst8+psoY7v9ieO2Ef3m6B+gfzk4atRkwpm3qRPg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, > Il 26/02/2021 09:44 Marc Kleine-Budde ha scritto: > > > On 25.02.2021 22:51:52, 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). > > Is this a fix? > I think that If I consider what is described in the 640916db2bf7 commit, using the IF_RX interface in a tx routine is wrong. Thanks and regards Dario > Marc > > > > > Signed-off-by: Dario Binacchi > > --- > > > > (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); > > can_get_echo_skb(dev, idx, NULL); > > bytes += priv->dlc[idx]; > > pkts++; > > -- > > 2.17.1 > > > > > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Embedded Linux | https://www.pengutronix.de | > Vertretung West/Dortmund | Phone: +49-231-2826-924 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |