Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Stefan Mätje" <Stefan.Maetje@esd.eu>
To: "mkl@pengutronix.de" <mkl@pengutronix.de>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"wg@grandegger.com" <wg@grandegger.com>
Subject: Re: [PATCH 1/1] can: esd: add support for esd GmbH PCIe/402 CAN interface family
Date: Thu, 29 Jul 2021 16:10:06 +0000	[thread overview]
Message-ID: <59f2f6a6544eebc9824a72f0da52f98b4673cbe3.camel@esd.eu> (raw)
In-Reply-To: <20210729071650.77e274e4zobv5uwo@pengutronix.de>

Am Donnerstag, den 29.07.2021, 09:16 +0200 schrieb Marc Kleine-Budde:
> 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?

Yes, we will provide support for CAN-FD too. I mentioned this already in the 
cover letter. Should I mention this explicitely in the commit description too?


> 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                            

I'll change this to 

	iowrite32(0U, card->addr_pciep + PCI402_PCIEP_OF_BM_ADDR_HI);

which is enough for now because the card->dma_hnd value is limited to a 32-bit address with 
pci_set_consistent_dma_mask() atm.


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

I was not aware of that fact and it was not intended.

> 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

I will change the Makefile incorporating your recommendations.


Best regards,

Stefan Mätje
System Design

Phone: +49-511-37298-146
E-Mail: stefan.maetje@esd.eu
_______________________________________
esd electronics gmbh
Vahrenwalder Str. 207
30165 Hannover
www.esd.eu

Quality Products – Made in Germany
_______________________________________

Register Hannover HRB 51373 - VAT-ID DE 115672832
General Manager: Klaus Detering


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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 20:36 [PATCH 0/1] " Stefan Mätje
2021-07-28 20:36 ` [PATCH 1/1] " Stefan Mätje
2021-07-29  7:16   ` Marc Kleine-Budde
2021-07-29 16:10     ` Stefan Mätje [this message]
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=59f2f6a6544eebc9824a72f0da52f98b4673cbe3.camel@esd.eu \
    --to=stefan.maetje@esd.eu \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=wg@grandegger.com \
    --subject='Re: [PATCH 1/1] can: esd: add support for esd GmbH PCIe/402 CAN interface family' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox