From owner-freebsd-usb@FreeBSD.ORG Mon Feb 25 16:56:38 2008 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 0F1D016A40A for ; Mon, 25 Feb 2008 16:56:38 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.190]) by mx1.freebsd.org (Postfix) with ESMTP id 8D28B13C4D3 for ; Mon, 25 Feb 2008 16:56:37 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so2178375fka.11 for ; Mon, 25 Feb 2008 08:56:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:x-authentication-warning:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=wJNbrsgrbeBnNLqdV+zjoAWbxPkD1MM1rqmuQf78qjk=; b=du0Wh7X5hjj4brRjwWjllT273OmDhFHWbPEDJvhrYLoJUW9RJUYnWBRdm73YG0Nt3qcaBrhh4cxGx+JPI1alVtaoDYAmrPaZooJYbEksVfYkqt+958rt2/1/TpluoWs5u0nM0cffBfTcabNl3xNbeQnEb69NIqSNBEM+h5zfHFg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=n0funWsFDjyZ5sUGWcsT3LIXj/8LMIXc+a68NWV0t0YYxuH+1/CFQRTJDv2+x+CT7/u8TPdqiT900Ro7y/WhN1xkAeXiomkk1l5TH4QT09V71KOAo1GNz5J5X9BltQCstyAoMni7DocbSXJpkHvGyii9UicpJ0k0Q6K4xmW3ZxY= Received: by 10.82.189.6 with SMTP id m6mr6352829buf.16.1203958595530; Mon, 25 Feb 2008 08:56:35 -0800 (PST) Received: from plan0.kaiwan.csbnet.se ( [193.11.244.12]) by mx.google.com with ESMTPS id b30sm9086117ika.11.2008.02.25.08.56.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Feb 2008 08:56:34 -0800 (PST) Received: from localhost ([127.0.0.1] helo=plan0.kaiwan.csbnet.se) by plan0.kaiwan.csbnet.se with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JTgcv-000EfW-Pi; Mon, 25 Feb 2008 17:56:29 +0100 Received: (from kaffir@localhost) by plan0.kaiwan.csbnet.se (8.14.2/8.14.2/Submit) id m1PGuS3Y056389; Mon, 25 Feb 2008 17:56:28 +0100 (CET) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: plan0.kaiwan.csbnet.se: kaffir set sender to kaiwang27@gmail.com using -f Date: Mon, 25 Feb 2008 17:56:28 +0100 From: Kai Wang To: "Duane H. Hesser" Message-ID: <20080225165628.GA56247@plan0.kaiwan.csbnet.se> Mail-Followup-To: "Duane H. Hesser" , freebsd-usb@freebsd.org References: <200802242330.m1ONU4H3074911@freefall.freebsd.org> <20080225022450.GA40942@plan0.kaiwan.csbnet.se> <20080225075647.854d071f.dhesser@accima.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20080225075647.854d071f.dhesser@accima.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-usb@freebsd.org Subject: Re: usb/121052: Microsoft Notebook Optical Mouse 3000 (model 1049) doesn't work 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: Mon, 25 Feb 2008 16:56:38 -0000 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 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