From owner-freebsd-usb@FreeBSD.ORG Wed Jun 27 15:33:50 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5E3A106566B for ; Wed, 27 Jun 2012 15:33:50 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3CAA88FC0C for ; Wed, 27 Jun 2012 15:33:50 +0000 (UTC) Received: by bkvi18 with SMTP id i18so1282762bkv.13 for ; Wed, 27 Jun 2012 08:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6HEL1zW/Ssp8PypsnnROennwz7vuryDNis6+dd4GooM=; b=A2JdxV8ovzi006boVpdhVfPnymGpWPOrsdv7kg+ScjcQtPksUL/yybhb5dlBT6csjK tfRQRkus1dlFyoy0bd1utTApx/Y1f064jscAxnEM0mJHWulnIL2f5xlZCbjxzCzSsNAY 5Ehnys1i87QWIj6kLAhF+NuSuw+JMl3Dvk2pr3FlipnIROiseGEv2FYsRHCOojHx3ofp KoDl/k6OUywYG6VMSarX7Sa4ruosAwvX8419w0/s5VFg8cExvQfGVZuKxX2xRUS5IRWi YUkPkWXdPrmuE6St0FKS81OKQjNsg9kkWXrV+YnQwNnU82a1S+22sJgxiz59vvH5pXkj A4Kw== Received: by 10.204.143.138 with SMTP id v10mr7480282bku.40.1340811229293; Wed, 27 Jun 2012 08:33:49 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id ig1sm55465728bkc.4.2012.06.27.08.33.47 (version=SSLv3 cipher=OTHER); Wed, 27 Jun 2012 08:33:48 -0700 (PDT) Sender: Alexander Motin Message-ID: <4FEB27D9.9030408@FreeBSD.org> Date: Wed, 27 Jun 2012 18:33:45 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Hans Petter Selasky References: <4FE9AB28.3070704@passap.ru> <201206271717.02962.hselasky@c2i.net> <4FEB269E.6000508@FreeBSD.org> <201206271731.08298.hselasky@c2i.net> In-Reply-To: <201206271731.08298.hselasky@c2i.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 27 Jun 2012 15:33:50 -0000 On 06/27/12 18:31, Hans Petter Selasky wrote: > On Wednesday 27 June 2012 17:28:30 Alexander Motin wrote: >> On 06/27/12 18:17, Hans Petter Selasky wrote: >>> On Wednesday 27 June 2012 17:08:29 Alexander Motin wrote: >>>> umass problem >>> >>> Hi, >>> >>> Are you verifying the received data length for the SCSI commands reading >>> out various data? >> >> Mentioned revision beyond others adds check for the sense data length in >> case of error. It won't even look into the sense data if reported amount >> (sense_len - sense_resid) is zero or less then needed. I have no idea >> how USB calculates resid, but it may be a problem in this case. I think >> it could be useful to get USB packets trace to see whether it is device >> doesn't return any sense data, or umass improperly interprets them in >> this case for some reason. > > Hi, > > The residue is part of the 13 status bytes in the SCSI BOT protocol. If this > field is zero, the umass driver will compute the residue from the actual data > transferred as a workaround. Can't there be an opposite bug -- residue field is equal to the transfer size in which case CAM will think there is no sense data? -- Alexander Motin