From owner-freebsd-usb@FreeBSD.ORG Tue Nov 1 21:48:20 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 3C1AB106564A; Tue, 1 Nov 2011 21:48:20 +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 3ADBB8FC0C; Tue, 1 Nov 2011 21:48:19 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 199247240; Tue, 01 Nov 2011 22:48:16 +0100 From: Hans Petter Selasky To: Pawel Jakub Dawidek Date: Tue, 1 Nov 2011 22:45:17 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <4EA9127E.80504@entel.upc.edu> <201110302115.40450.hselasky@c2i.net> <20111101121533.GA4567@garage.freebsd.pl> In-Reply-To: <20111101121533.GA4567@garage.freebsd.pl> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111012245.17173.hselasky@c2i.net> 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: Tue, 01 Nov 2011 21:48:20 -0000 On Tuesday 01 November 2011 13:15:33 Pawel Jakub Dawidek wrote: > On Sun, Oct 30, 2011 at 09:15:40PM +0100, Hans Petter Selasky wrote: > > On Saturday 29 October 2011 20:38:07 Pawel Jakub Dawidek wrote: > > > > + err = usbd_do_request(udev, NULL, &req, &buf); > > > > + if (err) > > > > + buf = 0; > > > > + > > > > + return (buf); > > > > +} > > > > > > You could drop 'err' variable and just check function return directly. > > > There is only one extra empty line at the begining of the function. > > > > No, because there is &buf. > > How about: > > if (usbd_do_request(udev, NULL, &req, &buf) != 0) > buf = 0; > > return (buf); > > > I'll add your device to the device quirk list. > > Ok. How come did it work in the past? I don't think that my device was > removed from the quirk list by accident? May other, similar devices not > work as well with the current code? The old code did not try the synchronize command, so as long as you use msdosfs nothing will show up broken. If you format your memory stick with ZFS, then it will throw out warnings. --HPS