Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755187AbYHDQsY (ORCPT ); Mon, 4 Aug 2008 12:48:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757930AbYHDQsN (ORCPT ); Mon, 4 Aug 2008 12:48:13 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:52052 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757276AbYHDQsL (ORCPT ); Mon, 4 Aug 2008 12:48:11 -0400 Date: Mon, 4 Aug 2008 12:48:09 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Alex Buell cc: linux-kernel@vger.kernel.org, Robert Hancock , Tomas Styblo , , Subject: Re: [PATCH] JMicron JM20337 USB-SATA data corruption bugfix - device 152d:2338 In-Reply-To: <20080803100706.5e52ce90.alex.buell@munted.org.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1322 Lines: 34 On Sun, 3 Aug 2008, Alex Buell wrote: > > Which patch? Several different ones have been posted. > > This is the one that I applied: > Index: usb-2.6/drivers/usb/storage/transport.c > =================================================================== > --- usb-2.6.orig/drivers/usb/storage/transport.c > +++ usb-2.6/drivers/usb/storage/transport.c > @@ -663,7 +663,7 @@ void usb_stor_invoke_transport(struct sc > } > > /* Did we transfer less than the minimum amount required? */ > - if (srb->result == SAM_STAT_GOOD && > + if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) && scsi_bufflen(srb) - scsi_get_resid(srb) < srb->underflow) > srb->result = (DID_ERROR << 16) | (SUGGEST_RETRY << 24); > > > The log doesn't provide much help. We need to see a log with > > CONFIG_USB_STORAGE_DEBUG enabled. > > Which patch should I be trying out? That's the right patch. You should use it with 2.6.27-rc1. I just got one of those JMicron thingies; I'll try it out later today. No SATA devices available for testing, though, only PATA. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/