From owner-freebsd-usb@FreeBSD.ORG Fri Oct 28 05:27:33 2011 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 1EC1C106564A for ; Fri, 28 Oct 2011 05:27:33 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from violet.upc.es (violet.upc.es [147.83.2.51]) by mx1.freebsd.org (Postfix) with ESMTP id 9BD268FC17 for ; Fri, 28 Oct 2011 05:27:32 +0000 (UTC) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by violet.upc.es (8.14.1/8.13.1) with ESMTP id p9S5RPl1026829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 28 Oct 2011 07:27:25 +0200 Received: from portgus.lan ([147.83.40.234]) (authenticated bits=0) by ackerman2.upc.es (8.14.4/8.14.4) with ESMTP id p9S5RMIt020401 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 28 Oct 2011 07:27:25 +0200 Message-ID: <4EAA3D37.4060909@entel.upc.edu> Date: Fri, 28 Oct 2011 07:27:19 +0200 From: =?ISO-8859-15?Q?Gustau_P=E9rez?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111018 Thunderbird/7.0.1 MIME-Version: 1.0 To: Hans Petter Selasky References: <4EA9127E.80504@entel.upc.edu> <201110272028.40342.hselasky@c2i.net> In-Reply-To: <201110272028.40342.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.70 on 147.83.2.244 X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (violet.upc.es [147.83.2.51]); Fri, 28 Oct 2011 07:27:25 +0200 (CEST) Cc: freebsd-usb@freebsd.org Subject: Re: Quirk for a USB mass storage device 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: Fri, 28 Oct 2011 05:27:33 -0000 Al 27/10/2011 20:28, En/na Hans Petter Selasky ha escrit: > On Thursday 27 October 2011 10:12:46 Gustau Pérez wrote: >> Hi, >> >> I'm running FreeBSD 10.0 r226042 on AMD64 and I'm having problems >> with the following device: >> >> umass0: > addr 7> on usbus0 >> umass0: SCSI over Bulk-Only; quirks = 0x4001 >> umass0: Get Max Lun not supported (USB_ERR_TIMEOUT) >> umass0:5:0:-1: Attached to scbus5 >> >> as you can see, UQ_MSC_NO_GETMAXLUN should be set to use the device. >> As it is a 64Gb mass storage I would like to use it. >> >> I tried to manually add the quirk and it worked. Later on I tried >> with 9.0Beta2/i386 on the same machine and the problem also appeared. So >> I made a patch (which works on CURRENT, did not try with STABLE) to add >> the quirk, which is attached. >> >> Hans: is it necessary to fill a PR with the patch or would it be >> enough with the inline patch? > Hi Gustau, > > Does this device work at all without this patch? > > I was thinking to auto detect this behaviour instead. > > --HPS It did not work without the quirk. The corresponding /dev/daX device never appeared. After manually setting the quirk I could use it by unplugging and re-plugging the device. I see a few number of devices using this quirk. However many of them use other quirks too. So auto detecting this behavior would be good for those pseudo-scsi devices having only problems with LUN detection. Please let me know if you want me to test any patch or you want me to check any code. Gus