From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Vorontsov Subject: Re: [PATCH] spi: spi_mpc8xxx.c: fix potential memory corruption. Date: Thu, 13 May 2010 13:55:45 +0400 Message-ID: <20100513095545.GA11506@oksana.dev.rtsoft.ru> References: <1273679450-4185-1-git-send-email-Joakim.Tjernlund@transmode.se> <20100512162231.GA449@oksana.dev.rtsoft.ru> <20100512164321.GA5522@oksana.dev.rtsoft.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Joakim Tjernlund Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Thu, May 13, 2010 at 11:36:15AM +0200, Joakim Tjernlund wrote: [...] > The new QE mode is so broken :( > Notice how the byte order is swapped for word = 16, 32 *yawn*, it's not a news... :-) Remember QE-specific rx/tx_shift stuff? I'm sure the issue is related to how the QE SPI shift register works. I.e. SDMA just feeds the shift register, and it's shift register that is causing > 8 bits words to misbehave, or the issue is in how SDMA and shift registers connected. > Not even sure what is right to begin with :) > Can't see how one should fix this either. I guess by copying the whole buffer, shifting bytes back and forth, remapping it, doing transfer, and copying data back. I think that'll work, but no idea how efficient that will be. Also, I'd not do that for CPM hardware, I tend to believe that it's not affected. -- Anton Vorontsov email: cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org irc://irc.freenode.net/bd2 ------------------------------------------------------------------------------