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]
Message-ID: <ZAso695fdT3ngjqf@sirena.org.uk>
Date:   Fri, 10 Mar 2023 12:56:11 +0000
From:   Mark Brown <broonie@...nel.org>
To:     zhuyinbo <zhuyinbo@...ngson.cn>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jianmin Lv <lvjianmin@...ngson.cn>,
        wanghongliang@...ngson.cn, Liu Peibao <liupeibao@...ngson.cn>,
        loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v1 2/2] spi: loongson: add bus driver for the loongson
 spi controller

On Fri, Mar 10, 2023 at 06:01:23PM +0800, zhuyinbo wrote:
> 在 2023/3/8 下午11:03, Mark Brown 写道:
> > On Wed, Mar 08, 2023 at 10:59:08AM +0800, Yinbo Zhu wrote:

> > > +	hz  = t ? t->speed_hz : spi->max_speed_hz;

> > Please write normal conditional statements so that things are legible,
> > though in this case the core will ensure that there's a speed_hz in
> > every transfer so there's no need for any of the logic around ensuring
> > it's set.

> Do you mean to achieve the following ?  and drop spi->max_speed_hz.

> if (t)
> 
>       hz = t->speed_hz;

Yes.

> > > +	loongson_spi_update_state(loongson_spi, spi, NULL);
> > > +	loongson_spi_set_cs(loongson_spi, spi, 1);

> > Note that setup() needs to be able to run for one device while there are
> > transfers for other devices on the same controller active.

> okay, I will add a spin_lock for it.

We also need to take care not to change the hardware
configuration for the currently running transfer (can't
remember if that's an issue here or not, but it's a common
one).

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ