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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200811222059.59806.david-b@pacbell.net>
Date:	Sat, 22 Nov 2008 20:59:59 -0800
From:	David Brownell <david-b@...bell.net>
To:	Daniel Ribeiro <drwyrm@...il.com>
Cc:	Stefan Schmidt <stefan@...enfreihafen.org>,
	spi-devel-general@...ts.sourceforge.net,
	Stefan Schmidt <stefan@...nmoko.org>, eric.y.miao@...il.com,
	linux-kernel@...r.kernel.org, sameo@...nedhand.com,
	linux-arm-kernel@...ts.arm.linux.org.uk
Subject: Re: [spi-devel-general] [patch 05/14] mfd: PCAP2 driver

On Saturday 22 November 2008, Daniel Ribeiro wrote:
> >  - You should make ezx_pcap_write() and ezx_pcap_read() switch
> >    over to spi_write_then_read(), to ensure it's never doing
> >    DMA to/from the stack.  I see a byte-order dependency too...
> 
> I tried spi_write_then_read before, but it didn't work. I supposed it
> was because it was doing 2 transfers as the second transfer rx_buf
> always came zeroed.

You may have been using it wrong.  Also, verify against
current kernels ... there have been bugfixes to pxa2xx_spi.


> I see that commit 
> f9b90e39cbc5c4d6ef60022fd1f25d541df0aad1 changed it to do a single
> transfer, so i will try it again.

Unless it needs the full duplex capability of SPI, then
you should be able to make write_then_read work ... on
the other hand, if you do need full duplex, then you
should address the DMA.  (And byteswapping, either way.)


> >  - If you're going to mark the probe() as __devinit, then mark
> >    the remove() as __devexit and use __devexit_p() in the driver
> >    struct.
> 
> Ok. Shouldn't i use __init instead?

I wouldn't.  There are ways that the probe() could be called
more than once -- e.g. after rebinding either of the relevant
SPI drivers through sysfs, or after rmmod/modprobe of the SPI
master controller driver -- and using an __init annotation
would make that point to memory that's unlikely to still hold
that code.

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