lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 10 Apr 2019 08:13:04 +0000
From:   Flavio Suligoi <f.suligoi@...m.it>
To:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        "Robert Jarzmik" <robert.jarzmik@...e.fr>,
        Mark Brown <broonie@...nel.org>
CC:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/1] spi: pxa2xx: add driver enabling message

Hi Jarkko,

> >
> >> Hi
> >>
> >> On 4/8/19 6:22 PM, Flavio Suligoi wrote:
> >>> Add an info message for the PXA2xx device driver start-up,
> >>> with the indication of the transfer mode used (DMA or GPIO).
> >>>
> >>> This info is useful to individuate the timing when
> >>> the module starts.
> >>>
> >>> Signed-off-by: Flavio Suligoi <f.suligoi@...m.it>
> >>> ---
> >>>    drivers/spi/spi-pxa2xx.c | 3 +++
> >>>    1 file changed, 3 insertions(+)
> >>>
> >>> diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
> >>> index f7068cc..d449501 100644
> >>> --- a/drivers/spi/spi-pxa2xx.c
> >>> +++ b/drivers/spi/spi-pxa2xx.c
> >>> @@ -1826,6 +1826,9 @@ static int pxa2xx_spi_probe(struct
> platform_device
> >> *pdev)
> >>>    		goto out_error_clock_enabled;
> >>>    	}
> >>>
> >>> +	dev_info(dev, "PXA2xx SPI master controller (%s mode)\n",
> >>> +		 platform_info->enable_dma ? "DMA" : "PIO");
> >>> +
> >>>    	return status;
> >>>
> >> Would this look better if moved before devm_spi_register_controller()
> >> call?
> >
> > Ok, so in case of SPI registering failure, we have two messages, as:
> >
> > pxa2xx-spi 80860F0E:00: PXA2xx SPI master controller (DMA mode)
> > pxa2xx-spi 80860F0E:00: problem registering spi controller
> >
> > Do you think that it is more explicative?
> >
> I think yes and it should not cause confusion since the error message is
> the last one.
> 
> I was thinking the successful registration case when DMA is not
> available. First there is a warning, followed by a debug message from
> SPI core (if CONFIG_SPI_DEBUG) and then info message.
> 
> [    9.506895] pxa2xx-spi pxa2xx-spi.13: no DMA channels available,
> using PIO
> [    9.516770] pxa2xx-spi pxa2xx-spi.13: registered master spi2
> [    9.518527] pxa2xx-spi pxa2xx-spi.13: PXA2xx SPI master controller
> (PIO mode)

I have added this message because, using an x86 machine, the message:

"pxa2xx-spi pxa2xx-spi.13: registered master spi2"

doesn't appear in the kernel messages!

> Actually this info message doesn't necessarily tell will the driver end
> up using DMA for transfers. See pxa2xx_spi_can_dma() and
> pxa2xx_spi_transfer_one().
> 
> How about replacing "no DMA channels available, using PIO" and have
> instead single info message telling is the DMA available or does the
> driver use PIO only?

Ok, it's a good idea, to avoid to many similar messages.
So I can simply remove the:

"no DMA channels available, using PIO"

and leave only the new:

" pxa2xx-spi pxa2xx-spi.13: PXA2xx SPI master controller (PIO mode)"

Flavio

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ