usb/121052: Microsoft Notebook Optical Mouse 3000 (model 1049) doesn't work

Kai Wang kaiwang27 at gmail.com
Mon Feb 25 16:56:38 UTC 2008


On Mon, Feb 25, 2008 at 07:56:47AM -0800, Duane H. Hesser wrote:
> On Mon, 25 Feb 2008 03:24:50 +0100
> Kai Wang <kaiwang27 at gmail.com> wrote:
> 
> > 
> > +		sc->flags = UMS_Z;
> > +		sc->nbuttons = 3;
> > +		sc->sc_isize = 5;
> > +		sc->sc_iid = 17;
> > +		sc->sc_loc_x.pos = 8;
> > +		sc->sc_loc_y.pos = 16;
> > +		sc->sc_loc_z.pos = 24;
> > +		sc->sc_loc_btn[0].pos = 0;
> > +		sc->sc_loc_btn[1].pos = 1;
> > +		sc->sc_loc_btn[2].pos = 2;
> 
> The above does not appear to be quite correct, despite a report from
> oliver@ that the patch is working.
> 
> The ms3000 provides multiple input reports, and thus prepends and "ID"
> byte to each report, so the button bits will start at 8, and the x.pos
> will be at 16.

You are right. But it does not count that ID byte when you set
sc->sc_iid to a non-zero value.

excerpt from ums_intr():

	} else {
		if (sc->sc_iid) {
			if (*ibuf++ != sc->sc_iid)
				return;
		}
	}

Note that "*ibuf++"

--
Kai




More information about the freebsd-usb mailing list