From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Siewior Subject: Re: [PATCH] spi: fix the read path in spidev Date: Wed, 02 Jul 2008 09:02:05 +0200 Message-ID: <486B27ED.3000008@linutronix.de> References: <20080701154504.GA26219@www.tglx.de> <200807011959.50695.david-b@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Andrew Morton To: David Brownell Return-path: In-Reply-To: <200807011959.50695.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org David Brownell wrote: > On Tuesday 01 July 2008, Sebastian Siewior wrote: >> This got broken by the recent "fix rmmod $spi_driver while spidev-user is active". >> I tested the rmmod & write path but didn't check the read path. I am sorry. >> The read logic changed and spidev_sync_read() + spidev_sync_write() do not return >> zero on success anymore but the number of bytes that has been transfered over the >> bus. >> This patch changes the logic and copy_to_user() gets called again. > > Good catch ... did you observe this failure happening "in the wild" > or was this a code-inspection kind of thing? > "in the wild". I've been testing HW testing after I rebased to -rc8 and somehow I got no error but the receive buffer was empty.... Sebastian ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08