Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Feb 2002 15:47:05 -0800 (PST)
From:      Mikko Tyolajarvi <mikko@dynas.se>
To:        joe@tao.org.uk
Cc:        stable@freebsd.org
Subject:   Re: USB patchset available for testing.
Message-ID:  <200202102347.g1ANl5r07417@mikko.rsa.com>
References:  <20020210204630.D16746@genius.tao.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
In local.freebsd.stable you write:

>--Qrgsu6vtpU/OV/zm
>Content-Type: text/plain; charset=us-ascii
>Content-Disposition: inline

>Dear USB users,

>I've created a patch set containing improvements from -current for
>USB controllers and devices.  I'd be very interested in feedback
>from interested parties.

>http://www.josef-k.net:/misc/RELENG_4-USB-20020210.patch.gz

[...]

I've just looked through the patch and unless I misunderstand
something, the following (from ulpt.c) removes one line too many:

   void
  -ulpt_reset(sc)
  -       struct ulpt_softc *sc;
  +ulpt_reset(struct ulpt_softc *sc)
   {
          usb_device_request_t req;
   
          DPRINTFN(1, ("ulpt_reset\n"));
  -       req.bmRequestType = UT_WRITE_CLASS_OTHER;

Don't delete this line, or the first call to usbd_do_request() will have
an uninitialized request type.

          req.bRequest = UR_SOFT_RESET;
          USETW(req.wValue, 0);
          USETW(req.wIndex, sc->sc_ifaceno);
          USETW(req.wLength, 0);
  -       (void)usbd_do_request(sc->sc_udev, &req, 0);
  +
  +       /*
  +        * There was a mistake in the USB printer 1.0 spec that gave the
  +        * request type as UT_WRITE_CLASS_OTHER; it should have been
  +        * UT_WRITE_CLASS_INTERFACE.  Many printers use the old one,
  +        * so we try both.
  +        */
  +       if (usbd_do_request(sc->sc_udev, &req, 0)) {    /* 1.0 */
  +               req.bmRequestType = UT_WRITE_CLASS_INTERFACE;
  +               (void)usbd_do_request(sc->sc_udev, &req, 0); /* 1.1 */
  +       }
  +}

Doesn't look like you made an error, though -- the line is gone in
-CURRENT too...

  $.02,
  /Mikko
-- 
 Mikko Työläjärvi_______________________________________mikko@rsasecurity.com
 RSA Security

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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