linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "Stefan Mätje" <Stefan.Maetje@esd.eu>
Cc: linux-can@vger.kernel.org,
	Wolfgang Grandegger <wg@grandegger.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] can: esd: add support for esd GmbH PCIe/402 CAN interface family
Date: Thu, 29 Jul 2021 09:16:50 +0200	[thread overview]
Message-ID: <20210729071650.77e274e4zobv5uwo@pengutronix.de> (raw)
In-Reply-To: <20210728203647.15240-2-Stefan.Maetje@esd.eu>

[-- Attachment #1: Type: text/plain, Size: 3284 bytes --]

On 28.07.2021 22:36:47, Stefan Mätje wrote:
> This patch adds support for the PCI based PCIe/402 CAN interface family
> from esd GmbH that is available with various form factors
> (https://esd.eu/en/products/402-series-can-interfaces).
> 
> All boards utilize a FPGA based CAN controller solution developed
> by esd (esdACC). For more information on the esdACC see
> https://esd.eu/en/products/esdacc.

Thanks for the patch!

> This driver detects all available CAN interface boards but atm.
> operates the CAN-FD capable devices in Classic-CAN mode only!

Are you planing to change this?

> Signed-off-by: Stefan Mätje <Stefan.Maetje@esd.eu>

For now just some nitpicks:

Compilation throws this error message on 32 bit ARM:

| drivers/net/can/esd/esd402_pci.c: In function ‘pci402_init_dma’:                                                                                                                                                              
| drivers/net/can/esd/esd402_pci.c:304:32: warning: right shift count >= width of type [-Wshift-count-overflow]                                                                                                                 
|   304 |  iowrite32((u32)(card->dma_hnd >> 32),                                                                                                                                                                                                                  
|       |                                ^~                                                                                                                                                                                                                       
|   CHECK   /srv/work/frogger/socketcan/linux/drivers/net/can/esd/esd402_pci.c                                                                                                                                                                                    
| drivers/net/can/esd/esd402_pci.c:304:42: warning: shift too big (32) for type unsigned int                            

[...]

> diff --git a/drivers/net/can/esd/Makefile b/drivers/net/can/esd/Makefile
> new file mode 100644
> index 000000000000..a960e8b97c6f
> --- /dev/null
> +++ b/drivers/net/can/esd/Makefile
> @@ -0,0 +1,11 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +#
> +#  Makefile for esd gmbh ESDACC controller driver
> +#
> +esd_402_pci-y := esdacc.o esd402_pci.o
> +
> +ifeq ($(CONFIG_CAN_ESD_402_PCI),)
> +obj-m += esd_402_pci.o
> +else
> +obj-$(CONFIG_CAN_ESD_402_PCI) += esd_402_pci.o
> +endif

Why do you build the driver, if it has not been enabled?

The straight forward way to build the driver would be:

| obj-$(CONFIG_CAN_ESD_402_PCI) += esd_402_pci.o
|
| esd_402_pci-objs := esdacc.o esd402_pci.o

You can rename the esd_402_pci.c to esd_402_pci-core.c to avoid
inconsistent naming, (C file is called esd402_pci.c, while the driver
module is esd_402_pci.ko)

Marc
-- 
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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-07-29  7:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 20:36 [PATCH 0/1] can: esd: add support for esd GmbH PCIe/402 CAN interface family Stefan Mätje
2021-07-28 20:36 ` [PATCH 1/1] " Stefan Mätje
2021-07-29  7:16   ` Marc Kleine-Budde [this message]
2021-07-29 16:10     ` Stefan Mätje
2021-07-30  6:33   ` kernel test robot
2021-08-06 15:03     ` Stefan Mätje

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210729071650.77e274e4zobv5uwo@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Stefan.Maetje@esd.eu \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).