Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Nov 2011 22:45:17 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Pawel Jakub Dawidek <pjd@freebsd.org>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: Quirk for a USB mass storage device
Message-ID:  <201111012245.17173.hselasky@c2i.net>
In-Reply-To: <20111101121533.GA4567@garage.freebsd.pl>
References:  <4EA9127E.80504@entel.upc.edu> <201110302115.40450.hselasky@c2i.net> <20111101121533.GA4567@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111012245.17173.hselasky>