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: <20150522153157.GA12285@deathray>
Date:	Fri, 22 May 2015 10:31:57 -0500
From:	Michael Welling <mwelling@...e.org>
To:	Mark Brown <broonie@...nel.org>
Cc:	linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-next@...r.kernel.org, linux-spi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: omap2-mcspi: Fix native cs with new set_cs

On Fri, May 22, 2015 at 01:25:44PM +0100, Mark Brown wrote:
> On Thu, May 21, 2015 at 06:48:33PM -0500, Michael Welling wrote:
> 
> > So after reverting this patch I found there is a issue in that it is difficult
> > to determine when a transfer is complete to properly drive the chipselect from
> > within the transfer_one function.
> 
> Is unprepare_message() a suitable place here?  I've got a feeling the
> answer is no...
> 
> > Then I figured that we could handle the case when GPIOs are being used with
> > some conditional calls to omap2_mcspi_set_cs in the omap2_mcspi_work_one
> > function.
> > 
> > Near the beginning of the function I added:
> > 	if (gpio_is_valid(spi->cs_gpio))
> > 		omap2_mcspi_set_cs(spi, 0);
> > 
> > Near the end of the function I added:
> > 	if (gpio_is_valid(spi->cs_gpio))
> > 		omap2_mcspi_set_cs(spi, 1);
> > 
> > This makes GPIO chip select support work while leaving the native working
> > as previous.
> > 
> > Is this solution acceptible?
> 
> I think that's probably OK as well, it's not ideal though (and risky if
> the chip select is routed somewhere...).  
> 
> > In the process of reviewing the changes I found a few other things that
> > should be changed as well.
> 
> Please send fixes for these as separate patches (ideally without any
> dependency on your new work so we can send them to Linus as fixes).
>

Well actually these fixes are needed as the results of the first three patches
pushed into next.

When switching from transfer_one_message to tranfer_one I did not realize that
the delay was handled in the core.

When adding the set_cs function I did not notice that the enable was
complemented by the core driver.

> > Here you will see a delay that is already handled by the core spi driver:
> > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/spi/spi-omap2-mcspi.c#n1166
> 
> I can't actually see that since I have no internet access right now!

That's like a fish out of water.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ