From owner-freebsd-usb@FreeBSD.ORG Thu Jun 28 06:56:26 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0AB5106566B; Thu, 28 Jun 2012 06:56:26 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 260008FC12; Thu, 28 Jun 2012 06:56:25 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 292314908; Thu, 28 Jun 2012 08:56:18 +0200 From: Hans Petter Selasky To: Alexander Motin Date: Thu, 28 Jun 2012 08:56:03 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: <4FE9AB28.3070704@passap.ru> <201206272208.05877.hselasky@c2i.net> <4FEB77C3.2040803@FreeBSD.org> In-Reply-To: <4FEB77C3.2040803@FreeBSD.org> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <201206280856.03751.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: [usb] Kingston 8Gb is not usable X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2012 06:56:26 -0000 On Wednesday 27 June 2012 23:14:43 Alexander Motin wrote: > On 27.06.2012 23:08, Hans Petter Selasky wrote: > > On Wednesday 27 June 2012 19:51:15 Alexander Motin wrote: > >> On 06/27/12 19:26, Hans Petter Selasky wrote: > >>> On Wednesday 27 June 2012 18:15:24 Hans Petter Selasky wrote: > >>>> ERR=STALLED > >>> > >>> Retrying might not work, until sense is cleared, due to stalled error. > >>> > >>> MAV: Maybe that failed prevent-allow medium removal left a sense error > >>> that needs to be cleared. > >> > >> It should be cleared by fetching sense command. As I was assured by > >> several people, it is SIM (controller driver, umass) obligation to fetch > >> sense and respectively clear it when error detected. But not sure what > >> should umass do if this device STALLs. May be should try to do it also. > >> So far I haven't see any properly fetched sense from it in provided > >> logs. > > > > Are you sure? And where should the sense output be sent? > > Sense output should be (and are now for working devices) sent within > reply on the original command returning with the CHECK CONDITION SCSI > status. In addition to general status fields there are space for sense > data in struct scsiio: sense_data, sense_len and sense_resid fields. Hi, I see. UMASS already does the sense like you explain on errors, except if the BULK endpoint is STALL'ed on a READ data. Anyway, I see that the next SCSI command in the queue completes. And also that the previous one was successful. So there should be no sense data to fetch. Even if UMASS gets the sense information, will the upper layers, in this case CAM layer, retry the CAPACITY command, which seems required to workaround a bug the stick's firmware? --HPS