Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp738323pxb; Thu, 25 Feb 2021 13:55:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1z3mMeCF6DBdjdSwHdSO/9kZCOlpLHdY6W5W5ZJuDn2ch7p5YK6R4uRR2WP9CPV7cqhNL X-Received: by 2002:a17:906:f19a:: with SMTP id gs26mr4733559ejb.545.1614290145068; Thu, 25 Feb 2021 13:55:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614290145; cv=none; d=google.com; s=arc-20160816; b=taBnKG58WCCjxLBeRYq+lDcx07ITZZIPcKFzNbo8RQqsCnHRRSZ4BiJHLLr1DriWxF smNbkW+jUC45JUkrSGi2/7qQg9HuhYAci6Kkym2/Ib8eEE7j9HziaGDPdlHDqqVBqCII u6DqNR0/QkUcKu6JBSQYd82tcUSlm4GHu2QQTjJWkPZEJuPWLyErxpGYcuIITeGGZCzy hLhvg4cyT/BspZmeipwguCeXWfJaqdZ5k+jPkeiAnUxHPZakdcohxwAzsPtEwfRCJ8/i h4TK4/2La4GrOWWQTzkrnFqNTaxwOxAesHiCV2p4ttk1cB5fW/PTGZA1wPUO5d46nXwB BqfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=twkxEz/c7cqZmimIxIW4zZBadfOthraWlBWEAgYQSfY=; b=uheKjklaD4xqgep5Sr84cwteDVNXcc9QxsbBUo2LhlGF+X7YlAqhuYvso4bZ22YdPy xZmnfYTBHneiHY28xWE2U/CPrkXTTdZxxu32zIx56tpCxDsSkGhZ05DjXvtD/i3e7r1S dpMV5l2vCdq85J11SIf8keNOaEOmtlCZBtuYbB9se3x/dbrimHbLpAATOUQdr64H/rPy 9L2KD3nkEBBMwxdBnRj1bdLkpvgqdDKXmMzoCkBkChalCLPhwPAifq46UrNmZtRavexR ugRYIP/p/+lGmgN64J34yT4+cLjITwqpRMv3bHQuD1ERAlSyGFD+pEOaOId79tFr+m8Z Bt2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@libero.it header.s=s2021 header.b=FsLQauvK; 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 w12si4269882edr.505.2021.02.25.13.55.22; Thu, 25 Feb 2021 13:55:45 -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=FsLQauvK; 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 S234592AbhBYVyN (ORCPT + 99 others); Thu, 25 Feb 2021 16:54:13 -0500 Received: from smtp-17.italiaonline.it ([213.209.10.17]:39071 "EHLO libero.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234634AbhBYVxJ (ORCPT ); Thu, 25 Feb 2021 16:53:09 -0500 Received: from passgat-Modern-14-A10M.homenet.telecomitalia.it ([87.20.116.197]) by smtp-17.iol.local with ESMTPA id FOYQlNUJ2lChfFOYTlkbf6; Thu, 25 Feb 2021 22:52:19 +0100 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1614289939; bh=twkxEz/c7cqZmimIxIW4zZBadfOthraWlBWEAgYQSfY=; h=From; b=FsLQauvKGw29rGVjIxmark8otPN+g2A3pMGhaJgGQVNwB77cc3qEsZs0EO/xHC8Qw DTnczn1+xkZHqaS6lhDJvSn4zaBNGH3WJC1viV+KlQ/sJkPDzVwoD5T9SvxJz+JTye Ar84b3XFUd0VoXzFic/AtAPTPqMKBxve1sf32lAXyPNjODmfiopq3s+k7N4Og64tpW Uj9wKVFtGhuGWmqpDCP5aZLPLSBavrWvKKstvGv3BKPzNYsa9uLFYnTh1MjKeEG0z1 uMRtfkU/zObUzOF4GoCHYXkqaJ+bDyLZENEaLs4cUWkDpUVSrbtmc6Qqt+4hSNB1Fm +S0VN7TTmz56w== X-CNFS-Analysis: v=2.4 cv=S6McfKgP c=1 sm=1 tr=0 ts=60381c13 cx=a_exe a=AVqmXbCQpuNSdJmApS5GbQ==:117 a=AVqmXbCQpuNSdJmApS5GbQ==:17 a=gu6fZOg2AAAA:8 a=_nVJ0L4g9Xc5rHmjS8IA:9 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=2RSlZUUhi9gRBrsHwhhZ:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Alexander Stein , Federico Vaga , Dario Binacchi , "David S. Miller" , Jakub Kicinski , Marc Kleine-Budde , Oliver Hartkopp , Vincent Mailhol , Wolfgang Grandegger , YueHaibing , Zhang Qilong , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 0/6] can: c_can: add support to 64 message objects Date: Thu, 25 Feb 2021 22:51:49 +0100 Message-Id: <20210225215155.30509-1-dariobin@libero.it> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4xfN0e8pKNwQDTelLjuTfm8BEU4wdA+HYwT1FZjd6i9f9cOrhyJuJZkw5PvVHe32vfSrPOfQU8ge3SFuXa/qRuz/xDEKR3csTwOImj7lO+0Sjokr9+iuEm bNfE6du0EuZ3lNtD6zc+wBmaLnPQsH4/Vkl7zNkSjlRBlulgRwJzjOJo3xWbQ6GWVRGHS67R8/r2ypeoIdIex7zQ0RwkqOxN3xFm4lycfZbmZznYseIvDEys 8yeuMu0arMIHPDtnIP6yVCIXr2FuwGe/bMPsf2v8Yww7D6kVV2eWFMPz8Xg1sDf/+d45kEiwHK4EjzL9216R43m32+rhI5fhJe3OnSa96NupjcKEH58EGg09 nZo2/lmHRreVGLrbplmqVCapH8vbcEtfGqkkt5y908/RlIwfNW+10B8bNoa2glEBYjpx8F7wiCxWkwg0K5nCzklgYw56/CHHeCR7sdLrLlNqg5ZjjuRK3lNI REMdxYn172dcDv7P0ldi26n6BORcTu9emKNd0gWchJuW5fw8KN5AEYXFHcMvEPN2X78Nxb7lZ7rahPYOfoB9feRdLzB98MQU/Zn3Ao5esWQs9E69BUm2NrrD xEQzM/Qb8OYxCLKrCo+ckOZnfm+4F81sYjKQaPZXLCpqYMNd9N0loGKs/lX1KYmd2volJl0iUrzfDIBd2sA0UlmZw9MEgkE+SU07ZvTV4H7GBQ== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The D_CAN controller supports up to 128 messages. Until now the driver only managed 32 messages although Sitara processors and DRA7 SOC can handle 64. The series was tested on a beaglebone board. Note: I have not changed the type of tx_field (belonging to the c_can_priv structure) to atomic64_t because I think the atomic_t type has size of at least 32 bits on x86 and arm, which is enough to handle 64 messages. http://marc.info/?l=linux-can&m=139746476821294&w=2 reports the results of tests performed just on x86 and arm architectures. Changes in v2: - Fix compiling error reported by kernel test robot. - Add Reported-by tag. - Pass larger size to alloc_candev() routine to avoid an additional memory allocation/deallocation. - Add message objects number to PCI driver data. Dario Binacchi (6): can: c_can: remove unused code can: c_can: fix indentation can: c_can: fix control interface used by c_can_do_tx can: c_can: use 32-bit write to set arbitration register can: c_can: prepare to up the message objects number can: c_can: add support to 64 message objects drivers/net/can/c_can/c_can.c | 77 +++++++++++++++----------- drivers/net/can/c_can/c_can.h | 32 +++++------ drivers/net/can/c_can/c_can_pci.c | 6 +- drivers/net/can/c_can/c_can_platform.c | 6 +- 4 files changed, 68 insertions(+), 53 deletions(-) -- 2.17.1