From owner-freebsd-current Thu Dec 19 5:12:28 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C43437B401; Thu, 19 Dec 2002 05:12:26 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id F335C43E4A; Thu, 19 Dec 2002 05:12:24 -0800 (PST) (envelope-from ticso@cicely8.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.5/8.12.5) with ESMTP id gBJDCFqd088338 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 19 Dec 2002 14:12:17 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.1.10]) by cicely5.cicely.de (8.12.6/8.12.6) with ESMTP id gBJDCEfQ097327 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 19 Dec 2002 14:12:14 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (localhost [127.0.0.1]) by cicely8.cicely.de (8.12.6/8.12.6) with ESMTP id gBJDCDgV048167; Thu, 19 Dec 2002 14:12:13 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.12.6/8.12.6/Submit) id gBJDCCqd048166; Thu, 19 Dec 2002 14:12:12 +0100 (CET) Date: Thu, 19 Dec 2002 14:12:12 +0100 From: Bernd Walter To: Matthew Dillon Cc: Bernd Walter , "Brian F. Feldman" , Josef Karthauser , freebsd-current@FreeBSD.ORG Subject: Re: UMASS USB bug? (getting the Sony disk-on-key device working). Message-ID: <20021219131211.GA29286@cicely8.cicely.de> Reply-To: ticso@cicely.de References: <200212191032.gBJAWNj0039522@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200212191032.gBJAWNj0039522@apollo.backplane.com> X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Dec 19, 2002 at 02:32:23AM -0800, Matthew Dillon wrote: > It took a hellofalong time pulling my hair out trying to figure out > why the Sony disk-on-key I just bought didn't work. > > First I added a Quirk entry for the standard 6-byte problem, but it > didn't solve the problem. > > Finally, after slogging through an insane amount of debugging (I mean, > it really generates a lot of debugging if you turn it all on!) I came > up with the following patch. It appears that when an error occurs > and the umass device tries to read the sense data that it fails > comparing: > > sc->transfer_datalen - sc->transfer_actlen != UGETDW(sc->csw.dCSWDataResidue). > > As far as I can sc->transfer_actlen is NEVER updated. It is always 0, so > I don't quite see how the calculation could ever possibly be correct > if DataResidue is what I think it is (a count-down of the number of > unused bytes after a transfer). I can't comment on this yet. > Note that my other UMASS device, a compact flash reader, has always > worked fine with just the Quirk entry. I really need a USB expert to > tell me what is going on :-) The problem is that an umass bulk only umass device is allowed to stall the comunication pipe on an invalid command. I got the impression that the umass driver doesn't clear the pipe on errors. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message