From owner-freebsd-usb@FreeBSD.ORG Sun Aug 10 23:58:35 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 864CA106567A; Sun, 10 Aug 2008 23:58:35 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5AC0A8FC08; Sun, 10 Aug 2008 23:58:35 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7ANwZl3053287; Sun, 10 Aug 2008 23:58:35 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7ANwZrs053283; Sun, 10 Aug 2008 23:58:35 GMT (envelope-from linimon) Date: Sun, 10 Aug 2008 23:58:35 GMT Message-Id: <200808102358.m7ANwZrs053283@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/126396: [panic] kernel panic after unplug USB Bluetooth device 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: Sun, 10 Aug 2008 23:58:35 -0000 Old Synopsis: kernel panic after unplug USB Bluetooth device New Synopsis: [panic] kernel panic after unplug USB Bluetooth device Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Sun Aug 10 23:57:30 UTC 2008 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=126396 From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 06:50:05 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA75F1065680 for ; Mon, 11 Aug 2008 06:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 77B5F8FC1F for ; Mon, 11 Aug 2008 06:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7B6o5RO095971 for ; Mon, 11 Aug 2008 06:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7B6o5kV095970; Mon, 11 Aug 2008 06:50:05 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 06:50:05 GMT Message-Id: <200808110650.m7B6o5kV095970@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: "Mars G Miro" Cc: Subject: Re: usb/122905: [ubsa] [patch] add Huawei E220 to ubsa X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mars G Miro List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 06:50:05 -0000 The following reply was made to PR usb/122905; it has been noted by GNATS. From: "Mars G Miro" To: "Wojciech Puchar" , bug-followup@freebsd.org, Volker , "Per olof Ljungmark" Cc: Subject: Re: usb/122905: [ubsa] [patch] add Huawei E220 to ubsa Date: Mon, 11 Aug 2008 14:45:58 +0800 Hi guys, This patch does work. The only catch is it's only up to 3G speeds (~384K), not HSDPA (~ 1Mbps++, see my comments in usb/118686). Has anyone noticed this? I did try the NetBSD driver, only to find out I'd crash on their latest CURRENT :-( Thanks. -- cheers mars From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 06:50:08 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2962C106566C for ; Mon, 11 Aug 2008 06:50:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EBA988FC21 for ; Mon, 11 Aug 2008 06:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7B6o7dq096021 for ; Mon, 11 Aug 2008 06:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7B6o7Yt096020; Mon, 11 Aug 2008 06:50:07 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 06:50:07 GMT Message-Id: <200808110650.m7B6o7Yt096020@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Wojciech Puchar Cc: Subject: Re: usb/122905: [ubsa] [patch] add Huawei E220 to ubsa X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Wojciech Puchar List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 06:50:08 -0000 The following reply was made to PR usb/122905; it has been noted by GNATS. From: Wojciech Puchar To: Mars G Miro Cc: bug-followup@freebsd.org, Volker , Per olof Ljungmark Subject: Re: usb/122905: [ubsa] [patch] add Huawei E220 to ubsa Date: Mon, 11 Aug 2008 08:48:06 +0200 (CEST) > Hi guys, > > This patch does work. The only catch is it's only up to 3G speeds > (~384K), not HSDPA (~ 1Mbps++, see my comments in usb/118686). yes it is. i have no idea how to make it work at fill speed From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 09:37:28 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 A177C106566B for ; Mon, 11 Aug 2008 09:37:28 +0000 (UTC) (envelope-from dbn@bielefeldtsolutions.dk) Received: from apollon.biesol.dk (apollon.biesol.dk [91.194.94.2]) by mx1.freebsd.org (Postfix) with ESMTP id 562418FC08 for ; Mon, 11 Aug 2008 09:37:28 +0000 (UTC) (envelope-from dbn@bielefeldtsolutions.dk) Received: from localhost (localhost [127.0.0.1]) by apollon.biesol.dk (Postfix) with ESMTP id 57173120F2B6 for ; Mon, 11 Aug 2008 11:20:28 +0200 (CEST) X-Virus-Scanned-By: biesol.dk Received: from apollon.biesol.dk ([127.0.0.1]) by localhost (apollon.biesol.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hN9P-P9pvw1P for ; Mon, 11 Aug 2008 11:20:23 +0200 (CEST) Received: from dbns-macbook-pro.local (0x55529957.adsl.cybercity.dk [85.82.153.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by apollon.biesol.dk (Postfix) with ESMTP id E6B6A120F2A0 for ; Mon, 11 Aug 2008 11:20:22 +0200 (CEST) Message-ID: <48A00456.4010702@bielefeldtsolutions.dk> Date: Mon, 11 Aug 2008 11:20:22 +0200 From: Daniel Bielefeldt User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: USB Multiplex mode 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, 11 Aug 2008 09:37:28 -0000 Hi, I've just purchased a samba 75 GSM modem. Unfortunly, I have problems setting it to multiplex mode. I have been searching around for a while now. And the only thig I can find is something about putting "{ 0x0681, 0x0034, ANY, {UQ_ASSUME_CM_OVER_DATA }}," into usb_quirks.c and then rebuild my kernel. But as I can see "CM_ASSUMCE_CM_OVER_DATA" has been removed, according to this: http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/usb/usb_quirks.c Everytime I plug in the GSM modem I get this in my message log. --- snip ---- Aug 6 14:00:41 apollon root: Unknown USB device: vendor 0x0681 product 0x0034 bus uhub0 Aug 6 14:00:42 apollon kernel: ucom0: on uhub0 Aug 6 14:00:42 apollon kernel: ucom0: iclass 2/2 Aug 6 14:00:42 apollon kernel: ucom0: data interface 1, has CM over data, has no break Aug 6 14:00:42 apollon kernel: ucom0: status change notification available Aug 6 14:00:42 apollon kernel: ucom0: at uhub0 port 2 (addr 2) disconnected Aug 6 14:00:42 apollon kernel: ucom0: detached --- snip ---- Thanks in advance and kind regards, Daniel Bielefeldt From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 11:07:11 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 2E8E61065672 for ; Mon, 11 Aug 2008 11:07:11 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 19AB98FC12 for ; Mon, 11 Aug 2008 11:07:11 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BB7BOo047367 for ; Mon, 11 Aug 2008 11:07:11 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BB7AQf047363 for freebsd-usb@FreeBSD.org; Mon, 11 Aug 2008 11:07:10 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 11 Aug 2008 11:07:10 GMT Message-Id: <200808111107.m7BB7AQf047363@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org 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, 11 Aug 2008 11:07:11 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- f usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa o usb/91629 usb usbd_abort_pipe() may result in infinite loop 2 problems total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o bin/57255 usb usbd(8) and multi-function devices o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/73307 usb [panic] Kernel panics on USB disconnect o usb/74771 usb [umass] [hang] mounting write-protected umass device a o usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) o usb/75797 usb [sound] 5.3-STABLE(2005 1/4) detect USB headset, But c o usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 o usb/77184 usb [umass] [panic] kernel panic on USB device disconnect, o usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/79269 usb [ohci] USB ohci da0 plug/unplug causes crashes and loc o usb/79287 usb [uhci] [hang] UHCI hang after interrupt transfer o usb/79524 usb [ulpt] printing to Minolta PagePro 1[23]xxW via USB fa a usb/79656 usb [ehci] RHSC interrupts lost o usb/79722 usb [ehci] wrong alignments in ehci.h o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails o usb/80829 usb [modules] [panic] possible panic when loading USB-modu o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected s usb/82569 usb [umass] [panic] USB mass storage plug/unplug causes sy o usb/82660 usb [ehci] [panic] EHCI: I/O stuck in state 'physrd'/panic o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/83563 usb [umass] [panic] Page Fault while detaching Mpman Usb d f usb/83677 usb [usb] [request] usb controller often not detected (Sun o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/89954 usb [umass] [panic] USB Disk driver race condition? o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/93408 usb [mouse] hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk s usb/95348 usb [keyboard] USB keyboard unplug causes noise on screen o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 s usb/96120 usb [ums] [request] USB mouse not always detected o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync o usb/96457 usb [umass] [panic] fatback on umass = reboot s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o usb/101096 usb [ural] [panic] USB WLAN occasionally causes kernel-pan o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work f usb/102096 usb [patch] usbd(8) does not handle multiple devices in on o usb/103025 usb [uhub] [panic] wrong detection of USB device for FreeB o usb/104292 usb [umass] [hang] system lockup on forced umount of usb-s o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/105186 usb [ehci] [panic] USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 c o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106648 usb [umass] [hang] USB Floppy on D1950 10 min Hang on Inse s usb/106832 usb USB HP printer is not detected by kernel when ACPI ena o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107446 usb [umass] umass problems (usb and fw disks) o usb/107827 usb [ohci] [panic] ohci_add_done addr not found o usb/107848 usb [umass] [request] cannot access Samsung flash disk o usb/107924 usb [patch] usbd(8) does not call detach o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE [regr o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/109397 usb [panic] on boot from USB flash o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID s usb/112568 usb [umass] [request] USB mode may wrong when mounting Pla o usb/112631 usb [panic] Problem with SONY DSC-S80 camera on umount o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an s usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 s usb/113977 usb [request] Need a way to set mode of USB disk's write c o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114682 usb [umass] generic USB media-card reader unusable o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116699 usb [usbhid] USB HID devices do not initialize at system b o usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119509 usb USB flaky on Dell Optiplex 755 o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/120017 usb [ehci] [patch] CS5536 (AMD Geode) USB 2.0 quirk o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120786 usb Kernel panic when forced umount of a dettached USB Har o usb/121232 usb remove PCCARD rebooted system o usb/121275 usb [boot] FreeBSD fails to boot with usb legacy support e o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121755 usb [ohci] [patch] Fix panic after ohci/uhub cardbus devic o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o kern/123510 usb [ums] Mouse Wheel Fails to Work [regression] o usb/123690 usb Panic on USB device insertion when usb loaded as a mod o usb/123714 usb Panic when hald-storage-probe runs with umass device i o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124758 usb rum panics SMP kernel o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o usb/125088 usb Touchpad not detected on Adesso AKB-430UG USB kbd/pad o usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125631 usb [usb][ums] kernel panic during bootup while 'Logitech o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device 136 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem o usb/40948 usb [umass] [request] USB HP CDW8200 does not work s usb/51958 usb [urio] [patch] update for urio driver s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71455 usb [umass] Slow USB umass performance of 5.3 s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R a usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76732 usb Mouse problems with USB KVM Switch o usb/78984 usb [umass] [patch] Creative MUVO umass failure o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ s usb/80777 usb [request] usb_rem_task() should wait for callback to c o usb/80854 usb [patch] [request] suggestion for new iface-no-probe me o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/83863 usb [ugen] Communication problem between opensc/openct via s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device o usb/86298 usb [mouse] Known good USB mouse won't work with correct s o usb/87224 usb Cannot mount USB Zip750 o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/88408 usb [axe] axe0 read PHY failed o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/96599 usb [usb] [patch] Sony Handycam DCR-HC32E memory stick slo o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/100746 usb [keyboard] system does not boot due to USB keyboard pr o usb/101761 usb [usb] [patch] [request] usb.h: increase maximal size o o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/102678 usb [keyboard] Dell PowerEdge DRAC5 USB Keyboard does not o usb/102976 usb [panic] Casio Exilim Digital Camera causes panic on in o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103289 usb [request] USB 2.0 problems on AMD LX-800 CPU and CS-55 o usb/103418 usb [usbhidctl] [patch] [request] usbhidctl: add ability t o usb/103917 usb [uhub] USB driver reports "Addr 0 should never happen" o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104645 usb [umass] [request] Rave C-201 MP3 player does not commu o usb/105065 usb [ata] SATA - USB Bridge o usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/106041 usb [usb] [request] FreeBSD does not recognise Mustek Bear o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze o usb/107243 usb [cam] [patch] Apacer USB Flash Drive quirk o usb/107388 usb [patch] [request] new driver: add utoppy device from N o usb/107496 usb [uhub] USB device problem on RELENG_6_2 (SHORT_XFER) [ o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/108056 usb [ohci] Mouse gets powered off during device probe when s usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC s usb/110991 usb [usbdevs] [patch] QUIRK: Super Top IDE DEVICE (depends o usb/112461 usb [ehci] [request] ehci USB 2.0 doesn't work on nforce4 o usb/112463 usb [umass] problem with Samsung USB DVD writer, libscg an o usb/112944 usb [ulpt] [patch] Bi-directional access to HP LaserJet 10 o usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/113432 usb [ucom] WARNING: attempt to net_add_domain(netgraph) af o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/114068 usb [umass] [patch] Problems with connection of the umass o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/117075 usb [scsi_da] [patch] quirk: USB Samsung YP-U3 MP3 o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/117185 usb [umodem] [patch] Add support for UNION interface descr o usb/117205 usb [uscanner] [patch] uscanner support for HP ScanJet 447 o usb/117546 usb [uftdi] [patch] Add MaxStream ZigBee product ID to uft o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/118485 usb [usbdevs] [patch] Logitech Headset Workaround o usb/118686 usb [usbdevs] [patch] teach usbdevs / ubsa(4) about Huawei o usb/119150 usb [usbdevs] [patch] new usbdevs for CDMA 1xEVDO devices o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119981 usb [axe] [patch] add support for LOGITEC LAN-GTJ/U2 gigab o usb/120572 usb [umass] [patch] quirk to support ASUS P535 as umass (a o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS o usb/121169 usb [umass] Issues with usb mp3 player o usb/121184 usb [uipaq] [patch] add ids from linux ipaq driver (plus a o usb/121426 usb [patch] [uscanner] add HP ScanJet 3570C o usb/122025 usb [patch] uscanner does not attach to Epson RX620 printe o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/122547 usb [ehci] USB Printer not being recognized after reboot p usb/122610 usb Add Verizon v740 support to ubsa(4) o usb/122621 usb [patch] [request] New driver for Sierra Wireless 3G US o usb/122712 usb [usbdevs] [patch] Sony Vaio RF keyboard/mouse receiver o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122819 usb Patch to provide dynamic additions to the usb quirks t o usb/122936 usb [ucom][ubsa] Device does not receive interrupt o usb/122956 usb Support for Novatel Wireless XU870 3G Card o usb/122992 usb MotoROKR Z6 Phone not recognised by umass as USB disk. p usb/123148 usb [uscanner] [patch] Epson DX8400/50 needs uscanner to s p usb/123211 usb [udav] if_udav driver doesn't support Davicom 9601 USB o kern/123224 usb [ums] Scroll wheel breakage w/ USB MS Wireless Intelli o usb/123351 usb Add Reiner SCT cyberJack, Omnikey [26]020, Fujitsu Sie o usb/123352 usb Add Option GTMAX3.6/7.2 and Quallcomm MMC module devic o usb/123509 usb [umass] continuous reset Samsung SGH-G600 phone o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/123691 usb usbd(8): usbd hangs o usb/123959 usb [ums] add support for Razer Lachesis 4000dpi usb mouse o usb/123969 usb Supermicro H8SMi-2 usb problem o usb/124604 usb Wireless Mouse doesn't work o usb/125072 usb [uplcom] [patch] add Mobile Action MA-620 Infrared Ada o usb/125238 usb Habu Mouse turns off in X o usb/125264 usb [patch] sysctl for set usb mouse rate (very useful for o usb/125510 usb repeated plug and unplug of USB mass storage devices l o usb/125736 usb [ukbd] [hang] system hangs after AT keyboard detect if o usb/125941 usb [ums] not working wheel on my microsoft notebook optic 137 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 13:40:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 325DE106564A for ; Mon, 11 Aug 2008 13:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 20DC28FC12 for ; Mon, 11 Aug 2008 13:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BDe3dl067506 for ; Mon, 11 Aug 2008 13:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BDe3gh067505; Mon, 11 Aug 2008 13:40:03 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 13:40:03 GMT Message-Id: <200808111340.m7BDe3gh067505@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: kern/123510: [ums] Mouse Wheel Fails to Work [regression] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 13:40:04 -0000 The following reply was made to PR kern/123510; it has been noted by GNATS. From: Kai Wang To: bug-followup@FreeBSD.org, tmdraney@verizon.net Cc: Subject: Re: kern/123510: [ums] Mouse Wheel Fails to Work [regression] Date: Mon, 11 Aug 2008 15:10:01 +0200 Hello Merritt, Since /usr/src/sys/dev/usb/ums.c rev 1.96.2.1 worked for you, I guess this might be caused by rev 1.97 which removed "TWHEEL" stuff. Could you please try the patch below and see if it also fix the problem? (Patch should apply to latest -STABLE or -CURRENT) Thanks, Kai --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 +++ ums.c.new 2008-08-11 15:00:37.000000000 +0200 @@ -283,6 +283,9 @@ /* Try the wheel first as the Z activator since it's tradition. */ wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), + hid_input, &sc->sc_loc_z, &flags) || + hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, + HUG_TWHEEL), hid_input, &sc->sc_loc_z, &flags); if (wheel) { From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 14:00:15 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CE311065677 for ; Mon, 11 Aug 2008 14:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0AF588FC1F for ; Mon, 11 Aug 2008 14:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BE0E9l068180 for ; Mon, 11 Aug 2008 14:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BE0Ejp068179; Mon, 11 Aug 2008 14:00:14 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 14:00:14 GMT Message-Id: <200808111400.m7BE0Ejp068179@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 14:00:15 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Kai Wang To: magik@back-up.pl Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Mon, 11 Aug 2008 15:34:34 +0200 On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: > > > On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org wrote: > > Thank you very much for your problem report. > > It has the internal identification `usb/125941'. > > The individual assigned to look at your > > report is: freebsd-usb. > > > > You can access the state of your problem report at any time > > via this link: > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > >>Category: usb > >>Responsible: freebsd-usb > >>Synopsis: not working wheel on my microsoft notebook optical mouse > > 3000 > >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > I just fixed problem with wheel on my mouse > and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c file. > --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > @@ -402,6 +402,7 @@ > sc->sc_loc_x.pos = 8; > sc->sc_loc_y.pos = 16; > sc->sc_loc_z.pos = 24; > + sc->sc_loc_z.size = 8; > sc->sc_loc_btn[0].pos = 0; > sc->sc_loc_btn[1].pos = 1; > sc->sc_loc_btn[2].pos = 2; Hi, Thanks for submitting the patch. It'd be great if you could also test the patch below for us and paste the result here, just for better understanding the problem. The patch adds some debug printfs: --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 @@ -284,6 +284,7 @@ wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &sc->sc_loc_z, &flags); + printf("wheel=%d\n", wheel); if (wheel) { if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { @@ -323,6 +324,7 @@ sc->flags |= UMS_Z; } } + printf("sc->flags=0x%04x\n", sc->flags); /* * The Microsoft Wireless Intellimouse 2.0 reports it's wheel @@ -402,6 +404,7 @@ sc->sc_loc_x.pos = 8; sc->sc_loc_y.pos = 16; sc->sc_loc_z.pos = 24; + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; sc->sc_loc_btn[1].pos = 1; sc->sc_loc_btn[2].pos = 2; From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 14:02:49 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 28DB5106568A for ; Mon, 11 Aug 2008 14:02:49 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.freebsd.org (Postfix) with ESMTP id 9EC6E8FC0A for ; Mon, 11 Aug 2008 14:02:48 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so857485nfh.33 for ; Mon, 11 Aug 2008 07:02:47 -0700 (PDT) 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=z9Z0g5dUdJ+qqG27rUet+IfDgnirbykg5YFkVfz4Mv8=; b=mteoYhzL4vcPLnRFRsgaGjJGYsOo5xFB0aQREMzF6lvZ0aMMGmLykuX9/ripkkK2Tx exsqaTAPIWD5PtxFnl+ohlgJFYbGMDR1lVFkMraqOyG9W939Yj977YijFAAPjC77JdPx N1ljYjg92v2mQBW4YwcdeKkbCdgaA2TqVBQlQ= 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=Smsyd2UTVg3GsWfD/keMWd8yozGSHDm+snAB9MdoLvtglkEoSXJjsQ7uxed2xq0nUw 7weK8hpwY7fvXFPDoichihaFYy7/c99x9vNxqiFremCNLBkpa/UVOFf6foU0FaVxAOjN 7g7ewcbVEHBScaMZh+A/yn3iU2HPuBJBckzHM= Received: by 10.210.18.8 with SMTP id 8mr9382061ebr.80.1218461681290; Mon, 11 Aug 2008 06:34:41 -0700 (PDT) Received: from localhost ( [85.8.1.55]) by mx.google.com with ESMTPS id g12sm335892nfb.28.2008.08.11.06.34.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Aug 2008 06:34:39 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KSXXe-00016c-RF; Mon, 11 Aug 2008 15:34:34 +0200 Received: (from kaffir@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m7BDYY4j004253; Mon, 11 Aug 2008 15:34:34 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaffir set sender to kaiwang27@gmail.com using -f Date: Mon, 11 Aug 2008 15:34:34 +0200 From: Kai Wang To: magik@back-up.pl Message-ID: <20080811133434.GA4224@plan0> Mail-Followup-To: magik@back-up.pl, FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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, 11 Aug 2008 14:02:49 -0000 On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: > > > On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org wrote: > > Thank you very much for your problem report. > > It has the internal identification `usb/125941'. > > The individual assigned to look at your > > report is: freebsd-usb. > > > > You can access the state of your problem report at any time > > via this link: > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > >>Category: usb > >>Responsible: freebsd-usb > >>Synopsis: not working wheel on my microsoft notebook optical mouse > > 3000 > >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > I just fixed problem with wheel on my mouse > and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c file. > --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > @@ -402,6 +402,7 @@ > sc->sc_loc_x.pos = 8; > sc->sc_loc_y.pos = 16; > sc->sc_loc_z.pos = 24; > + sc->sc_loc_z.size = 8; > sc->sc_loc_btn[0].pos = 0; > sc->sc_loc_btn[1].pos = 1; > sc->sc_loc_btn[2].pos = 2; Hi, Thanks for submitting the patch. It'd be great if you could also test the patch below for us and paste the result here, just for better understanding the problem. The patch adds some debug printfs: --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 @@ -284,6 +284,7 @@ wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), hid_input, &sc->sc_loc_z, &flags); + printf("wheel=%d\n", wheel); if (wheel) { if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { @@ -323,6 +324,7 @@ sc->flags |= UMS_Z; } } + printf("sc->flags=0x%04x\n", sc->flags); /* * The Microsoft Wireless Intellimouse 2.0 reports it's wheel @@ -402,6 +404,7 @@ sc->sc_loc_x.pos = 8; sc->sc_loc_y.pos = 16; sc->sc_loc_z.pos = 24; + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; sc->sc_loc_btn[1].pos = 1; sc->sc_loc_btn[2].pos = 2; From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 14:19:39 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 737D7106566C; Mon, 11 Aug 2008 14:19:39 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com (chi.fastbighost.com [65.98.102.73]) by mx1.freebsd.org (Postfix) with ESMTP id 354018FC14; Mon, 11 Aug 2008 14:19:39 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com ([65.98.102.73] helo=mx.back-up.pl) by chi.fastbighost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KSYFE-0002UN-9M; Mon, 11 Aug 2008 10:19:36 -0400 MIME-Version: 1.0 Date: Mon, 11 Aug 2008 10:19:35 -0400 From: Grzegorz Blach To: Kai Wang In-Reply-To: <20080811133434.GA4224@plan0> References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> Message-ID: <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> X-Sender: magik@back-up.pl User-Agent: RoundCube Webmail/0.2a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - chi.fastbighost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - back-up.pl X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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, 11 Aug 2008 14:19:39 -0000 On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang wrote: > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: >> >> >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org > wrote: >> > Thank you very much for your problem report. >> > It has the internal identification `usb/125941'. >> > The individual assigned to look at your >> > report is: freebsd-usb. >> > >> > You can access the state of your problem report at any time >> > via this link: >> > >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 >> > >> >>Category: usb >> >>Responsible: freebsd-usb >> >>Synopsis: not working wheel on my microsoft notebook optical > mouse >> > 3000 >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 >> >> I just fixed problem with wheel on my mouse >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c file. > >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 >> @@ -402,6 +402,7 @@ >> sc->sc_loc_x.pos = 8; >> sc->sc_loc_y.pos = 16; >> sc->sc_loc_z.pos = 24; >> + sc->sc_loc_z.size = 8; >> sc->sc_loc_btn[0].pos = 0; >> sc->sc_loc_btn[1].pos = 1; >> sc->sc_loc_btn[2].pos = 2; > > > Hi, > > Thanks for submitting the patch. It'd be great if you could also > test the patch below for us and paste the result here, just for > better understanding the problem. > > The patch adds some debug printfs: > > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > @@ -284,6 +284,7 @@ > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, > HUG_WHEEL), > hid_input, &sc->sc_loc_z, &flags); > + printf("wheel=%d\n", wheel); > > if (wheel) { > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { > @@ -323,6 +324,7 @@ > sc->flags |= UMS_Z; > } > } > + printf("sc->flags=0x%04x\n", sc->flags); > > /* > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel > @@ -402,6 +404,7 @@ > sc->sc_loc_x.pos = 8; > sc->sc_loc_y.pos = 16; > sc->sc_loc_z.pos = 24; > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); > sc->sc_loc_btn[0].pos = 0; > sc->sc_loc_btn[1].pos = 1; > sc->sc_loc_btn[2].pos = 2; this, what I see: ums0: on uhub0 wheel=0 sc->flags=0x0000 ums0: 3 buttons and a TILT dir. sc->sc_loc_z.size=0 From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 14:20:05 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EA961065674 for ; Mon, 11 Aug 2008 14:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2048FC18 for ; Mon, 11 Aug 2008 14:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BEK5Bd070214 for ; Mon, 11 Aug 2008 14:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BEK5Ze070213; Mon, 11 Aug 2008 14:20:05 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 14:20:05 GMT Message-Id: <200808111420.m7BEK5Ze070213@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: kern/123224: [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 14:20:05 -0000 The following reply was made to PR kern/123224; it has been noted by GNATS. From: Kai Wang To: bug-followup@FreeBSD.org, coxbrian@msu.edu Cc: Subject: Re: kern/123224: [ums] Scroll wheel breakage w/ USB MS Wireless Intellimouse Explorer Date: Mon, 11 Aug 2008 16:10:55 +0200 Hi Brian, I think the regression you metioned is indeed there. Could you please try the following patch against -CURRENT or -STABLE and see if it fixes the problem? --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 +++ ums.c.new 2008-08-11 15:00:37.000000000 +0200 @@ -283,6 +283,9 @@ /* Try the wheel first as the Z activator since it's tradition. */ wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), + hid_input, &sc->sc_loc_z, &flags) || + hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, + HUG_TWHEEL), hid_input, &sc->sc_loc_z, &flags); if (wheel) { From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 14:20:07 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C34EB1065680 for ; Mon, 11 Aug 2008 14:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B196E8FC0A for ; Mon, 11 Aug 2008 14:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BEK7mc070264 for ; Mon, 11 Aug 2008 14:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BEK7U8070263; Mon, 11 Aug 2008 14:20:07 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 14:20:07 GMT Message-Id: <200808111420.m7BEK7U8070263@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Grzegorz Blach Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grzegorz Blach List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 14:20:07 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Grzegorz Blach To: Kai Wang Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Mon, 11 Aug 2008 10:19:35 -0400 On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang wrote: > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: >> >> >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org > wrote: >> > Thank you very much for your problem report. >> > It has the internal identification `usb/125941'. >> > The individual assigned to look at your >> > report is: freebsd-usb. >> > >> > You can access the state of your problem report at any time >> > via this link: >> > >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 >> > >> >>Category: usb >> >>Responsible: freebsd-usb >> >>Synopsis: not working wheel on my microsoft notebook optical > mouse >> > 3000 >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 >> >> I just fixed problem with wheel on my mouse >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c file. > >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 >> @@ -402,6 +402,7 @@ >> sc->sc_loc_x.pos = 8; >> sc->sc_loc_y.pos = 16; >> sc->sc_loc_z.pos = 24; >> + sc->sc_loc_z.size = 8; >> sc->sc_loc_btn[0].pos = 0; >> sc->sc_loc_btn[1].pos = 1; >> sc->sc_loc_btn[2].pos = 2; > > > Hi, > > Thanks for submitting the patch. It'd be great if you could also > test the patch below for us and paste the result here, just for > better understanding the problem. > > The patch adds some debug printfs: > > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > @@ -284,6 +284,7 @@ > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, > HUG_WHEEL), > hid_input, &sc->sc_loc_z, &flags); > + printf("wheel=%d\n", wheel); > > if (wheel) { > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { > @@ -323,6 +324,7 @@ > sc->flags |= UMS_Z; > } > } > + printf("sc->flags=0x%04x\n", sc->flags); > > /* > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel > @@ -402,6 +404,7 @@ > sc->sc_loc_x.pos = 8; > sc->sc_loc_y.pos = 16; > sc->sc_loc_z.pos = 24; > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); > sc->sc_loc_btn[0].pos = 0; > sc->sc_loc_btn[1].pos = 1; > sc->sc_loc_btn[2].pos = 2; this, what I see: ums0: on uhub0 wheel=0 sc->flags=0x0000 ums0: 3 buttons and a TILT dir. sc->sc_loc_z.size=0 From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 14:50:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F681106568C for ; Mon, 11 Aug 2008 14:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E823E8FC2F for ; Mon, 11 Aug 2008 14:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BEo3hT073060 for ; Mon, 11 Aug 2008 14:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BEo3W6073059; Mon, 11 Aug 2008 14:50:03 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 14:50:03 GMT Message-Id: <200808111450.m7BEo3W6073059@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/123959: [ums] add support for Razer Lachesis 4000dpi usb mouse X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 14:50:04 -0000 The following reply was made to PR usb/123959; it has been noted by GNATS. From: Kai Wang To: bug-followup@FreeBSD.org, ehaupt@FreeBSD.org Cc: Subject: Re: usb/123959: [ums] add support for Razer Lachesis 4000dpi usb mouse Date: Mon, 11 Aug 2008 16:43:11 +0200 Hello Emanuel, I believe this mouse is supported now, a patch which was committed by jhb@ should solve the UISUBCLASS problem several Razer mice have. It was solved in a different way, see this PR for details: http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/118670 If you have the mouse, could you please confirm that it is supported now so we can close the PR? Thanks, Kai From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 15:19:53 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 37388106566B for ; Mon, 11 Aug 2008 15:19:53 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id AB93A8FC1F for ; Mon, 11 Aug 2008 15:19:52 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so884028nfh.33 for ; Mon, 11 Aug 2008 08:19:51 -0700 (PDT) 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=gREFk3cnNZxUuFmwFBrV+US8neY1sB66k4oQ+Fyc6Lk=; b=FNIgTPRHc4ZMRjD3VEWPUqgXDo7+g5L7PivXOZvyDdGNBtp6m46XbONzR4gX5QtEpt 3lQw/Fh1odldxG9YKVJK51Q6O+PomIMnhxZMg6uHkGzF2dX+g0a3OmbAyzMKCteR+uZ7 Z3cGsBtyxFTCdnKu1x0c4xJT04cx8Z0ASHyVM= 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=Cm6wZDpQqgrQbBTRFtmdpjFn3HXr+1fkv3Sv1hgStqmuQw+TGq6PmDuBPgVICyxRYf 8SkI+pndhUGEHEDCk3iqUr/NEixnmbzXiNEYBHwC0/6SBAPB3TpuzFmG7HZ+a9nPFqwq zsB7MMT7B46XO3VtgZW6pVLExC1PkNV+IHCPQ= Received: by 10.210.75.6 with SMTP id x6mr9521164eba.68.1218467991576; Mon, 11 Aug 2008 08:19:51 -0700 (PDT) Received: from localhost ( [85.8.1.55]) by mx.google.com with ESMTPS id k5sm47585nfh.0.2008.08.11.08.19.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Aug 2008 08:19:49 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KSZBO-0001Cb-1D; Mon, 11 Aug 2008 17:19:42 +0200 Received: (from kaffir@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m7BFJfqd004624; Mon, 11 Aug 2008 17:19:41 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaffir set sender to kaiwang27@gmail.com using -f Date: Mon, 11 Aug 2008 17:19:41 +0200 From: Kai Wang To: Grzegorz Blach Message-ID: <20080811151941.GA4590@plan0> Mail-Followup-To: Grzegorz Blach , FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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, 11 Aug 2008 15:19:53 -0000 On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > > > On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang wrote: > > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: > >> > >> > >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org > > wrote: > >> > Thank you very much for your problem report. > >> > It has the internal identification `usb/125941'. > >> > The individual assigned to look at your > >> > report is: freebsd-usb. > >> > > >> > You can access the state of your problem report at any time > >> > via this link: > >> > > >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > >> > > >> >>Category: usb > >> >>Responsible: freebsd-usb > >> >>Synopsis: not working wheel on my microsoft notebook optical > > mouse > >> > 3000 > >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > >> > >> I just fixed problem with wheel on my mouse > >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c file. > > > >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > >> @@ -402,6 +402,7 @@ > >> sc->sc_loc_x.pos = 8; > >> sc->sc_loc_y.pos = 16; > >> sc->sc_loc_z.pos = 24; > >> + sc->sc_loc_z.size = 8; > >> sc->sc_loc_btn[0].pos = 0; > >> sc->sc_loc_btn[1].pos = 1; > >> sc->sc_loc_btn[2].pos = 2; > > > > > > Hi, > > > > Thanks for submitting the patch. It'd be great if you could also > > test the patch below for us and paste the result here, just for > > better understanding the problem. > > > > The patch adds some debug printfs: > > > > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 > > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > @@ -284,6 +284,7 @@ > > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, > > HUG_WHEEL), > > hid_input, &sc->sc_loc_z, &flags); > > + printf("wheel=%d\n", wheel); > > > > if (wheel) { > > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { > > @@ -323,6 +324,7 @@ > > sc->flags |= UMS_Z; > > } > > } > > + printf("sc->flags=0x%04x\n", sc->flags); > > > > /* > > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel > > @@ -402,6 +404,7 @@ > > sc->sc_loc_x.pos = 8; > > sc->sc_loc_y.pos = 16; > > sc->sc_loc_z.pos = 24; > > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); > > sc->sc_loc_btn[0].pos = 0; > > sc->sc_loc_btn[1].pos = 1; > > sc->sc_loc_btn[2].pos = 2; > > this, what I see: > > ums0: 0/0, rev 2.00/1.20, addr 2> on uhub0 > wheel=0 > sc->flags=0x0000 > ums0: 3 buttons and a TILT dir. > sc->sc_loc_z.size=0 > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got different versions. Could you please get krepdump (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) # tar xzvf krepdump.tgz # cd krepdump # make # kldload ./krepdump.ko Then plug in your mouse and paste the result here? There is one version of report desc of this mouse here: http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html and my guess is your mouse's report desc is different than that... Thanks, Kai From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 15:20:03 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 647B8106564A for ; Mon, 11 Aug 2008 15:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 47E1E8FC08 for ; Mon, 11 Aug 2008 15:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BFK3NE075221 for ; Mon, 11 Aug 2008 15:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BFK3Ni075218; Mon, 11 Aug 2008 15:20:03 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 15:20:03 GMT Message-Id: <200808111520.m7BFK3Ni075218@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 15:20:03 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Kai Wang To: Grzegorz Blach Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Mon, 11 Aug 2008 17:19:41 +0200 On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > > > On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang wrote: > > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: > >> > >> > >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org > > wrote: > >> > Thank you very much for your problem report. > >> > It has the internal identification `usb/125941'. > >> > The individual assigned to look at your > >> > report is: freebsd-usb. > >> > > >> > You can access the state of your problem report at any time > >> > via this link: > >> > > >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > >> > > >> >>Category: usb > >> >>Responsible: freebsd-usb > >> >>Synopsis: not working wheel on my microsoft notebook optical > > mouse > >> > 3000 > >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > >> > >> I just fixed problem with wheel on my mouse > >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c file. > > > >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > >> @@ -402,6 +402,7 @@ > >> sc->sc_loc_x.pos = 8; > >> sc->sc_loc_y.pos = 16; > >> sc->sc_loc_z.pos = 24; > >> + sc->sc_loc_z.size = 8; > >> sc->sc_loc_btn[0].pos = 0; > >> sc->sc_loc_btn[1].pos = 1; > >> sc->sc_loc_btn[2].pos = 2; > > > > > > Hi, > > > > Thanks for submitting the patch. It'd be great if you could also > > test the patch below for us and paste the result here, just for > > better understanding the problem. > > > > The patch adds some debug printfs: > > > > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 > > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > @@ -284,6 +284,7 @@ > > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, > > HUG_WHEEL), > > hid_input, &sc->sc_loc_z, &flags); > > + printf("wheel=%d\n", wheel); > > > > if (wheel) { > > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { > > @@ -323,6 +324,7 @@ > > sc->flags |= UMS_Z; > > } > > } > > + printf("sc->flags=0x%04x\n", sc->flags); > > > > /* > > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel > > @@ -402,6 +404,7 @@ > > sc->sc_loc_x.pos = 8; > > sc->sc_loc_y.pos = 16; > > sc->sc_loc_z.pos = 24; > > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); > > sc->sc_loc_btn[0].pos = 0; > > sc->sc_loc_btn[1].pos = 1; > > sc->sc_loc_btn[2].pos = 2; > > this, what I see: > > ums0: 0/0, rev 2.00/1.20, addr 2> on uhub0 > wheel=0 > sc->flags=0x0000 > ums0: 3 buttons and a TILT dir. > sc->sc_loc_z.size=0 > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got different versions. Could you please get krepdump (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) # tar xzvf krepdump.tgz # cd krepdump # make # kldload ./krepdump.ko Then plug in your mouse and paste the result here? There is one version of report desc of this mouse here: http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html and my guess is your mouse's report desc is different than that... Thanks, Kai From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 16:12:06 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB44E1065677; Mon, 11 Aug 2008 16:12:06 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A18478FC24; Mon, 11 Aug 2008 16:12:06 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from freefall.freebsd.org (kaiw@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BGC6pj078940; Mon, 11 Aug 2008 16:12:06 GMT (envelope-from kaiw@freefall.freebsd.org) Received: (from kaiw@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BGC6c7078936; Mon, 11 Aug 2008 16:12:06 GMT (envelope-from kaiw) Date: Mon, 11 Aug 2008 16:12:06 GMT Message-Id: <200808111612.m7BGC6c7078936@freefall.freebsd.org> To: ehaupt@freebsd.org, kaiw@FreeBSD.org, freebsd-usb@FreeBSD.org From: kaiw@FreeBSD.org Cc: Subject: Re: usb/123959: [ums] add support for Razer Lachesis 4000dpi usb mouse 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, 11 Aug 2008 16:12:06 -0000 Synopsis: [ums] add support for Razer Lachesis 4000dpi usb mouse State-Changed-From-To: open->closed State-Changed-By: kaiw State-Changed-When: Mon Aug 11 16:10:48 UTC 2008 State-Changed-Why: The submitter confirmed that the mouse is supported now. http://www.freebsd.org/cgi/query-pr.cgi?pr=123959 From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 16:20:05 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B810A1065678 for ; Mon, 11 Aug 2008 16:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A74BF8FC21 for ; Mon, 11 Aug 2008 16:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BGK5q5080399 for ; Mon, 11 Aug 2008 16:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BGK5bP080398; Mon, 11 Aug 2008 16:20:05 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 16:20:05 GMT Message-Id: <200808111620.m7BGK5bP080398@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Emanuel Haupt Cc: Subject: Re: usb/123959: [ums] add support for Razer Lachesis 4000dpi usb mouse X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Emanuel Haupt List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 16:20:05 -0000 The following reply was made to PR usb/123959; it has been noted by GNATS. From: Emanuel Haupt To: Kai Wang Cc: bug-followup@freebsd.org Subject: Re: usb/123959: [ums] add support for Razer Lachesis 4000dpi usb mouse Date: Mon, 11 Aug 2008 17:53:17 +0200 > Hello Emanuel, > > I believe this mouse is supported now, a patch which was committed by > jhb@ should solve the UISUBCLASS problem several Razer mice have. > > It was solved in a different way, see this PR for details: > http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/118670 > > If you have the mouse, could you please confirm that it is supported > now so we can close the PR? I can confirm that it's solved in RELENG_7. The PR can be closed, thanks. Emanuel From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 17:31:02 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 09FCA106567C; Mon, 11 Aug 2008 17:31:02 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com (chi.fastbighost.com [65.98.102.73]) by mx1.freebsd.org (Postfix) with ESMTP id BE4668FC0A; Mon, 11 Aug 2008 17:31:01 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com ([65.98.102.73] helo=mx.back-up.pl) by chi.fastbighost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KSbEQ-0000N4-1t; Mon, 11 Aug 2008 13:30:58 -0400 MIME-Version: 1.0 Date: Mon, 11 Aug 2008 13:30:57 -0400 From: Grzegorz Blach To: Kai Wang In-Reply-To: <20080811151941.GA4590@plan0> References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> Message-ID: <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> X-Sender: magik@back-up.pl User-Agent: RoundCube Webmail/0.2a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - chi.fastbighost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - back-up.pl X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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, 11 Aug 2008 17:31:02 -0000 On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang wrote: > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: >> >> >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > wrote: >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: >> >> >> >> >> >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org >> > wrote: >> >> > Thank you very much for your problem report. >> >> > It has the internal identification `usb/125941'. >> >> > The individual assigned to look at your >> >> > report is: freebsd-usb. >> >> > >> >> > You can access the state of your problem report at any time >> >> > via this link: >> >> > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 >> >> > >> >> >>Category: usb >> >> >>Responsible: freebsd-usb >> >> >>Synopsis: not working wheel on my microsoft notebook optical >> > mouse >> >> > 3000 >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 >> >> >> >> I just fixed problem with wheel on my mouse >> >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c > file. >> > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 >> >> @@ -402,6 +402,7 @@ >> >> sc->sc_loc_x.pos = 8; >> >> sc->sc_loc_y.pos = 16; >> >> sc->sc_loc_z.pos = 24; >> >> + sc->sc_loc_z.size = 8; >> >> sc->sc_loc_btn[0].pos = 0; >> >> sc->sc_loc_btn[1].pos = 1; >> >> sc->sc_loc_btn[2].pos = 2; >> > >> > >> > Hi, >> > >> > Thanks for submitting the patch. It'd be great if you could also >> > test the patch below for us and paste the result here, just for >> > better understanding the problem. >> > >> > The patch adds some debug printfs: >> > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 >> > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 >> > @@ -284,6 +284,7 @@ >> > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, >> > HUG_WHEEL), >> > hid_input, &sc->sc_loc_z, &flags); >> > + printf("wheel=%d\n", wheel); >> > >> > if (wheel) { >> > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { >> > @@ -323,6 +324,7 @@ >> > sc->flags |= UMS_Z; >> > } >> > } >> > + printf("sc->flags=0x%04x\n", sc->flags); >> > >> > /* >> > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel >> > @@ -402,6 +404,7 @@ >> > sc->sc_loc_x.pos = 8; >> > sc->sc_loc_y.pos = 16; >> > sc->sc_loc_z.pos = 24; >> > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); >> > sc->sc_loc_btn[0].pos = 0; >> > sc->sc_loc_btn[1].pos = 1; >> > sc->sc_loc_btn[2].pos = 2; >> >> this, what I see: >> >> ums0: > 0/0, rev 2.00/1.20, addr 2> on uhub0 >> wheel=0 >> sc->flags=0x0000 >> ums0: 3 buttons and a TILT dir. >> sc->sc_loc_z.size=0 >> > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > different > versions. > > Could you please get krepdump > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > # tar xzvf krepdump.tgz > # cd krepdump > # make > # kldload ./krepdump.ko > > Then plug in your mouse and paste the result here? > > There is one version of report desc of this mouse here: > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > and my guess is your mouse's report desc is different than that... > > > Thanks, > Kai ---- my krepdump ---- ums0: at uhub0 port 2 (addr 2) disconnected ums0: detached [report desc size=196] USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Logical(2) REPORT ID 19 USAGE PAGE Consumer(0xc) USAGE AC Pan(0x238)[Consumer(0xc)] REPORT COUNT 1 REPORT SIZE 8 LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 INPUT ( Data Variable Relative ) (6) REPORT ID 23 USAGE PAGE Microsoft(0xff00) USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 PHYSICAL MINIMUM 1 PHYSICAL MAXIMUM 4 REPORT COUNT 1 REPORT SIZE 2 FEATURE ( Data Variable Absolute ) (2) PHYSICAL MINIMUM 0 PHYSICAL MAXIMUM 0 FEATURE ( Const Array Absolute ) (1) USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] REPORT SIZE 1 FEATURE ( Data Variable Absolute ) (2) REPORT SIZE 3 FEATURE ( Const Array Absolute ) (1) REPORT ID 24 USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] REPORT SIZE 1 FEATURE ( Data Variable Absolute ) (2) REPORT SIZE 7 FEATURE ( Const Array Absolute ) (1) END COLLECTION END COLLECTION USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Application(1) USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Logical(2) REPORT ID 17 USAGE Pointer(0x1)[Generic Desktop(0x1)] COLLECTION Physical(0) USAGE PAGE Button(0x9) USAGE MINIMUM Button1(1) USAGE MAXIMUM Button3(3) REPORT COUNT 3 REPORT SIZE 1 LOGICAL MAXIMUM 1 INPUT ( Data Variable Absolute ) (2) REPORT COUNT 1 INPUT ( Const Array Absolute ) (1) USAGE Button5(0x5)[Button(0x9)] INPUT ( Data Variable Absolute ) (2) REPORT COUNT 3 INPUT ( Const Array Absolute ) (1) USAGE PAGE Generic Desktop(0x1) USAGE X(0x30)[Generic Desktop(0x1)] USAGE Y(0x31)[Generic Desktop(0x1)] REPORT COUNT 2 REPORT SIZE 8 LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 INPUT ( Data Variable Relative ) (6) COLLECTION Logical(2) REPORT ID 18 USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] REPORT COUNT 1 REPORT SIZE 2 LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 PHYSICAL MINIMUM 1 PHYSICAL MAXIMUM 4 FEATURE ( Data Variable Absolute ) (2) PHYSICAL MINIMUM 0 PHYSICAL MAXIMUM 0 REPORT SIZE 6 FEATURE ( Const Array Absolute ) (1) REPORT ID 17 USAGE Wheel(0x38)[Generic Desktop(0x1)] LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 REPORT SIZE 8 INPUT ( Data Variable Relative ) (6) END COLLECTION USAGE PAGE Consumer(0xc) REPORT SIZE 8 USAGE AC Pan(0x238)[Consumer(0xc)] INPUT ( Data Variable Relative ) (6) END COLLECTION END COLLECTION END COLLECTION [hexdump] 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 00C0 06 C0 C0 C0 ums0: on uhub0 wheel=0 sc->flags=0x0000 ums0: 3 buttons and a TILT dir. sc->sc_loc_z.size=0 ---- end of krepdump ---- ---- diff between my report and this from lists.freebsd.org/.../004617.html ---- --- 1.txt 2008-08-11 19:25:56.496820730 +0200 +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 @@ -1,7 +1,7 @@ -ums1: at uhub0 port 4 (addr 4) disconnected -ums1: detached - -[report desc size=3D196] +ums0: at uhub0 port 2 (addr 2) disconnected +ums0: detached + +[report desc size=196] USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) @@ -114,6 +114,9 @@ 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 00C0 06 C0 C0 C0 -ums1: on uhub0 -ums1: 3 buttons and Z dir and a TILT dir. +ums0: on uhub0 +wheel=0 +sc->flags=0x0000 +ums0: 3 buttons and a TILT dir. +sc->sc_loc_z.size=0 ---- end of diff ---- and short info: When I use RELENG_7_0, driver reports that my mouse have Z dir, but on RELENG_7 not. From owner-freebsd-usb@FreeBSD.ORG Mon Aug 11 17:40:03 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA8C21065673 for ; Mon, 11 Aug 2008 17:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B87CC8FC23 for ; Mon, 11 Aug 2008 17:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7BHe3K9087916 for ; Mon, 11 Aug 2008 17:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7BHe3JJ087915; Mon, 11 Aug 2008 17:40:03 GMT (envelope-from gnats) Date: Mon, 11 Aug 2008 17:40:03 GMT Message-Id: <200808111740.m7BHe3JJ087915@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Grzegorz Blach Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grzegorz Blach List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 17:40:04 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Grzegorz Blach To: Kai Wang Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Mon, 11 Aug 2008 13:30:57 -0400 On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang wrote: > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: >> >> >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > wrote: >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: >> >> >> >> >> >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org >> > wrote: >> >> > Thank you very much for your problem report. >> >> > It has the internal identification `usb/125941'. >> >> > The individual assigned to look at your >> >> > report is: freebsd-usb. >> >> > >> >> > You can access the state of your problem report at any time >> >> > via this link: >> >> > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 >> >> > >> >> >>Category: usb >> >> >>Responsible: freebsd-usb >> >> >>Synopsis: not working wheel on my microsoft notebook optical >> > mouse >> >> > 3000 >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 >> >> >> >> I just fixed problem with wheel on my mouse >> >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c > file. >> > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 >> >> @@ -402,6 +402,7 @@ >> >> sc->sc_loc_x.pos = 8; >> >> sc->sc_loc_y.pos = 16; >> >> sc->sc_loc_z.pos = 24; >> >> + sc->sc_loc_z.size = 8; >> >> sc->sc_loc_btn[0].pos = 0; >> >> sc->sc_loc_btn[1].pos = 1; >> >> sc->sc_loc_btn[2].pos = 2; >> > >> > >> > Hi, >> > >> > Thanks for submitting the patch. It'd be great if you could also >> > test the patch below for us and paste the result here, just for >> > better understanding the problem. >> > >> > The patch adds some debug printfs: >> > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 >> > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 >> > @@ -284,6 +284,7 @@ >> > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, >> > HUG_WHEEL), >> > hid_input, &sc->sc_loc_z, &flags); >> > + printf("wheel=%d\n", wheel); >> > >> > if (wheel) { >> > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { >> > @@ -323,6 +324,7 @@ >> > sc->flags |= UMS_Z; >> > } >> > } >> > + printf("sc->flags=0x%04x\n", sc->flags); >> > >> > /* >> > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel >> > @@ -402,6 +404,7 @@ >> > sc->sc_loc_x.pos = 8; >> > sc->sc_loc_y.pos = 16; >> > sc->sc_loc_z.pos = 24; >> > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); >> > sc->sc_loc_btn[0].pos = 0; >> > sc->sc_loc_btn[1].pos = 1; >> > sc->sc_loc_btn[2].pos = 2; >> >> this, what I see: >> >> ums0: > 0/0, rev 2.00/1.20, addr 2> on uhub0 >> wheel=0 >> sc->flags=0x0000 >> ums0: 3 buttons and a TILT dir. >> sc->sc_loc_z.size=0 >> > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > different > versions. > > Could you please get krepdump > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > # tar xzvf krepdump.tgz > # cd krepdump > # make > # kldload ./krepdump.ko > > Then plug in your mouse and paste the result here? > > There is one version of report desc of this mouse here: > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > and my guess is your mouse's report desc is different than that... > > > Thanks, > Kai ---- my krepdump ---- ums0: at uhub0 port 2 (addr 2) disconnected ums0: detached [report desc size=196] USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Logical(2) REPORT ID 19 USAGE PAGE Consumer(0xc) USAGE AC Pan(0x238)[Consumer(0xc)] REPORT COUNT 1 REPORT SIZE 8 LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 INPUT ( Data Variable Relative ) (6) REPORT ID 23 USAGE PAGE Microsoft(0xff00) USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 PHYSICAL MINIMUM 1 PHYSICAL MAXIMUM 4 REPORT COUNT 1 REPORT SIZE 2 FEATURE ( Data Variable Absolute ) (2) PHYSICAL MINIMUM 0 PHYSICAL MAXIMUM 0 FEATURE ( Const Array Absolute ) (1) USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] REPORT SIZE 1 FEATURE ( Data Variable Absolute ) (2) REPORT SIZE 3 FEATURE ( Const Array Absolute ) (1) REPORT ID 24 USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] REPORT SIZE 1 FEATURE ( Data Variable Absolute ) (2) REPORT SIZE 7 FEATURE ( Const Array Absolute ) (1) END COLLECTION END COLLECTION USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Application(1) USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Logical(2) REPORT ID 17 USAGE Pointer(0x1)[Generic Desktop(0x1)] COLLECTION Physical(0) USAGE PAGE Button(0x9) USAGE MINIMUM Button1(1) USAGE MAXIMUM Button3(3) REPORT COUNT 3 REPORT SIZE 1 LOGICAL MAXIMUM 1 INPUT ( Data Variable Absolute ) (2) REPORT COUNT 1 INPUT ( Const Array Absolute ) (1) USAGE Button5(0x5)[Button(0x9)] INPUT ( Data Variable Absolute ) (2) REPORT COUNT 3 INPUT ( Const Array Absolute ) (1) USAGE PAGE Generic Desktop(0x1) USAGE X(0x30)[Generic Desktop(0x1)] USAGE Y(0x31)[Generic Desktop(0x1)] REPORT COUNT 2 REPORT SIZE 8 LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 INPUT ( Data Variable Relative ) (6) COLLECTION Logical(2) REPORT ID 18 USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] REPORT COUNT 1 REPORT SIZE 2 LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 PHYSICAL MINIMUM 1 PHYSICAL MAXIMUM 4 FEATURE ( Data Variable Absolute ) (2) PHYSICAL MINIMUM 0 PHYSICAL MAXIMUM 0 REPORT SIZE 6 FEATURE ( Const Array Absolute ) (1) REPORT ID 17 USAGE Wheel(0x38)[Generic Desktop(0x1)] LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 REPORT SIZE 8 INPUT ( Data Variable Relative ) (6) END COLLECTION USAGE PAGE Consumer(0xc) REPORT SIZE 8 USAGE AC Pan(0x238)[Consumer(0xc)] INPUT ( Data Variable Relative ) (6) END COLLECTION END COLLECTION END COLLECTION [hexdump] 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 00C0 06 C0 C0 C0 ums0: on uhub0 wheel=0 sc->flags=0x0000 ums0: 3 buttons and a TILT dir. sc->sc_loc_z.size=0 ---- end of krepdump ---- ---- diff between my report and this from lists.freebsd.org/.../004617.html ---- --- 1.txt 2008-08-11 19:25:56.496820730 +0200 +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 @@ -1,7 +1,7 @@ -ums1: at uhub0 port 4 (addr 4) disconnected -ums1: detached - -[report desc size=3D196] +ums0: at uhub0 port 2 (addr 2) disconnected +ums0: detached + +[report desc size=196] USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) @@ -114,6 +114,9 @@ 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 00C0 06 C0 C0 C0 -ums1: on uhub0 -ums1: 3 buttons and Z dir and a TILT dir. +ums0: on uhub0 +wheel=0 +sc->flags=0x0000 +ums0: 3 buttons and a TILT dir. +sc->sc_loc_z.size=0 ---- end of diff ---- and short info: When I use RELENG_7_0, driver reports that my mouse have Z dir, but on RELENG_7 not. From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 02:27:19 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 423B1106566C for ; Tue, 12 Aug 2008 02:27:19 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 9169A8FC13 for ; Tue, 12 Aug 2008 02:27:18 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so1063811nfh.33 for ; Mon, 11 Aug 2008 19:27:17 -0700 (PDT) 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=eZQnHXLYQrWV608nwS3USeNvnlQmgLQoCupUKkXQQto=; b=GQazaQMF0hrr7tpIIOo26NxK0o7EzAajPsR6m9WivX6aga3iGmdQ0QBmuVhhEG10KJ IJ1hGXzoK3sA7NL6aj71CuPZd4TPVq30EeGJO3cvsufTUpMqcOATCIWaokpKDeehEDjV JQ3JhguRlriEUuWHJ3qDNgu1bqxMiSkvgNsQ4= 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=abgt9TwMkhTmNgJkpxbx9ZSR2Nh5Znma2sPqpVxcjtYlKJ/k8qIPAGXmDB+DjJbTB2 kJ50itOZUOvDXKEVkQiWCH+H+iLx29UTOIj62bd1R1uovt6uuzQKKfxAyjfVrNCAmwPH YcXTE9TcCt/Kzq7AQifay/KO3WboODNaWMf6g= Received: by 10.210.58.13 with SMTP id g13mr10285408eba.144.1218508037117; Mon, 11 Aug 2008 19:27:17 -0700 (PDT) Received: from localhost ( [85.8.1.55]) by mx.google.com with ESMTPS id i4sm1316627nfh.1.2008.08.11.19.27.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Aug 2008 19:27:16 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KSjbL-0001xs-K1; Tue, 12 Aug 2008 04:27:11 +0200 Received: (from kaffir@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m7C2RARA007555; Tue, 12 Aug 2008 04:27:10 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaffir set sender to kaiwang27@gmail.com using -f Date: Tue, 12 Aug 2008 04:27:10 +0200 From: Kai Wang To: Grzegorz Blach Message-ID: <20080812022710.GA7527@plan0> Mail-Followup-To: Grzegorz Blach , FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 02:27:19 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang wrote: > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > >> > >> > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > wrote: > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: > >> >> > >> >> > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org > >> > wrote: > >> >> > Thank you very much for your problem report. > >> >> > It has the internal identification `usb/125941'. > >> >> > The individual assigned to look at your > >> >> > report is: freebsd-usb. > >> >> > > >> >> > You can access the state of your problem report at any time > >> >> > via this link: > >> >> > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > >> >> > > >> >> >>Category: usb > >> >> >>Responsible: freebsd-usb > >> >> >>Synopsis: not working wheel on my microsoft notebook optical > >> > mouse > >> >> > 3000 > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > >> >> > >> >> I just fixed problem with wheel on my mouse > >> >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c > > file. > >> > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > >> >> @@ -402,6 +402,7 @@ > >> >> sc->sc_loc_x.pos = 8; > >> >> sc->sc_loc_y.pos = 16; > >> >> sc->sc_loc_z.pos = 24; > >> >> + sc->sc_loc_z.size = 8; > >> >> sc->sc_loc_btn[0].pos = 0; > >> >> sc->sc_loc_btn[1].pos = 1; > >> >> sc->sc_loc_btn[2].pos = 2; > >> > > >> > > >> > Hi, > >> > > >> > Thanks for submitting the patch. It'd be great if you could also > >> > test the patch below for us and paste the result here, just for > >> > better understanding the problem. > >> > > >> > The patch adds some debug printfs: > >> > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 > >> > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > >> > @@ -284,6 +284,7 @@ > >> > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, > >> > HUG_WHEEL), > >> > hid_input, &sc->sc_loc_z, &flags); > >> > + printf("wheel=%d\n", wheel); > >> > > >> > if (wheel) { > >> > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { > >> > @@ -323,6 +324,7 @@ > >> > sc->flags |= UMS_Z; > >> > } > >> > } > >> > + printf("sc->flags=0x%04x\n", sc->flags); > >> > > >> > /* > >> > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel > >> > @@ -402,6 +404,7 @@ > >> > sc->sc_loc_x.pos = 8; > >> > sc->sc_loc_y.pos = 16; > >> > sc->sc_loc_z.pos = 24; > >> > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); > >> > sc->sc_loc_btn[0].pos = 0; > >> > sc->sc_loc_btn[1].pos = 1; > >> > sc->sc_loc_btn[2].pos = 2; > >> > >> this, what I see: > >> > >> ums0: >> 0/0, rev 2.00/1.20, addr 2> on uhub0 > >> wheel=0 > >> sc->flags=0x0000 > >> ums0: 3 buttons and a TILT dir. > >> sc->sc_loc_z.size=0 > >> > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > > different > > versions. > > > > Could you please get krepdump > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > # tar xzvf krepdump.tgz > > # cd krepdump > > # make > > # kldload ./krepdump.ko > > > > Then plug in your mouse and paste the result here? > > > > There is one version of report desc of this mouse here: > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > and my guess is your mouse's report desc is different than that... > > > > > > Thanks, > > Kai > > ---- my krepdump ---- > ums0: at uhub0 port 2 (addr 2) disconnected > ums0: detached > > [report desc size=196] > USAGE PAGE Consumer(0xc) > USAGE Consumer Control(0x1)[Consumer(0xc)] > COLLECTION Application(1) > USAGE PAGE Generic Desktop(0x1) > USAGE Mouse(0x2)[Generic Desktop(0x1)] > COLLECTION Logical(2) > REPORT ID 19 > USAGE PAGE Consumer(0xc) > USAGE AC Pan(0x238)[Consumer(0xc)] > REPORT COUNT 1 > REPORT SIZE 8 > LOGICAL MINIMUM -127 > LOGICAL MAXIMUM 127 > INPUT ( Data Variable Relative ) (6) > REPORT ID 23 > USAGE PAGE Microsoft(0xff00) > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > LOGICAL MINIMUM 0 > LOGICAL MAXIMUM 1 > PHYSICAL MINIMUM 1 > PHYSICAL MAXIMUM 4 > REPORT COUNT 1 > REPORT SIZE 2 > FEATURE ( Data Variable Absolute ) (2) > PHYSICAL MINIMUM 0 > PHYSICAL MAXIMUM 0 > FEATURE ( Const Array Absolute ) (1) > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > REPORT SIZE 1 > FEATURE ( Data Variable Absolute ) (2) > REPORT SIZE 3 > FEATURE ( Const Array Absolute ) (1) > REPORT ID 24 > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > REPORT SIZE 1 > FEATURE ( Data Variable Absolute ) (2) > REPORT SIZE 7 > FEATURE ( Const Array Absolute ) (1) > END COLLECTION > END COLLECTION > USAGE PAGE Generic Desktop(0x1) > USAGE Mouse(0x2)[Generic Desktop(0x1)] > COLLECTION Application(1) > USAGE PAGE Generic Desktop(0x1) > USAGE Mouse(0x2)[Generic Desktop(0x1)] > COLLECTION Logical(2) > REPORT ID 17 > USAGE Pointer(0x1)[Generic Desktop(0x1)] > COLLECTION Physical(0) > USAGE PAGE Button(0x9) > USAGE MINIMUM Button1(1) > USAGE MAXIMUM Button3(3) > REPORT COUNT 3 > REPORT SIZE 1 > LOGICAL MAXIMUM 1 > INPUT ( Data Variable Absolute ) (2) > REPORT COUNT 1 > INPUT ( Const Array Absolute ) (1) > USAGE Button5(0x5)[Button(0x9)] > INPUT ( Data Variable Absolute ) (2) > REPORT COUNT 3 > INPUT ( Const Array Absolute ) (1) > USAGE PAGE Generic Desktop(0x1) > USAGE X(0x30)[Generic Desktop(0x1)] > USAGE Y(0x31)[Generic Desktop(0x1)] > REPORT COUNT 2 > REPORT SIZE 8 > LOGICAL MINIMUM -127 > LOGICAL MAXIMUM 127 > INPUT ( Data Variable Relative ) (6) > COLLECTION Logical(2) > REPORT ID 18 > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > REPORT COUNT 1 > REPORT SIZE 2 > LOGICAL MINIMUM 0 > LOGICAL MAXIMUM 1 > PHYSICAL MINIMUM 1 > PHYSICAL MAXIMUM 4 > FEATURE ( Data Variable Absolute ) (2) > PHYSICAL MINIMUM 0 > PHYSICAL MAXIMUM 0 > REPORT SIZE 6 > FEATURE ( Const Array Absolute ) (1) > REPORT ID 17 > USAGE Wheel(0x38)[Generic Desktop(0x1)] > LOGICAL MINIMUM -127 > LOGICAL MAXIMUM 127 > REPORT SIZE 8 > INPUT ( Data Variable Relative ) (6) > END COLLECTION > USAGE PAGE Consumer(0xc) > REPORT SIZE 8 > USAGE AC Pan(0x238)[Consumer(0xc)] > INPUT ( Data Variable Relative ) (6) > END COLLECTION > END COLLECTION > END COLLECTION > [hexdump] > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > 00C0 06 C0 C0 C0 > ums0: 0/0, rev 2.00/1.20, addr 2> on uhub0 > wheel=0 > sc->flags=0x0000 > ums0: 3 buttons and a TILT dir. > sc->sc_loc_z.size=0 > ---- end of krepdump ---- > > > ---- diff between my report and this from lists.freebsd.org/.../004617.html > ---- > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > @@ -1,7 +1,7 @@ > -ums1: at uhub0 port 4 (addr 4) disconnected > -ums1: detached > - > -[report desc size=3D196] > +ums0: at uhub0 port 2 (addr 2) disconnected > +ums0: detached > + > +[report desc size=196] > USAGE PAGE Consumer(0xc) > USAGE Consumer Control(0x1)[Consumer(0xc)] > COLLECTION Application(1) > @@ -114,6 +114,9 @@ > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > 00C0 06 C0 C0 C0 > -ums1: 0/0, rev 2.00/1.20, addr 4> on uhub0 > -ums1: 3 buttons and Z dir and a TILT dir. > +ums0: 0/0, rev 2.00/1.20, addr 2> on uhub0 > +wheel=0 > +sc->flags=0x0000 > +ums0: 3 buttons and a TILT dir. > +sc->sc_loc_z.size=0 > ---- end of diff ---- > > and short info: > > When I use RELENG_7_0, driver reports that my mouse have Z dir, but on > RELENG_7 not. The report descriptor is the same. After some experiments, I think the actual problem is inside our hid parser. Could you please try the patch attached against /sys/dev/usb/hid.c along with the debug printf patch for ums.c, and see what the result will be? --y0ulUmNC+osPPQO6-- From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 02:30:11 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A97E21065675 for ; Tue, 12 Aug 2008 02:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8C27A8FC12 for ; Tue, 12 Aug 2008 02:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7C2UBGS034668 for ; Tue, 12 Aug 2008 02:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7C2UBu7034665; Tue, 12 Aug 2008 02:30:11 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 02:30:11 GMT Message-Id: <200808120230.m7C2UBu7034665@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 02:30:11 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Kai Wang To: Grzegorz Blach Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 04:27:10 +0200 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang wrote: > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > >> > >> > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > wrote: > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl wrote: > >> >> > >> >> > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, FreeBSD-gnats-submit@FreeBSD.org > >> > wrote: > >> >> > Thank you very much for your problem report. > >> >> > It has the internal identification `usb/125941'. > >> >> > The individual assigned to look at your > >> >> > report is: freebsd-usb. > >> >> > > >> >> > You can access the state of your problem report at any time > >> >> > via this link: > >> >> > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > >> >> > > >> >> >>Category: usb > >> >> >>Responsible: freebsd-usb > >> >> >>Synopsis: not working wheel on my microsoft notebook optical > >> > mouse > >> >> > 3000 > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > >> >> > >> >> I just fixed problem with wheel on my mouse > >> >> and I'm sending in attachment patch for /usr/src/sys/dev/usb/ums.c > > file. > >> > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > >> >> @@ -402,6 +402,7 @@ > >> >> sc->sc_loc_x.pos = 8; > >> >> sc->sc_loc_y.pos = 16; > >> >> sc->sc_loc_z.pos = 24; > >> >> + sc->sc_loc_z.size = 8; > >> >> sc->sc_loc_btn[0].pos = 0; > >> >> sc->sc_loc_btn[1].pos = 1; > >> >> sc->sc_loc_btn[2].pos = 2; > >> > > >> > > >> > Hi, > >> > > >> > Thanks for submitting the patch. It'd be great if you could also > >> > test the patch below for us and paste the result here, just for > >> > better understanding the problem. > >> > > >> > The patch adds some debug printfs: > >> > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 +0200 > >> > +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > >> > @@ -284,6 +284,7 @@ > >> > wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, > >> > HUG_WHEEL), > >> > hid_input, &sc->sc_loc_z, &flags); > >> > + printf("wheel=%d\n", wheel); > >> > > >> > if (wheel) { > >> > if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { > >> > @@ -323,6 +324,7 @@ > >> > sc->flags |= UMS_Z; > >> > } > >> > } > >> > + printf("sc->flags=0x%04x\n", sc->flags); > >> > > >> > /* > >> > * The Microsoft Wireless Intellimouse 2.0 reports it's wheel > >> > @@ -402,6 +404,7 @@ > >> > sc->sc_loc_x.pos = 8; > >> > sc->sc_loc_y.pos = 16; > >> > sc->sc_loc_z.pos = 24; > >> > + printf("sc->sc_loc_z.size=%u\n", sc->sc_loc_z.size); > >> > sc->sc_loc_btn[0].pos = 0; > >> > sc->sc_loc_btn[1].pos = 1; > >> > sc->sc_loc_btn[2].pos = 2; > >> > >> this, what I see: > >> > >> ums0: >> 0/0, rev 2.00/1.20, addr 2> on uhub0 > >> wheel=0 > >> sc->flags=0x0000 > >> ums0: 3 buttons and a TILT dir. > >> sc->sc_loc_z.size=0 > >> > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > > different > > versions. > > > > Could you please get krepdump > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > # tar xzvf krepdump.tgz > > # cd krepdump > > # make > > # kldload ./krepdump.ko > > > > Then plug in your mouse and paste the result here? > > > > There is one version of report desc of this mouse here: > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > and my guess is your mouse's report desc is different than that... > > > > > > Thanks, > > Kai > > ---- my krepdump ---- > ums0: at uhub0 port 2 (addr 2) disconnected > ums0: detached > > [report desc size=196] > USAGE PAGE Consumer(0xc) > USAGE Consumer Control(0x1)[Consumer(0xc)] > COLLECTION Application(1) > USAGE PAGE Generic Desktop(0x1) > USAGE Mouse(0x2)[Generic Desktop(0x1)] > COLLECTION Logical(2) > REPORT ID 19 > USAGE PAGE Consumer(0xc) > USAGE AC Pan(0x238)[Consumer(0xc)] > REPORT COUNT 1 > REPORT SIZE 8 > LOGICAL MINIMUM -127 > LOGICAL MAXIMUM 127 > INPUT ( Data Variable Relative ) (6) > REPORT ID 23 > USAGE PAGE Microsoft(0xff00) > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > LOGICAL MINIMUM 0 > LOGICAL MAXIMUM 1 > PHYSICAL MINIMUM 1 > PHYSICAL MAXIMUM 4 > REPORT COUNT 1 > REPORT SIZE 2 > FEATURE ( Data Variable Absolute ) (2) > PHYSICAL MINIMUM 0 > PHYSICAL MAXIMUM 0 > FEATURE ( Const Array Absolute ) (1) > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > REPORT SIZE 1 > FEATURE ( Data Variable Absolute ) (2) > REPORT SIZE 3 > FEATURE ( Const Array Absolute ) (1) > REPORT ID 24 > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > REPORT SIZE 1 > FEATURE ( Data Variable Absolute ) (2) > REPORT SIZE 7 > FEATURE ( Const Array Absolute ) (1) > END COLLECTION > END COLLECTION > USAGE PAGE Generic Desktop(0x1) > USAGE Mouse(0x2)[Generic Desktop(0x1)] > COLLECTION Application(1) > USAGE PAGE Generic Desktop(0x1) > USAGE Mouse(0x2)[Generic Desktop(0x1)] > COLLECTION Logical(2) > REPORT ID 17 > USAGE Pointer(0x1)[Generic Desktop(0x1)] > COLLECTION Physical(0) > USAGE PAGE Button(0x9) > USAGE MINIMUM Button1(1) > USAGE MAXIMUM Button3(3) > REPORT COUNT 3 > REPORT SIZE 1 > LOGICAL MAXIMUM 1 > INPUT ( Data Variable Absolute ) (2) > REPORT COUNT 1 > INPUT ( Const Array Absolute ) (1) > USAGE Button5(0x5)[Button(0x9)] > INPUT ( Data Variable Absolute ) (2) > REPORT COUNT 3 > INPUT ( Const Array Absolute ) (1) > USAGE PAGE Generic Desktop(0x1) > USAGE X(0x30)[Generic Desktop(0x1)] > USAGE Y(0x31)[Generic Desktop(0x1)] > REPORT COUNT 2 > REPORT SIZE 8 > LOGICAL MINIMUM -127 > LOGICAL MAXIMUM 127 > INPUT ( Data Variable Relative ) (6) > COLLECTION Logical(2) > REPORT ID 18 > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > REPORT COUNT 1 > REPORT SIZE 2 > LOGICAL MINIMUM 0 > LOGICAL MAXIMUM 1 > PHYSICAL MINIMUM 1 > PHYSICAL MAXIMUM 4 > FEATURE ( Data Variable Absolute ) (2) > PHYSICAL MINIMUM 0 > PHYSICAL MAXIMUM 0 > REPORT SIZE 6 > FEATURE ( Const Array Absolute ) (1) > REPORT ID 17 > USAGE Wheel(0x38)[Generic Desktop(0x1)] > LOGICAL MINIMUM -127 > LOGICAL MAXIMUM 127 > REPORT SIZE 8 > INPUT ( Data Variable Relative ) (6) > END COLLECTION > USAGE PAGE Consumer(0xc) > REPORT SIZE 8 > USAGE AC Pan(0x238)[Consumer(0xc)] > INPUT ( Data Variable Relative ) (6) > END COLLECTION > END COLLECTION > END COLLECTION > [hexdump] > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > 00C0 06 C0 C0 C0 > ums0: 0/0, rev 2.00/1.20, addr 2> on uhub0 > wheel=0 > sc->flags=0x0000 > ums0: 3 buttons and a TILT dir. > sc->sc_loc_z.size=0 > ---- end of krepdump ---- > > > ---- diff between my report and this from lists.freebsd.org/.../004617.html > ---- > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > @@ -1,7 +1,7 @@ > -ums1: at uhub0 port 4 (addr 4) disconnected > -ums1: detached > - > -[report desc size=3D196] > +ums0: at uhub0 port 2 (addr 2) disconnected > +ums0: detached > + > +[report desc size=196] > USAGE PAGE Consumer(0xc) > USAGE Consumer Control(0x1)[Consumer(0xc)] > COLLECTION Application(1) > @@ -114,6 +114,9 @@ > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > 00C0 06 C0 C0 C0 > -ums1: 0/0, rev 2.00/1.20, addr 4> on uhub0 > -ums1: 3 buttons and Z dir and a TILT dir. > +ums0: 0/0, rev 2.00/1.20, addr 2> on uhub0 > +wheel=0 > +sc->flags=0x0000 > +ums0: 3 buttons and a TILT dir. > +sc->sc_loc_z.size=0 > ---- end of diff ---- > > and short info: > > When I use RELENG_7_0, driver reports that my mouse have Z dir, but on > RELENG_7 not. The report descriptor is the same. After some experiments, I think the actual problem is inside our hid parser. Could you please try the patch attached against /sys/dev/usb/hid.c along with the debug printf patch for ums.c, and see what the result will be? --y0ulUmNC+osPPQO6 Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="hid.diff" --- /sys/dev/usb/hid.c 2007-06-20 07:10:52.000000000 +0200 +++ hid.c 2008-08-12 04:14:19.000000000 +0200 @@ -131,6 +131,8 @@ if (s->multi < s->multimax) { c->usage = s->usages[min(s->multi, s->nu-1)]; s->multi++; + if (s->nu > 0) + s->nu--; *h = *c; c->loc.pos += c->loc.size; h->next = 0; @@ -193,8 +195,11 @@ case 0: /* Main */ switch (bTag) { case 8: /* Input */ - if (!(s->kindset & (1 << hid_input))) + if (!(s->kindset & (1 << hid_input))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_input; c->flags = dval; ret: @@ -223,8 +228,11 @@ return (1); } case 9: /* Output */ - if (!(s->kindset & (1 << hid_output))) + if (!(s->kindset & (1 << hid_output))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_output; c->flags = dval; goto ret; @@ -237,8 +245,11 @@ s->nu = 0; return (1); case 11: /* Feature */ - if (!(s->kindset & (1 << hid_feature))) + if (!(s->kindset & (1 << hid_feature))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_feature; c->flags = dval; goto ret; --y0ulUmNC+osPPQO6-- From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 12:30:24 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 E08C3106564A; Tue, 12 Aug 2008 12:30:24 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com (chi.fastbighost.com [65.98.102.73]) by mx1.freebsd.org (Postfix) with ESMTP id A63708FC12; Tue, 12 Aug 2008 12:30:24 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from admc214.neoplus.adsl.tpnet.pl ([79.185.32.214] helo=silver.doors) by chi.fastbighost.com with esmtpa (Exim 4.69) (envelope-from ) id 1KSt13-0003ah-Bc; Tue, 12 Aug 2008 08:30:22 -0400 Date: Tue, 12 Aug 2008 14:30:16 +0200 From: Grzegorz Blach To: Kai Wang Message-ID: <20080812143016.2ac5a7a4@silver.doors> In-Reply-To: <20080812022710.GA7527@plan0> References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - chi.fastbighost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - back-up.pl X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 12:30:25 -0000 On Tue, 12 Aug 2008 04:27:10 +0200 Kai Wang wrote: > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > wrote: > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > > >> > > >> > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > >> > > > wrote: > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > >> > wrote: > > >> >> > > >> >> > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > >> > wrote: > > >> >> > Thank you very much for your problem report. > > >> >> > It has the internal identification `usb/125941'. > > >> >> > The individual assigned to look at your > > >> >> > report is: freebsd-usb. > > >> >> > > > >> >> > You can access the state of your problem report at any time > > >> >> > via this link: > > >> >> > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > >> >> > > > >> >> >>Category: usb > > >> >> >>Responsible: freebsd-usb > > >> >> >>Synopsis: not working wheel on my microsoft notebook > > >> >> >>optical > > >> > mouse > > >> >> > 3000 > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > >> >> > > >> >> I just fixed problem with wheel on my mouse > > >> >> and I'm sending in attachment patch > > >> >> for /usr/src/sys/dev/usb/ums.c > > > file. > > >> > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > >> >> @@ -402,6 +402,7 @@ > > >> >> sc->sc_loc_x.pos = 8; > > >> >> sc->sc_loc_y.pos = 16; > > >> >> sc->sc_loc_z.pos = 24; > > >> >> + sc->sc_loc_z.size = 8; > > >> >> sc->sc_loc_btn[0].pos = 0; > > >> >> sc->sc_loc_btn[1].pos = 1; > > >> >> sc->sc_loc_btn[2].pos = 2; > > >> > > > >> > > > >> > Hi, > > >> > > > >> > Thanks for submitting the patch. It'd be great if you could > > >> > also test the patch below for us and paste the result here, > > >> > just for better understanding the problem. > > >> > > > >> > The patch adds some debug printfs: > > >> > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > >> > @@ -284,6 +284,7 @@ > > >> > wheel = hid_locate(desc, size, > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > >> > hid_input, &sc->sc_loc_z, &flags); > > >> > + printf("wheel=%d\n", wheel); > > >> > > > >> > if (wheel) { > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > >> > sc->flags |= UMS_Z; > > >> > } > > >> > } > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > >> > > > >> > /* > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > >> > it's wheel @@ -402,6 +404,7 @@ > > >> > sc->sc_loc_x.pos = 8; > > >> > sc->sc_loc_y.pos = 16; > > >> > sc->sc_loc_z.pos = 24; > > >> > + printf("sc->sc_loc_z.size=%u\n", > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > >> > sc->sc_loc_btn[1].pos = 1; > > >> > sc->sc_loc_btn[2].pos = 2; > > >> > > >> this, what I see: > > >> > > >> ums0: > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > >> wheel=0 > > >> sc->flags=0x0000 > > >> ums0: 3 buttons and a TILT dir. > > >> sc->sc_loc_z.size=0 > > >> > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > > > different > > > versions. > > > > > > Could you please get krepdump > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > # tar xzvf krepdump.tgz > > > # cd krepdump > > > # make > > > # kldload ./krepdump.ko > > > > > > Then plug in your mouse and paste the result here? > > > > > > There is one version of report desc of this mouse here: > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > and my guess is your mouse's report desc is different than that... > > > > > > > > > Thanks, > > > Kai > > > > ---- my krepdump ---- > > ums0: at uhub0 port 2 (addr 2) disconnected > > ums0: detached > > > > [report desc size=196] > > USAGE PAGE Consumer(0xc) > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > COLLECTION Application(1) > > USAGE PAGE Generic Desktop(0x1) > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > COLLECTION Logical(2) > > REPORT ID 19 > > USAGE PAGE Consumer(0xc) > > USAGE AC Pan(0x238)[Consumer(0xc)] > > REPORT COUNT 1 > > REPORT SIZE 8 > > LOGICAL MINIMUM -127 > > LOGICAL MAXIMUM 127 > > INPUT ( Data Variable Relative ) (6) > > REPORT ID 23 > > USAGE PAGE Microsoft(0xff00) > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > LOGICAL MINIMUM 0 > > LOGICAL MAXIMUM 1 > > PHYSICAL MINIMUM 1 > > PHYSICAL MAXIMUM 4 > > REPORT COUNT 1 > > REPORT SIZE 2 > > FEATURE ( Data Variable Absolute ) (2) > > PHYSICAL MINIMUM 0 > > PHYSICAL MAXIMUM 0 > > FEATURE ( Const Array Absolute ) (1) > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > REPORT SIZE 1 > > FEATURE ( Data Variable Absolute ) (2) > > REPORT SIZE 3 > > FEATURE ( Const Array Absolute ) (1) > > REPORT ID 24 > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > REPORT SIZE 1 > > FEATURE ( Data Variable Absolute ) (2) > > REPORT SIZE 7 > > FEATURE ( Const Array Absolute ) (1) > > END COLLECTION > > END COLLECTION > > USAGE PAGE Generic Desktop(0x1) > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > COLLECTION Application(1) > > USAGE PAGE Generic Desktop(0x1) > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > COLLECTION Logical(2) > > REPORT ID 17 > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > COLLECTION Physical(0) > > USAGE PAGE Button(0x9) > > USAGE MINIMUM Button1(1) > > USAGE MAXIMUM Button3(3) > > REPORT COUNT 3 > > REPORT SIZE 1 > > LOGICAL MAXIMUM 1 > > INPUT ( Data Variable Absolute ) (2) > > REPORT COUNT 1 > > INPUT ( Const Array Absolute ) (1) > > USAGE Button5(0x5)[Button(0x9)] > > INPUT ( Data Variable Absolute ) (2) > > REPORT COUNT 3 > > INPUT ( Const Array Absolute ) (1) > > USAGE PAGE Generic Desktop(0x1) > > USAGE X(0x30)[Generic Desktop(0x1)] > > USAGE Y(0x31)[Generic Desktop(0x1)] > > REPORT COUNT 2 > > REPORT SIZE 8 > > LOGICAL MINIMUM -127 > > LOGICAL MAXIMUM 127 > > INPUT ( Data Variable Relative ) (6) > > COLLECTION Logical(2) > > REPORT ID 18 > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > REPORT COUNT 1 > > REPORT SIZE 2 > > LOGICAL MINIMUM 0 > > LOGICAL MAXIMUM 1 > > PHYSICAL MINIMUM 1 > > PHYSICAL MAXIMUM 4 > > FEATURE ( Data Variable Absolute ) (2) > > PHYSICAL MINIMUM 0 > > PHYSICAL MAXIMUM 0 > > REPORT SIZE 6 > > FEATURE ( Const Array Absolute ) (1) > > REPORT ID 17 > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > LOGICAL MINIMUM -127 > > LOGICAL MAXIMUM 127 > > REPORT SIZE 8 > > INPUT ( Data Variable Relative ) (6) > > END COLLECTION > > USAGE PAGE Consumer(0xc) > > REPORT SIZE 8 > > USAGE AC Pan(0x238)[Consumer(0xc)] > > INPUT ( Data Variable Relative ) (6) > > END COLLECTION > > END COLLECTION > > END COLLECTION > > [hexdump] > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > 00C0 06 C0 C0 C0 > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > wheel=0 > > sc->flags=0x0000 > > ums0: 3 buttons and a TILT dir. > > sc->sc_loc_z.size=0 > > ---- end of krepdump ---- > > > > > > ---- diff between my report and this from > > lists.freebsd.org/.../004617.html ---- > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > @@ -1,7 +1,7 @@ > > -ums1: at uhub0 port 4 (addr 4) disconnected > > -ums1: detached > > - > > -[report desc size=3D196] > > +ums0: at uhub0 port 2 (addr 2) disconnected > > +ums0: detached > > + > > +[report desc size=196] > > USAGE PAGE Consumer(0xc) > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > COLLECTION Application(1) > > @@ -114,6 +114,9 @@ > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > 00C0 06 C0 C0 C0 > > -ums1: > class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > -ums1: 3 buttons and Z dir and a TILT dir. > > +ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > +wheel=0 > > +sc->flags=0x0000 > > +ums0: 3 buttons and a TILT dir. > > +sc->sc_loc_z.size=0 > > ---- end of diff ---- > > > > and short info: > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, but > > on RELENG_7 not. > > The report descriptor is the same. After some experiments, I think > the actual problem is inside our hid parser. > > Could you please try the patch attached against /sys/dev/usb/hid.c > along with the debug printf patch for ums.c, and see what the result > will be? > > kernel with appiled this two patches reports that: ums0: on uhub0 ums0: mouse has no Y report device_attach: ums0 attach returned 6 From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 12:40:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FB0F1065674 for ; Tue, 12 Aug 2008 12:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0424B8FC15 for ; Tue, 12 Aug 2008 12:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CCe3wc021258 for ; Tue, 12 Aug 2008 12:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CCe3bO021257; Tue, 12 Aug 2008 12:40:03 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 12:40:03 GMT Message-Id: <200808121240.m7CCe3bO021257@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Grzegorz Blach Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grzegorz Blach List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 12:40:04 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Grzegorz Blach To: Kai Wang Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 14:30:16 +0200 On Tue, 12 Aug 2008 04:27:10 +0200 Kai Wang wrote: > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > wrote: > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > > >> > > >> > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > >> > > > wrote: > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > >> > wrote: > > >> >> > > >> >> > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > >> > wrote: > > >> >> > Thank you very much for your problem report. > > >> >> > It has the internal identification `usb/125941'. > > >> >> > The individual assigned to look at your > > >> >> > report is: freebsd-usb. > > >> >> > > > >> >> > You can access the state of your problem report at any time > > >> >> > via this link: > > >> >> > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > >> >> > > > >> >> >>Category: usb > > >> >> >>Responsible: freebsd-usb > > >> >> >>Synopsis: not working wheel on my microsoft notebook > > >> >> >>optical > > >> > mouse > > >> >> > 3000 > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > >> >> > > >> >> I just fixed problem with wheel on my mouse > > >> >> and I'm sending in attachment patch > > >> >> for /usr/src/sys/dev/usb/ums.c > > > file. > > >> > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > >> >> @@ -402,6 +402,7 @@ > > >> >> sc->sc_loc_x.pos = 8; > > >> >> sc->sc_loc_y.pos = 16; > > >> >> sc->sc_loc_z.pos = 24; > > >> >> + sc->sc_loc_z.size = 8; > > >> >> sc->sc_loc_btn[0].pos = 0; > > >> >> sc->sc_loc_btn[1].pos = 1; > > >> >> sc->sc_loc_btn[2].pos = 2; > > >> > > > >> > > > >> > Hi, > > >> > > > >> > Thanks for submitting the patch. It'd be great if you could > > >> > also test the patch below for us and paste the result here, > > >> > just for better understanding the problem. > > >> > > > >> > The patch adds some debug printfs: > > >> > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > >> > @@ -284,6 +284,7 @@ > > >> > wheel = hid_locate(desc, size, > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > >> > hid_input, &sc->sc_loc_z, &flags); > > >> > + printf("wheel=%d\n", wheel); > > >> > > > >> > if (wheel) { > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > >> > sc->flags |= UMS_Z; > > >> > } > > >> > } > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > >> > > > >> > /* > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > >> > it's wheel @@ -402,6 +404,7 @@ > > >> > sc->sc_loc_x.pos = 8; > > >> > sc->sc_loc_y.pos = 16; > > >> > sc->sc_loc_z.pos = 24; > > >> > + printf("sc->sc_loc_z.size=%u\n", > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > >> > sc->sc_loc_btn[1].pos = 1; > > >> > sc->sc_loc_btn[2].pos = 2; > > >> > > >> this, what I see: > > >> > > >> ums0: > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > >> wheel=0 > > >> sc->flags=0x0000 > > >> ums0: 3 buttons and a TILT dir. > > >> sc->sc_loc_z.size=0 > > >> > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > > > different > > > versions. > > > > > > Could you please get krepdump > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > # tar xzvf krepdump.tgz > > > # cd krepdump > > > # make > > > # kldload ./krepdump.ko > > > > > > Then plug in your mouse and paste the result here? > > > > > > There is one version of report desc of this mouse here: > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > and my guess is your mouse's report desc is different than that... > > > > > > > > > Thanks, > > > Kai > > > > ---- my krepdump ---- > > ums0: at uhub0 port 2 (addr 2) disconnected > > ums0: detached > > > > [report desc size=196] > > USAGE PAGE Consumer(0xc) > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > COLLECTION Application(1) > > USAGE PAGE Generic Desktop(0x1) > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > COLLECTION Logical(2) > > REPORT ID 19 > > USAGE PAGE Consumer(0xc) > > USAGE AC Pan(0x238)[Consumer(0xc)] > > REPORT COUNT 1 > > REPORT SIZE 8 > > LOGICAL MINIMUM -127 > > LOGICAL MAXIMUM 127 > > INPUT ( Data Variable Relative ) (6) > > REPORT ID 23 > > USAGE PAGE Microsoft(0xff00) > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > LOGICAL MINIMUM 0 > > LOGICAL MAXIMUM 1 > > PHYSICAL MINIMUM 1 > > PHYSICAL MAXIMUM 4 > > REPORT COUNT 1 > > REPORT SIZE 2 > > FEATURE ( Data Variable Absolute ) (2) > > PHYSICAL MINIMUM 0 > > PHYSICAL MAXIMUM 0 > > FEATURE ( Const Array Absolute ) (1) > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > REPORT SIZE 1 > > FEATURE ( Data Variable Absolute ) (2) > > REPORT SIZE 3 > > FEATURE ( Const Array Absolute ) (1) > > REPORT ID 24 > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > REPORT SIZE 1 > > FEATURE ( Data Variable Absolute ) (2) > > REPORT SIZE 7 > > FEATURE ( Const Array Absolute ) (1) > > END COLLECTION > > END COLLECTION > > USAGE PAGE Generic Desktop(0x1) > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > COLLECTION Application(1) > > USAGE PAGE Generic Desktop(0x1) > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > COLLECTION Logical(2) > > REPORT ID 17 > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > COLLECTION Physical(0) > > USAGE PAGE Button(0x9) > > USAGE MINIMUM Button1(1) > > USAGE MAXIMUM Button3(3) > > REPORT COUNT 3 > > REPORT SIZE 1 > > LOGICAL MAXIMUM 1 > > INPUT ( Data Variable Absolute ) (2) > > REPORT COUNT 1 > > INPUT ( Const Array Absolute ) (1) > > USAGE Button5(0x5)[Button(0x9)] > > INPUT ( Data Variable Absolute ) (2) > > REPORT COUNT 3 > > INPUT ( Const Array Absolute ) (1) > > USAGE PAGE Generic Desktop(0x1) > > USAGE X(0x30)[Generic Desktop(0x1)] > > USAGE Y(0x31)[Generic Desktop(0x1)] > > REPORT COUNT 2 > > REPORT SIZE 8 > > LOGICAL MINIMUM -127 > > LOGICAL MAXIMUM 127 > > INPUT ( Data Variable Relative ) (6) > > COLLECTION Logical(2) > > REPORT ID 18 > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > REPORT COUNT 1 > > REPORT SIZE 2 > > LOGICAL MINIMUM 0 > > LOGICAL MAXIMUM 1 > > PHYSICAL MINIMUM 1 > > PHYSICAL MAXIMUM 4 > > FEATURE ( Data Variable Absolute ) (2) > > PHYSICAL MINIMUM 0 > > PHYSICAL MAXIMUM 0 > > REPORT SIZE 6 > > FEATURE ( Const Array Absolute ) (1) > > REPORT ID 17 > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > LOGICAL MINIMUM -127 > > LOGICAL MAXIMUM 127 > > REPORT SIZE 8 > > INPUT ( Data Variable Relative ) (6) > > END COLLECTION > > USAGE PAGE Consumer(0xc) > > REPORT SIZE 8 > > USAGE AC Pan(0x238)[Consumer(0xc)] > > INPUT ( Data Variable Relative ) (6) > > END COLLECTION > > END COLLECTION > > END COLLECTION > > [hexdump] > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > 00C0 06 C0 C0 C0 > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > wheel=0 > > sc->flags=0x0000 > > ums0: 3 buttons and a TILT dir. > > sc->sc_loc_z.size=0 > > ---- end of krepdump ---- > > > > > > ---- diff between my report and this from > > lists.freebsd.org/.../004617.html ---- > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > @@ -1,7 +1,7 @@ > > -ums1: at uhub0 port 4 (addr 4) disconnected > > -ums1: detached > > - > > -[report desc size=3D196] > > +ums0: at uhub0 port 2 (addr 2) disconnected > > +ums0: detached > > + > > +[report desc size=196] > > USAGE PAGE Consumer(0xc) > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > COLLECTION Application(1) > > @@ -114,6 +114,9 @@ > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > 00C0 06 C0 C0 C0 > > -ums1: > class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > -ums1: 3 buttons and Z dir and a TILT dir. > > +ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > +wheel=0 > > +sc->flags=0x0000 > > +ums0: 3 buttons and a TILT dir. > > +sc->sc_loc_z.size=0 > > ---- end of diff ---- > > > > and short info: > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, but > > on RELENG_7 not. > > The report descriptor is the same. After some experiments, I think > the actual problem is inside our hid parser. > > Could you please try the patch attached against /sys/dev/usb/hid.c > along with the debug printf patch for ums.c, and see what the result > will be? > > kernel with appiled this two patches reports that: ums0: on uhub0 ums0: mouse has no Y report device_attach: ums0 attach returned 6 From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 13:30: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 9A7FF1065671 for ; Tue, 12 Aug 2008 13:30:38 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.188]) by mx1.freebsd.org (Postfix) with ESMTP id EC9028FC16 for ; Tue, 12 Aug 2008 13:30:37 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so3798904fkk.11 for ; Tue, 12 Aug 2008 06:30:36 -0700 (PDT) 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=BhMVr3fmCY1C8+lVOJLq6e0+ERh8no+NcpUH+tntzSY=; b=UaI8ON3MXHlJ9n1djRNcsG3en7oefLGpJbKHnaN7qAbsg6cWlmB9AZHs9XZhJk/cJm lBEpMED7Mw6GEXBg8IszfYYVKX9kB+3mAqbIYeCTYJQiUVFrNg5/ZPrlinNvT2sAgnm5 CLSbtCL8kur8jH/9YGWGz9lHxuL4D1CCGNlGI= 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=xiq8/uBGkX6bpSsQXtz60nufpTUmdKjrmtkfe7IJBQAKC6m5EmqlSAhH35fVe5BGXO EfQYZvlGRtS9EVZR0mebfUwYPAklmw2InT7gXDMN877MkxkL0DdM5iQp063sMN4VmhJl A9huFQfbaBVY3u/XbwpPsP0HOIv9pGcoyMtf4= Received: by 10.180.253.12 with SMTP id a12mr4875597bki.40.1218547836520; Tue, 12 Aug 2008 06:30:36 -0700 (PDT) Received: from localhost ( [85.8.1.55]) by mx.google.com with ESMTPS id k10sm7837446nfh.25.2008.08.12.06.30.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Aug 2008 06:30:35 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KStxG-0002Ui-8m; Tue, 12 Aug 2008 15:30:30 +0200 Received: (from kaffir@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m7CDUT2G009591; Tue, 12 Aug 2008 15:30:29 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaffir set sender to kaiwang27@gmail.com using -f Date: Tue, 12 Aug 2008 15:30:29 +0200 From: Kai Wang To: Grzegorz Blach Message-ID: <20080812133029.GA9576@plan0> Mail-Followup-To: Grzegorz Blach , FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> <20080812143016.2ac5a7a4@silver.doors> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: <20080812143016.2ac5a7a4@silver.doors> User-Agent: Mutt/1.5.17 (2007-11-01) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 13:30:38 -0000 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Tue, Aug 12, 2008 at 02:30:16PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 04:27:10 +0200 > Kai Wang wrote: > > > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > > wrote: > > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > > > >> > > > >> > > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > > >> > > > > wrote: > > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > > >> > wrote: > > > >> >> > > > >> >> > > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > > >> > wrote: > > > >> >> > Thank you very much for your problem report. > > > >> >> > It has the internal identification `usb/125941'. > > > >> >> > The individual assigned to look at your > > > >> >> > report is: freebsd-usb. > > > >> >> > > > > >> >> > You can access the state of your problem report at any time > > > >> >> > via this link: > > > >> >> > > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > >> >> > > > > >> >> >>Category: usb > > > >> >> >>Responsible: freebsd-usb > > > >> >> >>Synopsis: not working wheel on my microsoft notebook > > > >> >> >>optical > > > >> > mouse > > > >> >> > 3000 > > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > > >> >> > > > >> >> I just fixed problem with wheel on my mouse > > > >> >> and I'm sending in attachment patch > > > >> >> for /usr/src/sys/dev/usb/ums.c > > > > file. > > > >> > > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > > >> >> @@ -402,6 +402,7 @@ > > > >> >> sc->sc_loc_x.pos = 8; > > > >> >> sc->sc_loc_y.pos = 16; > > > >> >> sc->sc_loc_z.pos = 24; > > > >> >> + sc->sc_loc_z.size = 8; > > > >> >> sc->sc_loc_btn[0].pos = 0; > > > >> >> sc->sc_loc_btn[1].pos = 1; > > > >> >> sc->sc_loc_btn[2].pos = 2; > > > >> > > > > >> > > > > >> > Hi, > > > >> > > > > >> > Thanks for submitting the patch. It'd be great if you could > > > >> > also test the patch below for us and paste the result here, > > > >> > just for better understanding the problem. > > > >> > > > > >> > The patch adds some debug printfs: > > > >> > > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > > >> > @@ -284,6 +284,7 @@ > > > >> > wheel = hid_locate(desc, size, > > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > > >> > hid_input, &sc->sc_loc_z, &flags); > > > >> > + printf("wheel=%d\n", wheel); > > > >> > > > > >> > if (wheel) { > > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > > >> > sc->flags |= UMS_Z; > > > >> > } > > > >> > } > > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > > >> > > > > >> > /* > > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > > >> > it's wheel @@ -402,6 +404,7 @@ > > > >> > sc->sc_loc_x.pos = 8; > > > >> > sc->sc_loc_y.pos = 16; > > > >> > sc->sc_loc_z.pos = 24; > > > >> > + printf("sc->sc_loc_z.size=%u\n", > > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > > >> > sc->sc_loc_btn[1].pos = 1; > > > >> > sc->sc_loc_btn[2].pos = 2; > > > >> > > > >> this, what I see: > > > >> > > > >> ums0: > > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > >> wheel=0 > > > >> sc->flags=0x0000 > > > >> ums0: 3 buttons and a TILT dir. > > > >> sc->sc_loc_z.size=0 > > > >> > > > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > > > > different > > > > versions. > > > > > > > > Could you please get krepdump > > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > > > # tar xzvf krepdump.tgz > > > > # cd krepdump > > > > # make > > > > # kldload ./krepdump.ko > > > > > > > > Then plug in your mouse and paste the result here? > > > > > > > > There is one version of report desc of this mouse here: > > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > > > and my guess is your mouse's report desc is different than that... > > > > > > > > > > > > Thanks, > > > > Kai > > > > > > ---- my krepdump ---- > > > ums0: at uhub0 port 2 (addr 2) disconnected > > > ums0: detached > > > > > > [report desc size=196] > > > USAGE PAGE Consumer(0xc) > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > COLLECTION Application(1) > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > COLLECTION Logical(2) > > > REPORT ID 19 > > > USAGE PAGE Consumer(0xc) > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > REPORT COUNT 1 > > > REPORT SIZE 8 > > > LOGICAL MINIMUM -127 > > > LOGICAL MAXIMUM 127 > > > INPUT ( Data Variable Relative ) (6) > > > REPORT ID 23 > > > USAGE PAGE Microsoft(0xff00) > > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > > LOGICAL MINIMUM 0 > > > LOGICAL MAXIMUM 1 > > > PHYSICAL MINIMUM 1 > > > PHYSICAL MAXIMUM 4 > > > REPORT COUNT 1 > > > REPORT SIZE 2 > > > FEATURE ( Data Variable Absolute ) (2) > > > PHYSICAL MINIMUM 0 > > > PHYSICAL MAXIMUM 0 > > > FEATURE ( Const Array Absolute ) (1) > > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > > REPORT SIZE 1 > > > FEATURE ( Data Variable Absolute ) (2) > > > REPORT SIZE 3 > > > FEATURE ( Const Array Absolute ) (1) > > > REPORT ID 24 > > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > > REPORT SIZE 1 > > > FEATURE ( Data Variable Absolute ) (2) > > > REPORT SIZE 7 > > > FEATURE ( Const Array Absolute ) (1) > > > END COLLECTION > > > END COLLECTION > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > COLLECTION Application(1) > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > COLLECTION Logical(2) > > > REPORT ID 17 > > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > > COLLECTION Physical(0) > > > USAGE PAGE Button(0x9) > > > USAGE MINIMUM Button1(1) > > > USAGE MAXIMUM Button3(3) > > > REPORT COUNT 3 > > > REPORT SIZE 1 > > > LOGICAL MAXIMUM 1 > > > INPUT ( Data Variable Absolute ) (2) > > > REPORT COUNT 1 > > > INPUT ( Const Array Absolute ) (1) > > > USAGE Button5(0x5)[Button(0x9)] > > > INPUT ( Data Variable Absolute ) (2) > > > REPORT COUNT 3 > > > INPUT ( Const Array Absolute ) (1) > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE X(0x30)[Generic Desktop(0x1)] > > > USAGE Y(0x31)[Generic Desktop(0x1)] > > > REPORT COUNT 2 > > > REPORT SIZE 8 > > > LOGICAL MINIMUM -127 > > > LOGICAL MAXIMUM 127 > > > INPUT ( Data Variable Relative ) (6) > > > COLLECTION Logical(2) > > > REPORT ID 18 > > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > > REPORT COUNT 1 > > > REPORT SIZE 2 > > > LOGICAL MINIMUM 0 > > > LOGICAL MAXIMUM 1 > > > PHYSICAL MINIMUM 1 > > > PHYSICAL MAXIMUM 4 > > > FEATURE ( Data Variable Absolute ) (2) > > > PHYSICAL MINIMUM 0 > > > PHYSICAL MAXIMUM 0 > > > REPORT SIZE 6 > > > FEATURE ( Const Array Absolute ) (1) > > > REPORT ID 17 > > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > > LOGICAL MINIMUM -127 > > > LOGICAL MAXIMUM 127 > > > REPORT SIZE 8 > > > INPUT ( Data Variable Relative ) (6) > > > END COLLECTION > > > USAGE PAGE Consumer(0xc) > > > REPORT SIZE 8 > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > INPUT ( Data Variable Relative ) (6) > > > END COLLECTION > > > END COLLECTION > > > END COLLECTION > > > [hexdump] > > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > 00C0 06 C0 C0 C0 > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > wheel=0 > > > sc->flags=0x0000 > > > ums0: 3 buttons and a TILT dir. > > > sc->sc_loc_z.size=0 > > > ---- end of krepdump ---- > > > > > > > > > ---- diff between my report and this from > > > lists.freebsd.org/.../004617.html ---- > > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > > @@ -1,7 +1,7 @@ > > > -ums1: at uhub0 port 4 (addr 4) disconnected > > > -ums1: detached > > > - > > > -[report desc size=3D196] > > > +ums0: at uhub0 port 2 (addr 2) disconnected > > > +ums0: detached > > > + > > > +[report desc size=196] > > > USAGE PAGE Consumer(0xc) > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > COLLECTION Application(1) > > > @@ -114,6 +114,9 @@ > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > 00C0 06 C0 C0 C0 > > > -ums1: > > class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > > -ums1: 3 buttons and Z dir and a TILT dir. > > > +ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > +wheel=0 > > > +sc->flags=0x0000 > > > +ums0: 3 buttons and a TILT dir. > > > +sc->sc_loc_z.size=0 > > > ---- end of diff ---- > > > > > > and short info: > > > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, but > > > on RELENG_7 not. > > > > The report descriptor is the same. After some experiments, I think > > the actual problem is inside our hid parser. > > > > Could you please try the patch attached against /sys/dev/usb/hid.c > > along with the debug printf patch for ums.c, and see what the result > > will be? > > > > > > kernel with appiled this two patches reports that: > > ums0: class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse has no Y report > device_attach: ums0 attach returned 6 > Sorry I made a mistake in previous patch. How about this one? --Qxx1br4bt0+wmkIi-- From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 13:40:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18A511065685 for ; Tue, 12 Aug 2008 13:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 102148FC21 for ; Tue, 12 Aug 2008 13:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CDe3Ox026318 for ; Tue, 12 Aug 2008 13:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CDe3HR026317; Tue, 12 Aug 2008 13:40:03 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 13:40:03 GMT Message-Id: <200808121340.m7CDe3HR026317@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 13:40:04 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Kai Wang To: Grzegorz Blach Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 15:30:29 +0200 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Tue, Aug 12, 2008 at 02:30:16PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 04:27:10 +0200 > Kai Wang wrote: > > > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > > wrote: > > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach wrote: > > > >> > > > >> > > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > > >> > > > > wrote: > > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > > >> > wrote: > > > >> >> > > > >> >> > > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > > >> > wrote: > > > >> >> > Thank you very much for your problem report. > > > >> >> > It has the internal identification `usb/125941'. > > > >> >> > The individual assigned to look at your > > > >> >> > report is: freebsd-usb. > > > >> >> > > > > >> >> > You can access the state of your problem report at any time > > > >> >> > via this link: > > > >> >> > > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > >> >> > > > > >> >> >>Category: usb > > > >> >> >>Responsible: freebsd-usb > > > >> >> >>Synopsis: not working wheel on my microsoft notebook > > > >> >> >>optical > > > >> > mouse > > > >> >> > 3000 > > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > > >> >> > > > >> >> I just fixed problem with wheel on my mouse > > > >> >> and I'm sending in attachment patch > > > >> >> for /usr/src/sys/dev/usb/ums.c > > > > file. > > > >> > > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > > >> >> @@ -402,6 +402,7 @@ > > > >> >> sc->sc_loc_x.pos = 8; > > > >> >> sc->sc_loc_y.pos = 16; > > > >> >> sc->sc_loc_z.pos = 24; > > > >> >> + sc->sc_loc_z.size = 8; > > > >> >> sc->sc_loc_btn[0].pos = 0; > > > >> >> sc->sc_loc_btn[1].pos = 1; > > > >> >> sc->sc_loc_btn[2].pos = 2; > > > >> > > > > >> > > > > >> > Hi, > > > >> > > > > >> > Thanks for submitting the patch. It'd be great if you could > > > >> > also test the patch below for us and paste the result here, > > > >> > just for better understanding the problem. > > > >> > > > > >> > The patch adds some debug printfs: > > > >> > > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > > >> > @@ -284,6 +284,7 @@ > > > >> > wheel = hid_locate(desc, size, > > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > > >> > hid_input, &sc->sc_loc_z, &flags); > > > >> > + printf("wheel=%d\n", wheel); > > > >> > > > > >> > if (wheel) { > > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > > >> > sc->flags |= UMS_Z; > > > >> > } > > > >> > } > > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > > >> > > > > >> > /* > > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > > >> > it's wheel @@ -402,6 +404,7 @@ > > > >> > sc->sc_loc_x.pos = 8; > > > >> > sc->sc_loc_y.pos = 16; > > > >> > sc->sc_loc_z.pos = 24; > > > >> > + printf("sc->sc_loc_z.size=%u\n", > > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > > >> > sc->sc_loc_btn[1].pos = 1; > > > >> > sc->sc_loc_btn[2].pos = 2; > > > >> > > > >> this, what I see: > > > >> > > > >> ums0: > > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > >> wheel=0 > > > >> sc->flags=0x0000 > > > >> ums0: 3 buttons and a TILT dir. > > > >> sc->sc_loc_z.size=0 > > > >> > > > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 got > > > > different > > > > versions. > > > > > > > > Could you please get krepdump > > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > > > # tar xzvf krepdump.tgz > > > > # cd krepdump > > > > # make > > > > # kldload ./krepdump.ko > > > > > > > > Then plug in your mouse and paste the result here? > > > > > > > > There is one version of report desc of this mouse here: > > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > > > and my guess is your mouse's report desc is different than that... > > > > > > > > > > > > Thanks, > > > > Kai > > > > > > ---- my krepdump ---- > > > ums0: at uhub0 port 2 (addr 2) disconnected > > > ums0: detached > > > > > > [report desc size=196] > > > USAGE PAGE Consumer(0xc) > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > COLLECTION Application(1) > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > COLLECTION Logical(2) > > > REPORT ID 19 > > > USAGE PAGE Consumer(0xc) > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > REPORT COUNT 1 > > > REPORT SIZE 8 > > > LOGICAL MINIMUM -127 > > > LOGICAL MAXIMUM 127 > > > INPUT ( Data Variable Relative ) (6) > > > REPORT ID 23 > > > USAGE PAGE Microsoft(0xff00) > > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > > LOGICAL MINIMUM 0 > > > LOGICAL MAXIMUM 1 > > > PHYSICAL MINIMUM 1 > > > PHYSICAL MAXIMUM 4 > > > REPORT COUNT 1 > > > REPORT SIZE 2 > > > FEATURE ( Data Variable Absolute ) (2) > > > PHYSICAL MINIMUM 0 > > > PHYSICAL MAXIMUM 0 > > > FEATURE ( Const Array Absolute ) (1) > > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > > REPORT SIZE 1 > > > FEATURE ( Data Variable Absolute ) (2) > > > REPORT SIZE 3 > > > FEATURE ( Const Array Absolute ) (1) > > > REPORT ID 24 > > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > > REPORT SIZE 1 > > > FEATURE ( Data Variable Absolute ) (2) > > > REPORT SIZE 7 > > > FEATURE ( Const Array Absolute ) (1) > > > END COLLECTION > > > END COLLECTION > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > COLLECTION Application(1) > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > COLLECTION Logical(2) > > > REPORT ID 17 > > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > > COLLECTION Physical(0) > > > USAGE PAGE Button(0x9) > > > USAGE MINIMUM Button1(1) > > > USAGE MAXIMUM Button3(3) > > > REPORT COUNT 3 > > > REPORT SIZE 1 > > > LOGICAL MAXIMUM 1 > > > INPUT ( Data Variable Absolute ) (2) > > > REPORT COUNT 1 > > > INPUT ( Const Array Absolute ) (1) > > > USAGE Button5(0x5)[Button(0x9)] > > > INPUT ( Data Variable Absolute ) (2) > > > REPORT COUNT 3 > > > INPUT ( Const Array Absolute ) (1) > > > USAGE PAGE Generic Desktop(0x1) > > > USAGE X(0x30)[Generic Desktop(0x1)] > > > USAGE Y(0x31)[Generic Desktop(0x1)] > > > REPORT COUNT 2 > > > REPORT SIZE 8 > > > LOGICAL MINIMUM -127 > > > LOGICAL MAXIMUM 127 > > > INPUT ( Data Variable Relative ) (6) > > > COLLECTION Logical(2) > > > REPORT ID 18 > > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > > REPORT COUNT 1 > > > REPORT SIZE 2 > > > LOGICAL MINIMUM 0 > > > LOGICAL MAXIMUM 1 > > > PHYSICAL MINIMUM 1 > > > PHYSICAL MAXIMUM 4 > > > FEATURE ( Data Variable Absolute ) (2) > > > PHYSICAL MINIMUM 0 > > > PHYSICAL MAXIMUM 0 > > > REPORT SIZE 6 > > > FEATURE ( Const Array Absolute ) (1) > > > REPORT ID 17 > > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > > LOGICAL MINIMUM -127 > > > LOGICAL MAXIMUM 127 > > > REPORT SIZE 8 > > > INPUT ( Data Variable Relative ) (6) > > > END COLLECTION > > > USAGE PAGE Consumer(0xc) > > > REPORT SIZE 8 > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > INPUT ( Data Variable Relative ) (6) > > > END COLLECTION > > > END COLLECTION > > > END COLLECTION > > > [hexdump] > > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > 00C0 06 C0 C0 C0 > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > wheel=0 > > > sc->flags=0x0000 > > > ums0: 3 buttons and a TILT dir. > > > sc->sc_loc_z.size=0 > > > ---- end of krepdump ---- > > > > > > > > > ---- diff between my report and this from > > > lists.freebsd.org/.../004617.html ---- > > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > > @@ -1,7 +1,7 @@ > > > -ums1: at uhub0 port 4 (addr 4) disconnected > > > -ums1: detached > > > - > > > -[report desc size=3D196] > > > +ums0: at uhub0 port 2 (addr 2) disconnected > > > +ums0: detached > > > + > > > +[report desc size=196] > > > USAGE PAGE Consumer(0xc) > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > COLLECTION Application(1) > > > @@ -114,6 +114,9 @@ > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > 00C0 06 C0 C0 C0 > > > -ums1: > > class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > > -ums1: 3 buttons and Z dir and a TILT dir. > > > +ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > +wheel=0 > > > +sc->flags=0x0000 > > > +ums0: 3 buttons and a TILT dir. > > > +sc->sc_loc_z.size=0 > > > ---- end of diff ---- > > > > > > and short info: > > > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, but > > > on RELENG_7 not. > > > > The report descriptor is the same. After some experiments, I think > > the actual problem is inside our hid parser. > > > > Could you please try the patch attached against /sys/dev/usb/hid.c > > along with the debug printf patch for ums.c, and see what the result > > will be? > > > > > > kernel with appiled this two patches reports that: > > ums0: class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse has no Y report > device_attach: ums0 attach returned 6 > Sorry I made a mistake in previous patch. How about this one? --Qxx1br4bt0+wmkIi Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="hid.diff" --- /sys/dev/usb/hid.c 2007-06-20 07:10:52.000000000 +0200 +++ ./hid.c 2008-08-12 15:29:03.000000000 +0200 @@ -193,8 +193,11 @@ case 0: /* Main */ switch (bTag) { case 8: /* Input */ - if (!(s->kindset & (1 << hid_input))) + if (!(s->kindset & (1 << hid_input))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_input; c->flags = dval; ret: @@ -223,8 +226,11 @@ return (1); } case 9: /* Output */ - if (!(s->kindset & (1 << hid_output))) + if (!(s->kindset & (1 << hid_output))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_output; c->flags = dval; goto ret; @@ -237,8 +243,11 @@ s->nu = 0; return (1); case 11: /* Feature */ - if (!(s->kindset & (1 << hid_feature))) + if (!(s->kindset & (1 << hid_feature))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_feature; c->flags = dval; goto ret; --Qxx1br4bt0+wmkIi-- From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 14:53: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 DD7B91065689; Tue, 12 Aug 2008 14:53:38 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com (chi.fastbighost.com [65.98.102.73]) by mx1.freebsd.org (Postfix) with ESMTP id A85C68FC22; Tue, 12 Aug 2008 14:53:38 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from admc214.neoplus.adsl.tpnet.pl ([79.185.32.214] helo=silver.doors) by chi.fastbighost.com with esmtpa (Exim 4.69) (envelope-from ) id 1KSvFd-0004DY-Om; Tue, 12 Aug 2008 10:53:34 -0400 Date: Tue, 12 Aug 2008 16:53:29 +0200 From: Grzegorz Blach To: Kai Wang Message-ID: <20080812165329.47bc22d8@silver.doors> In-Reply-To: <20080812133029.GA9576@plan0> References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> <20080812143016.2ac5a7a4@silver.doors> <20080812133029.GA9576@plan0> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - chi.fastbighost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - back-up.pl X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 14:53:39 -0000 On Tue, 12 Aug 2008 15:30:29 +0200 Kai Wang wrote: > On Tue, Aug 12, 2008 at 02:30:16PM +0200, Grzegorz Blach wrote: > > On Tue, 12 Aug 2008 04:27:10 +0200 > > Kai Wang wrote: > > > > > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > > > wrote: > > > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach > > > > > wrote: > > > > >> > > > > >> > > > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > > > >> > > > > > wrote: > > > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > > > >> > wrote: > > > > >> >> > > > > >> >> > > > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > > > >> > wrote: > > > > >> >> > Thank you very much for your problem report. > > > > >> >> > It has the internal identification `usb/125941'. > > > > >> >> > The individual assigned to look at your > > > > >> >> > report is: freebsd-usb. > > > > >> >> > > > > > >> >> > You can access the state of your problem report at any > > > > >> >> > time via this link: > > > > >> >> > > > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > > >> >> > > > > > >> >> >>Category: usb > > > > >> >> >>Responsible: freebsd-usb > > > > >> >> >>Synopsis: not working wheel on my microsoft > > > > >> >> >>notebook optical > > > > >> > mouse > > > > >> >> > 3000 > > > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > > > >> >> > > > > >> >> I just fixed problem with wheel on my mouse > > > > >> >> and I'm sending in attachment patch > > > > >> >> for /usr/src/sys/dev/usb/ums.c > > > > > file. > > > > >> > > > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > > > >> >> @@ -402,6 +402,7 @@ > > > > >> >> sc->sc_loc_x.pos = 8; > > > > >> >> sc->sc_loc_y.pos = 16; > > > > >> >> sc->sc_loc_z.pos = 24; > > > > >> >> + sc->sc_loc_z.size = 8; > > > > >> >> sc->sc_loc_btn[0].pos = 0; > > > > >> >> sc->sc_loc_btn[1].pos = 1; > > > > >> >> sc->sc_loc_btn[2].pos = 2; > > > > >> > > > > > >> > > > > > >> > Hi, > > > > >> > > > > > >> > Thanks for submitting the patch. It'd be great if you could > > > > >> > also test the patch below for us and paste the result here, > > > > >> > just for better understanding the problem. > > > > >> > > > > > >> > The patch adds some debug printfs: > > > > >> > > > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > > > >> > @@ -284,6 +284,7 @@ > > > > >> > wheel = hid_locate(desc, size, > > > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > > > >> > hid_input, &sc->sc_loc_z, > > > > >> > &flags); > > > > >> > + printf("wheel=%d\n", wheel); > > > > >> > > > > > >> > if (wheel) { > > > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > > > >> > sc->flags |= UMS_Z; > > > > >> > } > > > > >> > } > > > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > > > >> > > > > > >> > /* > > > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > > > >> > it's wheel @@ -402,6 +404,7 @@ > > > > >> > sc->sc_loc_x.pos = 8; > > > > >> > sc->sc_loc_y.pos = 16; > > > > >> > sc->sc_loc_z.pos = 24; > > > > >> > + printf("sc->sc_loc_z.size=%u\n", > > > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > > > >> > sc->sc_loc_btn[1].pos = 1; > > > > >> > sc->sc_loc_btn[2].pos = 2; > > > > >> > > > > >> this, what I see: > > > > >> > > > > >> ums0: > > > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > >> wheel=0 > > > > >> sc->flags=0x0000 > > > > >> ums0: 3 buttons and a TILT dir. > > > > >> sc->sc_loc_z.size=0 > > > > >> > > > > > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 > > > > > got different > > > > > versions. > > > > > > > > > > Could you please get krepdump > > > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > > > > > # tar xzvf krepdump.tgz > > > > > # cd krepdump > > > > > # make > > > > > # kldload ./krepdump.ko > > > > > > > > > > Then plug in your mouse and paste the result here? > > > > > > > > > > There is one version of report desc of this mouse here: > > > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > > > > > and my guess is your mouse's report desc is different than > > > > > that... > > > > > > > > > > > > > > > Thanks, > > > > > Kai > > > > > > > > ---- my krepdump ---- > > > > ums0: at uhub0 port 2 (addr 2) disconnected > > > > ums0: detached > > > > > > > > [report desc size=196] > > > > USAGE PAGE Consumer(0xc) > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > COLLECTION Application(1) > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > COLLECTION Logical(2) > > > > REPORT ID 19 > > > > USAGE PAGE Consumer(0xc) > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > REPORT COUNT 1 > > > > REPORT SIZE 8 > > > > LOGICAL MINIMUM -127 > > > > LOGICAL MAXIMUM 127 > > > > INPUT ( Data Variable Relative ) (6) > > > > REPORT ID 23 > > > > USAGE PAGE Microsoft(0xff00) > > > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > > > LOGICAL MINIMUM 0 > > > > LOGICAL MAXIMUM 1 > > > > PHYSICAL MINIMUM 1 > > > > PHYSICAL MAXIMUM 4 > > > > REPORT COUNT 1 > > > > REPORT SIZE 2 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > PHYSICAL MINIMUM 0 > > > > PHYSICAL MAXIMUM 0 > > > > FEATURE ( Const Array Absolute ) (1) > > > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > > > REPORT SIZE 1 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > REPORT SIZE 3 > > > > FEATURE ( Const Array Absolute ) (1) > > > > REPORT ID 24 > > > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > > > REPORT SIZE 1 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > REPORT SIZE 7 > > > > FEATURE ( Const Array Absolute ) (1) > > > > END COLLECTION > > > > END COLLECTION > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > COLLECTION Application(1) > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > COLLECTION Logical(2) > > > > REPORT ID 17 > > > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > > > COLLECTION Physical(0) > > > > USAGE PAGE Button(0x9) > > > > USAGE MINIMUM Button1(1) > > > > USAGE MAXIMUM Button3(3) > > > > REPORT COUNT 3 > > > > REPORT SIZE 1 > > > > LOGICAL MAXIMUM 1 > > > > INPUT ( Data Variable Absolute ) (2) > > > > REPORT COUNT 1 > > > > INPUT ( Const Array Absolute ) (1) > > > > USAGE Button5(0x5)[Button(0x9)] > > > > INPUT ( Data Variable Absolute ) (2) > > > > REPORT COUNT 3 > > > > INPUT ( Const Array Absolute ) (1) > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE X(0x30)[Generic Desktop(0x1)] > > > > USAGE Y(0x31)[Generic Desktop(0x1)] > > > > REPORT COUNT 2 > > > > REPORT SIZE 8 > > > > LOGICAL MINIMUM -127 > > > > LOGICAL MAXIMUM 127 > > > > INPUT ( Data Variable Relative ) (6) > > > > COLLECTION Logical(2) > > > > REPORT ID 18 > > > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > > > REPORT COUNT 1 > > > > REPORT SIZE 2 > > > > LOGICAL MINIMUM 0 > > > > LOGICAL MAXIMUM 1 > > > > PHYSICAL MINIMUM 1 > > > > PHYSICAL MAXIMUM 4 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > PHYSICAL MINIMUM 0 > > > > PHYSICAL MAXIMUM 0 > > > > REPORT SIZE 6 > > > > FEATURE ( Const Array Absolute ) (1) > > > > REPORT ID 17 > > > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > > > LOGICAL MINIMUM -127 > > > > LOGICAL MAXIMUM 127 > > > > REPORT SIZE 8 > > > > INPUT ( Data Variable Relative ) (6) > > > > END COLLECTION > > > > USAGE PAGE Consumer(0xc) > > > > REPORT SIZE 8 > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > INPUT ( Data Variable Relative ) (6) > > > > END COLLECTION > > > > END COLLECTION > > > > END COLLECTION > > > > [hexdump] > > > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > 00C0 06 C0 C0 C0 > > > > ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > wheel=0 > > > > sc->flags=0x0000 > > > > ums0: 3 buttons and a TILT dir. > > > > sc->sc_loc_z.size=0 > > > > ---- end of krepdump ---- > > > > > > > > > > > > ---- diff between my report and this from > > > > lists.freebsd.org/.../004617.html ---- > > > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > > > @@ -1,7 +1,7 @@ > > > > -ums1: at uhub0 port 4 (addr 4) disconnected > > > > -ums1: detached > > > > - > > > > -[report desc size=3D196] > > > > +ums0: at uhub0 port 2 (addr 2) disconnected > > > > +ums0: detached > > > > + > > > > +[report desc size=196] > > > > USAGE PAGE Consumer(0xc) > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > COLLECTION Application(1) > > > > @@ -114,6 +114,9 @@ > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > 00C0 06 C0 C0 C0 > > > > -ums1: > > > Wheel, class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > > > -ums1: 3 buttons and Z dir and a TILT dir. > > > > +ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > +wheel=0 > > > > +sc->flags=0x0000 > > > > +ums0: 3 buttons and a TILT dir. > > > > +sc->sc_loc_z.size=0 > > > > ---- end of diff ---- > > > > > > > > and short info: > > > > > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, > > > > but on RELENG_7 not. > > > > > > The report descriptor is the same. After some experiments, I think > > > the actual problem is inside our hid parser. > > > > > > Could you please try the patch attached against /sys/dev/usb/hid.c > > > along with the debug printf patch for ums.c, and see what the > > > result will be? > > > > > > > > > > kernel with appiled this two patches reports that: > > > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse has no Y > > report device_attach: ums0 attach returned 6 > > > > Sorry I made a mistake in previous patch. > > How about this one? > Again, the same message as above: ums0: on uhub0 ums0: mouse has no Y report device_attach: ums0 attach returned 6 From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 15:00:13 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 604F6106566B for ; Tue, 12 Aug 2008 15:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4FC1E8FC15 for ; Tue, 12 Aug 2008 15:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CF0Dq5032731 for ; Tue, 12 Aug 2008 15:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CF0DIX032730; Tue, 12 Aug 2008 15:00:13 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 15:00:13 GMT Message-Id: <200808121500.m7CF0DIX032730@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Grzegorz Blach Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grzegorz Blach List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 15:00:13 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Grzegorz Blach To: Kai Wang Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 16:53:29 +0200 On Tue, 12 Aug 2008 15:30:29 +0200 Kai Wang wrote: > On Tue, Aug 12, 2008 at 02:30:16PM +0200, Grzegorz Blach wrote: > > On Tue, 12 Aug 2008 04:27:10 +0200 > > Kai Wang wrote: > > > > > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > > > wrote: > > > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach > > > > > wrote: > > > > >> > > > > >> > > > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > > > >> > > > > > wrote: > > > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > > > >> > wrote: > > > > >> >> > > > > >> >> > > > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > > > >> > wrote: > > > > >> >> > Thank you very much for your problem report. > > > > >> >> > It has the internal identification `usb/125941'. > > > > >> >> > The individual assigned to look at your > > > > >> >> > report is: freebsd-usb. > > > > >> >> > > > > > >> >> > You can access the state of your problem report at any > > > > >> >> > time via this link: > > > > >> >> > > > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > > >> >> > > > > > >> >> >>Category: usb > > > > >> >> >>Responsible: freebsd-usb > > > > >> >> >>Synopsis: not working wheel on my microsoft > > > > >> >> >>notebook optical > > > > >> > mouse > > > > >> >> > 3000 > > > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > > > >> >> > > > > >> >> I just fixed problem with wheel on my mouse > > > > >> >> and I'm sending in attachment patch > > > > >> >> for /usr/src/sys/dev/usb/ums.c > > > > > file. > > > > >> > > > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > > > >> >> @@ -402,6 +402,7 @@ > > > > >> >> sc->sc_loc_x.pos = 8; > > > > >> >> sc->sc_loc_y.pos = 16; > > > > >> >> sc->sc_loc_z.pos = 24; > > > > >> >> + sc->sc_loc_z.size = 8; > > > > >> >> sc->sc_loc_btn[0].pos = 0; > > > > >> >> sc->sc_loc_btn[1].pos = 1; > > > > >> >> sc->sc_loc_btn[2].pos = 2; > > > > >> > > > > > >> > > > > > >> > Hi, > > > > >> > > > > > >> > Thanks for submitting the patch. It'd be great if you could > > > > >> > also test the patch below for us and paste the result here, > > > > >> > just for better understanding the problem. > > > > >> > > > > > >> > The patch adds some debug printfs: > > > > >> > > > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > > > >> > @@ -284,6 +284,7 @@ > > > > >> > wheel = hid_locate(desc, size, > > > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > > > >> > hid_input, &sc->sc_loc_z, > > > > >> > &flags); > > > > >> > + printf("wheel=%d\n", wheel); > > > > >> > > > > > >> > if (wheel) { > > > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > > > >> > sc->flags |= UMS_Z; > > > > >> > } > > > > >> > } > > > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > > > >> > > > > > >> > /* > > > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > > > >> > it's wheel @@ -402,6 +404,7 @@ > > > > >> > sc->sc_loc_x.pos = 8; > > > > >> > sc->sc_loc_y.pos = 16; > > > > >> > sc->sc_loc_z.pos = 24; > > > > >> > + printf("sc->sc_loc_z.size=%u\n", > > > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > > > >> > sc->sc_loc_btn[1].pos = 1; > > > > >> > sc->sc_loc_btn[2].pos = 2; > > > > >> > > > > >> this, what I see: > > > > >> > > > > >> ums0: > > > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > >> wheel=0 > > > > >> sc->flags=0x0000 > > > > >> ums0: 3 buttons and a TILT dir. > > > > >> sc->sc_loc_z.size=0 > > > > >> > > > > > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 > > > > > got different > > > > > versions. > > > > > > > > > > Could you please get krepdump > > > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > > > > > # tar xzvf krepdump.tgz > > > > > # cd krepdump > > > > > # make > > > > > # kldload ./krepdump.ko > > > > > > > > > > Then plug in your mouse and paste the result here? > > > > > > > > > > There is one version of report desc of this mouse here: > > > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > > > > > and my guess is your mouse's report desc is different than > > > > > that... > > > > > > > > > > > > > > > Thanks, > > > > > Kai > > > > > > > > ---- my krepdump ---- > > > > ums0: at uhub0 port 2 (addr 2) disconnected > > > > ums0: detached > > > > > > > > [report desc size=196] > > > > USAGE PAGE Consumer(0xc) > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > COLLECTION Application(1) > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > COLLECTION Logical(2) > > > > REPORT ID 19 > > > > USAGE PAGE Consumer(0xc) > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > REPORT COUNT 1 > > > > REPORT SIZE 8 > > > > LOGICAL MINIMUM -127 > > > > LOGICAL MAXIMUM 127 > > > > INPUT ( Data Variable Relative ) (6) > > > > REPORT ID 23 > > > > USAGE PAGE Microsoft(0xff00) > > > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > > > LOGICAL MINIMUM 0 > > > > LOGICAL MAXIMUM 1 > > > > PHYSICAL MINIMUM 1 > > > > PHYSICAL MAXIMUM 4 > > > > REPORT COUNT 1 > > > > REPORT SIZE 2 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > PHYSICAL MINIMUM 0 > > > > PHYSICAL MAXIMUM 0 > > > > FEATURE ( Const Array Absolute ) (1) > > > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > > > REPORT SIZE 1 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > REPORT SIZE 3 > > > > FEATURE ( Const Array Absolute ) (1) > > > > REPORT ID 24 > > > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > > > REPORT SIZE 1 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > REPORT SIZE 7 > > > > FEATURE ( Const Array Absolute ) (1) > > > > END COLLECTION > > > > END COLLECTION > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > COLLECTION Application(1) > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > COLLECTION Logical(2) > > > > REPORT ID 17 > > > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > > > COLLECTION Physical(0) > > > > USAGE PAGE Button(0x9) > > > > USAGE MINIMUM Button1(1) > > > > USAGE MAXIMUM Button3(3) > > > > REPORT COUNT 3 > > > > REPORT SIZE 1 > > > > LOGICAL MAXIMUM 1 > > > > INPUT ( Data Variable Absolute ) (2) > > > > REPORT COUNT 1 > > > > INPUT ( Const Array Absolute ) (1) > > > > USAGE Button5(0x5)[Button(0x9)] > > > > INPUT ( Data Variable Absolute ) (2) > > > > REPORT COUNT 3 > > > > INPUT ( Const Array Absolute ) (1) > > > > USAGE PAGE Generic Desktop(0x1) > > > > USAGE X(0x30)[Generic Desktop(0x1)] > > > > USAGE Y(0x31)[Generic Desktop(0x1)] > > > > REPORT COUNT 2 > > > > REPORT SIZE 8 > > > > LOGICAL MINIMUM -127 > > > > LOGICAL MAXIMUM 127 > > > > INPUT ( Data Variable Relative ) (6) > > > > COLLECTION Logical(2) > > > > REPORT ID 18 > > > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > > > REPORT COUNT 1 > > > > REPORT SIZE 2 > > > > LOGICAL MINIMUM 0 > > > > LOGICAL MAXIMUM 1 > > > > PHYSICAL MINIMUM 1 > > > > PHYSICAL MAXIMUM 4 > > > > FEATURE ( Data Variable Absolute ) (2) > > > > PHYSICAL MINIMUM 0 > > > > PHYSICAL MAXIMUM 0 > > > > REPORT SIZE 6 > > > > FEATURE ( Const Array Absolute ) (1) > > > > REPORT ID 17 > > > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > > > LOGICAL MINIMUM -127 > > > > LOGICAL MAXIMUM 127 > > > > REPORT SIZE 8 > > > > INPUT ( Data Variable Relative ) (6) > > > > END COLLECTION > > > > USAGE PAGE Consumer(0xc) > > > > REPORT SIZE 8 > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > INPUT ( Data Variable Relative ) (6) > > > > END COLLECTION > > > > END COLLECTION > > > > END COLLECTION > > > > [hexdump] > > > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > 00C0 06 C0 C0 C0 > > > > ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > wheel=0 > > > > sc->flags=0x0000 > > > > ums0: 3 buttons and a TILT dir. > > > > sc->sc_loc_z.size=0 > > > > ---- end of krepdump ---- > > > > > > > > > > > > ---- diff between my report and this from > > > > lists.freebsd.org/.../004617.html ---- > > > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > > > @@ -1,7 +1,7 @@ > > > > -ums1: at uhub0 port 4 (addr 4) disconnected > > > > -ums1: detached > > > > - > > > > -[report desc size=3D196] > > > > +ums0: at uhub0 port 2 (addr 2) disconnected > > > > +ums0: detached > > > > + > > > > +[report desc size=196] > > > > USAGE PAGE Consumer(0xc) > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > COLLECTION Application(1) > > > > @@ -114,6 +114,9 @@ > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > 00C0 06 C0 C0 C0 > > > > -ums1: > > > Wheel, class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > > > -ums1: 3 buttons and Z dir and a TILT dir. > > > > +ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > +wheel=0 > > > > +sc->flags=0x0000 > > > > +ums0: 3 buttons and a TILT dir. > > > > +sc->sc_loc_z.size=0 > > > > ---- end of diff ---- > > > > > > > > and short info: > > > > > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, > > > > but on RELENG_7 not. > > > > > > The report descriptor is the same. After some experiments, I think > > > the actual problem is inside our hid parser. > > > > > > Could you please try the patch attached against /sys/dev/usb/hid.c > > > along with the debug printf patch for ums.c, and see what the > > > result will be? > > > > > > > > > > kernel with appiled this two patches reports that: > > > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse has no Y > > report device_attach: ums0 attach returned 6 > > > > Sorry I made a mistake in previous patch. > > How about this one? > Again, the same message as above: ums0: on uhub0 ums0: mouse has no Y report device_attach: ums0 attach returned 6 From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 15:01:49 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 0F7AF1065676 for ; Tue, 12 Aug 2008 15:01:49 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 6B7E68FC19 for ; Tue, 12 Aug 2008 15:01:48 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so1164083nfh.33 for ; Tue, 12 Aug 2008 08:01:46 -0700 (PDT) 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=BAy30ptNxWztGRoijCkE5BIYQpfVJ2jMoxMwfFeCpRE=; b=YkcsG+g3rYvY2wyguImWZsXrdC20+PNwaD2chpsEl0kR6Ug4iM7eYdc+1YUMFlREOw mzYf4cE/yku7D/CYc5YvK6Adoaq8eP010Jh1QdEruuJwTelusoTOp5JJy7MAuNNY83Ul tauyWP1B6jSgThsJrJIfOiqZvBYOveM0dc74k= 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=AwU53FlyvIwVe1hTJLryI8943QUT2XJLeAdpYY9gpTwMA+EEK7fK8L/QkQUcw25G3a /FCTI85JSj1EwcKEsjUb9YtonrxKvXiBhh0qlyrfvVUPiKBxnsZBpF9J90cCSY2eJEur W9Os0/4OKcC5trhW2QhL1oFR3Kk/aeV9DngIk= Received: by 10.187.202.7 with SMTP id e7mr500101faq.37.1218553305853; Tue, 12 Aug 2008 08:01:45 -0700 (PDT) Received: from localhost ( [85.8.1.55]) by mx.google.com with ESMTPS id 33sm7698088nfu.7.2008.08.12.08.01.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Aug 2008 08:01:45 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KSvNT-0002aX-L7; Tue, 12 Aug 2008 17:01:39 +0200 Received: (from kaffir@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m7CF1dII009952; Tue, 12 Aug 2008 17:01:39 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaffir set sender to kaiwang27@gmail.com using -f Date: Tue, 12 Aug 2008 17:01:39 +0200 From: Kai Wang To: Grzegorz Blach Message-ID: <20080812150139.GA9769@plan0> Mail-Followup-To: Grzegorz Blach , FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> <20080812143016.2ac5a7a4@silver.doors> <20080812133029.GA9576@plan0> <20080812165329.47bc22d8@silver.doors> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20080812165329.47bc22d8@silver.doors> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 15:01:49 -0000 On Tue, Aug 12, 2008 at 04:53:29PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 15:30:29 +0200 > Kai Wang wrote: > > > On Tue, Aug 12, 2008 at 02:30:16PM +0200, Grzegorz Blach wrote: > > > On Tue, 12 Aug 2008 04:27:10 +0200 > > > Kai Wang wrote: > > > > > > > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > > > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > > > > wrote: > > > > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach > > > > > > wrote: > > > > > >> > > > > > >> > > > > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > > > > >> > > > > > > wrote: > > > > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > > > > >> > wrote: > > > > > >> >> > > > > > >> >> > > > > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > > > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > > > > >> > wrote: > > > > > >> >> > Thank you very much for your problem report. > > > > > >> >> > It has the internal identification `usb/125941'. > > > > > >> >> > The individual assigned to look at your > > > > > >> >> > report is: freebsd-usb. > > > > > >> >> > > > > > > >> >> > You can access the state of your problem report at any > > > > > >> >> > time via this link: > > > > > >> >> > > > > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > > > >> >> > > > > > > >> >> >>Category: usb > > > > > >> >> >>Responsible: freebsd-usb > > > > > >> >> >>Synopsis: not working wheel on my microsoft > > > > > >> >> >>notebook optical > > > > > >> > mouse > > > > > >> >> > 3000 > > > > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > > > > >> >> > > > > > >> >> I just fixed problem with wheel on my mouse > > > > > >> >> and I'm sending in attachment patch > > > > > >> >> for /usr/src/sys/dev/usb/ums.c > > > > > > file. > > > > > >> > > > > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > > > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > > > > >> >> @@ -402,6 +402,7 @@ > > > > > >> >> sc->sc_loc_x.pos = 8; > > > > > >> >> sc->sc_loc_y.pos = 16; > > > > > >> >> sc->sc_loc_z.pos = 24; > > > > > >> >> + sc->sc_loc_z.size = 8; > > > > > >> >> sc->sc_loc_btn[0].pos = 0; > > > > > >> >> sc->sc_loc_btn[1].pos = 1; > > > > > >> >> sc->sc_loc_btn[2].pos = 2; > > > > > >> > > > > > > >> > > > > > > >> > Hi, > > > > > >> > > > > > > >> > Thanks for submitting the patch. It'd be great if you could > > > > > >> > also test the patch below for us and paste the result here, > > > > > >> > just for better understanding the problem. > > > > > >> > > > > > > >> > The patch adds some debug printfs: > > > > > >> > > > > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > > > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > > > > >> > @@ -284,6 +284,7 @@ > > > > > >> > wheel = hid_locate(desc, size, > > > > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > > > > >> > hid_input, &sc->sc_loc_z, > > > > > >> > &flags); > > > > > >> > + printf("wheel=%d\n", wheel); > > > > > >> > > > > > > >> > if (wheel) { > > > > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > > > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > > > > >> > sc->flags |= UMS_Z; > > > > > >> > } > > > > > >> > } > > > > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > > > > >> > > > > > > >> > /* > > > > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > > > > >> > it's wheel @@ -402,6 +404,7 @@ > > > > > >> > sc->sc_loc_x.pos = 8; > > > > > >> > sc->sc_loc_y.pos = 16; > > > > > >> > sc->sc_loc_z.pos = 24; > > > > > >> > + printf("sc->sc_loc_z.size=%u\n", > > > > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > > > > >> > sc->sc_loc_btn[1].pos = 1; > > > > > >> > sc->sc_loc_btn[2].pos = 2; > > > > > >> > > > > > >> this, what I see: > > > > > >> > > > > > >> ums0: > > > > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > >> wheel=0 > > > > > >> sc->flags=0x0000 > > > > > >> ums0: 3 buttons and a TILT dir. > > > > > >> sc->sc_loc_z.size=0 > > > > > >> > > > > > > > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 > > > > > > got different > > > > > > versions. > > > > > > > > > > > > Could you please get krepdump > > > > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > > > > > > > # tar xzvf krepdump.tgz > > > > > > # cd krepdump > > > > > > # make > > > > > > # kldload ./krepdump.ko > > > > > > > > > > > > Then plug in your mouse and paste the result here? > > > > > > > > > > > > There is one version of report desc of this mouse here: > > > > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > > > > > > > and my guess is your mouse's report desc is different than > > > > > > that... > > > > > > > > > > > > > > > > > > Thanks, > > > > > > Kai > > > > > > > > > > ---- my krepdump ---- > > > > > ums0: at uhub0 port 2 (addr 2) disconnected > > > > > ums0: detached > > > > > > > > > > [report desc size=196] > > > > > USAGE PAGE Consumer(0xc) > > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > > COLLECTION Application(1) > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > > COLLECTION Logical(2) > > > > > REPORT ID 19 > > > > > USAGE PAGE Consumer(0xc) > > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > > REPORT COUNT 1 > > > > > REPORT SIZE 8 > > > > > LOGICAL MINIMUM -127 > > > > > LOGICAL MAXIMUM 127 > > > > > INPUT ( Data Variable Relative ) (6) > > > > > REPORT ID 23 > > > > > USAGE PAGE Microsoft(0xff00) > > > > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > > > > LOGICAL MINIMUM 0 > > > > > LOGICAL MAXIMUM 1 > > > > > PHYSICAL MINIMUM 1 > > > > > PHYSICAL MAXIMUM 4 > > > > > REPORT COUNT 1 > > > > > REPORT SIZE 2 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > PHYSICAL MINIMUM 0 > > > > > PHYSICAL MAXIMUM 0 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > > > > REPORT SIZE 1 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > REPORT SIZE 3 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > REPORT ID 24 > > > > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > > > > REPORT SIZE 1 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > REPORT SIZE 7 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > END COLLECTION > > > > > END COLLECTION > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > > COLLECTION Application(1) > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > > COLLECTION Logical(2) > > > > > REPORT ID 17 > > > > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > > > > COLLECTION Physical(0) > > > > > USAGE PAGE Button(0x9) > > > > > USAGE MINIMUM Button1(1) > > > > > USAGE MAXIMUM Button3(3) > > > > > REPORT COUNT 3 > > > > > REPORT SIZE 1 > > > > > LOGICAL MAXIMUM 1 > > > > > INPUT ( Data Variable Absolute ) (2) > > > > > REPORT COUNT 1 > > > > > INPUT ( Const Array Absolute ) (1) > > > > > USAGE Button5(0x5)[Button(0x9)] > > > > > INPUT ( Data Variable Absolute ) (2) > > > > > REPORT COUNT 3 > > > > > INPUT ( Const Array Absolute ) (1) > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE X(0x30)[Generic Desktop(0x1)] > > > > > USAGE Y(0x31)[Generic Desktop(0x1)] > > > > > REPORT COUNT 2 > > > > > REPORT SIZE 8 > > > > > LOGICAL MINIMUM -127 > > > > > LOGICAL MAXIMUM 127 > > > > > INPUT ( Data Variable Relative ) (6) > > > > > COLLECTION Logical(2) > > > > > REPORT ID 18 > > > > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > > > > REPORT COUNT 1 > > > > > REPORT SIZE 2 > > > > > LOGICAL MINIMUM 0 > > > > > LOGICAL MAXIMUM 1 > > > > > PHYSICAL MINIMUM 1 > > > > > PHYSICAL MAXIMUM 4 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > PHYSICAL MINIMUM 0 > > > > > PHYSICAL MAXIMUM 0 > > > > > REPORT SIZE 6 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > REPORT ID 17 > > > > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > > > > LOGICAL MINIMUM -127 > > > > > LOGICAL MAXIMUM 127 > > > > > REPORT SIZE 8 > > > > > INPUT ( Data Variable Relative ) (6) > > > > > END COLLECTION > > > > > USAGE PAGE Consumer(0xc) > > > > > REPORT SIZE 8 > > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > > INPUT ( Data Variable Relative ) (6) > > > > > END COLLECTION > > > > > END COLLECTION > > > > > END COLLECTION > > > > > [hexdump] > > > > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > > > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > > > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > > > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > > > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > > > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > > > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > > > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > > > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > > > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > > 00C0 06 C0 C0 C0 > > > > > ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > wheel=0 > > > > > sc->flags=0x0000 > > > > > ums0: 3 buttons and a TILT dir. > > > > > sc->sc_loc_z.size=0 > > > > > ---- end of krepdump ---- > > > > > > > > > > > > > > > ---- diff between my report and this from > > > > > lists.freebsd.org/.../004617.html ---- > > > > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > > > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > > > > @@ -1,7 +1,7 @@ > > > > > -ums1: at uhub0 port 4 (addr 4) disconnected > > > > > -ums1: detached > > > > > - > > > > > -[report desc size=3D196] > > > > > +ums0: at uhub0 port 2 (addr 2) disconnected > > > > > +ums0: detached > > > > > + > > > > > +[report desc size=196] > > > > > USAGE PAGE Consumer(0xc) > > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > > COLLECTION Application(1) > > > > > @@ -114,6 +114,9 @@ > > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > > 00C0 06 C0 C0 C0 > > > > > -ums1: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > > > > -ums1: 3 buttons and Z dir and a TILT dir. > > > > > +ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > +wheel=0 > > > > > +sc->flags=0x0000 > > > > > +ums0: 3 buttons and a TILT dir. > > > > > +sc->sc_loc_z.size=0 > > > > > ---- end of diff ---- > > > > > > > > > > and short info: > > > > > > > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, > > > > > but on RELENG_7 not. > > > > > > > > The report descriptor is the same. After some experiments, I think > > > > the actual problem is inside our hid parser. > > > > > > > > Could you please try the patch attached against /sys/dev/usb/hid.c > > > > along with the debug printf patch for ums.c, and see what the > > > > result will be? > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse has no Y > > > report device_attach: ums0 attach returned 6 > > > > > > > Sorry I made a mistake in previous patch. > > > > How about this one? > > > > Again, the same message as above: > > ums0: class 0/0, rev 2.00/1.20, addr 2> on uhub0 > ums0: mouse has no Y report > device_attach: ums0 attach returned 6 Strange.. This should not happen. Did you revert previous hid.c patch before applying this one? From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 15:10:07 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8159A106564A for ; Tue, 12 Aug 2008 15:10:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7BAF48FC08 for ; Tue, 12 Aug 2008 15:10:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CFA7ar033191 for ; Tue, 12 Aug 2008 15:10:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CFA76X033188; Tue, 12 Aug 2008 15:10:07 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 15:10:07 GMT Message-Id: <200808121510.m7CFA76X033188@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 15:10:07 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Kai Wang To: Grzegorz Blach Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 17:01:39 +0200 On Tue, Aug 12, 2008 at 04:53:29PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 15:30:29 +0200 > Kai Wang wrote: > > > On Tue, Aug 12, 2008 at 02:30:16PM +0200, Grzegorz Blach wrote: > > > On Tue, 12 Aug 2008 04:27:10 +0200 > > > Kai Wang wrote: > > > > > > > On Mon, Aug 11, 2008 at 01:30:57PM -0400, Grzegorz Blach wrote: > > > > > On Mon, 11 Aug 2008 17:19:41 +0200, Kai Wang > > > > > wrote: > > > > > > On Mon, Aug 11, 2008 at 10:19:35AM -0400, Grzegorz Blach > > > > > > wrote: > > > > > >> > > > > > >> > > > > > >> On Mon, 11 Aug 2008 15:34:34 +0200, Kai Wang > > > > > >> > > > > > > wrote: > > > > > >> > On Tue, Aug 05, 2008 at 10:03:15AM -0400, magik@back-up.pl > > > > > >> > wrote: > > > > > >> >> > > > > > >> >> > > > > > >> >> On Thu, 24 Jul 2008 23:30:07 GMT, > > > > > >> >> FreeBSD-gnats-submit@FreeBSD.org > > > > > >> > wrote: > > > > > >> >> > Thank you very much for your problem report. > > > > > >> >> > It has the internal identification `usb/125941'. > > > > > >> >> > The individual assigned to look at your > > > > > >> >> > report is: freebsd-usb. > > > > > >> >> > > > > > > >> >> > You can access the state of your problem report at any > > > > > >> >> > time via this link: > > > > > >> >> > > > > > > >> >> > http://www.freebsd.org/cgi/query-pr.cgi?pr=125941 > > > > > >> >> > > > > > > >> >> >>Category: usb > > > > > >> >> >>Responsible: freebsd-usb > > > > > >> >> >>Synopsis: not working wheel on my microsoft > > > > > >> >> >>notebook optical > > > > > >> > mouse > > > > > >> >> > 3000 > > > > > >> >> >>Arrival-Date: Thu Jul 24 23:30:07 UTC 2008 > > > > > >> >> > > > > > >> >> I just fixed problem with wheel on my mouse > > > > > >> >> and I'm sending in attachment patch > > > > > >> >> for /usr/src/sys/dev/usb/ums.c > > > > > > file. > > > > > >> > > > > > > >> >> --- ums.c.orig 2008-08-05 17:24:21.815936911 +0200 > > > > > >> >> +++ ums.c 2008-08-05 17:24:51.885277111 +0200 > > > > > >> >> @@ -402,6 +402,7 @@ > > > > > >> >> sc->sc_loc_x.pos = 8; > > > > > >> >> sc->sc_loc_y.pos = 16; > > > > > >> >> sc->sc_loc_z.pos = 24; > > > > > >> >> + sc->sc_loc_z.size = 8; > > > > > >> >> sc->sc_loc_btn[0].pos = 0; > > > > > >> >> sc->sc_loc_btn[1].pos = 1; > > > > > >> >> sc->sc_loc_btn[2].pos = 2; > > > > > >> > > > > > > >> > > > > > > >> > Hi, > > > > > >> > > > > > > >> > Thanks for submitting the patch. It'd be great if you could > > > > > >> > also test the patch below for us and paste the result here, > > > > > >> > just for better understanding the problem. > > > > > >> > > > > > > >> > The patch adds some debug printfs: > > > > > >> > > > > > > >> > --- /sys/dev/usb/ums.c 2008-05-05 20:25:42.000000000 > > > > > >> > +0200 +++ ums.c 2008-08-11 15:25:44.000000000 +0200 > > > > > >> > @@ -284,6 +284,7 @@ > > > > > >> > wheel = hid_locate(desc, size, > > > > > >> > HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), > > > > > >> > hid_input, &sc->sc_loc_z, > > > > > >> > &flags); > > > > > >> > + printf("wheel=%d\n", wheel); > > > > > >> > > > > > > >> > if (wheel) { > > > > > >> > if ((flags & MOUSE_FLAGS_MASK) != > > > > > >> > MOUSE_FLAGS) { @@ -323,6 +324,7 @@ > > > > > >> > sc->flags |= UMS_Z; > > > > > >> > } > > > > > >> > } > > > > > >> > + printf("sc->flags=0x%04x\n", sc->flags); > > > > > >> > > > > > > >> > /* > > > > > >> > * The Microsoft Wireless Intellimouse 2.0 reports > > > > > >> > it's wheel @@ -402,6 +404,7 @@ > > > > > >> > sc->sc_loc_x.pos = 8; > > > > > >> > sc->sc_loc_y.pos = 16; > > > > > >> > sc->sc_loc_z.pos = 24; > > > > > >> > + printf("sc->sc_loc_z.size=%u\n", > > > > > >> > sc->sc_loc_z.size); sc->sc_loc_btn[0].pos = 0; > > > > > >> > sc->sc_loc_btn[1].pos = 1; > > > > > >> > sc->sc_loc_btn[2].pos = 2; > > > > > >> > > > > > >> this, what I see: > > > > > >> > > > > > >> ums0: > > > > >> Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > >> wheel=0 > > > > > >> sc->flags=0x0000 > > > > > >> ums0: 3 buttons and a TILT dir. > > > > > >> sc->sc_loc_z.size=0 > > > > > >> > > > > > > > > > > > > Interesting. Now I suspect that Optical Mouse 3000 model 1049 > > > > > > got different > > > > > > versions. > > > > > > > > > > > > Could you please get krepdump > > > > > > (http://people.freebsd.org/~kaiw/tools/krepdump.tgz) > > > > > > > > > > > > # tar xzvf krepdump.tgz > > > > > > # cd krepdump > > > > > > # make > > > > > > # kldload ./krepdump.ko > > > > > > > > > > > > Then plug in your mouse and paste the result here? > > > > > > > > > > > > There is one version of report desc of this mouse here: > > > > > > http://lists.freebsd.org/pipermail/freebsd-usb/2008-February/004617.html > > > > > > > > > > > > and my guess is your mouse's report desc is different than > > > > > > that... > > > > > > > > > > > > > > > > > > Thanks, > > > > > > Kai > > > > > > > > > > ---- my krepdump ---- > > > > > ums0: at uhub0 port 2 (addr 2) disconnected > > > > > ums0: detached > > > > > > > > > > [report desc size=196] > > > > > USAGE PAGE Consumer(0xc) > > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > > COLLECTION Application(1) > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > > COLLECTION Logical(2) > > > > > REPORT ID 19 > > > > > USAGE PAGE Consumer(0xc) > > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > > REPORT COUNT 1 > > > > > REPORT SIZE 8 > > > > > LOGICAL MINIMUM -127 > > > > > LOGICAL MAXIMUM 127 > > > > > INPUT ( Data Variable Relative ) (6) > > > > > REPORT ID 23 > > > > > USAGE PAGE Microsoft(0xff00) > > > > > USAGE Unknown Usage(0xff06)[Microsoft(0xff00)] > > > > > LOGICAL MINIMUM 0 > > > > > LOGICAL MAXIMUM 1 > > > > > PHYSICAL MINIMUM 1 > > > > > PHYSICAL MAXIMUM 4 > > > > > REPORT COUNT 1 > > > > > REPORT SIZE 2 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > PHYSICAL MINIMUM 0 > > > > > PHYSICAL MAXIMUM 0 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > USAGE Unknown Usage(0xff04)[Microsoft(0xff00)] > > > > > REPORT SIZE 1 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > REPORT SIZE 3 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > REPORT ID 24 > > > > > USAGE Unknown Usage(0xff08)[Microsoft(0xff00)] > > > > > REPORT SIZE 1 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > REPORT SIZE 7 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > END COLLECTION > > > > > END COLLECTION > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > > COLLECTION Application(1) > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE Mouse(0x2)[Generic Desktop(0x1)] > > > > > COLLECTION Logical(2) > > > > > REPORT ID 17 > > > > > USAGE Pointer(0x1)[Generic Desktop(0x1)] > > > > > COLLECTION Physical(0) > > > > > USAGE PAGE Button(0x9) > > > > > USAGE MINIMUM Button1(1) > > > > > USAGE MAXIMUM Button3(3) > > > > > REPORT COUNT 3 > > > > > REPORT SIZE 1 > > > > > LOGICAL MAXIMUM 1 > > > > > INPUT ( Data Variable Absolute ) (2) > > > > > REPORT COUNT 1 > > > > > INPUT ( Const Array Absolute ) (1) > > > > > USAGE Button5(0x5)[Button(0x9)] > > > > > INPUT ( Data Variable Absolute ) (2) > > > > > REPORT COUNT 3 > > > > > INPUT ( Const Array Absolute ) (1) > > > > > USAGE PAGE Generic Desktop(0x1) > > > > > USAGE X(0x30)[Generic Desktop(0x1)] > > > > > USAGE Y(0x31)[Generic Desktop(0x1)] > > > > > REPORT COUNT 2 > > > > > REPORT SIZE 8 > > > > > LOGICAL MINIMUM -127 > > > > > LOGICAL MAXIMUM 127 > > > > > INPUT ( Data Variable Relative ) (6) > > > > > COLLECTION Logical(2) > > > > > REPORT ID 18 > > > > > USAGE Resolution Multiplier(0x48)[Generic Desktop(0x1)] > > > > > REPORT COUNT 1 > > > > > REPORT SIZE 2 > > > > > LOGICAL MINIMUM 0 > > > > > LOGICAL MAXIMUM 1 > > > > > PHYSICAL MINIMUM 1 > > > > > PHYSICAL MAXIMUM 4 > > > > > FEATURE ( Data Variable Absolute ) (2) > > > > > PHYSICAL MINIMUM 0 > > > > > PHYSICAL MAXIMUM 0 > > > > > REPORT SIZE 6 > > > > > FEATURE ( Const Array Absolute ) (1) > > > > > REPORT ID 17 > > > > > USAGE Wheel(0x38)[Generic Desktop(0x1)] > > > > > LOGICAL MINIMUM -127 > > > > > LOGICAL MAXIMUM 127 > > > > > REPORT SIZE 8 > > > > > INPUT ( Data Variable Relative ) (6) > > > > > END COLLECTION > > > > > USAGE PAGE Consumer(0xc) > > > > > REPORT SIZE 8 > > > > > USAGE AC Pan(0x238)[Consumer(0xc)] > > > > > INPUT ( Data Variable Relative ) (6) > > > > > END COLLECTION > > > > > END COLLECTION > > > > > END COLLECTION > > > > > [hexdump] > > > > > 0000 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 13 05 0C > > > > > 0010 0A 38 02 95 01 75 08 15 81 25 7F 81 06 85 17 06 > > > > > 0020 00 FF 0A 06 FF 15 00 25 01 35 01 45 04 95 01 75 > > > > > 0030 02 B1 02 35 00 45 00 B1 01 0A 04 FF 75 01 B1 02 > > > > > 0040 75 03 B1 01 85 18 0A 08 FF 75 01 B1 02 75 07 B1 > > > > > 0050 01 C0 C0 05 01 09 02 A1 01 05 01 09 02 A1 02 85 > > > > > 0060 11 09 01 A1 00 05 09 19 01 29 03 95 03 75 01 25 > > > > > 0070 01 81 02 95 01 81 01 09 05 81 02 95 03 81 01 05 > > > > > 0080 01 09 30 09 31 95 02 75 08 15 81 25 7F 81 06 A1 > > > > > 0090 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 > > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > > 00C0 06 C0 C0 C0 > > > > > ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > wheel=0 > > > > > sc->flags=0x0000 > > > > > ums0: 3 buttons and a TILT dir. > > > > > sc->sc_loc_z.size=0 > > > > > ---- end of krepdump ---- > > > > > > > > > > > > > > > ---- diff between my report and this from > > > > > lists.freebsd.org/.../004617.html ---- > > > > > --- 1.txt 2008-08-11 19:25:56.496820730 +0200 > > > > > +++ dump.txt 2008-08-11 19:25:59.156847633 +0200 > > > > > @@ -1,7 +1,7 @@ > > > > > -ums1: at uhub0 port 4 (addr 4) disconnected > > > > > -ums1: detached > > > > > - > > > > > -[report desc size=3D196] > > > > > +ums0: at uhub0 port 2 (addr 2) disconnected > > > > > +ums0: detached > > > > > + > > > > > +[report desc size=196] > > > > > USAGE PAGE Consumer(0xc) > > > > > USAGE Consumer Control(0x1)[Consumer(0xc)] > > > > > COLLECTION Application(1) > > > > > @@ -114,6 +114,9 @@ > > > > > 00A0 04 B1 02 35 00 45 00 75 06 B1 01 85 11 09 38 15 > > > > > 00B0 81 25 7F 75 08 81 06 C0 05 0C 75 08 0A 38 02 81 > > > > > 00C0 06 C0 C0 C0 > > > > > -ums1: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 4> on uhub0 > > > > > -ums1: 3 buttons and Z dir and a TILT dir. > > > > > +ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > +wheel=0 > > > > > +sc->flags=0x0000 > > > > > +ums0: 3 buttons and a TILT dir. > > > > > +sc->sc_loc_z.size=0 > > > > > ---- end of diff ---- > > > > > > > > > > and short info: > > > > > > > > > > When I use RELENG_7_0, driver reports that my mouse have Z dir, > > > > > but on RELENG_7 not. > > > > > > > > The report descriptor is the same. After some experiments, I think > > > > the actual problem is inside our hid parser. > > > > > > > > Could you please try the patch attached against /sys/dev/usb/hid.c > > > > along with the debug printf patch for ums.c, and see what the > > > > result will be? > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse has no Y > > > report device_attach: ums0 attach returned 6 > > > > > > > Sorry I made a mistake in previous patch. > > > > How about this one? > > > > Again, the same message as above: > > ums0: class 0/0, rev 2.00/1.20, addr 2> on uhub0 > ums0: mouse has no Y report > device_attach: ums0 attach returned 6 Strange.. This should not happen. Did you revert previous hid.c patch before applying this one? From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 16:17:51 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 43DB71065678; Tue, 12 Aug 2008 16:17:51 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com (chi.fastbighost.com [65.98.102.73]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF808FC17; Tue, 12 Aug 2008 16:17:51 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from admc214.neoplus.adsl.tpnet.pl ([79.185.32.214] helo=silver.doors) by chi.fastbighost.com with esmtpa (Exim 4.69) (envelope-from ) id 1KSwZ9-0001qF-8l; Tue, 12 Aug 2008 12:17:47 -0400 Date: Tue, 12 Aug 2008 18:17:44 +0200 From: Grzegorz Blach To: Kai Wang Message-ID: <20080812181744.5b7be17c@silver.doors> In-Reply-To: <20080812150139.GA9769@plan0> References: <200807242330.m6ONU70T091921@freefall.freebsd.org> <5d252c1d8f1ddaed55d2467adea536ca@chi.fastbighost.com> <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> <20080812143016.2ac5a7a4@silver.doors> <20080812133029.GA9576@plan0> <20080812165329.47bc22d8@silver.doors> <20080812150139.GA9769@plan0> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - chi.fastbighost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - back-up.pl X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 16:17:51 -0000 On Tue, 12 Aug 2008 17:01:39 +0200 Kai Wang wrote: > > > > > Could you please try the patch attached > > > > > against /sys/dev/usb/hid.c along with the debug printf patch > > > > > for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse > > > > has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > How about this one? > > > > > > > Again, the same message as above: > > > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > ums0: mouse has no Y report > > device_attach: ums0 attach returned 6 > > Strange.. This should not happen. Did you revert previous hid.c > patch before applying this one? OK, I have updated source from cvs, then appiled hid.diff and rebuild kernel, when kernel boot I see: ums0: on uhub0 wheel=1 sc->flags=0x0001 ums0: 3 buttons and Z dir. sc->sc_loc_z.size=8 Wheel is working correctly, but I don't have info about TILT dir (but I never used this direction). From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 16:20:03 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 990F51065694 for ; Tue, 12 Aug 2008 16:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 955098FC12 for ; Tue, 12 Aug 2008 16:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CGK3rW040324 for ; Tue, 12 Aug 2008 16:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CGK3Ar040323; Tue, 12 Aug 2008 16:20:03 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 16:20:03 GMT Message-Id: <200808121620.m7CGK3Ar040323@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Grzegorz Blach Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grzegorz Blach List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 16:20:03 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Grzegorz Blach To: Kai Wang Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 18:17:44 +0200 On Tue, 12 Aug 2008 17:01:39 +0200 Kai Wang wrote: > > > > > Could you please try the patch attached > > > > > against /sys/dev/usb/hid.c along with the debug printf patch > > > > > for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse > > > > has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > How about this one? > > > > > > > Again, the same message as above: > > > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > ums0: mouse has no Y report > > device_attach: ums0 attach returned 6 > > Strange.. This should not happen. Did you revert previous hid.c > patch before applying this one? OK, I have updated source from cvs, then appiled hid.diff and rebuild kernel, when kernel boot I see: ums0: on uhub0 wheel=1 sc->flags=0x0001 ums0: 3 buttons and Z dir. sc->sc_loc_z.size=8 Wheel is working correctly, but I don't have info about TILT dir (but I never used this direction). From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 16:42:32 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 7CE651065670 for ; Tue, 12 Aug 2008 16:42:32 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.freebsd.org (Postfix) with ESMTP id 086388FC16 for ; Tue, 12 Aug 2008 16:42:31 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so1198049nfh.33 for ; Tue, 12 Aug 2008 09:42:31 -0700 (PDT) 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=bWWwy3JsCaOAwbfTSUd0Y0+EW+9iqB09xXksB2obzWA=; b=go8tZp8I7WU07qITq2CDp0qPc8TTrtudSWH+FoKnipdVLS0Kn4hyWrS3jBF1oDqhqJ 3AWeJR9226VuM2muSegpM4XPKx3Bl0SBzWMkdUVfJDkyZI/WdgR2I/pY4nFiqnpuuHq7 UEKxjkyP/mUwyUrFyRuHH8/LS1mwN5JPUE5bM= 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=RTRU0C1hzUoUcHHBZMQKCnA2ZswRQCvzXhGJRnYpDf3HMuf0Z9/VOfpJkWxIr0Xf/5 jk3jMPUCrUeOKHwh9i5A17HSGSGbIa1K+QqkSIrd8fD7DYdpgigPKvAg429vSF5RNhdo ASVKNuH5o34TpKMkymYPFr02YYweXoFvfHmLg= Received: by 10.187.185.8 with SMTP id m8mr901892fap.93.1218559350835; Tue, 12 Aug 2008 09:42:30 -0700 (PDT) Received: from localhost ( [85.8.1.55]) by mx.google.com with ESMTPS id k10sm202395nfh.25.2008.08.12.09.42.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Aug 2008 09:42:30 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KSwwy-0002gu-N0; Tue, 12 Aug 2008 18:42:24 +0200 Received: (from kaffir@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m7CGgOGu010347; Tue, 12 Aug 2008 18:42:24 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaffir set sender to kaiwang27@gmail.com using -f Date: Tue, 12 Aug 2008 18:42:24 +0200 From: Kai Wang To: Grzegorz Blach Message-ID: <20080812164224.GA9967@plan0> Mail-Followup-To: Grzegorz Blach , FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org References: <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> <20080812143016.2ac5a7a4@silver.doors> <20080812133029.GA9576@plan0> <20080812165329.47bc22d8@silver.doors> <20080812150139.GA9769@plan0> <20080812181744.5b7be17c@silver.doors> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20080812181744.5b7be17c@silver.doors> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 16:42:32 -0000 On Tue, Aug 12, 2008 at 06:17:44PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 17:01:39 +0200 > Kai Wang wrote: > > > > > > > Could you please try the patch attached > > > > > > against /sys/dev/usb/hid.c along with the debug printf patch > > > > > > for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > > > ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse > > > > > has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > > > How about this one? > > > > > > > > > > Again, the same message as above: > > > > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > ums0: mouse has no Y report > > > device_attach: ums0 attach returned 6 > > > > Strange.. This should not happen. Did you revert previous hid.c > > patch before applying this one? > > OK, I have updated source from cvs, then appiled hid.diff and rebuild > kernel, when kernel boot I see: > > ums0: class 0/0, rev 2.00/1.20, addr 2> on uhub0 wheel=1 > sc->flags=0x0001 > ums0: 3 buttons and Z dir. > sc->sc_loc_z.size=8 Great! Thank you again for testing all these stuff. > Wheel is working correctly, but I don't have info about TILT dir (but > I never used this direction). It was wrong that ums(4) reported the mouse has "a TILT dir" before. The TWHEEL(0x48) usage inside the report desc of this mouse is a FEATURE item, while the Microsoft Wireless Intellimouse 2.0 quirk (the hid_locate call around line 334) tries to find a TWHEEL usage with a INPUT item, because of the hid parser bug, it will mistakenly find the next INPUT item, (which is the WHEEL input item) and report the "TILT dir". From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 16:50:05 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF650106564A for ; Tue, 12 Aug 2008 16:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AAF5A8FC18 for ; Tue, 12 Aug 2008 16:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CGo5fD043185 for ; Tue, 12 Aug 2008 16:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CGo5Vp043184; Tue, 12 Aug 2008 16:50:05 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 16:50:05 GMT Message-Id: <200808121650.m7CGo5Vp043184@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 16:50:05 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Kai Wang To: Grzegorz Blach Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 18:42:24 +0200 On Tue, Aug 12, 2008 at 06:17:44PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 17:01:39 +0200 > Kai Wang wrote: > > > > > > > Could you please try the patch attached > > > > > > against /sys/dev/usb/hid.c along with the debug printf patch > > > > > > for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > > > ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: mouse > > > > > has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > > > How about this one? > > > > > > > > > > Again, the same message as above: > > > > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > ums0: mouse has no Y report > > > device_attach: ums0 attach returned 6 > > > > Strange.. This should not happen. Did you revert previous hid.c > > patch before applying this one? > > OK, I have updated source from cvs, then appiled hid.diff and rebuild > kernel, when kernel boot I see: > > ums0: class 0/0, rev 2.00/1.20, addr 2> on uhub0 wheel=1 > sc->flags=0x0001 > ums0: 3 buttons and Z dir. > sc->sc_loc_z.size=8 Great! Thank you again for testing all these stuff. > Wheel is working correctly, but I don't have info about TILT dir (but > I never used this direction). It was wrong that ums(4) reported the mouse has "a TILT dir" before. The TWHEEL(0x48) usage inside the report desc of this mouse is a FEATURE item, while the Microsoft Wireless Intellimouse 2.0 quirk (the hid_locate call around line 334) tries to find a TWHEEL usage with a INPUT item, because of the hid parser bug, it will mistakenly find the next INPUT item, (which is the WHEEL input item) and report the "TILT dir". From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 17:01:44 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 7C0C31065674; Tue, 12 Aug 2008 17:01:44 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from chi.fastbighost.com (chi.fastbighost.com [65.98.102.73]) by mx1.freebsd.org (Postfix) with ESMTP id 481CA8FC20; Tue, 12 Aug 2008 17:01:44 +0000 (UTC) (envelope-from magik@back-up.pl) Received: from admc214.neoplus.adsl.tpnet.pl ([79.185.32.214] helo=silver.doors) by chi.fastbighost.com with esmtpa (Exim 4.69) (envelope-from ) id 1KSxFc-0002cT-8t; Tue, 12 Aug 2008 13:01:40 -0400 Date: Tue, 12 Aug 2008 19:01:37 +0200 From: Grzegorz Blach To: Kai Wang Message-ID: <20080812190137.62dba989@silver.doors> In-Reply-To: <20080812164224.GA9967@plan0> References: <20080811133434.GA4224@plan0> <0ed513c9800b730fff47034b86526e5d@chi.fastbighost.com> <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> <20080812143016.2ac5a7a4@silver.doors> <20080812133029.GA9576@plan0> <20080812165329.47bc22d8@silver.doors> <20080812150139.GA9769@plan0> <20080812181744.5b7be17c@silver.doors> <20080812164224.GA9967@plan0> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - chi.fastbighost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - back-up.pl X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 17:01:44 -0000 On Tue, 12 Aug 2008 18:42:24 +0200 Kai Wang wrote: > On Tue, Aug 12, 2008 at 06:17:44PM +0200, Grzegorz Blach wrote: > > On Tue, 12 Aug 2008 17:01:39 +0200 > > Kai Wang wrote: > > > > > > > > > Could you please try the patch attached > > > > > > > against /sys/dev/usb/hid.c along with the debug printf > > > > > > > patch for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > > > > > ums0: > > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: > > > > > > mouse has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > > > > > How about this one? > > > > > > > > > > > > > Again, the same message as above: > > > > > > > > ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > ums0: mouse has no Y report > > > > device_attach: ums0 attach returned 6 > > > > > > Strange.. This should not happen. Did you revert previous hid.c > > > patch before applying this one? > > > > OK, I have updated source from cvs, then appiled hid.diff and > > rebuild kernel, when kernel boot I see: > > > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 wheel=1 > > sc->flags=0x0001 > > ums0: 3 buttons and Z dir. > > sc->sc_loc_z.size=8 > > Great! Thank you again for testing all these stuff. > > > Wheel is working correctly, but I don't have info about TILT dir > > (but I never used this direction). > > It was wrong that ums(4) reported the mouse has "a TILT dir" before. > The TWHEEL(0x48) usage inside the report desc of this mouse is a > FEATURE item, while the Microsoft Wireless Intellimouse 2.0 quirk > (the hid_locate call around line 334) tries to find a TWHEEL usage > with a INPUT item, because of the hid parser bug, it will mistakenly > find the next INPUT item, (which is the WHEEL input item) and report > the "TILT dir". > > I don't understand: Is TILT dir working when it isn't reported. Microsoft notebook optical 3000 and Microsoft wireless intellimouse 2.0, both support TITL dir. In documentation this is mentioned as "4-way scrolling with tilt wheel technology". From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 17:10:06 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B94F1065678 for ; Tue, 12 Aug 2008 17:10:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 06EEF8FC18 for ; Tue, 12 Aug 2008 17:10:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CHA5QN043974 for ; Tue, 12 Aug 2008 17:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CHA51p043973; Tue, 12 Aug 2008 17:10:05 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 17:10:05 GMT Message-Id: <200808121710.m7CHA51p043973@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Grzegorz Blach Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grzegorz Blach List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 17:10:06 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Grzegorz Blach To: Kai Wang Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 19:01:37 +0200 On Tue, 12 Aug 2008 18:42:24 +0200 Kai Wang wrote: > On Tue, Aug 12, 2008 at 06:17:44PM +0200, Grzegorz Blach wrote: > > On Tue, 12 Aug 2008 17:01:39 +0200 > > Kai Wang wrote: > > > > > > > > > Could you please try the patch attached > > > > > > > against /sys/dev/usb/hid.c along with the debug printf > > > > > > > patch for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > > > > > ums0: > > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: > > > > > > mouse has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > > > > > How about this one? > > > > > > > > > > > > > Again, the same message as above: > > > > > > > > ums0: > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > ums0: mouse has no Y report > > > > device_attach: ums0 attach returned 6 > > > > > > Strange.. This should not happen. Did you revert previous hid.c > > > patch before applying this one? > > > > OK, I have updated source from cvs, then appiled hid.diff and > > rebuild kernel, when kernel boot I see: > > > > ums0: > class 0/0, rev 2.00/1.20, addr 2> on uhub0 wheel=1 > > sc->flags=0x0001 > > ums0: 3 buttons and Z dir. > > sc->sc_loc_z.size=8 > > Great! Thank you again for testing all these stuff. > > > Wheel is working correctly, but I don't have info about TILT dir > > (but I never used this direction). > > It was wrong that ums(4) reported the mouse has "a TILT dir" before. > The TWHEEL(0x48) usage inside the report desc of this mouse is a > FEATURE item, while the Microsoft Wireless Intellimouse 2.0 quirk > (the hid_locate call around line 334) tries to find a TWHEEL usage > with a INPUT item, because of the hid parser bug, it will mistakenly > find the next INPUT item, (which is the WHEEL input item) and report > the "TILT dir". > > I don't understand: Is TILT dir working when it isn't reported. Microsoft notebook optical 3000 and Microsoft wireless intellimouse 2.0, both support TITL dir. In documentation this is mentioned as "4-way scrolling with tilt wheel technology". From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 17:18:53 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 C26961065670 for ; Tue, 12 Aug 2008 17:18:53 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by mx1.freebsd.org (Postfix) with ESMTP id 4B9BC8FC17 for ; Tue, 12 Aug 2008 17:18:53 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so3917929fkk.11 for ; Tue, 12 Aug 2008 10:18:52 -0700 (PDT) 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=/dVOyinQTGbdNAhnb6Mx/COibXHc6D+Ru6+RW1nOwA4=; b=CRXdHlcBteTq0VX5JzB55snKHsOq4OnOK9Hrn5wTqeF02iniTsBB1udAqWuKPI4o0D u+W1fjiuFa9Z17Br+Adicpm4y76MdYBmCBrRbOP2yvit3ghgG1x8ZbHMgMOmkhYTGvv8 xHrv1FkTzuDjNRjf4Fm3CYolR68epwq9vQdTg= 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=UPBRHnMtvSVa2Y4ywpGd4ZWW34JYDsmneacLmtW3tJrAm3dLt7fuwqdfLhpRCijvqD Jo5HEMjok+tt/qM+a23tTaqaWkkNWU73sJm7RNQfUTdoBOH/zIKsnhqwcRxAOpLkFmy+ 8hFyXtOO1PqZfLiB7YO9C9O5oRzDnio/l89Ik= Received: by 10.181.16.6 with SMTP id t6mr3384901bki.81.1218561531661; Tue, 12 Aug 2008 10:18:51 -0700 (PDT) Received: from localhost ( [85.8.1.55]) by mx.google.com with ESMTPS id f3sm1830248nfh.2.2008.08.12.10.18.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Aug 2008 10:18:50 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KSxW9-0002k6-9W; Tue, 12 Aug 2008 19:18:45 +0200 Received: (from kaffir@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m7CHIiUf010545; Tue, 12 Aug 2008 19:18:44 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaffir set sender to kaiwang27@gmail.com using -f Date: Tue, 12 Aug 2008 19:18:44 +0200 From: Kai Wang To: Grzegorz Blach Message-ID: <20080812171844.GA10473@plan0> Mail-Followup-To: Grzegorz Blach , FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org References: <20080811151941.GA4590@plan0> <310aef2cb8e5bbcc7cf345f962cb102b@chi.fastbighost.com> <20080812022710.GA7527@plan0> <20080812143016.2ac5a7a4@silver.doors> <20080812133029.GA9576@plan0> <20080812165329.47bc22d8@silver.doors> <20080812150139.GA9769@plan0> <20080812181744.5b7be17c@silver.doors> <20080812164224.GA9967@plan0> <20080812190137.62dba989@silver.doors> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20080812190137.62dba989@silver.doors> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 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: Tue, 12 Aug 2008 17:18:53 -0000 On Tue, Aug 12, 2008 at 07:01:37PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 18:42:24 +0200 > Kai Wang wrote: > > > On Tue, Aug 12, 2008 at 06:17:44PM +0200, Grzegorz Blach wrote: > > > On Tue, 12 Aug 2008 17:01:39 +0200 > > > Kai Wang wrote: > > > > > > > > > > > Could you please try the patch attached > > > > > > > > against /sys/dev/usb/hid.c along with the debug printf > > > > > > > > patch for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > > > > > > > ums0: > > > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: > > > > > > > mouse has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > > > > > > > How about this one? > > > > > > > > > > > > > > > > Again, the same message as above: > > > > > > > > > > ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > ums0: mouse has no Y report > > > > > device_attach: ums0 attach returned 6 > > > > > > > > Strange.. This should not happen. Did you revert previous hid.c > > > > patch before applying this one? > > > > > > OK, I have updated source from cvs, then appiled hid.diff and > > > rebuild kernel, when kernel boot I see: > > > > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 wheel=1 > > > sc->flags=0x0001 > > > ums0: 3 buttons and Z dir. > > > sc->sc_loc_z.size=8 > > > > Great! Thank you again for testing all these stuff. > > > > > Wheel is working correctly, but I don't have info about TILT dir > > > (but I never used this direction). > > > > It was wrong that ums(4) reported the mouse has "a TILT dir" before. > > The TWHEEL(0x48) usage inside the report desc of this mouse is a > > FEATURE item, while the Microsoft Wireless Intellimouse 2.0 quirk > > (the hid_locate call around line 334) tries to find a TWHEEL usage > > with a INPUT item, because of the hid parser bug, it will mistakenly > > find the next INPUT item, (which is the WHEEL input item) and report > > the "TILT dir". > > > > > > I don't understand: > > Is TILT dir working when it isn't reported. > > Microsoft notebook optical 3000 > and Microsoft wireless intellimouse > 2.0, both support TITL dir. > > In documentation this is mentioned as "4-way scrolling with tilt wheel > technology". I don't know if ums(4) support the TITL dir of this mouse, I guess not. It just falsely reports it before patching. You could try to use TITL wheel with and without patching, see if there is a difference. Thanks, Kai From owner-freebsd-usb@FreeBSD.ORG Tue Aug 12 17:20:06 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E57B1065689 for ; Tue, 12 Aug 2008 17:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 39AE58FC19 for ; Tue, 12 Aug 2008 17:20:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CHK5Fl046465 for ; Tue, 12 Aug 2008 17:20:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7CHK5ev046464; Tue, 12 Aug 2008 17:20:05 GMT (envelope-from gnats) Date: Tue, 12 Aug 2008 17:20:05 GMT Message-Id: <200808121720.m7CHK5ev046464@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Kai Wang Cc: Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Kai Wang List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 17:20:06 -0000 The following reply was made to PR usb/125941; it has been noted by GNATS. From: Kai Wang To: Grzegorz Blach Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-usb@FreeBSD.org Subject: Re: usb/125941: not working wheel on my microsoft notebook optical mouse 3000 Date: Tue, 12 Aug 2008 19:18:44 +0200 On Tue, Aug 12, 2008 at 07:01:37PM +0200, Grzegorz Blach wrote: > On Tue, 12 Aug 2008 18:42:24 +0200 > Kai Wang wrote: > > > On Tue, Aug 12, 2008 at 06:17:44PM +0200, Grzegorz Blach wrote: > > > On Tue, 12 Aug 2008 17:01:39 +0200 > > > Kai Wang wrote: > > > > > > > > > > > Could you please try the patch attached > > > > > > > > against /sys/dev/usb/hid.c along with the debug printf > > > > > > > > patch for ums.c, and see what the result will be? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > kernel with appiled this two patches reports that: > > > > > > > > > > > > > > ums0: > > > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 ums0: > > > > > > > mouse has no Y report device_attach: ums0 attach returned 6 > > > > > > > > > > > > > > > > > > > Sorry I made a mistake in previous patch. > > > > > > > > > > > > How about this one? > > > > > > > > > > > > > > > > Again, the same message as above: > > > > > > > > > > ums0: > > > > Wheel, class 0/0, rev 2.00/1.20, addr 2> on uhub0 > > > > > ums0: mouse has no Y report > > > > > device_attach: ums0 attach returned 6 > > > > > > > > Strange.. This should not happen. Did you revert previous hid.c > > > > patch before applying this one? > > > > > > OK, I have updated source from cvs, then appiled hid.diff and > > > rebuild kernel, when kernel boot I see: > > > > > > ums0: > > class 0/0, rev 2.00/1.20, addr 2> on uhub0 wheel=1 > > > sc->flags=0x0001 > > > ums0: 3 buttons and Z dir. > > > sc->sc_loc_z.size=8 > > > > Great! Thank you again for testing all these stuff. > > > > > Wheel is working correctly, but I don't have info about TILT dir > > > (but I never used this direction). > > > > It was wrong that ums(4) reported the mouse has "a TILT dir" before. > > The TWHEEL(0x48) usage inside the report desc of this mouse is a > > FEATURE item, while the Microsoft Wireless Intellimouse 2.0 quirk > > (the hid_locate call around line 334) tries to find a TWHEEL usage > > with a INPUT item, because of the hid parser bug, it will mistakenly > > find the next INPUT item, (which is the WHEEL input item) and report > > the "TILT dir". > > > > > > I don't understand: > > Is TILT dir working when it isn't reported. > > Microsoft notebook optical 3000 > and Microsoft wireless intellimouse > 2.0, both support TITL dir. > > In documentation this is mentioned as "4-way scrolling with tilt wheel > technology". I don't know if ums(4) support the TITL dir of this mouse, I guess not. It just falsely reports it before patching. You could try to use TITL wheel with and without patching, see if there is a difference. Thanks, Kai From owner-freebsd-usb@FreeBSD.ORG Wed Aug 13 12:50:03 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 895BB106564A for ; Wed, 13 Aug 2008 12:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 808168FC16 for ; Wed, 13 Aug 2008 12:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7DCo3m1082949 for ; Wed, 13 Aug 2008 12:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7DCo3JD082948; Wed, 13 Aug 2008 12:50:03 GMT (envelope-from gnats) Date: Wed, 13 Aug 2008 12:50:03 GMT Message-Id: <200808131250.m7DCo3JD082948@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/96599: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2008 12:50:03 -0000 The following reply was made to PR usb/96599; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/96599: commit references a PR Date: Wed, 13 Aug 2008 12:40:35 +0000 (UTC) maxim 2008-08-13 12:40:20 UTC FreeBSD src repository Modified files: sys/dev/usb umass.c Log: SVN rev 181685 on 2008-08-13 12:40:20Z by maxim o Add a quirk for Sony Handycam DCR-HC32E. PR: usb/96599 Submitted by: Eugene Grosbein MFC after: 1 week Revision Changes Path 1.164 +4 -0 src/sys/dev/usb/umass.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Wed Aug 13 15:40:05 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C6E4106566B for ; Wed, 13 Aug 2008 15:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D83088FC0C for ; Wed, 13 Aug 2008 15:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7DFe4CX097971 for ; Wed, 13 Aug 2008 15:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7DFe410097966; Wed, 13 Aug 2008 15:40:04 GMT (envelope-from gnats) Date: Wed, 13 Aug 2008 15:40:04 GMT Message-Id: <200808131540.m7DFe410097966@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: "Artem Naluzhnyy" Cc: Subject: Re: usb/117205: [patch] uscanner support for HP ScanJet 4470c X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Artem Naluzhnyy List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2008 15:40:05 -0000 The following reply was made to PR usb/117205; it has been noted by GNATS. From: "Artem Naluzhnyy" To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/117205: [patch] uscanner support for HP ScanJet 4470c Date: Wed, 13 Aug 2008 18:04:30 +0300 You may actually close the PR since there is no working backend for the scanner anyway. So it isn't supported by FreeBSD. -- Artem Naluzhnyy From owner-freebsd-usb@FreeBSD.ORG Wed Aug 13 16:05:18 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 6BFF31065689; Wed, 13 Aug 2008 16:05:18 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id EFFC88FC3D; Wed, 13 Aug 2008 16:05:17 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id F162E744191; Wed, 13 Aug 2008 18:41:51 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eQleWWqNKSrh; Wed, 13 Aug 2008 18:41:51 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 1F9E5744174; Wed, 13 Aug 2008 18:41:51 +0300 (EEST) Message-ID: <48A300B9.5090105@icyb.net.ua> Date: Wed, 13 Aug 2008 18:41:45 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.16 (X11/20080805) MIME-Version: 1.0 To: freebsd-usb@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: tilt/horizontal scroll support 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: Wed, 13 Aug 2008 16:05:18 -0000 I have the following mouse: http://www.logitech.com/index.cfm/partners/system_builders_integrators/products/mice/devices/3141&cl=gb,en# It has "Tilt Wheel Plus Zoomâ„¢ technology", i.e. its scroll wheel can be tilted left and right. Currently it perfectly works as 3 buttons + wheel mouse, but tilting action does not cause any effect (in xev). This is some debug output from ums driver: ums0: Logitech USB-PS/2 Optical Mouse, rev 2.00/27.20, addr 2, iclass 3/1 ums0: 8 buttons and Z dir. ums_attach: sc=0xffffff004d747400 ums_attach: X 8/8 ums_attach: Y 16/8 ums_attach: Z 24/8 ums_attach: B1 0/1 ums_attach: B2 1/1 ums_attach: B3 2/1 ums_attach: B4 3/1 ums_attach: B5 4/1 ums_attach: B6 5/1 ums_attach: B7 6/1 ums_attach: B8 7/1 Here's how "normal"/vertical scrolling of the wheel is reported by ums (one scroll forward and one scroll backward): ums_intr: sc=0xffffff006b502400 status=0 ums_intr: data = 00 00 00 ff 00 ums_intr: x:0 y:0 z:1 t:0 buttons:0x0 ums_intr: sc=0xffffff006b502400 status=0 ums_intr: data = 00 00 00 01 00 ums_intr: x:0 y:0 z:-1 t:0 buttons:0x0 As expected value in the 4th byte (data[3]) is interpreted as z-axis movement (and seems to always be +1/-1). Here's how tilting of the wheel is reported (tilted the wheel, held it for some time and then released): ums_intr: sc=0xffffff004d747400 status=0 ums_intr: data = 00 00 00 00 01 ums_intr: x:0 y:0 z:0 t:0 buttons:0x0 ums_intr: sc=0xffffff004d747400 status=0 ums_intr: data = 00 00 00 00 01 ums_intr: x:0 y:0 z:0 t:0 buttons:0x0 ums_intr: sc=0xffffff004d747400 status=0 ums_intr: data = 00 00 00 00 01 ums_intr: x:0 y:0 z:0 t:0 buttons:0x0 ums_intr: sc=0xffffff004d747400 status=0 ums_intr: data = 00 00 00 00 00 ums_intr: x:0 y:0 z:0 t:0 buttons:0x0 It seems that tilting is reported by value in the 5th byte (data[4]), it has hardware "auto-repeat" and end of tilting is reported by all-zeroes data. Currently, it seems, data[4] is completely ignored. I would like to get tilting to work as horizontal scrolling in X, using SysMouse protocol. As I understand currently our sysmouse(4) protocol doesn't provide for tilting data (there is no field for it in the packet structure), and Xorg sysmouse driver does not have any support for tilting either. So now I have two questions. 1. What would be the best way to each ums about the tilt capability of this mouse? Is there some generic way to detect it or maybe logitech-specific way or some model-specific quirk is required? 2. What would be the best way to pass tilting data to consumers? I see two possibilities: A) map data[4] to some extended button value (do it in ums driver), e.g. to button 6 and button 7; B) it seems that dz value is always 1 or -1, amount of scrolling affects number of mouse events, but abs(dz) is always 1; if this is really always true, then tilting could be piggy-backed onto dz as +2/-2 value (or some such) and then Xorg sysmouse driver could be taught to interpret such values as special button presses (similarly to how vertical scrolling is handled in it). Thank you in advance for advices and opinions. -- Andriy Gapon From owner-freebsd-usb@FreeBSD.ORG Wed Aug 13 16:55:16 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 0204D1065670 for ; Wed, 13 Aug 2008 16:55:16 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.freebsd.org (Postfix) with ESMTP id 907138FC16 for ; Wed, 13 Aug 2008 16:55:15 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so47663nfh.33 for ; Wed, 13 Aug 2008 09:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender; bh=doRi0Bg3xoEiXCx1ZERBht0QC405eYjf6KDcWrXr/H0=; b=liJDQIvqyou8NUBdBfb0gEec83hhCxGDWtgNTSAMw4mFL7+5Ej3TQGxtJnvOrFXvTu gBgBZUh0a+q9pdOz3jJYs2QB3IWar8UW5s0wdYq1wijyBTVtv2H0kXZIwfdFnNY5qeeT Dekzg9v/DpDKrMLbtQeKsqilC2ec6Qs0ctmYY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent:sender; b=B9VMeKkrLUep0hh7ULYuhhdXzBPBmjjO8xL44DEyi6dNKHEdK0lNeRXCR06kudUn43 SWWLA31Vff/Lz4xhiPE8uV1NRC7KeyAR6NkxYZJRLxY5qu4AcFjrcGpOzopOvnsMGlSA S5wIRXjRv+298ztQ29ZQJZKCNQCtflrYA8oFs= Received: by 10.210.89.4 with SMTP id m4mr9101ebb.21.1218644978375; Wed, 13 Aug 2008 09:29:38 -0700 (PDT) Received: from epsilon.local ( [89.214.74.64]) by mx.google.com with ESMTPS id p10sm767782gvf.7.2008.08.13.09.29.35 (version=SSLv3 cipher=RC4-MD5); Wed, 13 Aug 2008 09:29:37 -0700 (PDT) Date: Wed, 13 Aug 2008 17:29:31 +0100 From: Rui Paulo To: Andriy Gapon Message-ID: <20080813162931.GC718@epsilon.local> References: <48A300B9.5090105@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48A300B9.5090105@icyb.net.ua> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: Rui Paulo Cc: freebsd-hackers@freebsd.org, freebsd-usb@freebsd.org Subject: Re: tilt/horizontal scroll support 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: Wed, 13 Aug 2008 16:55:16 -0000 On Wed, Aug 13, 2008 at 06:41:45PM +0300, Andriy Gapon wrote: > > I have the following mouse: > http://www.logitech.com/index.cfm/partners/system_builders_integrators/products/mice/devices/3141&cl=gb,en# ... > So now I have two questions. > 1. What would be the best way to each ums about the tilt capability of > this mouse? Is there some generic way to detect it or maybe > logitech-specific way or some model-specific quirk is required? > > 2. What would be the best way to pass tilting data to consumers? > I see two possibilities: > A) map data[4] to some extended button value (do it in ums driver), e.g. > to button 6 and button 7; > B) it seems that dz value is always 1 or -1, amount of scrolling affects > number of mouse events, but abs(dz) is always 1; if this is really > always true, then tilting could be piggy-backed onto dz as +2/-2 value > (or some such) and then Xorg sysmouse driver could be taught to > interpret such values as special button presses (similarly to how > vertical scrolling is handled in it). Well, perhaps the best way is to teach sysmouse about horizontal scrolling and then add a quirk WRT your mouse ? sysmouse(4) really needs to grow horizontal scrolling since nowadays every mouse has it. Regards, -- Rui Paulo From owner-freebsd-usb@FreeBSD.ORG Thu Aug 14 07:00:06 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A32361065671 for ; Thu, 14 Aug 2008 07:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0808FC0C for ; Thu, 14 Aug 2008 07:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7E705i3009002 for ; Thu, 14 Aug 2008 07:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7E705Se009001; Thu, 14 Aug 2008 07:00:05 GMT (envelope-from gnats) Date: Thu, 14 Aug 2008 07:00:05 GMT Message-Id: <200808140700.m7E705Se009001@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: "Oleksii Krykun" Cc: Subject: Re: usb/122992: MotoROKR Z6 Phone not recognised by umass as USB disk. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Oleksii Krykun List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2008 07:00:06 -0000 The following reply was made to PR usb/122992; it has been noted by GNATS. From: "Oleksii Krykun" To: bug-followup@FreeBSD.org,gemellus@sdf.lonestar.org Cc: Subject: Re: usb/122992: MotoROKR Z6 Phone not recognised by umass as USB disk. Date: Thu, 14 Aug 2008 09:56:32 +0300 This bug also described in http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-03/msg04505.html I tried to apply quirks: --- usbdevs.orig 2008-01-08 01:12:45.000000000 +0200 +++ usbdevs 2008-07-30 13:55:59.000000000 +0300 @@ -1695,6 +1695,7 @@ product MOTOROLA2 E398 0x4810 E398 Mobile Phone product MOTOROLA2 USBLAN 0x600c USBLAN product MOTOROLA2 USBLAN2 0x6027 USBLAN +product MOTOROLA2 MS 0x6426 MS /* MultiTech products */ product MULTITECH ATLAS 0xf101 MT5634ZBA-USB modem --- umass.c.orig 2007-07-05 08:26:08.000000000 +0300 +++ umass.c 2008-08-06 15:00:00.000000000 +0300 @@ -544,6 +544,10 @@ UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY | NO_INQUIRY_EVPD | NO_GETMAXLUN }, + { USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_MS, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + NO_INQUIRY | READ_CAPACITY_OFFBY1 + }, { USB_VENDOR_MSYSTEMS, USB_PRODUCT_MSYSTEMS_DISKONKEY, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE | NO_GETMAXLUN | RS_NO_CLEAR_UA I get following messages: Aug 6 15:51:26 kws kernel: pass1 at umass-sim0 bus 0 target 0 lun 1 Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Retrying Command Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Retrying Command Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Retrying Command Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Retrying Command Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): error 5 Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): Retries Exausted Aug 6 15:51:26 kws kernel: (da0:umass-sim0:0:0:0): removing device entry Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): error 5 Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retries Exausted Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): got CAM status 0x4 Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): fatal error, failed to attach to device Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): lost device Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retrying Command Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Request completed with CAM_REQ_CMP_ERR Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): error 5 Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): Retries Exausted Aug 6 15:51:26 kws kernel: (da1:umass-sim0:0:0:1): removing device entry After unplugging my phone seems connected to PC until reboot. Unfortunately I have not any idea about BULK_IGNORE_TAG porting From owner-freebsd-usb@FreeBSD.ORG Thu Aug 14 10:22:33 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B73A11065673; Thu, 14 Aug 2008 10:22:33 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8A4708FC17; Thu, 14 Aug 2008 10:22:33 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7EAMXYI074400; Thu, 14 Aug 2008 10:22:33 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7EAMXaI074396; Thu, 14 Aug 2008 10:22:33 GMT (envelope-from linimon) Date: Thu, 14 Aug 2008 10:22:33 GMT Message-Id: <200808141022.m7EAMXaI074396@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-amd64@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/126519: [usb] [panic] panic when plugging in an iphone 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: Thu, 14 Aug 2008 10:22:33 -0000 Old Synopsis: Panic when plugging in an iphone New Synopsis: [usb] [panic] panic when plugging in an iphone Responsible-Changed-From-To: freebsd-amd64->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Thu Aug 14 10:22:02 UTC 2008 Responsible-Changed-Why: Reclassify. http://www.freebsd.org/cgi/query-pr.cgi?pr=126519 From owner-freebsd-usb@FreeBSD.ORG Fri Aug 15 10:08:37 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 E0842106566B for ; Fri, 15 Aug 2008 10:08:37 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 951028FC14 for ; Fri, 15 Aug 2008 10:08:36 +0000 (UTC) (envelope-from kevlo@kevlo.org) Received: from [127.0.0.1] (ns.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.3/8.14.3) with ESMTP id m7F9aX65014410 for ; Fri, 15 Aug 2008 17:36:50 +0800 (CST) (envelope-from kevlo@kevlo.org) X-Authentication-Warning: ns.kevlo.org: Host ns.kevlo.org [220.128.136.52] claimed to be [127.0.0.1] From: Kevin Lo To: freebsd-usb@FreeBSD.org Content-Type: multipart/mixed; boundary="=-2mJhl0bZKzX3lZ7vrtwn" Date: Fri, 15 Aug 2008 17:39:02 +0800 Message-Id: <1218793142.1703.7.camel@wsl.kevlo.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1.1 FreeBSD GNOME Team Port Cc: Subject: High speed isochronous transfer patch 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: Fri, 15 Aug 2008 10:08:38 -0000 --=-2mJhl0bZKzX3lZ7vrtwn Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, The attached patch that adds support for high speed isochronous transfer, which is taken from NetBSD. Kevin --=-2mJhl0bZKzX3lZ7vrtwn Content-Disposition: attachment; filename=patch-ehci Content-Type: text/x-patch; name=patch-ehci; charset=Big5 Content-Transfer-Encoding: 7bit diff -ruN sys.orig/dev/usb/ehci.c sys/dev/usb/ehci.c --- sys.orig/dev/usb/ehci.c 2008-08-15 17:16:07.000000000 +0800 +++ sys/dev/usb/ehci.c 2008-08-15 17:15:44.000000000 +0800 @@ -129,7 +129,10 @@ u_int length; } bulk; /* Iso pipe */ - /* XXX */ + struct { + u_int next_frame; + u_int cur_xfers; + } isoc; } u; }; @@ -139,6 +142,8 @@ static int ehci_intr1(ehci_softc_t *); static void ehci_waitintr(ehci_softc_t *, usbd_xfer_handle); static void ehci_check_intr(ehci_softc_t *, struct ehci_xfer *); +static void ehci_check_qh_intr(ehci_softc_t *, struct ehci_xfer *); +static void ehci_check_itd_intr(ehci_softc_t *, struct ehci_xfer *); static void ehci_idone(struct ehci_xfer *); static void ehci_timeout(void *); static void ehci_timeout_task(void *); @@ -205,6 +210,12 @@ static void ehci_free_sqtd_chain(ehci_softc_t *, ehci_soft_qh_t *, ehci_soft_qtd_t *, ehci_soft_qtd_t *); +static ehci_soft_itd_t *ehci_alloc_itd(ehci_softc_t *); +static void ehci_free_itd(ehci_softc_t *, ehci_soft_itd_t *); +static void ehci_rem_free_itd_chain(ehci_softc_t *, + struct ehci_xfer *); +static void ehci_abort_isoc_xfer(usbd_xfer_handle, usbd_status); + static usbd_status ehci_device_request(usbd_xfer_handle xfer); static usbd_status ehci_device_setintr(ehci_softc_t *, ehci_soft_qh_t *, @@ -228,6 +239,10 @@ static void ehci_dump_sqtd(ehci_soft_qtd_t *); static void ehci_dump_qtd(ehci_qtd_t *); static void ehci_dump_sqh(ehci_soft_qh_t *); +#if notyet +static void ehci_dump_sitd(struct ehci_soft_itd *); +static void ehci_dump_itd(struct ehci_soft_itd *); +#endif #ifdef DIAGNOSTIC static void ehci_dump_exfer(struct ehci_xfer *); #endif @@ -414,8 +429,19 @@ return (err); DPRINTF(("%s: flsize=%d\n", device_get_nameunit(sc->sc_bus.bdev),sc->sc_flsize)); sc->sc_flist = KERNADDR(&sc->sc_fldma, 0); + + for (i = 0; i < sc->sc_flsize; i++) { + sc->sc_flist[i] = EHCI_NULL; + } + EOWRITE4(sc, EHCI_PERIODICLISTBASE, DMAADDR(&sc->sc_fldma, 0)); + sc->sc_softitds = malloc(sc->sc_flsize * sizeof(ehci_soft_itd_t *), + M_USB, M_NOWAIT | M_ZERO); + if (sc->sc_softitds == NULL) + return (ENOMEM); + LIST_INIT(&sc->sc_freeitds); + /* Set up the bus struct. */ sc->sc_bus.methods = &ehci_bus_methods; sc->sc_bus.pipe_size = sizeof(struct ehci_pipe); @@ -714,19 +740,31 @@ void ehci_check_intr(ehci_softc_t *sc, struct ehci_xfer *ex) { - ehci_soft_qtd_t *sqtd, *lsqtd; - u_int32_t status; + int attr; DPRINTFN(/*15*/2, ("ehci_check_intr: ex=%p\n", ex)); + attr = ex->xfer.pipe->endpoint->edesc->bmAttributes; + if (UE_GET_XFERTYPE(attr) == UE_ISOCHRONOUS) + ehci_check_itd_intr(sc, ex); + else + ehci_check_qh_intr(sc, ex); +} + +void +ehci_check_qh_intr(ehci_softc_t *sc, struct ehci_xfer *ex) +{ + ehci_soft_qtd_t *sqtd, *lsqtd; + u_int32_t status; + if (ex->sqtdstart == NULL) { - printf("ehci_check_intr: sqtdstart=NULL\n"); + printf("ehci_check_qh_intr: not valid sqtd\n"); return; } lsqtd = ex->sqtdend; #ifdef DIAGNOSTIC if (lsqtd == NULL) { - printf("ehci_check_intr: lsqtd==0\n"); + printf("ehci_check_qh_intr: lsqtd==0\n"); return; } #endif @@ -761,6 +799,64 @@ } void +ehci_check_itd_intr(ehci_softc_t *sc, struct ehci_xfer *ex) +{ + ehci_soft_itd_t *itd; + int i; + + if (ex->itdstart == NULL) { + printf("ehci_check_itd_intr: not valid itd\n"); + return; + } + + itd = ex->itdend; +#ifdef DIAGNOSTIC + if (itd == NULL) { + printf("ehci_check_itd_intr: itdend == 0\n"); + return; + } +#endif + + /* + * Step 1, check no active transfers in last itd, meaning we're finished + */ + for (i = 0; i < 8; i++) { + if (le32toh(itd->itd.itd_ctl[i]) & EHCI_ITD_ACTIVE) + break; + } + + if (i == 8) { + goto done; /* All 8 descriptors inactive, it's done */ + } + + /* + * Step 2, check for errors in status bits, throughout chain... + */ + + DPRINTFN(12, ("ehci_check_itd_intr: active ex=%p\n", ex)); + + for (itd = ex->itdstart; itd != ex->itdend; itd = itd->xfer_next) { + for (i = 0; i < 8; i++) { + if (le32toh(itd->itd.itd_ctl[i]) & (EHCI_ITD_BUF_ERR | + EHCI_ITD_BABBLE | EHCI_ITD_ERROR)) + break; + } + if (i != 8) { /* Error in one of the itds */ + goto done; + } + } /* itd search loop */ + + DPRINTFN(12, ("ehci_check_itd_intr: ex %p itd %p still active\n", ex, + ex->itdstart)); + return; +done: + DPRINTFN(12, ("ehci_check_itd_intr: ex=%p done\n", ex)); + callout_stop(&ex->xfer.timeout_handle); + usb_rem_task(ex->xfer.pipe->device, &ex->abort_task); + ehci_idone(ex); +} + +void ehci_idone(struct ehci_xfer *ex) { usbd_xfer_handle xfer = &ex->xfer; @@ -826,9 +922,56 @@ } /* The transfer is done, compute actual length and status. */ + if (UE_GET_XFERTYPE(xfer->pipe->endpoint->edesc->bmAttributes) + == UE_ISOCHRONOUS) { + /* Isoc transfer */ + struct ehci_soft_itd *itd; + int i, nframes, len, uframes; + + nframes = 0; + actlen = 0; + + switch (xfer->pipe->endpoint->edesc->bInterval) { + case 0: + panic("ehci: isoc xfer suddenly has 0 bInterval, " + "invalid\n"); + case 1: uframes = 1; break; + case 2: uframes = 2; break; + case 3: uframes = 4; break; + default: uframes = 8; break; + } + + for (itd = ex->itdstart; itd != NULL; itd = itd->xfer_next) { + for (i = 0; i < 8; i += uframes) { + /* XXX - driver didn't fill in the frame full + * of uframes. This leads to scheduling + * inefficiencies, but working around + * this doubles complexity of tracking + * an xfer. + */ + if (nframes >= xfer->nframes) + break; + + status = le32toh(itd->itd.itd_ctl[i]); + len = EHCI_ITD_GET_LEN(status); + xfer->frlengths[nframes++] = len; + actlen += len; + } + if (nframes >= xfer->nframes) + break; + } + xfer->actlen = actlen; + xfer->status = USBD_NORMAL_COMPLETION; + + goto end; + } + + /* Continue processing xfers using queue heads */ + lsqtd = ex->sqtdend; actlen = 0; - for (sqtd = ex->sqtdstart; sqtd != lsqtd->nextqtd; sqtd=sqtd->nextqtd) { + for (sqtd = ex->sqtdstart; sqtd != lsqtd->nextqtd; + sqtd =sqtd->nextqtd) { nstatus = le32toh(sqtd->qtd.qtd_status); if (nstatus & EHCI_QTD_ACTIVE) break; @@ -871,7 +1014,11 @@ } else { xfer->status = USBD_NORMAL_COMPLETION; } - +end: + /* XXX transfer_complete memcpys out transfer data (for in endpoints) + * during this call, before methods->done is called: dma sync required + * beforehand? + */ usb_transfer_complete(xfer); DPRINTFN(/*12*/2, ("ehci_idone: ex=%p done\n", ex)); } @@ -1319,11 +1466,51 @@ ehci_dump_qtd(&qh->qh_qtd); } +#if notyet +void +ehci_dump_itd(struct ehci_soft_itd *itd) +{ + ehci_isoc_trans_t t; + ehci_isoc_bufr_ptr_t b, b2, b3; + int i; + + printf("ITD: next phys=%X\n", itd->itd.itd_next); + + for (i = 0; i < 8;i++) { + t = le32toh(itd->itd.itd_ctl[i]); + printf("ITDctl %d: stat=%X len=%X ioc=%X pg=%X offs=%X\n", i, + EHCI_ITD_GET_STATUS(t), EHCI_ITD_GET_LEN(t), + EHCI_ITD_GET_IOC(t), EHCI_ITD_GET_PG(t), + EHCI_ITD_GET_OFFS(t)); + } + printf("ITDbufr: "); + for (i = 0; i < 7; i++) + printf("%X,", EHCI_ITD_GET_BPTR(le32toh(itd->itd.itd_bufr[i]))); + + b = le32toh(itd->itd.itd_bufr[0]); + b2 = le32toh(itd->itd.itd_bufr[1]); + b3 = le32toh(itd->itd.itd_bufr[2]); + printf("\nep=%X daddr=%X dir=%d maxpkt=%X multi=%X\n", + EHCI_ITD_GET_EP(b), EHCI_ITD_GET_DADDR(b), EHCI_ITD_GET_DIR(b2), + EHCI_ITD_GET_MAXPKT(b2), EHCI_ITD_GET_MULTI(b3)); +} + +void +ehci_dump_sitd(struct ehci_soft_itd *itd) +{ + printf("SITD %p next=%p prev=%p xfernext=%p physaddr=%X slot=%d\n", + itd, itd->u.frame_list.next, itd->u.frame_list.prev, + itd->xfer_next, itd->physaddr, itd->slot); +} +#endif + #ifdef DIAGNOSTIC -static void +void ehci_dump_exfer(struct ehci_xfer *ex) { - printf("ehci_dump_exfer: ex=%p\n", ex); + printf("ehci_dump_exfer: ex=%p sqtdstart=%p end=%p itdstart=%p " + "end=%p isdone=%d\n", ex, ex->sqtdstart, ex->sqtdend, ex->itdstart, + ex->itdend, ex->isdone); } #endif #endif @@ -1366,6 +1553,8 @@ pipe->methods = &ehci_root_intr_methods; break; default: + DPRINTF(("ehci_open: bad bEndpointAddress 0x%02x\n", + ed->bEndpointAddress)); return (USBD_INVAL); } return (USBD_NORMAL_COMPLETION); @@ -1379,42 +1568,46 @@ default: panic("ehci_open: bad device speed %d", dev->speed); } if (speed != EHCI_QH_SPEED_HIGH && xfertype == UE_ISOCHRONOUS) { - printf("%s: *** WARNING: opening low/full speed device, this " - "does not work yet.\n", - device_get_nameunit(sc->sc_bus.bdev)); + printf("%s: *** Error: opening low/full speed isoc device on" + "ehci, this does not work yet. Feel free to implement\n", + device_get_nameunit(sc->sc_bus.bdev)); DPRINTFN(1,("ehci_open: hshubaddr=%d hshubport=%d\n", hshubaddr, hshubport)); return USBD_INVAL; } naks = 8; /* XXX */ - sqh = ehci_alloc_sqh(sc); - if (sqh == NULL) - goto bad0; - /* qh_link filled when the QH is added */ - sqh->qh.qh_endp = htole32( - EHCI_QH_SET_ADDR(addr) | - EHCI_QH_SET_ENDPT(UE_GET_ADDR(ed->bEndpointAddress)) | - EHCI_QH_SET_EPS(speed) | - (xfertype == UE_CONTROL ? EHCI_QH_DTC : 0) | - EHCI_QH_SET_MPL(UGETW(ed->wMaxPacketSize)) | - (speed != EHCI_QH_SPEED_HIGH && xfertype == UE_CONTROL ? - EHCI_QH_CTL : 0) | - EHCI_QH_SET_NRL(naks) - ); - sqh->qh.qh_endphub = htole32( - EHCI_QH_SET_MULT(1) | - EHCI_QH_SET_HUBA(hshubaddr) | - EHCI_QH_SET_PORT(hshubport) | - EHCI_QH_SET_CMASK(0x1c) | - EHCI_QH_SET_SMASK(xfertype == UE_INTERRUPT ? 0x01 : 0) - ); - sqh->qh.qh_curqtd = EHCI_NULL; - /* The overlay qTD was already set up by ehci_alloc_sqh(). */ - sqh->qh.qh_qtd.qtd_status = - htole32(EHCI_QTD_SET_TOGGLE(pipe->endpoint->savedtoggle)); - - epipe->sqh = sqh; + /* Allocate sqh for everything, save isoc xfers */ + if (xfertype != UE_ISOCHRONOUS) { + sqh = ehci_alloc_sqh(sc); + if (sqh == NULL) + goto bad0; + /* qh_link filled when the QH is added */ + sqh->qh.qh_endp = htole32( + EHCI_QH_SET_ADDR(addr) | + EHCI_QH_SET_ENDPT(UE_GET_ADDR(ed->bEndpointAddress)) | + EHCI_QH_SET_EPS(speed) | + (xfertype == UE_CONTROL ? EHCI_QH_DTC : 0) | + EHCI_QH_SET_MPL(UGETW(ed->wMaxPacketSize)) | + (speed != EHCI_QH_SPEED_HIGH && xfertype == UE_CONTROL ? + EHCI_QH_CTL : 0) | + EHCI_QH_SET_NRL(naks) + ); + sqh->qh.qh_endphub = htole32( + EHCI_QH_SET_MULT(1) | + EHCI_QH_SET_HUBA(hshubaddr) | + EHCI_QH_SET_PORT(hshubport) | + EHCI_QH_SET_CMASK(0x1c) | + EHCI_QH_SET_SMASK(xfertype == UE_INTERRUPT ? 0x01 : 0) + ); + sqh->qh.qh_curqtd = EHCI_NULL; + /* The overlay qTD was already set up by ehci_alloc_sqh(). */ + sqh->qh.qh_qtd.qtd_status = + htole32(EHCI_QTD_SET_TOGGLE(pipe->endpoint->savedtoggle)); + epipe->sqh = sqh; + } else { + sqh = NULL; + } switch (xfertype) { case UE_CONTROL: @@ -1445,14 +1638,29 @@ return (ehci_device_setintr(sc, sqh, ival)); case UE_ISOCHRONOUS: pipe->methods = &ehci_device_isoc_methods; - return (USBD_INVAL); + if (ed->bInterval == 0 || ed->bInterval > 16) { + printf("ehci: opening pipe with invalid bInterval\n"); + err = USBD_INVAL; + goto bad1; + } + if (UGETW(ed->wMaxPacketSize) == 0) { + printf("ehci: zero length endpoint open request\n"); + err = USBD_INVAL; + goto bad1; + } + epipe->u.isoc.next_frame = 0; + epipe->u.isoc.cur_xfers = 0; + break; default: + DPRINTF(("ehci: bad xfer type %d\n", xfertype)); return (USBD_INVAL); } return (USBD_NORMAL_COMPLETION); bad1: - ehci_free_sqh(sc, sqh); + if (sqh != NULL) + ehci_free_sqh(sc, sqh); + return (err); bad0: return (USBD_NOMEM); } @@ -1569,6 +1777,49 @@ DPRINTFN(2,("ehci_sync_hc: exit\n")); } +/*Call at splusb*/ +void +ehci_rem_free_itd_chain(ehci_softc_t *sc, struct ehci_xfer *exfer) +{ + struct ehci_soft_itd *itd, *prev; + + prev = NULL; + + if (exfer->itdstart == NULL || exfer->itdend == NULL) + panic("ehci isoc xfer being freed, but with no itd chain\n"); + + for (itd = exfer->itdstart; itd != NULL; itd = itd->xfer_next) { + prev = itd->u.frame_list.prev; + /* Unlink itd from hardware chain, or frame array */ + if (prev == NULL) { /* We're at the table head */ + sc->sc_softitds[itd->slot] = itd->u.frame_list.next; + sc->sc_flist[itd->slot] = itd->itd.itd_next; + + if (itd->u.frame_list.next != NULL) + itd->u.frame_list.next->u.frame_list.prev = + NULL; + } else { + /* XXX this part is untested... */ + prev->itd.itd_next = itd->itd.itd_next; + prev->u.frame_list.next = itd->u.frame_list.next; + if (itd->u.frame_list.next != NULL) + itd->u.frame_list.next->u.frame_list.prev = + prev; + } + } + + prev = NULL; + for (itd = exfer->itdstart; itd != NULL; itd = itd->xfer_next) { + if (prev != NULL) + ehci_free_itd(sc, prev); + prev = itd; + } + if (prev) + ehci_free_itd(sc, prev); + exfer->itdstart = NULL; + exfer->itdend = NULL; +} + /***********/ /* @@ -2463,6 +2714,76 @@ } } +ehci_soft_itd_t * +ehci_alloc_itd(ehci_softc_t *sc) +{ + struct ehci_soft_itd *itd, *freeitd; + usbd_status err; + int i, s, offs, frindex, previndex; + usb_dma_t dma; + + s = splusb(); + + /* Find an itd that wasn't freed this frame or last frame. This can + * discard itds that were freed before frindex wrapped around + * XXX - can this lead to thrashing? Could fix by enabling wrap-around + * interrupt and fiddling with list when that happens */ + frindex = (EOREAD4(sc, EHCI_FRINDEX) + 1) >> 3; + previndex = (frindex != 0) ? frindex - 1 : sc->sc_flsize; + + freeitd = NULL; + LIST_FOREACH(itd, &sc->sc_freeitds, u.free_list) { + if (itd == NULL) + break; + if (itd->slot != frindex && itd->slot != previndex) { + freeitd = itd; + break; + } + } + + if (freeitd == NULL) { + DPRINTFN(2, ("ehci_alloc_itd allocating chunk\n")); + err = usb_allocmem(&sc->sc_bus, EHCI_ITD_SIZE * EHCI_ITD_CHUNK, + EHCI_PAGE_SIZE, &dma); + + if (err) { + DPRINTF(("ehci_alloc_itd, alloc returned %d\n", err)); + return NULL; + } + + for (i = 0; i < EHCI_ITD_CHUNK; i++) { + offs = i * EHCI_ITD_SIZE; + itd = KERNADDR(&dma, offs); + itd->physaddr = DMAADDR(&dma, offs); + itd->dma = dma; + itd->offs = offs; + LIST_INSERT_HEAD(&sc->sc_freeitds, itd, u.free_list); + } + freeitd = LIST_FIRST(&sc->sc_freeitds); + } + + itd = freeitd; + LIST_REMOVE(itd, u.free_list); + memset(&itd->itd, 0, sizeof(ehci_itd_t)); + itd->u.frame_list.next = NULL; + itd->u.frame_list.prev = NULL; + itd->xfer_next = NULL; + itd->slot = 0; + splx(s); + + return (itd); +} + +void +ehci_free_itd(ehci_softc_t *sc, ehci_soft_itd_t *itd) +{ + int s; + + s = splusb(); + LIST_INSERT_AFTER(LIST_FIRST(&sc->sc_freeitds), itd, u.free_list); + splx(s); +} + /****************/ /* @@ -2522,7 +2843,7 @@ return; } - if (xfer->device->bus->intr_context || !curproc) + if (xfer->device->bus->intr_context) panic("ehci_abort_xfer: not in process context"); /* @@ -2692,6 +3013,86 @@ } void +ehci_abort_isoc_xfer(usbd_xfer_handle xfer, usbd_status status) +{ + ehci_isoc_trans_t trans_status; + struct ehci_pipe *epipe; + struct ehci_xfer *exfer; + ehci_softc_t *sc; + struct ehci_soft_itd *itd; + int s, i; + + epipe = (struct ehci_pipe *) xfer->pipe; + exfer = EXFER(xfer); + sc = (ehci_softc_t *)epipe->pipe.device->bus; + + DPRINTF(("ehci_abort_isoc_xfer: xfer %p pipe %p\n", xfer, epipe)); + + if (sc->sc_dying) { + s = splusb(); + xfer->status = status; + callout_stop(&xfer->timeout_handle); + usb_rem_task(epipe->pipe.device, &exfer->abort_task); + usb_transfer_complete(xfer); + splx(s); + return; + } + + if (exfer->ehci_xfer_flags & EHCI_XFER_ABORTING) { + DPRINTFN(2, ("ehci_abort_isoc_xfer: already aborting\n")); + +#ifdef DIAGNOSTIC + if (status == USBD_TIMEOUT) + printf("ehci_abort_xfer: TIMEOUT while aborting\n"); +#endif + + xfer->status = status; + DPRINTFN(2, ("ehci_abort_xfer: waiting for abort to finish\n")); + exfer->ehci_xfer_flags |= EHCI_XFER_ABORTWAIT; + while (exfer->ehci_xfer_flags & EHCI_XFER_ABORTING) + tsleep(&exfer->ehci_xfer_flags, PZERO, "ehciaw", 0); + return; + } + exfer->ehci_xfer_flags |= EHCI_XFER_ABORTING; + + xfer->status = status; + callout_stop(&xfer->timeout_handle); + usb_rem_task(epipe->pipe.device, &exfer->abort_task); + + s = splusb(); + for (itd = exfer->itdstart; itd != NULL; itd = itd->xfer_next) { + + for (i = 0; i < 8; i++) { + trans_status = le32toh(itd->itd.itd_ctl[i]); + trans_status &= ~EHCI_ITD_ACTIVE; + itd->itd.itd_ctl[i] = htole32(trans_status); + } + + } + splx(s); + + s = splusb(); +#ifdef USB_USE_SOFTINTR + sc->sc_softwake = 1; +#endif /* USB_USE_SOFTINTR */ + usb_schedsoftintr(&sc->sc_bus); +#ifdef USB_USE_SOFTINTR + tsleep(&sc->sc_softwake, PZERO, "ehciab", 0); +#endif /* USB_USE_SOFTINTR */ + splx(s); + +#ifdef DIAGNOSTIC + exfer->isdone = 1; +#endif + exfer->ehci_xfer_flags &= ~EHCI_XFER_ABORTING; + if (exfer->ehci_xfer_flags & EHCI_XFER_ABORTWAIT) { + exfer->ehci_xfer_flags &= ~EHCI_XFER_ABORTWAIT; + wakeup(&exfer->ehci_xfer_flags); + } + usb_transfer_complete(xfer); +} + +void ehci_timeout_task(void *addr) { usbd_xfer_handle xfer = addr; @@ -3270,6 +3671,11 @@ DPRINTFN(1, ("ehci_device_intr_abort: remove\n")); xfer->pipe->intrxfer = NULL; } + /* + * XXX - abort_xfer uses ehci_sync_hc, which syncs via the advance + * async doorbell. That's dependant on the async list, wheras + * intr xfers are periodic, should not use this? + */ ehci_abort_xfer(xfer, USBD_CANCELLED); } @@ -3362,8 +3768,306 @@ /************************/ -static usbd_status ehci_device_isoc_transfer(usbd_xfer_handle xfer) { return USBD_IOERROR; } -static usbd_status ehci_device_isoc_start(usbd_xfer_handle xfer) { return USBD_IOERROR; } -static void ehci_device_isoc_abort(usbd_xfer_handle xfer) { } -static void ehci_device_isoc_close(usbd_pipe_handle pipe) { } -static void ehci_device_isoc_done(usbd_xfer_handle xfer) { } +static usbd_status +ehci_device_isoc_transfer(usbd_xfer_handle xfer) +{ + usbd_status err; + + err = usb_insert_transfer(xfer); + if (err && err != USBD_IN_PROGRESS) + return (err); + + return (ehci_device_isoc_start(xfer)); +} + +static usbd_status +ehci_device_isoc_start(usbd_xfer_handle xfer) +{ + struct ehci_pipe *epipe; + usbd_device_handle dev; + ehci_softc_t *sc; + struct ehci_xfer *exfer; + ehci_soft_itd_t *itd, *prev, *start, *stop; + usb_dma_t *dma_buf; + int i, j, k, frames, uframes, ufrperframe; + int s, trans_count, offs, total_length; + int frindex; + + start = NULL; + prev = NULL; + itd = NULL; + trans_count = 0; + total_length = 0; + exfer = (struct ehci_xfer *) xfer; + sc = (ehci_softc_t *)xfer->pipe->device->bus; + dev = xfer->pipe->device; + epipe = (struct ehci_pipe *)xfer->pipe; + + /* + * To allow continuous transfers, above we start all transfers + * immediately. However, we're still going to get usbd_start_next call + * this when another xfer completes. So, check if this is already + * in progress or not + */ + + if (exfer->itdstart != NULL) + return (USBD_IN_PROGRESS); + + DPRINTFN(2, ("ehci_device_isoc_start: xfer %p len %d flags %d\n", + xfer, xfer->length, xfer->flags)); + + if (sc->sc_dying) + return (USBD_IOERROR); + + /* + * To avoid complication, don't allow a request right now that'll span + * the entire frame table. To within 4 frames, to allow some leeway + * on either side of where the hc currently is. + */ + if ((1 << (epipe->pipe.endpoint->edesc->bInterval)) * + xfer->nframes >= (sc->sc_flsize - 4) * 8) { + printf("ehci: isoc descriptor requested that spans the entire" + " frametable, too many frames\n"); + return (USBD_INVAL); + } + +#ifdef DIAGNOSTIC + if (xfer->rqflags & URQ_REQUEST) + panic("ehci_device_isoc_start: request\n"); + + if (!exfer->isdone) + printf("ehci_device_isoc_start: not done, ex = %p\n", exfer); + exfer->isdone = 0; +#endif + + /* + * Step 1: Allocate and initialize itds, how many do we need? + * One per transfer if interval >= 8 microframes, fewer if we use + * multiple microframes per frame. + */ + + i = epipe->pipe.endpoint->edesc->bInterval; + if (i > 16 || i == 0) { + /* Spec page 271 says intervals > 16 are invalid */ + DPRINTF(("ehci_device_isoc_start: bInvertal %d invalid\n", i)); + return (USBD_INVAL); + } + + switch (i) { + case 1: ufrperframe = 8; + case 2: ufrperframe = 4; + case 3: ufrperframe = 2; + default: ufrperframe = 1; + } + frames = (xfer->nframes + (ufrperframe - 1)) / ufrperframe; + uframes = 8 / ufrperframe; + + if (frames == 0) { + DPRINTF(("ehci_device_isoc_start: frames == 0\n")); + return (USBD_INVAL); + } + + dma_buf = xfer->buffer; + offs = 0; + + for (i = 0; i < frames; i++) { + int froffs = offs; + itd = ehci_alloc_itd(sc); + + if (prev != NULL) { + prev->itd.itd_next = + htole32(itd->physaddr | EHCI_LINK_ITD); + prev->xfer_next = itd; + } else { + start = itd; + } + + /* + * Step 1.5, initialize uframes + */ + for (j = 0; j < 8; j += uframes) { + /* Calculate which page in the list this starts in */ + int addr = DMAADDR(dma_buf, froffs); + addr = EHCI_PAGE_OFFSET(addr); + addr += (offs - froffs); + addr = EHCI_PAGE(addr); + addr /= EHCI_PAGE_SIZE; + + /* This gets the initial offset into the first page, + * looks how far further along the current uframe + * offset is. Works out how many pages that is. + */ + + itd->itd.itd_ctl[j] = htole32 ( EHCI_ITD_ACTIVE | + EHCI_ITD_SET_LEN(xfer->frlengths[trans_count]) | + EHCI_ITD_SET_PG(addr) | + EHCI_ITD_SET_OFFS(EHCI_PAGE_OFFSET(DMAADDR(dma_buf, + offs)))); + + total_length += xfer->frlengths[trans_count]; + offs += xfer->frlengths[trans_count]; + trans_count++; + + if (trans_count >= xfer->nframes) { /*Set IOC*/ + itd->itd.itd_ctl[j] |= htole32(EHCI_ITD_IOC); + } + } + + /* Step 1.75, set buffer pointers. To simplify matters, all + * pointers are filled out for the next 7 hardware pages in + * the dma block, so no need to worry what pages to cover + * and what to not. + */ + + for (j=0; j < 7; j++) { + /* + * Don't try to lookup a page that's past the end + * of buffer + */ + int page_offs = EHCI_PAGE(froffs + + (EHCI_PAGE_SIZE * j)); + if (page_offs >= dma_buf->block->size) + break; + + int page = DMAADDR(dma_buf, page_offs); + page = EHCI_PAGE(page); + itd->itd.itd_bufr[j] = + htole32(EHCI_ITD_SET_BPTR(page) | EHCI_LINK_ITD); + } + + /* + * Other special values + */ + + k = epipe->pipe.endpoint->edesc->bEndpointAddress; + itd->itd.itd_bufr[0] |= htole32( + EHCI_ITD_SET_EP(UE_GET_ADDR(k)) | + EHCI_ITD_SET_DADDR(epipe->pipe.device->address)); + + k = (UE_GET_DIR(epipe->pipe.endpoint->edesc->bEndpointAddress)) + ? 1 : 0; + j = UE_GET_SIZE( + UGETW(epipe->pipe.endpoint->edesc->wMaxPacketSize)); + itd->itd.itd_bufr[1] |= htole32(EHCI_ITD_SET_DIR(k) | + EHCI_ITD_SET_MAXPKT(UE_GET_SIZE(j))); + + /* FIXME: handle invalid trans */ + itd->itd.itd_bufr[2] |= + htole32(EHCI_ITD_SET_MULTI(UE_GET_TRANS(j)+1)); + prev = itd; + } /* End of frame */ + + stop = itd; + stop->xfer_next = NULL; + exfer->isoc_len = total_length; + + /* + * Part 2: Transfer descriptors have now been set up, now they must + * be scheduled into the period frame list. Erk. Not wanting to + * complicate matters, transfer is denied if the transfer spans + * more than the period frame list. + */ + + s = splusb(); + + /* Start inserting frames */ + if (epipe->u.isoc.cur_xfers > 0) { + frindex = epipe->u.isoc.next_frame; + } else { + frindex = EOREAD4(sc, EHCI_FRINDEX); + frindex = frindex >> 3; /* Erase microframe index */ + frindex += 2; + } + + if (frindex >= sc->sc_flsize) + frindex &= (sc->sc_flsize - 1); + + /* Whats the frame interval? */ + i = (1 << epipe->pipe.endpoint->edesc->bInterval); + if (i / 8 == 0) + i = 1; + else + i /= 8; + + itd = start; + for (j = 0; j < frames; j++) { + if (itd == NULL) + panic("ehci: unexpectedly ran out of isoc itds," + "isoc_start\n"); + + itd->itd.itd_next = sc->sc_flist[frindex]; + if (itd->itd.itd_next == 0) + /* FIXME: frindex table gets initialized to NULL + * or EHCI_NULL? */ + itd->itd.itd_next = htole32(EHCI_NULL); + + sc->sc_flist[frindex] = htole32(EHCI_LINK_ITD | itd->physaddr); + + itd->u.frame_list.next = sc->sc_softitds[frindex]; + sc->sc_softitds[frindex] = itd; + if (itd->u.frame_list.next != NULL) + itd->u.frame_list.next->u.frame_list.prev = itd; + itd->slot = frindex; + itd->u.frame_list.prev = NULL; + + frindex += i; + if (frindex >= sc->sc_flsize) + frindex -= sc->sc_flsize; + + itd = itd->xfer_next; + } + + epipe->u.isoc.cur_xfers++; + epipe->u.isoc.next_frame = frindex; + + exfer->itdstart = start; + exfer->itdend = stop; + exfer->sqtdstart = NULL; + exfer->sqtdstart = NULL; + + ehci_add_intr_list(sc, exfer); + xfer->status = USBD_IN_PROGRESS; + xfer->done = 0; + splx(s); + + if (sc->sc_bus.use_polling) { + printf("Starting ehci isoc xfer with polling. Bad idea?\n"); + ehci_waitintr(sc, xfer); + } + + return (USBD_IN_PROGRESS); +} + +static void +ehci_device_isoc_abort(usbd_xfer_handle xfer) +{ + DPRINTFN(1, ("ehci_device_isoc_abort: xfer = %p\n", xfer)); + ehci_abort_isoc_xfer(xfer, USBD_CANCELLED); +} + +static void +ehci_device_isoc_close(usbd_pipe_handle pipe) +{ + printf("ehci_device_isoc_close: nothing in the pipe to free?\n"); +} + +static void +ehci_device_isoc_done(usbd_xfer_handle xfer) +{ + struct ehci_xfer *exfer; + ehci_softc_t *sc; + struct ehci_pipe *epipe; + int s; + + exfer = EXFER(xfer); + sc = (ehci_softc_t *)xfer->pipe->device->bus; + epipe = (struct ehci_pipe *) xfer->pipe; + + s = splusb(); + epipe->u.isoc.cur_xfers--; + if (xfer->status != USBD_NOMEM && ehci_active_intr_list(exfer)) { + ehci_del_intr_list(exfer); + ehci_rem_free_itd_chain(sc, exfer); + } + splx(s); +} diff -ruN sys.orig/dev/usb/ehcireg.h sys/dev/usb/ehcireg.h --- sys.orig/dev/usb/ehcireg.h 2008-08-15 17:16:07.000000000 +0800 +++ sys/dev/usb/ehcireg.h 2008-08-15 17:15:44.000000000 +0800 @@ -196,10 +196,41 @@ typedef u_int32_t ehci_physaddr_t; +typedef u_int32_t ehci_isoc_trans_t; +typedef u_int32_t ehci_isoc_bufr_ptr_t; + /* Isochronous Transfer Descriptor */ typedef struct { - ehci_link_t itd_next; - /* XXX many more */ + ehci_link_t itd_next; + ehci_isoc_trans_t itd_ctl[8]; +#define EHCI_ITD_GET_STATUS(x) (((x) >> 28) & 0xf) +#define EHCI_ITD_SET_STATUS(x) (((x) & 0xf) << 28) +#define EHCI_ITD_ACTIVE 0x80000000 +#define EHCI_ITD_BUF_ERR 0x40000000 +#define EHCI_ITD_BABBLE 0x20000000 +#define EHCI_ITD_ERROR 0x10000000 +#define EHCI_ITD_GET_LEN(x) (((x) >> 16) & 0xfff) +#define EHCI_ITD_SET_LEN(x) (((x) & 0xfff) << 16) +#define EHCI_ITD_IOC 0x8000 +#define EHCI_ITD_GET_IOC(x) (((x) >> 15) & 1) +#define EHCI_ITD_SET_IOC(x) (((x) << 15) & EHCI_ITD_IOC) +#define EHCI_ITD_GET_PG(x) (((x) >> 12) & 0xf) +#define EHCI_ITD_SET_PG(x) (((x) & 0xf) << 12) +#define EHCI_ITD_GET_OFFS(x) (((x) >> 0) & 0xfff) +#define EHCI_ITD_SET_OFFS(x) (((x) & 0xfff) << 0) + ehci_isoc_bufr_ptr_t itd_bufr[7]; +#define EHCI_ITD_GET_BPTR(x) ((x) & 0xfffff000) +#define EHCI_ITD_SET_BPTR(x) ((x) & 0xfffff000) +#define EHCI_ITD_GET_EP(x) (((x) >> 8) & 0xf) +#define EHCI_ITD_SET_EP(x) (((x) & 0xf) << 8) +#define EHCI_ITD_GET_DADDR(x) ((x) & 0x7f) +#define EHCI_ITD_SET_DADDR(x) ((x) & 0x7f) +#define EHCI_ITD_GET_DIR(x) (((x) >> 11) & 1) +#define EHCI_ITD_SET_DIR(x) (((x) & 1) << 11) +#define EHCI_ITD_GET_MAXPKT(x) ((x) & 0x7ff) +#define EHCI_ITD_SET_MAXPKT(x) ((x) & 0x7ff) +#define EHCI_ITD_GET_MULTI(x) ((x) & 0x3) +#define EHCI_ITD_SET_MULTI(x) ((x) & 0x3) } ehci_itd_t; #define EHCI_ITD_ALIGN 32 diff -ruN sys.orig/dev/usb/ehcivar.h sys/dev/usb/ehcivar.h --- sys.orig/dev/usb/ehcivar.h 2008-08-15 17:16:07.000000000 +0800 +++ sys/dev/usb/ehcivar.h 2008-08-15 17:15:44.000000000 +0800 @@ -60,12 +60,36 @@ #define EHCI_SQH_SIZE ((sizeof (struct ehci_soft_qh) + EHCI_QH_ALIGN - 1) / EHCI_QH_ALIGN * EHCI_QH_ALIGN) #define EHCI_SQH_CHUNK (EHCI_PAGE_SIZE / EHCI_SQH_SIZE) +typedef struct ehci_soft_itd { + ehci_itd_t itd; + union { + struct { + /* soft_itds links in a periodic frame*/ + struct ehci_soft_itd *next; + struct ehci_soft_itd *prev; + } frame_list; + /* circular list of free itds */ + LIST_ENTRY(ehci_soft_itd) free_list; + } u; + struct ehci_soft_itd *xfer_next; /* Next soft_itd in xfer */ + ehci_physaddr_t physaddr; + usb_dma_t dma; + int offs; + int slot; + struct timeval t; /* store free time */ +} ehci_soft_itd_t; +#define EHCI_ITD_SIZE ((sizeof(struct ehci_soft_itd) + EHCI_QH_ALIGN - 1) / EHCI_ITD_ALIGN * EHCI_ITD_ALIGN) +#define EHCI_ITD_CHUNK (EHCI_PAGE_SIZE / EHCI_ITD_SIZE) + struct ehci_xfer { struct usbd_xfer xfer; struct usb_task abort_task; LIST_ENTRY(ehci_xfer) inext; /* list of active xfers */ ehci_soft_qtd_t *sqtdstart; ehci_soft_qtd_t *sqtdend; + ehci_soft_itd_t *itdstart; + ehci_soft_itd_t *itdend; + u_int isoc_len; u_int32_t ehci_xfer_flags; #ifdef DIAGNOSTIC int isdone; @@ -94,6 +118,8 @@ #define EHCI_HASH_SIZE 128 #define EHCI_COMPANION_MAX 8 +#define EHCI_FREE_LIST_INTERVAL 100 + #define EHCI_SCFLG_DONEINIT 0x0001 /* ehci_init() has been called. */ #define EHCI_SCFLG_LOSTINTRBUG 0x0002 /* workaround for VIA / ATI chipsets */ @@ -133,10 +159,16 @@ struct ehci_soft_islot sc_islots[EHCI_INTRQHS]; + /* jcmm - an array matching sc_flist, but with software pointers, + * not hardware address pointers + */ + struct ehci_soft_itd **sc_softitds; + LIST_HEAD(, ehci_xfer) sc_intrhead; ehci_soft_qh_t *sc_freeqhs; ehci_soft_qtd_t *sc_freeqtds; + LIST_HEAD(sc_freeitds, ehci_soft_itd) sc_freeitds; int sc_noport; u_int8_t sc_addr; /* device address */ diff -ruN sys.orig/dev/usb/usb.h sys/dev/usb/usb.h --- sys.orig/dev/usb/usb.h 2008-08-15 17:16:07.000000000 +0800 +++ sys/dev/usb/usb.h 2008-08-15 17:15:44.000000000 +0800 @@ -271,6 +271,8 @@ #define UE_ISO_SYNC 0x0c #define UE_GET_ISO_TYPE(a) ((a) & UE_ISO_TYPE) uWord wMaxPacketSize; +#define UE_GET_TRANS(a) (((a) >> 11) & 0x3) +#define UE_GET_SIZE(a) ((a) & 0x7ff) uByte bInterval; } UPACKED usb_endpoint_descriptor_t; #define USB_ENDPOINT_DESCRIPTOR_SIZE 7 --=-2mJhl0bZKzX3lZ7vrtwn-- From owner-freebsd-usb@FreeBSD.ORG Sat Aug 16 21:00:15 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AF901065683 for ; Sat, 16 Aug 2008 21:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F1D588FC21 for ; Sat, 16 Aug 2008 21:00:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7GL0Eim016169 for ; Sat, 16 Aug 2008 21:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7GL0EVa016159; Sat, 16 Aug 2008 21:00:14 GMT (envelope-from gnats) Date: Sat, 16 Aug 2008 21:00:14 GMT Message-Id: <200808162100.m7GL0EVa016159@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Emil Cazamir Cc: Subject: Re: usb/113432: [ucom] WARNING: attempt to net_add_domain(netgraph) after domainfinalize() X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Emil Cazamir List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2008 21:00:15 -0000 The following reply was made to PR usb/113432; it has been noted by GNATS. From: Emil Cazamir To: freebsd-gnats-submit@FreeBSD.org, quetzal@zone3000.net Cc: Subject: Re: usb/113432: [ucom] WARNING: attempt to net_add_domain(netgraph) after domainfinalize() Date: Sat, 16 Aug 2008 13:30:05 -0700 (PDT) --0-1186498824-1218918605=:36762 Content-Type: text/plain; charset=us-ascii Hello! I received a similar message when I tried to use ethernet interface renaming, at the time when starting pppoed on a renamed interface. I believe that the problem is somewhere at the netgraph level, in conjunction with ng_pppoe. How to repeat: use lines similar to the following, into a system running FreeBSD 7.0: /etc/rc.conf: ifconfig_em1_name="lan0" pppoed_enable="YES" pppoed_interface="lan0" -- other /etc/rc.conf parameters -- and check the messages at the time when pppoed starts. Best regards, Emil Cazamir FreeBSD user since 4.3-RELEASE --0-1186498824-1218918605=:36762 Content-Type: text/html; charset=us-ascii
Hello!

I received a similar message when I tried to use ethernet interface renaming, at the time when starting pppoed on a renamed interface. I believe that the problem is somewhere at the netgraph level, in conjunction with ng_pppoe.

How to repeat:
use lines similar to the following, into a system running FreeBSD 7.0:
/etc/rc.conf:
ifco nfig_em1_name="lan0"
pppoed_enable="YES"
pppoed_interface="lan0"
-- other /etc/rc.conf parameters --

and check the messages at the time when pppoed starts.

Best regards,
Emil Cazamir
FreeBSD user since 4.3-RELEASE


--0-1186498824-1218918605=:36762--