Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2005 10:45:29 -0800
From:      Matt Reimer <mattjreimer@gmail.com>
To:        freebsd-usb@freebsd.org
Subject:   PATCH: NO_GETMAXLUN quirk was ignored
Message-ID:  <f383264b0511231045o65d17816gcacbb41f44083183@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I noticed that several devices define NO_GETMAXLUN quirks but this quirk is
never consulted by the umass driver. The following patch seems to work. Is
what was really intended?

Matt

--- umass.c     Wed Nov 23 10:43:00 2005
+++ umass.c.new Wed Nov 23 10:00:51 2005
@@ -1094,7 +1094,8 @@ USB_ATTACH(umass)

        /* Get the maximum LUN supported by the device.
         */
-       if ((sc->proto & UMASS_PROTO_WIRE) =3D=3D UMASS_PROTO_BBB)
+       if (((sc->proto & UMASS_PROTO_WIRE) =3D=3D UMASS_PROTO_BBB) &&
+           !(sc->quirks & NO_GETMAXLUN))
                sc->maxlun =3D umass_bbb_get_max_lun(sc);
        else
                sc->maxlun =3D 0;



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