From owner-freebsd-usb@FreeBSD.ORG Mon Apr 13 05:27:37 2009 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 537E0106566B; Mon, 13 Apr 2009 05:27:37 +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 290DA8FC08; Mon, 13 Apr 2009 05:27:37 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3D5RaSB084355; Mon, 13 Apr 2009 05:27:36 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3D5RZN4084351; Mon, 13 Apr 2009 05:27:35 GMT (envelope-from linimon) Date: Mon, 13 Apr 2009 05:27:35 GMT Message-Id: <200904130527.n3D5RZN4084351@freefall.freebsd.org> To: kientzle@freesd.org, linimon@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/133545: [usb] [panic] Kernel crash in usb2_intr_schedule_adjust + 0x75 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, 13 Apr 2009 05:27:37 -0000 Old Synopsis: Kernel crash in usb2_intr_schedule_adjust + 0x75 New Synopsis: [usb] [panic] Kernel crash in usb2_intr_schedule_adjust + 0x75 State-Changed-From-To: open->feedback State-Changed-By: linimon State-Changed-When: Mon Apr 13 05:27:00 UTC 2009 State-Changed-Why: Note that submitter has been asked for feedback. http://www.freebsd.org/cgi/query-pr.cgi?pr=133545 From owner-freebsd-usb@FreeBSD.ORG Mon Apr 13 11:07:03 2009 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 36249106567E for ; Mon, 13 Apr 2009 11:07:03 +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 21C508FC14 for ; Mon, 13 Apr 2009 11:07:03 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DB73JN085125 for ; Mon, 13 Apr 2009 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3DB726P085121 for freebsd-usb@FreeBSD.org; Mon, 13 Apr 2009 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 13 Apr 2009 11:07:02 GMT Message-Id: <200904131107.n3DB726P085121@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, 13 Apr 2009 11:07:04 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- f usb/133545 usb [usb] [panic] Kernel crash in usb2_intr_schedule_adjus o usb/133390 usb umass crashes system in 7.1 when Olympus D-540 attache o usb/133296 usb rum driver not working properly in hostap mode p usb/132799 usb [usb][patch]GENESYS USB2IDE requires NO_SYNCHRONIZE_CA o usb/132785 usb [usb] [patch] Gemtech remote powersocket is classed as o usb/132594 usb USB subsystem causes page fault and crashes o usb/132312 usb Xorg 7.4 halts USB controller o usb/132080 usb [patch] [usb] Kernel panic after NOMEM caused by rum c o usb/132066 usb [ukbd] Keyboard failure USB keyboard DELL 760 o usb/132036 usb [panic] page fault when connecting Olympus C740 camera o usb/131912 usb [uslcom] [patch] New devices using Silicon Labs chips o usb/131900 usb [usbdevs] [patch] Additional product identification co o usb/131583 usb [umass] Failure when detaching umass Device o usb/131576 usb [aue] ADMtek USB To LAN Converter can't send data o usb/131521 usb Registering Belkin UPS to usb_quirks.c f usb/131123 usb [patch] re-add UQ_ASSUME_CM_OVER_DATA USB quirk o usb/131074 usb no run-time detection of usb devices plugged into exte o usb/130736 usb Page fault unplugging USB stick o usb/130325 usb [usb] [patch] fix tools/tools/usb/print-usb-if-vids.sh o usb/130230 usb Samsung Electronics YP-U3 does not attach in 7.1-RELEA o usb/130208 usb Boot process severely hampered by umass0 error o usb/130122 usb [newusb] DVD drive detects as 'da' device o docs/129962 usb [newusb] usbconfig(8) refers to non-existant usb2_core o usb/129945 usb [usbdevs] [patch] add u3g support for Longcheer WM66 U o usb/129766 usb [usb] plugging in usb modem HUAWEI E226 panics system o usb/129758 usb [uftdi] [patch] add Pyramid LCD usb support o usb/129673 usb [uhci] uhci (uhub) confused on replugging USB 1.1 scan o usb/129522 usb [ubsa] [patch] add support for ZTE AC8700 modem o usb/129500 usb [umass] [panic] FreeBSD Crashes when connecting SanDis o usb/129311 usb [usb] [panic] Instant crash with an USB card reader o usb/129251 usb [usbdevs] [patch] Liebert UPS being assigned uhid and o usb/129173 usb [uplcom] [patch] Add support for Corega CG-USBRS232R a s usb/128990 usb [usb] u3g does not handle RTS/CTS available on for exa o usb/128977 usb [usb] [patch] uaudio is not full duplex o usb/128803 usb [usbdevs] [patch] Quirk for I-Tuner Networks USBLCD4X2 o usb/128485 usb [umodem] [patch] Nokia N80 modem support o usb/128425 usb [umass] Cannot Connect Maxtor Onetouch 4 USB drive f usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/128324 usb [uplcom] [patch] remove baud rate restriction for PL23 o usb/127980 usb [umass] [patch] Fix Samsung YP U2 MP3 player on 7.x an o usb/127926 usb [boot] USB Timeout during bootup o usb/127549 usb [umass] [patch] Meizu MiniPlayer M6 (SL) requires some s usb/127453 usb [request] ubsa, uark, ubser, uftdi, and friends should o usb/127423 usb [boot] BTX halted on Gigabyte GA-MA69VM-S2 / AMD Sempr o usb/127342 usb [boot] cannot enable usb keyboard and mouse support in o kern/127222 usb [ohci]: Regression in 7.0 usb storage generic driver o usb/126884 usb [ugen] [patch] Bug in buffer handling in ugen.c f usb/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125736 usb [ukbd] [hang] system hangs after AT keyboard detect if o usb/125631 usb [ums] [panic] kernel panic during bootup while 'Logite o usb/125510 usb [panic] repeated plug and unplug of USB mass storage d o usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125264 usb [patch] sysctl for set usb mouse rate (very useful for o usb/125238 usb [ums] Habu Mouse turns off in X o usb/125088 usb [keyboard] Touchpad not detected on Adesso AKB-430UG U o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124758 usb [rum] [panic] rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124604 usb [ums] Microsoft combo wireless mouse doesn't work o usb/123969 usb [usb] Supermicro H8SMi-2 usb problem: port reset faile o usb/123714 usb [usb] [panic] Panic when hald-storage-probe runs with o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb [usb] [panic] Panic on USB device insertion when usb l o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/123509 usb [umass] continuous reset Samsung SGH-G600 phone o usb/123352 usb [usbdevs] [patch] Add Option GTMAX3.6/7.2 and Quallcom o usb/123351 usb [usbdevs] [patch] Add Reiner SCT cyberJack, Omnikey [2 o usb/122992 usb [umass] [patch] MotoROKR Z6 Phone not recognised by um o usb/122956 usb [ubsa] [patch] add support for Novatel Wireless XU870 o usb/122936 usb [ucom] [ubsa] Device does not receive interrupt o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o usb/122819 usb [usb] [patch] Patch to provide dynamic additions to th o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122621 usb [patch] [request] New driver for Sierra Wireless 3G US o usb/122547 usb [ehci] USB Printer not being recognized after reboot o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/122025 usb [uscanner] [patch] uscanner does not attach to Epson R o usb/121755 usb [ohci] [patch] Fix panic after ohci/uhub cardbus devic o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121426 usb [patch] [uscanner] add HP ScanJet 3570C o usb/121275 usb [boot] FreeBSD fails to boot with usb legacy support e o usb/121232 usb [usb] [panic] USB CardBus card removal causes reboot s p usb/121184 usb [uipaq] [patch] add ids from linux ipaq driver (plus a o usb/121169 usb [umass] Issues with usb mp3 player o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS o usb/120786 usb [usb] [panic] Kernel panic when forced umount of a det o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120572 usb [umass] [patch] quirk to support ASUS P535 as umass (a o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/119981 usb [axe] [patch] add support for LOGITEC LAN-GTJ/U2 gigab o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i o usb/119509 usb [usb] USB flaky on Dell Optiplex 755 o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/118686 usb [usbdevs] [patch] teach usbdevs / ubsa(4) about Huawei o usb/118485 usb [usbdevs] [patch] Logitech Headset Workaround o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/116699 usb [usbhid] USB HID devices do not initialize at system b o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/114682 usb [umass] generic USB media-card reader unusable o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114068 usb [umass] [patch] Problems with connection of the umass o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff s usb/113977 usb [request] Need a way to set mode of USB disk's write c o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 s usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113432 usb [ucom] WARNING: attempt to net_add_domain(netgraph) af a usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/112944 usb [ulpt] [patch] Bi-directional access to HP LaserJet 10 o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an o usb/112631 usb [panic] Problem with SONY DSC-S80 camera on umount s usb/112568 usb [umass] [request] USB mode may wrong when mounting Pla o usb/112463 usb [umass] problem with Samsung USB DVD writer, libscg an o usb/112461 usb [ehci] [request] ehci USB 2.0 doesn't work on nforce4 o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC o usb/109397 usb [panic] on boot from USB flash o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE [regr s usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/108056 usb [ohci] Mouse gets powered off during device probe when o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/107924 usb [patch] usbd(8) does not call detach o usb/107848 usb [umass] [request] cannot access Samsung flash disk o usb/107827 usb [ohci] [panic] ohci_add_done addr not found o usb/107496 usb [uhub] USB device problem on RELENG_6_2 (SHORT_XFER) [ o usb/107388 usb [patch] [request] new driver: add utoppy device from N o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107243 usb [cam] [patch] Apacer USB Flash Drive quirk o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze s usb/106832 usb [usb] USB HP printer is not detected by kernel when AC o usb/106648 usb [umass] [hang] USB Floppy on D1950 10 min Hang on Inse o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106041 usb [usb] [request] FreeBSD does not recognise Mustek Bear o usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/105186 usb [ehci] [panic] USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 c o usb/105065 usb [ata] [usb] SATA - USB Bridge o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/104645 usb [umass] [request] Rave C-201 MP3 player does not commu o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104292 usb [umass] [hang] system lockup on forced umount of usb-s o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/103917 usb [uhub] USB driver reports "Addr 0 should never happen" o usb/103418 usb usbhidctl(1): [patch] [request] usbhidctl: add ability o usb/103289 usb [request] USB 2.0 problems on AMD LX-800 CPU and CS-55 o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103025 usb [uhub] [panic] wrong detection of USB device for FreeB o usb/102976 usb [panic] Casio Exilim Digital Camera causes panic on in o usb/102678 usb [keyboard] Dell PowerEdge DRAC5 USB Keyboard does not o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/101761 usb [usb] [patch] [request] usb.h: increase maximal size o o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101096 usb [ural] [panic] USB WLAN occasionally causes kernel-pan o usb/100746 usb [keyboard] system does not boot due to USB keyboard pr o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o kern/99200 usb [bluetooth] SMP-Kernel crashes reliably when Bluetooth o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/96457 usb [umass] [panic] fatback on umass = reboot o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync s usb/96120 usb [ums] [request] USB mouse not always detected s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb s usb/95348 usb [keyboard] USB keyboard unplug causes noise on screen o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/93408 usb [mouse] hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg o usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91629 usb [usb] usbd_abort_pipe() may result in infinite loop o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/89954 usb [umass] [panic] USB Disk driver race condition? s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg o usb/88408 usb [axe] axe0 read PHY failed o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/87224 usb [usb] Cannot mount USB Zip750 o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/86298 usb [mouse] Known good USB mouse won't work with correct s s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device f usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/83863 usb [ugen] Communication problem between opensc/openct via o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe f usb/83677 usb [usb] [request] usb controller often not detected (Sun o usb/83563 usb [umass] [panic] Page Fault while detaching Mpman Usb d o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/82660 usb [ehci] [panic] EHCI: I/O stuck in state 'physrd'/panic s usb/82569 usb [umass] [panic] USB mass storage plug/unplug causes sy o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/80854 usb [patch] [request] suggestion for new iface-no-probe me o usb/80829 usb [modules] [panic] possible panic when loading USB-modu s usb/80777 usb [request] usb_rem_task() should wait for callback to c s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/79722 usb [ehci] wrong alignments in ehci.h a usb/79656 usb [ehci] RHSC interrupts lost o usb/79524 usb [ulpt] printing to Minolta PagePro 1[23]xxW via USB fa o usb/79287 usb [uhci] [hang] UHCI hang after interrupt transfer o usb/79269 usb [ohci] USB ohci da0 plug/unplug causes crashes and loc o usb/78984 usb [umass] [patch] Creative MUVO umass failure o usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/77184 usb [umass] [panic] kernel panic on USB device disconnect, o usb/76732 usb [ums] Mouse problems with USB KVM Switch o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn o usb/75797 usb [sound] 5.3-STABLE(2005 1/4) detect USB headset, But c o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) o usb/74771 usb [umass] [hang] mounting write-protected umass device a s usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R o usb/73307 usb [panic] Kernel panics on USB disconnect s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/71455 usb [umass] Slow USB umass performance of 5.3 o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans s bin/57255 usb [patch] usbd(8) and multi-function devices s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 s usb/51958 usb [urio] [patch] update for urio driver o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o usb/40948 usb [umass] [request] USB HP CDW8200 does not work o usb/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 306 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Apr 13 20:20:03 2009 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 40D8A1065675 for ; Mon, 13 Apr 2009 20: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 1A9BB8FC15 for ; Mon, 13 Apr 2009 20: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.3/8.14.3) with ESMTP id n3DKK2Sd034829 for ; Mon, 13 Apr 2009 20:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3DKK2BK034828; Mon, 13 Apr 2009 20:20:02 GMT (envelope-from gnats) Resent-Date: Mon, 13 Apr 2009 20:20:02 GMT Resent-Message-Id: <200904132020.n3DKK2BK034828@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Paul G Webster Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55212106566B for ; Mon, 13 Apr 2009 20:18:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 41C748FC18 for ; Mon, 13 Apr 2009 20:18:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DKI61h050999 for ; Mon, 13 Apr 2009 20:18:06 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n3DKI65n050997; Mon, 13 Apr 2009 20:18:06 GMT (envelope-from nobody) Message-Id: <200904132018.n3DKI65n050997@www.freebsd.org> Date: Mon, 13 Apr 2009 20:18:06 GMT From: Paul G Webster To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/133712: RE: Fixed an issue with ural(4) that was creating kernel panics (trap 12) 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, 13 Apr 2009 20:20:03 -0000 >Number: 133712 >Category: usb >Synopsis: RE: Fixed an issue with ural(4) that was creating kernel panics (trap 12) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Apr 13 20:20:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Paul G Webster >Release: FreeBSD 7.2-PRERELEASE >Organization: Home >Environment: FreeBSD eeepc.juperos 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #1: Sun Apr 12 19:27:57 UTC 2009 paul@eeepc.juperos:/usr/obj/usr/src/sys/KERN1 i386 >Description: On FreeBSD 7.0+ (and some 6.x versions according to other people on irc.freenode.net) you will get a Kpanic (trap12) when attempting to join a WPA enabled network. Here is the device in question: ural0: on uhub4 ural0: MAC/BBP RT2570 (rev 0x05), RF RT2526 ural0: WARNING: using obsoleted IFF_NEEDSGIANT flag ural0: Ethernet address: 00:12:17:84:4d:74 Now after some playing around I found out (by adding a few debug lines in the source) the crash occured when the rf autotune was being disabled.. Count down to the crash RFTUNEa Count down to the crash RFTUNEb Count down to the crash RFTUNEc disabling RF autotune <-- this message can be found in if_ural.c the rest are added by me disabling RF autotune - ENABLED now by adding all this debugging and turning on usb_debug it wont crash, after some investigating and some help from friends - apparently the crash is caused by a race event? and by adding all this debug information it has slowed down sufficiantly to let the device disable autotuning correctly.. I have not removed the debugging lines YET, but im thinking about swapping some out for sleep lines to try and fix this race issue.. Anyway.. I thought I best send a PR for if any of you guys know about this. -- Thank for your time -- Paul G Webster >How-To-Repeat: Use "ural0: MAC/BBP RT2570 (rev 0x05), RF RT2526" (linksys WUSB54G) [version 4] and use wpa_supplicant to access a wpa1/2 network >Fix: Slow down the driver disabling rf autotune Patch attached with submission follows: /* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.69 2009/04/02 19:07:24 paul Exp $ */ #include __FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.69 2007/09/17 19:07:24 sam Exp $"); /*- * Ralink Technology RT2500USB chipset driver * http://www.ralinktech.com/ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "usbdevs.h" #include #include #define USB_DEBUG #ifdef USB_DEBUG #define DPRINTF(x) do { if (uraldebug > 0) printf x; } while (0) #define DPRINTFN(n, x) do { if (uraldebug >= (n)) printf x; } while (0) int uraldebug = 9; SYSCTL_NODE(_hw_usb, OID_AUTO, ural, CTLFLAG_RW, 0, "USB ural"); SYSCTL_INT(_hw_usb_ural, OID_AUTO, debug, CTLFLAG_RW, &uraldebug, 0, "ural debug level"); #else #define DPRINTF(x) #define DPRINTFN(n, x) #endif #define URAL_RSSI(rssi) \ ((rssi) > (RAL_NOISE_FLOOR + RAL_RSSI_CORR) ? \ ((rssi) - (RAL_NOISE_FLOOR + RAL_RSSI_CORR)) : 0) /* various supported device vendors/products */ static const struct usb_devno ural_devs[] = { { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_WL167G }, { USB_VENDOR_ASUS, USB_PRODUCT_RALINK_RT2570 }, { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050 }, { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7051 }, { USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_C54RU }, { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DWLG122 }, { USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWBKG }, { USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GN54G }, { USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254 }, { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54G }, { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GP }, { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_HU200TS }, { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_KG54 }, { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_KG54AI }, { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_KG54YB }, { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_NINWIFI }, { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2570 }, { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2570_2 }, { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2570_3 }, { USB_VENDOR_NOVATECH, USB_PRODUCT_NOVATECH_NV902 }, { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2570 }, { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2570_2 }, { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2570_3 }, { USB_VENDOR_SIEMENS2, USB_PRODUCT_SIEMENS2_WL54G }, { USB_VENDOR_SMC, USB_PRODUCT_SMC_2862WG }, { USB_VENDOR_SPHAIRON, USB_PRODUCT_SPHAIRON_UB801R}, { USB_VENDOR_SURECOM, USB_PRODUCT_SURECOM_RT2570 }, { USB_VENDOR_VTECH, USB_PRODUCT_VTECH_RT2570 }, { USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2570 } }; MODULE_DEPEND(ural, wlan, 1, 1, 1); MODULE_DEPEND(ural, wlan_amrr, 1, 1, 1); MODULE_DEPEND(ural, usb, 1, 1, 1); static int ural_alloc_tx_list(struct ural_softc *); static void ural_free_tx_list(struct ural_softc *); static int ural_alloc_rx_list(struct ural_softc *); static void ural_free_rx_list(struct ural_softc *); static int ural_media_change(struct ifnet *); static void ural_task(void *); static void ural_scantask(void *); static int ural_newstate(struct ieee80211com *, enum ieee80211_state, int); static int ural_rxrate(struct ural_rx_desc *); static void ural_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); static void ural_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); static int ural_ack_rate(struct ieee80211com *, int); static uint16_t ural_txtime(int, int, uint32_t); static uint8_t ural_plcp_signal(int); static void ural_setup_tx_desc(struct ural_softc *, struct ural_tx_desc *, uint32_t, int, int); static int ural_tx_bcn(struct ural_softc *, struct mbuf *, struct ieee80211_node *); static int ural_tx_mgt(struct ural_softc *, struct mbuf *, struct ieee80211_node *); static int ural_tx_data(struct ural_softc *, struct mbuf *, struct ieee80211_node *); static void ural_start(struct ifnet *); static void ural_watchdog(void *); static int ural_reset(struct ifnet *); static int ural_ioctl(struct ifnet *, u_long, caddr_t); static void ural_set_testmode(struct ural_softc *); static void ural_eeprom_read(struct ural_softc *, uint16_t, void *, int); static uint16_t ural_read(struct ural_softc *, uint16_t); static void ural_read_multi(struct ural_softc *, uint16_t, void *, int); static void ural_write(struct ural_softc *, uint16_t, uint16_t); static void ural_write_multi(struct ural_softc *, uint16_t, void *, int) __unused; static void ural_bbp_write(struct ural_softc *, uint8_t, uint8_t); static uint8_t ural_bbp_read(struct ural_softc *, uint8_t); static void ural_rf_write(struct ural_softc *, uint8_t, uint32_t); static void ural_scan_start(struct ieee80211com *); static void ural_scan_end(struct ieee80211com *); static void ural_set_channel(struct ieee80211com *); static void ural_set_chan(struct ural_softc *, struct ieee80211_channel *); static void ural_disable_rf_tune(struct ural_softc *); static void ural_enable_tsf_sync(struct ural_softc *); static void ural_update_slot(struct ifnet *); static void ural_set_txpreamble(struct ural_softc *); static void ural_set_basicrates(struct ural_softc *); static void ural_set_bssid(struct ural_softc *, const uint8_t *); static void ural_set_macaddr(struct ural_softc *, uint8_t *); static void ural_update_promisc(struct ural_softc *); static const char *ural_get_rf(int); static void ural_read_eeprom(struct ural_softc *); static int ural_bbp_init(struct ural_softc *); static void ural_set_txantenna(struct ural_softc *, int); static void ural_set_rxantenna(struct ural_softc *, int); static void ural_init(void *); static void ural_stop(void *); static int ural_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static void ural_amrr_start(struct ural_softc *, struct ieee80211_node *); static void ural_amrr_timeout(void *); static void ural_amrr_update(usbd_xfer_handle, usbd_private_handle, usbd_status status); /* * Default values for MAC registers; values taken from the reference driver. */ static const struct { uint16_t reg; uint16_t val; } ural_def_mac[] = { { RAL_TXRX_CSR5, 0x8c8d }, { RAL_TXRX_CSR6, 0x8b8a }, { RAL_TXRX_CSR7, 0x8687 }, { RAL_TXRX_CSR8, 0x0085 }, { RAL_MAC_CSR13, 0x1111 }, { RAL_MAC_CSR14, 0x1e11 }, { RAL_TXRX_CSR21, 0xe78f }, { RAL_MAC_CSR9, 0xff1d }, { RAL_MAC_CSR11, 0x0002 }, { RAL_MAC_CSR22, 0x0053 }, { RAL_MAC_CSR15, 0x0000 }, { RAL_MAC_CSR8, 0x0780 }, { RAL_TXRX_CSR19, 0x0000 }, { RAL_TXRX_CSR18, 0x005a }, { RAL_PHY_CSR2, 0x0000 }, { RAL_TXRX_CSR0, 0x1ec0 }, { RAL_PHY_CSR4, 0x000f } }; /* * Default values for BBP registers; values taken from the reference driver. */ static const struct { uint8_t reg; uint8_t val; } ural_def_bbp[] = { { 3, 0x02 }, { 4, 0x19 }, { 14, 0x1c }, { 15, 0x30 }, { 16, 0xac }, { 17, 0x48 }, { 18, 0x18 }, { 19, 0xff }, { 20, 0x1e }, { 21, 0x08 }, { 22, 0x08 }, { 23, 0x08 }, { 24, 0x80 }, { 25, 0x50 }, { 26, 0x08 }, { 27, 0x23 }, { 30, 0x10 }, { 31, 0x2b }, { 32, 0xb9 }, { 34, 0x12 }, { 35, 0x50 }, { 39, 0xc4 }, { 40, 0x02 }, { 41, 0x60 }, { 53, 0x10 }, { 54, 0x18 }, { 56, 0x08 }, { 57, 0x10 }, { 58, 0x08 }, { 61, 0x60 }, { 62, 0x10 }, { 75, 0xff } }; /* * Default values for RF register R2 indexed by channel numbers. */ static const uint32_t ural_rf2522_r2[] = { 0x307f6, 0x307fb, 0x30800, 0x30805, 0x3080a, 0x3080f, 0x30814, 0x30819, 0x3081e, 0x30823, 0x30828, 0x3082d, 0x30832, 0x3083e }; static const uint32_t ural_rf2523_r2[] = { 0x00327, 0x00328, 0x00329, 0x0032a, 0x0032b, 0x0032c, 0x0032d, 0x0032e, 0x0032f, 0x00340, 0x00341, 0x00342, 0x00343, 0x00346 }; static const uint32_t ural_rf2524_r2[] = { 0x00327, 0x00328, 0x00329, 0x0032a, 0x0032b, 0x0032c, 0x0032d, 0x0032e, 0x0032f, 0x00340, 0x00341, 0x00342, 0x00343, 0x00346 }; static const uint32_t ural_rf2525_r2[] = { 0x20327, 0x20328, 0x20329, 0x2032a, 0x2032b, 0x2032c, 0x2032d, 0x2032e, 0x2032f, 0x20340, 0x20341, 0x20342, 0x20343, 0x20346 }; static const uint32_t ural_rf2525_hi_r2[] = { 0x2032f, 0x20340, 0x20341, 0x20342, 0x20343, 0x20344, 0x20345, 0x20346, 0x20347, 0x20348, 0x20349, 0x2034a, 0x2034b, 0x2034e }; static const uint32_t ural_rf2525e_r2[] = { 0x2044d, 0x2044e, 0x2044f, 0x20460, 0x20461, 0x20462, 0x20463, 0x20464, 0x20465, 0x20466, 0x20467, 0x20468, 0x20469, 0x2046b }; static const uint32_t ural_rf2526_hi_r2[] = { 0x0022a, 0x0022b, 0x0022b, 0x0022c, 0x0022c, 0x0022d, 0x0022d, 0x0022e, 0x0022e, 0x0022f, 0x0022d, 0x00240, 0x00240, 0x00241 }; static const uint32_t ural_rf2526_r2[] = { 0x00226, 0x00227, 0x00227, 0x00228, 0x00228, 0x00229, 0x00229, 0x0022a, 0x0022a, 0x0022b, 0x0022b, 0x0022c, 0x0022c, 0x0022d }; /* * For dual-band RF, RF registers R1 and R4 also depend on channel number; * values taken from the reference driver. */ static const struct { uint8_t chan; uint32_t r1; uint32_t r2; uint32_t r4; } ural_rf5222[] = { { 1, 0x08808, 0x0044d, 0x00282 }, { 2, 0x08808, 0x0044e, 0x00282 }, { 3, 0x08808, 0x0044f, 0x00282 }, { 4, 0x08808, 0x00460, 0x00282 }, { 5, 0x08808, 0x00461, 0x00282 }, { 6, 0x08808, 0x00462, 0x00282 }, { 7, 0x08808, 0x00463, 0x00282 }, { 8, 0x08808, 0x00464, 0x00282 }, { 9, 0x08808, 0x00465, 0x00282 }, { 10, 0x08808, 0x00466, 0x00282 }, { 11, 0x08808, 0x00467, 0x00282 }, { 12, 0x08808, 0x00468, 0x00282 }, { 13, 0x08808, 0x00469, 0x00282 }, { 14, 0x08808, 0x0046b, 0x00286 }, { 36, 0x08804, 0x06225, 0x00287 }, { 40, 0x08804, 0x06226, 0x00287 }, { 44, 0x08804, 0x06227, 0x00287 }, { 48, 0x08804, 0x06228, 0x00287 }, { 52, 0x08804, 0x06229, 0x00287 }, { 56, 0x08804, 0x0622a, 0x00287 }, { 60, 0x08804, 0x0622b, 0x00287 }, { 64, 0x08804, 0x0622c, 0x00287 }, { 100, 0x08804, 0x02200, 0x00283 }, { 104, 0x08804, 0x02201, 0x00283 }, { 108, 0x08804, 0x02202, 0x00283 }, { 112, 0x08804, 0x02203, 0x00283 }, { 116, 0x08804, 0x02204, 0x00283 }, { 120, 0x08804, 0x02205, 0x00283 }, { 124, 0x08804, 0x02206, 0x00283 }, { 128, 0x08804, 0x02207, 0x00283 }, { 132, 0x08804, 0x02208, 0x00283 }, { 136, 0x08804, 0x02209, 0x00283 }, { 140, 0x08804, 0x0220a, 0x00283 }, { 149, 0x08808, 0x02429, 0x00281 }, { 153, 0x08808, 0x0242b, 0x00281 }, { 157, 0x08808, 0x0242d, 0x00281 }, { 161, 0x08808, 0x0242f, 0x00281 } }; static device_probe_t ural_match; static device_attach_t ural_attach; static device_detach_t ural_detach; static device_method_t ural_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ural_match), DEVMETHOD(device_attach, ural_attach), DEVMETHOD(device_detach, ural_detach), { 0, 0 } }; static driver_t ural_driver = { "ural", ural_methods, sizeof(struct ural_softc) }; static devclass_t ural_devclass; DRIVER_MODULE(ural, uhub, ural_driver, ural_devclass, usbd_driver_load, 0); static int ural_match(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); if (uaa->iface != NULL) return UMATCH_NONE; return (usb_lookup(ural_devs, uaa->vendor, uaa->product) != NULL) ? UMATCH_VENDOR_PRODUCT : UMATCH_NONE; } static int ural_attach(device_t self) { struct ural_softc *sc = device_get_softc(self); struct usb_attach_arg *uaa = device_get_ivars(self); struct ifnet *ifp; struct ieee80211com *ic = &sc->sc_ic; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; usbd_status error; int i, bands; sc->sc_udev = uaa->device; sc->sc_dev = self; if (usbd_set_config_no(sc->sc_udev, RAL_CONFIG_NO, 0) != 0) { printf("%s: could not set configuration no\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } /* get the first interface handle */ error = usbd_device2interface_handle(sc->sc_udev, RAL_IFACE_INDEX, &sc->sc_iface); if (error != 0) { printf("%s: could not get interface handle\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } /* * Find endpoints. */ id = usbd_get_interface_descriptor(sc->sc_iface); sc->sc_rx_no = sc->sc_tx_no = -1; for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); if (ed == NULL) { printf("%s: no endpoint descriptor for %d\n", device_get_nameunit(sc->sc_dev), i); return ENXIO; } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) sc->sc_rx_no = ed->bEndpointAddress; else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) sc->sc_tx_no = ed->bEndpointAddress; } if (sc->sc_rx_no == -1 || sc->sc_tx_no == -1) { printf("%s: missing endpoint\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); usb_init_task(&sc->sc_task, ural_task, sc); usb_init_task(&sc->sc_scantask, ural_scantask, sc); callout_init(&sc->watchdog_ch, 0); callout_init(&sc->amrr_ch, 0); /* retrieve RT2570 rev. no */ sc->asic_rev = ural_read(sc, RAL_MAC_CSR0); /* retrieve MAC address and various other things from EEPROM */ ural_read_eeprom(sc); printf("%s: MAC/BBP RT2570 (rev 0x%02x), RF %s\n", device_get_nameunit(sc->sc_dev), sc->asic_rev, ural_get_rf(sc->rf_rev)); ifp = sc->sc_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { printf("%s: can not if_alloc()\n", device_get_nameunit(sc->sc_dev)); return ENXIO; } ifp->if_softc = sc; if_initname(ifp, "ural", device_get_unit(sc->sc_dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_NEEDSGIANT; /* USB stack is still under Giant lock */ ifp->if_init = ural_init; ifp->if_ioctl = ural_ioctl; ifp->if_start = ural_start; IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); ic->ic_ifp = ifp; ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */ ic->ic_state = IEEE80211_S_INIT; /* set device capabilities */ ic->ic_caps = IEEE80211_C_IBSS /* IBSS mode supported */ | IEEE80211_C_MONITOR /* monitor mode supported */ | IEEE80211_C_HOSTAP /* HostAp mode supported */ | IEEE80211_C_TXPMGT /* tx power management */ | IEEE80211_C_SHPREAMBLE /* short preamble supported */ | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* bg scanning supported */ | IEEE80211_C_WPA /* 802.11i */ ; bands = 0; setbit(&bands, IEEE80211_MODE_11B); setbit(&bands, IEEE80211_MODE_11G); if (sc->rf_rev == RAL_RF_5222) setbit(&bands, IEEE80211_MODE_11A); ieee80211_init_channels(ic, 0, CTRY_DEFAULT, bands, 0, 1); ieee80211_ifattach(ic); ic->ic_reset = ural_reset; /* enable s/w bmiss handling in sta mode */ ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; ic->ic_scan_start = ural_scan_start; ic->ic_scan_end = ural_scan_end; ic->ic_set_channel = ural_set_channel; /* override state transition machine */ sc->sc_newstate = ic->ic_newstate; ic->ic_newstate = ural_newstate; ic->ic_raw_xmit = ural_raw_xmit; ieee80211_media_init(ic, ural_media_change, ieee80211_media_status); ieee80211_amrr_init(&sc->amrr, ic, IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD); bpfattach2(ifp, DLT_IEEE802_11_RADIO, sizeof (struct ieee80211_frame) + 64, &sc->sc_drvbpf); sc->sc_rxtap_len = sizeof sc->sc_rxtapu; sc->sc_rxtap.wr_ihdr.it_len = htole16(sc->sc_rxtap_len); sc->sc_rxtap.wr_ihdr.it_present = htole32(RAL_RX_RADIOTAP_PRESENT); sc->sc_txtap_len = sizeof sc->sc_txtapu; sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len); sc->sc_txtap.wt_ihdr.it_present = htole32(RAL_TX_RADIOTAP_PRESENT); if (bootverbose) ieee80211_announce(ic); return 0; } static int ural_detach(device_t self) { struct ural_softc *sc = device_get_softc(self); struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = ic->ic_ifp; ural_stop(sc); usb_rem_task(sc->sc_udev, &sc->sc_task); callout_stop(&sc->watchdog_ch); callout_stop(&sc->amrr_ch); if (sc->amrr_xfer != NULL) { usbd_free_xfer(sc->amrr_xfer); sc->amrr_xfer = NULL; } if (sc->sc_rx_pipeh != NULL) { usbd_abort_pipe(sc->sc_rx_pipeh); usbd_close_pipe(sc->sc_rx_pipeh); } if (sc->sc_tx_pipeh != NULL) { usbd_abort_pipe(sc->sc_tx_pipeh); usbd_close_pipe(sc->sc_tx_pipeh); } ural_free_rx_list(sc); ural_free_tx_list(sc); bpfdetach(ifp); ieee80211_ifdetach(ic); if_free(ifp); mtx_destroy(&sc->sc_mtx); return 0; } static int ural_alloc_tx_list(struct ural_softc *sc) { struct ural_tx_data *data; int i, error; sc->tx_queued = 0; for (i = 0; i < RAL_TX_LIST_COUNT; i++) { data = &sc->tx_data[i]; data->sc = sc; data->xfer = usbd_alloc_xfer(sc->sc_udev); if (data->xfer == NULL) { printf("%s: could not allocate tx xfer\n", device_get_nameunit(sc->sc_dev)); error = ENOMEM; goto fail; } data->buf = usbd_alloc_buffer(data->xfer, RAL_TX_DESC_SIZE + MCLBYTES); if (data->buf == NULL) { printf("%s: could not allocate tx buffer\n", device_get_nameunit(sc->sc_dev)); error = ENOMEM; goto fail; } } return 0; fail: ural_free_tx_list(sc); return error; } static void ural_free_tx_list(struct ural_softc *sc) { struct ural_tx_data *data; int i; for (i = 0; i < RAL_TX_LIST_COUNT; i++) { data = &sc->tx_data[i]; if (data->xfer != NULL) { usbd_free_xfer(data->xfer); data->xfer = NULL; } if (data->ni != NULL) { ieee80211_free_node(data->ni); data->ni = NULL; } } } static int ural_alloc_rx_list(struct ural_softc *sc) { struct ural_rx_data *data; int i, error; for (i = 0; i < RAL_RX_LIST_COUNT; i++) { data = &sc->rx_data[i]; data->sc = sc; data->xfer = usbd_alloc_xfer(sc->sc_udev); if (data->xfer == NULL) { printf("%s: could not allocate rx xfer\n", device_get_nameunit(sc->sc_dev)); error = ENOMEM; goto fail; } if (usbd_alloc_buffer(data->xfer, MCLBYTES) == NULL) { printf("%s: could not allocate rx buffer\n", device_get_nameunit(sc->sc_dev)); error = ENOMEM; goto fail; } data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { printf("%s: could not allocate rx mbuf\n", device_get_nameunit(sc->sc_dev)); error = ENOMEM; goto fail; } data->buf = mtod(data->m, uint8_t *); } return 0; fail: ural_free_tx_list(sc); return error; } static void ural_free_rx_list(struct ural_softc *sc) { struct ural_rx_data *data; int i; for (i = 0; i < RAL_RX_LIST_COUNT; i++) { data = &sc->rx_data[i]; if (data->xfer != NULL) { usbd_free_xfer(data->xfer); data->xfer = NULL; } if (data->m != NULL) { m_freem(data->m); data->m = NULL; } } } static int ural_media_change(struct ifnet *ifp) { struct ural_softc *sc = ifp->if_softc; int error; RAL_LOCK(sc); error = ieee80211_media_change(ifp); if (error != ENETRESET) { RAL_UNLOCK(sc); return error; } if ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) ural_init(sc); RAL_UNLOCK(sc); return 0; } static void ural_task(void *xarg) { struct ural_softc *sc = xarg; struct ieee80211com *ic = &sc->sc_ic; enum ieee80211_state ostate; struct ieee80211_node *ni; struct mbuf *m; ostate = ic->ic_state; RAL_LOCK(sc); switch (sc->sc_state) { case IEEE80211_S_INIT: if (ostate == IEEE80211_S_RUN) { /* abort TSF synchronization */ ural_write(sc, RAL_TXRX_CSR19, 0); /* force tx led to stop blinking */ ural_write(sc, RAL_MAC_CSR20, 0); } break; case IEEE80211_S_RUN: ni = ic->ic_bss; if (ic->ic_opmode != IEEE80211_M_MONITOR) { ural_update_slot(ic->ic_ifp); ural_set_txpreamble(sc); ural_set_basicrates(sc); ural_set_bssid(sc, ni->ni_bssid); } if (ic->ic_opmode == IEEE80211_M_HOSTAP || ic->ic_opmode == IEEE80211_M_IBSS) { m = ieee80211_beacon_alloc(ni, &sc->sc_bo); if (m == NULL) { printf("%s: could not allocate beacon\n", device_get_nameunit(sc->sc_dev)); return; } if (ural_tx_bcn(sc, m, ni) != 0) { printf("%s: could not send beacon\n", device_get_nameunit(sc->sc_dev)); return; } } /* make tx led blink on tx (controlled by ASIC) */ ural_write(sc, RAL_MAC_CSR20, 1); if (ic->ic_opmode != IEEE80211_M_MONITOR) ural_enable_tsf_sync(sc); /* enable automatic rate adaptation in STA mode */ if (ic->ic_opmode == IEEE80211_M_STA && ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) ural_amrr_start(sc, ni); break; default: break; } RAL_UNLOCK(sc); sc->sc_newstate(ic, sc->sc_state, sc->sc_arg); } static void ural_scantask(void *arg) { struct ural_softc *sc = arg; struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = ic->ic_ifp; RAL_LOCK(sc); if (sc->sc_scan_action == URAL_SCAN_START) { /* abort TSF synchronization */ ural_write(sc, RAL_TXRX_CSR19, 0); ural_set_bssid(sc, ifp->if_broadcastaddr); } else if (sc->sc_scan_action == URAL_SET_CHANNEL) { mtx_lock(&Giant); ural_set_chan(sc, ic->ic_curchan); mtx_unlock(&Giant); } else { ural_enable_tsf_sync(sc); /* XXX keep local copy */ ural_set_bssid(sc, ic->ic_bss->ni_bssid); } RAL_UNLOCK(sc); } static int ural_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) { struct ural_softc *sc = ic->ic_ifp->if_softc; callout_stop(&sc->amrr_ch); /* do it in a process context */ sc->sc_state = nstate; sc->sc_arg = arg; usb_rem_task(sc->sc_udev, &sc->sc_task); if (nstate == IEEE80211_S_INIT) sc->sc_newstate(ic, nstate, arg); else usb_add_task(sc->sc_udev, &sc->sc_task, USB_TASKQ_DRIVER); return 0; } /* quickly determine if a given rate is CCK or OFDM */ #define RAL_RATE_IS_OFDM(rate) ((rate) >= 12 && (rate) != 22) #define RAL_ACK_SIZE 14 /* 10 + 4(FCS) */ #define RAL_CTS_SIZE 14 /* 10 + 4(FCS) */ #define RAL_SIFS 10 /* us */ #define RAL_RXTX_TURNAROUND 5 /* us */ /* * This function is only used by the Rx radiotap code. */ static int ural_rxrate(struct ural_rx_desc *desc) { if (le32toh(desc->flags) & RAL_RX_OFDM) { /* reverse function of ural_plcp_signal */ switch (desc->rate) { case 0xb: return 12; case 0xf: return 18; case 0xa: return 24; case 0xe: return 36; case 0x9: return 48; case 0xd: return 72; case 0x8: return 96; case 0xc: return 108; } } else { if (desc->rate == 10) return 2; if (desc->rate == 20) return 4; if (desc->rate == 55) return 11; if (desc->rate == 110) return 22; } return 2; /* should not get there */ } static void ural_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct ural_tx_data *data = priv; struct ural_softc *sc = data->sc; struct ifnet *ifp = sc->sc_ic.ic_ifp; if (data->m->m_flags & M_TXCB) ieee80211_process_callback(data->ni, data->m, status == USBD_NORMAL_COMPLETION ? 0 : ETIMEDOUT); if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; printf("%s: could not transmit buffer: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(sc->sc_rx_pipeh); ifp->if_oerrors++; /* XXX mbuf leak? */ return; } m_freem(data->m); data->m = NULL; ieee80211_free_node(data->ni); data->ni = NULL; sc->tx_queued--; ifp->if_opackets++; DPRINTFN(10, ("tx done\n")); sc->sc_tx_timer = 0; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ural_start(ifp); } static void ural_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct ural_rx_data *data = priv; struct ural_softc *sc = data->sc; struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = ic->ic_ifp; struct ural_rx_desc *desc; struct ieee80211_frame *wh; struct ieee80211_node *ni; struct mbuf *mnew, *m; int len; if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(sc->sc_rx_pipeh); goto skip; } usbd_get_xfer_status(xfer, NULL, NULL, &len, NULL); if (len < RAL_RX_DESC_SIZE + IEEE80211_MIN_LEN) { DPRINTF(("%s: xfer too short %d\n", device_get_nameunit(sc->sc_dev), len)); ifp->if_ierrors++; goto skip; } /* rx descriptor is located at the end */ desc = (struct ural_rx_desc *)(data->buf + len - RAL_RX_DESC_SIZE); if ((le32toh(desc->flags) & RAL_RX_PHY_ERROR) || (le32toh(desc->flags) & RAL_RX_CRC_ERROR)) { /* * This should not happen since we did not request to receive * those frames when we filled RAL_TXRX_CSR2. */ DPRINTFN(5, ("PHY or CRC error\n")); ifp->if_ierrors++; goto skip; } mnew = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { ifp->if_ierrors++; goto skip; } m = data->m; data->m = mnew; data->buf = mtod(data->m, uint8_t *); /* finalize mbuf */ m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = (le32toh(desc->flags) >> 16) & 0xfff; if (bpf_peers_present(sc->sc_drvbpf)) { struct ural_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = IEEE80211_RADIOTAP_F_FCS; tap->wr_rate = ural_rxrate(desc); tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antenna = sc->rx_ant; tap->wr_antsignal = URAL_RSSI(desc->rssi); bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m); } /* Strip trailing 802.11 MAC FCS. */ m_adj(m, -IEEE80211_CRC_LEN); wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); /* send the frame to the 802.11 layer */ ieee80211_input(ic, m, ni, URAL_RSSI(desc->rssi), RAL_NOISE_FLOOR, 0); /* node is no longer needed */ ieee80211_free_node(ni); DPRINTFN(15, ("rx done\n")); skip: /* setup a new transfer */ usbd_setup_xfer(xfer, sc->sc_rx_pipeh, data, data->buf, MCLBYTES, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, ural_rxeof); usbd_transfer(xfer); } /* * Return the expected ack rate for a frame transmitted at rate `rate'. * XXX: this should depend on the destination node basic rate set. */ static int ural_ack_rate(struct ieee80211com *ic, int rate) { switch (rate) { /* CCK rates */ case 2: return 2; case 4: case 11: case 22: return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate; /* OFDM rates */ case 12: case 18: return 12; case 24: case 36: return 24; case 48: case 72: case 96: case 108: return 48; } /* default to 1Mbps */ return 2; } /* * Compute the duration (in us) needed to transmit `len' bytes at rate `rate'. * The function automatically determines the operating mode depending on the * given rate. `flags' indicates whether short preamble is in use or not. */ static uint16_t ural_txtime(int len, int rate, uint32_t flags) { uint16_t txtime; if (RAL_RATE_IS_OFDM(rate)) { /* IEEE Std 802.11a-1999, pp. 37 */ txtime = (8 + 4 * len + 3 + rate - 1) / rate; txtime = 16 + 4 + 4 * txtime + 6; } else { /* IEEE Std 802.11b-1999, pp. 28 */ txtime = (16 * len + rate - 1) / rate; if (rate != 2 && (flags & IEEE80211_F_SHPREAMBLE)) txtime += 72 + 24; else txtime += 144 + 48; } return txtime; } static uint8_t ural_plcp_signal(int rate) { switch (rate) { /* CCK rates (returned values are device-dependent) */ case 2: return 0x0; case 4: return 0x1; case 11: return 0x2; case 22: return 0x3; /* OFDM rates (cf IEEE Std 802.11a-1999, pp. 14 Table 80) */ case 12: return 0xb; case 18: return 0xf; case 24: return 0xa; case 36: return 0xe; case 48: return 0x9; case 72: return 0xd; case 96: return 0x8; case 108: return 0xc; /* unsupported rates (should not get there) */ default: return 0xff; } } static void ural_setup_tx_desc(struct ural_softc *sc, struct ural_tx_desc *desc, uint32_t flags, int len, int rate) { struct ieee80211com *ic = &sc->sc_ic; uint16_t plcp_length; int remainder; desc->flags = htole32(flags); desc->flags |= htole32(RAL_TX_NEWSEQ); desc->flags |= htole32(len << 16); desc->wme = htole16(RAL_AIFSN(2) | RAL_LOGCWMIN(3) | RAL_LOGCWMAX(5)); desc->wme |= htole16(RAL_IVOFFSET(sizeof (struct ieee80211_frame))); /* setup PLCP fields */ desc->plcp_signal = ural_plcp_signal(rate); desc->plcp_service = 4; len += IEEE80211_CRC_LEN; if (RAL_RATE_IS_OFDM(rate)) { desc->flags |= htole32(RAL_TX_OFDM); plcp_length = len & 0xfff; desc->plcp_length_hi = plcp_length >> 6; desc->plcp_length_lo = plcp_length & 0x3f; } else { plcp_length = (16 * len + rate - 1) / rate; if (rate == 22) { remainder = (16 * len) % 22; if (remainder != 0 && remainder < 7) desc->plcp_service |= RAL_PLCP_LENGEXT; } desc->plcp_length_hi = plcp_length >> 8; desc->plcp_length_lo = plcp_length & 0xff; if (rate != 2 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) desc->plcp_signal |= 0x08; } desc->iv = 0; desc->eiv = 0; } #define RAL_TX_TIMEOUT 5000 static int ural_tx_bcn(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) { struct ural_tx_desc *desc; usbd_xfer_handle xfer; uint8_t cmd = 0; usbd_status error; uint8_t *buf; int xferlen, rate; rate = IEEE80211_IS_CHAN_5GHZ(ni->ni_chan) ? 12 : 2; xfer = usbd_alloc_xfer(sc->sc_udev); if (xfer == NULL) return ENOMEM; /* xfer length needs to be a multiple of two! */ xferlen = (RAL_TX_DESC_SIZE + m0->m_pkthdr.len + 1) & ~1; buf = usbd_alloc_buffer(xfer, xferlen); if (buf == NULL) { usbd_free_xfer(xfer); return ENOMEM; } usbd_setup_xfer(xfer, sc->sc_tx_pipeh, NULL, &cmd, sizeof cmd, USBD_FORCE_SHORT_XFER, RAL_TX_TIMEOUT, NULL); error = usbd_sync_transfer(xfer); if (error != 0) { usbd_free_xfer(xfer); return error; } desc = (struct ural_tx_desc *)buf; m_copydata(m0, 0, m0->m_pkthdr.len, buf + RAL_TX_DESC_SIZE); ural_setup_tx_desc(sc, desc, RAL_TX_IFS_NEWBACKOFF | RAL_TX_TIMESTAMP, m0->m_pkthdr.len, rate); DPRINTFN(10, ("sending beacon frame len=%u rate=%u xfer len=%u\n", m0->m_pkthdr.len, rate, xferlen)); usbd_setup_xfer(xfer, sc->sc_tx_pipeh, NULL, buf, xferlen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, NULL); error = usbd_sync_transfer(xfer); usbd_free_xfer(xfer); return error; } static int ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) { struct ieee80211com *ic = &sc->sc_ic; struct ural_tx_desc *desc; struct ural_tx_data *data; struct ieee80211_frame *wh; uint32_t flags = 0; uint16_t dur; usbd_status error; int xferlen, rate; data = &sc->tx_data[0]; desc = (struct ural_tx_desc *)data->buf; rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; data->m = m0; data->ni = ni; wh = mtod(m0, struct ieee80211_frame *); if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RAL_TX_ACK; dur = ural_txtime(RAL_ACK_SIZE, rate, ic->ic_flags) + RAL_SIFS; *(uint16_t *)wh->i_dur = htole16(dur); /* tell hardware to add timestamp for probe responses */ if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_MGT && (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PROBE_RESP) flags |= RAL_TX_TIMESTAMP; } if (bpf_peers_present(sc->sc_drvbpf)) { struct ural_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; tap->wt_rate = rate; tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_antenna = sc->tx_ant; bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0); } m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE); ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate); /* align end on a 2-bytes boundary */ xferlen = (RAL_TX_DESC_SIZE + m0->m_pkthdr.len + 1) & ~1; /* * No space left in the last URB to store the extra 2 bytes, force * sending of another URB. */ if ((xferlen % 64) == 0) xferlen += 2; DPRINTFN(10, ("sending mgt frame len=%u rate=%u xfer len=%u\n", m0->m_pkthdr.len, rate, xferlen)); usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, xferlen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, ural_txeof); error = usbd_transfer(data->xfer); if (error != USBD_NORMAL_COMPLETION && error != USBD_IN_PROGRESS) { m_freem(m0); data->m = NULL; data->ni = NULL; return error; } sc->tx_queued++; return 0; } static int ural_tx_raw(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, const struct ieee80211_bpf_params *params) { struct ieee80211com *ic = &sc->sc_ic; struct ural_tx_desc *desc; struct ural_tx_data *data; uint32_t flags; usbd_status error; int xferlen, rate; data = &sc->tx_data[0]; desc = (struct ural_tx_desc *)data->buf; rate = params->ibp_rate0 & IEEE80211_RATE_VAL; /* XXX validate */ if (rate == 0) { m_freem(m0); return EINVAL; } if (bpf_peers_present(sc->sc_drvbpf)) { struct ural_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; tap->wt_rate = rate; tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_antenna = sc->tx_ant; bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0); } data->m = m0; data->ni = ni; flags = 0; if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0) flags |= RAL_TX_ACK; m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE); /* XXX need to setup descriptor ourself */ ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate); /* align end on a 2-bytes boundary */ xferlen = (RAL_TX_DESC_SIZE + m0->m_pkthdr.len + 1) & ~1; /* * No space left in the last URB to store the extra 2 bytes, force * sending of another URB. */ if ((xferlen % 64) == 0) xferlen += 2; DPRINTFN(10, ("sending raw frame len=%u rate=%u xfer len=%u\n", m0->m_pkthdr.len, rate, xferlen)); usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, xferlen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, ural_txeof); error = usbd_transfer(data->xfer); if (error != USBD_NORMAL_COMPLETION && error != USBD_IN_PROGRESS) { m_freem(m0); data->m = NULL; data->ni = NULL; return error; } sc->tx_queued++; return 0; } static int ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) { struct ieee80211com *ic = &sc->sc_ic; struct ural_tx_desc *desc; struct ural_tx_data *data; struct ieee80211_frame *wh; struct ieee80211_key *k; uint32_t flags = 0; uint16_t dur; usbd_status error; int xferlen, rate; wh = mtod(m0, struct ieee80211_frame *); if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) rate = ic->ic_fixed_rate; else rate = ni->ni_rates.rs_rates[ni->ni_txrate]; rate &= IEEE80211_RATE_VAL; if (wh->i_fc[1] & IEEE80211_FC1_WEP) { k = ieee80211_crypto_encap(ic, ni, m0); if (k == NULL) { m_freem(m0); return ENOBUFS; } /* packet header may have moved, reset our local pointer */ wh = mtod(m0, struct ieee80211_frame *); } data = &sc->tx_data[0]; desc = (struct ural_tx_desc *)data->buf; data->m = m0; data->ni = ni; if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RAL_TX_ACK; flags |= RAL_TX_RETRY(7); dur = ural_txtime(RAL_ACK_SIZE, ural_ack_rate(ic, rate), ic->ic_flags) + RAL_SIFS; *(uint16_t *)wh->i_dur = htole16(dur); } if (bpf_peers_present(sc->sc_drvbpf)) { struct ural_tx_radiotap_header *tap = &sc->sc_txtap; tap->wt_flags = 0; tap->wt_rate = rate; tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wt_antenna = sc->tx_ant; bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0); } m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE); ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate); /* align end on a 2-bytes boundary */ xferlen = (RAL_TX_DESC_SIZE + m0->m_pkthdr.len + 1) & ~1; /* * No space left in the last URB to store the extra 2 bytes, force * sending of another URB. */ if ((xferlen % 64) == 0) xferlen += 2; DPRINTFN(10, ("sending data frame len=%u rate=%u xfer len=%u\n", m0->m_pkthdr.len, rate, xferlen)); usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, xferlen, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, ural_txeof); error = usbd_transfer(data->xfer); if (error != USBD_NORMAL_COMPLETION && error != USBD_IN_PROGRESS) { m_freem(m0); data->m = NULL; data->ni = NULL; return error; } sc->tx_queued++; return 0; } static void ural_start(struct ifnet *ifp) { struct ural_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *m0; struct ether_header *eh; struct ieee80211_node *ni; for (;;) { IF_POLL(&ic->ic_mgtq, m0); if (m0 != NULL) { if (sc->tx_queued >= RAL_TX_LIST_COUNT) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } IF_DEQUEUE(&ic->ic_mgtq, m0); ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif; m0->m_pkthdr.rcvif = NULL; if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, m0); if (ural_tx_mgt(sc, m0, ni) != 0) { ieee80211_free_node(ni); break; } } else { if (ic->ic_state != IEEE80211_S_RUN) break; IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; if (sc->tx_queued >= RAL_TX_LIST_COUNT) { IFQ_DRV_PREPEND(&ifp->if_snd, m0); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } /* * Cancel any background scan. */ if (ic->ic_flags & IEEE80211_F_SCAN) ieee80211_cancel_scan(ic); if (m0->m_len < sizeof (struct ether_header) && !(m0 = m_pullup(m0, sizeof (struct ether_header)))) continue; eh = mtod(m0, struct ether_header *); ni = ieee80211_find_txnode(ic, eh->ether_dhost); if (ni == NULL) { m_freem(m0); continue; } BPF_MTAP(ifp, m0); m0 = ieee80211_encap(ic, m0, ni); if (m0 == NULL) { ieee80211_free_node(ni); continue; } if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, m0); if (ural_tx_data(sc, m0, ni) != 0) { ieee80211_free_node(ni); ifp->if_oerrors++; break; } } sc->sc_tx_timer = 5; ic->ic_lastdata = ticks; callout_reset(&sc->watchdog_ch, hz, ural_watchdog, sc); } } static void ural_watchdog(void *arg) { struct ural_softc *sc = (struct ural_softc *)arg; RAL_LOCK(sc); if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { device_printf(sc->sc_dev, "device timeout\n"); /*ural_init(sc); XXX needs a process context! */ sc->sc_ifp->if_oerrors++; RAL_UNLOCK(sc); return; } callout_reset(&sc->watchdog_ch, hz, ural_watchdog, sc); } RAL_UNLOCK(sc); } /* * This function allows for fast channel switching in monitor mode (used by * net-mgmt/kismet). In IBSS mode, we must explicitly reset the interface to * generate a new beacon frame. */ static int ural_reset(struct ifnet *ifp) { struct ural_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; if (ic->ic_opmode != IEEE80211_M_MONITOR) return ENETRESET; ural_set_chan(sc, ic->ic_curchan); return 0; } static int ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ural_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; int error = 0; RAL_LOCK(sc); switch (cmd) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) ural_update_promisc(sc); else ural_init(sc); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) ural_stop(sc); } break; default: error = ieee80211_ioctl(ic, cmd, data); } if (error == ENETRESET) { if ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING) && (ic->ic_roaming != IEEE80211_ROAMING_MANUAL)) ural_init(sc); error = 0; } RAL_UNLOCK(sc); return error; } static void ural_set_testmode(struct ural_softc *sc) { usb_device_request_t req; usbd_status error; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RAL_VENDOR_REQUEST; USETW(req.wValue, 4); USETW(req.wIndex, 1); USETW(req.wLength, 0); error = usbd_do_request(sc->sc_udev, &req, NULL); if (error != 0) { printf("%s: could not set test mode: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); } } static void ural_eeprom_read(struct ural_softc *sc, uint16_t addr, void *buf, int len) { usb_device_request_t req; usbd_status error; req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = RAL_READ_EEPROM; USETW(req.wValue, 0); USETW(req.wIndex, addr); USETW(req.wLength, len); error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { printf("%s: could not read EEPROM: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); } } static uint16_t ural_read(struct ural_softc *sc, uint16_t reg) { usb_device_request_t req; usbd_status error; uint16_t val; req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = RAL_READ_MAC; USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, sizeof (uint16_t)); error = usbd_do_request(sc->sc_udev, &req, &val); if (error != 0) { printf("%s: could not read MAC register: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); return 0; } return le16toh(val); } static void ural_read_multi(struct ural_softc *sc, uint16_t reg, void *buf, int len) { usb_device_request_t req; usbd_status error; req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = RAL_READ_MULTI_MAC; USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, len); error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { printf("%s: could not read MAC register: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); } } static void ural_write(struct ural_softc *sc, uint16_t reg, uint16_t val) { usb_device_request_t req; usbd_status error; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RAL_WRITE_MAC; USETW(req.wValue, val); USETW(req.wIndex, reg); USETW(req.wLength, 0); error = usbd_do_request(sc->sc_udev, &req, NULL); if (error != 0) { printf("%s: could not write MAC register: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); } } static void ural_write_multi(struct ural_softc *sc, uint16_t reg, void *buf, int len) { usb_device_request_t req; usbd_status error; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RAL_WRITE_MULTI_MAC; USETW(req.wValue, 0); USETW(req.wIndex, reg); USETW(req.wLength, len); error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { printf("%s: could not write MAC register: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); } } static void ural_bbp_write(struct ural_softc *sc, uint8_t reg, uint8_t val) { uint16_t tmp; int ntries; for (ntries = 0; ntries < 5; ntries++) { if (!(ural_read(sc, RAL_PHY_CSR8) & RAL_BBP_BUSY)) break; } if (ntries == 5) { printf("%s: could not write to BBP\n", device_get_nameunit(sc->sc_dev)); return; } tmp = reg << 8 | val; ural_write(sc, RAL_PHY_CSR7, tmp); } static uint8_t ural_bbp_read(struct ural_softc *sc, uint8_t reg) { uint16_t val; int ntries; val = RAL_BBP_WRITE | reg << 8; ural_write(sc, RAL_PHY_CSR7, val); for (ntries = 0; ntries < 5; ntries++) { if (!(ural_read(sc, RAL_PHY_CSR8) & RAL_BBP_BUSY)) break; } if (ntries == 5) { printf("%s: could not read BBP\n", device_get_nameunit(sc->sc_dev)); return 0; } return ural_read(sc, RAL_PHY_CSR7) & 0xff; } static void ural_rf_write(struct ural_softc *sc, uint8_t reg, uint32_t val) { uint32_t tmp; int ntries; for (ntries = 0; ntries < 5; ntries++) { if (!(ural_read(sc, RAL_PHY_CSR10) & RAL_RF_LOBUSY)) break; } if (ntries == 5) { printf("%s: could not write to RF\n", device_get_nameunit(sc->sc_dev)); return; } tmp = RAL_RF_BUSY | RAL_RF_20BIT | (val & 0xfffff) << 2 | (reg & 0x3); ural_write(sc, RAL_PHY_CSR9, tmp & 0xffff); ural_write(sc, RAL_PHY_CSR10, tmp >> 16); /* remember last written value in sc */ sc->rf_regs[reg] = val; DPRINTFN(15, ("RF R[%u] <- 0x%05x\n", reg & 0x3, val & 0xfffff)); } static void ural_scan_start(struct ieee80211com *ic) { struct ural_softc *sc = ic->ic_ifp->if_softc; usb_rem_task(sc->sc_udev, &sc->sc_scantask); /* do it in a process context */ sc->sc_scan_action = URAL_SCAN_START; usb_add_task(sc->sc_udev, &sc->sc_scantask, USB_TASKQ_DRIVER); } static void ural_scan_end(struct ieee80211com *ic) { struct ural_softc *sc = ic->ic_ifp->if_softc; usb_rem_task(sc->sc_udev, &sc->sc_scantask); /* do it in a process context */ sc->sc_scan_action = URAL_SCAN_END; usb_add_task(sc->sc_udev, &sc->sc_scantask, USB_TASKQ_DRIVER); } static void ural_set_channel(struct ieee80211com *ic) { struct ural_softc *sc = ic->ic_ifp->if_softc; usb_rem_task(sc->sc_udev, &sc->sc_scantask); /* do it in a process context */ sc->sc_scan_action = URAL_SET_CHANNEL; usb_add_task(sc->sc_udev, &sc->sc_scantask, USB_TASKQ_DRIVER); } static void ural_set_chan(struct ural_softc *sc, struct ieee80211_channel *c) { struct ieee80211com *ic = &sc->sc_ic; uint8_t power, tmp; u_int i, chan; chan = ieee80211_chan2ieee(ic, c); if (chan == 0 || chan == IEEE80211_CHAN_ANY) return; if (IEEE80211_IS_CHAN_2GHZ(c)) power = min(sc->txpow[chan - 1], 31); else power = 31; /* adjust txpower using ifconfig settings */ power -= (100 - ic->ic_txpowlimit) / 8; DPRINTFN(2, ("setting channel to %u, txpower to %u\n", chan, power)); switch (sc->rf_rev) { case RAL_RF_2522: ural_rf_write(sc, RAL_RF1, 0x00814); ural_rf_write(sc, RAL_RF2, ural_rf2522_r2[chan - 1]); ural_rf_write(sc, RAL_RF3, power << 7 | 0x00040); break; case RAL_RF_2523: ural_rf_write(sc, RAL_RF1, 0x08804); ural_rf_write(sc, RAL_RF2, ural_rf2523_r2[chan - 1]); ural_rf_write(sc, RAL_RF3, power << 7 | 0x38044); ural_rf_write(sc, RAL_RF4, (chan == 14) ? 0x00280 : 0x00286); break; case RAL_RF_2524: ural_rf_write(sc, RAL_RF1, 0x0c808); ural_rf_write(sc, RAL_RF2, ural_rf2524_r2[chan - 1]); ural_rf_write(sc, RAL_RF3, power << 7 | 0x00040); ural_rf_write(sc, RAL_RF4, (chan == 14) ? 0x00280 : 0x00286); break; case RAL_RF_2525: ural_rf_write(sc, RAL_RF1, 0x08808); ural_rf_write(sc, RAL_RF2, ural_rf2525_hi_r2[chan - 1]); ural_rf_write(sc, RAL_RF3, power << 7 | 0x18044); ural_rf_write(sc, RAL_RF4, (chan == 14) ? 0x00280 : 0x00286); ural_rf_write(sc, RAL_RF1, 0x08808); ural_rf_write(sc, RAL_RF2, ural_rf2525_r2[chan - 1]); ural_rf_write(sc, RAL_RF3, power << 7 | 0x18044); ural_rf_write(sc, RAL_RF4, (chan == 14) ? 0x00280 : 0x00286); break; case RAL_RF_2525E: ural_rf_write(sc, RAL_RF1, 0x08808); ural_rf_write(sc, RAL_RF2, ural_rf2525e_r2[chan - 1]); ural_rf_write(sc, RAL_RF3, power << 7 | 0x18044); ural_rf_write(sc, RAL_RF4, (chan == 14) ? 0x00286 : 0x00282); break; case RAL_RF_2526: ural_rf_write(sc, RAL_RF2, ural_rf2526_hi_r2[chan - 1]); ural_rf_write(sc, RAL_RF4, (chan & 1) ? 0x00386 : 0x00381); ural_rf_write(sc, RAL_RF1, 0x08804); ural_rf_write(sc, RAL_RF2, ural_rf2526_r2[chan - 1]); ural_rf_write(sc, RAL_RF3, power << 7 | 0x18044); ural_rf_write(sc, RAL_RF4, (chan & 1) ? 0x00386 : 0x00381); break; /* dual-band RF */ case RAL_RF_5222: for (i = 0; ural_rf5222[i].chan != chan; i++); ural_rf_write(sc, RAL_RF1, ural_rf5222[i].r1); ural_rf_write(sc, RAL_RF2, ural_rf5222[i].r2); ural_rf_write(sc, RAL_RF3, power << 7 | 0x00040); ural_rf_write(sc, RAL_RF4, ural_rf5222[i].r4); break; } if (ic->ic_opmode != IEEE80211_M_MONITOR && (ic->ic_flags & IEEE80211_F_SCAN) == 0) { /* set Japan filter bit for channel 14 */ tmp = ural_bbp_read(sc, 70); tmp &= ~RAL_JAPAN_FILTER; if (chan == 14) tmp |= RAL_JAPAN_FILTER; ural_bbp_write(sc, 70, tmp); /* clear CRC errors */ ural_read(sc, RAL_STA_CSR0); DELAY(10000); ural_disable_rf_tune(sc); DPRINTFN(2, ("disabling RF autotune - ENABLED\n")); } /* update basic rate set */ if (IEEE80211_IS_CHAN_B(c)) { /* 11b basic rates: 1, 2Mbps */ ural_write(sc, RAL_TXRX_CSR11, 0x3); } else if (IEEE80211_IS_CHAN_A(c)) { /* 11a basic rates: 6, 12, 24Mbps */ ural_write(sc, RAL_TXRX_CSR11, 0x150); } else { /* 11g basic rates: 1, 2, 5.5, 11, 6, 12, 24Mbps */ ural_write(sc, RAL_TXRX_CSR11, 0x15f); } } /* * Disable RF auto-tuning. */ static void ural_disable_rf_tune(struct ural_softc *sc) { uint32_t tmp; DPRINTFN(2, ("Count down to the crash RFTUNEa\n")); if (sc->rf_rev != RAL_RF_2523) { tmp = sc->rf_regs[RAL_RF1] & ~RAL_RF1_AUTOTUNE; ural_rf_write(sc, RAL_RF1, tmp); DPRINTFN(2, ("Count down to the crash RFTUNEb\n")); } DPRINTFN(2, ("Count down to the crash RFTUNEc\n")); tmp = sc->rf_regs[RAL_RF3] & ~RAL_RF3_AUTOTUNE; ural_rf_write(sc, RAL_RF3, tmp); DPRINTFN(2, ("disabling RF autotune\n")); } /* * Refer to IEEE Std 802.11-1999 pp. 123 for more information on TSF * synchronization. */ static void ural_enable_tsf_sync(struct ural_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; uint16_t logcwmin, preload, tmp; /* first, disable TSF synchronization */ ural_write(sc, RAL_TXRX_CSR19, 0); tmp = (16 * ic->ic_bss->ni_intval) << 4; ural_write(sc, RAL_TXRX_CSR18, tmp); logcwmin = (ic->ic_opmode == IEEE80211_M_IBSS) ? 2 : 0; preload = (ic->ic_opmode == IEEE80211_M_IBSS) ? 320 : 6; tmp = logcwmin << 12 | preload; ural_write(sc, RAL_TXRX_CSR20, tmp); /* finally, enable TSF synchronization */ tmp = RAL_ENABLE_TSF | RAL_ENABLE_TBCN; if (ic->ic_opmode == IEEE80211_M_STA) tmp |= RAL_ENABLE_TSF_SYNC(1); else tmp |= RAL_ENABLE_TSF_SYNC(2) | RAL_ENABLE_BEACON_GENERATOR; ural_write(sc, RAL_TXRX_CSR19, tmp); DPRINTF(("enabling TSF synchronization\n")); } static void ural_update_slot(struct ifnet *ifp) { struct ural_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; uint16_t slottime, sifs, eifs; slottime = (ic->ic_flags & IEEE80211_F_SHSLOT) ? 9 : 20; /* * These settings may sound a bit inconsistent but this is what the * reference driver does. */ if (ic->ic_curmode == IEEE80211_MODE_11B) { sifs = 16 - RAL_RXTX_TURNAROUND; eifs = 364; } else { sifs = 10 - RAL_RXTX_TURNAROUND; eifs = 64; } ural_write(sc, RAL_MAC_CSR10, slottime); ural_write(sc, RAL_MAC_CSR11, sifs); ural_write(sc, RAL_MAC_CSR12, eifs); } static void ural_set_txpreamble(struct ural_softc *sc) { uint16_t tmp; tmp = ural_read(sc, RAL_TXRX_CSR10); tmp &= ~RAL_SHORT_PREAMBLE; if (sc->sc_ic.ic_flags & IEEE80211_F_SHPREAMBLE) tmp |= RAL_SHORT_PREAMBLE; ural_write(sc, RAL_TXRX_CSR10, tmp); } static void ural_set_basicrates(struct ural_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; /* update basic rate set */ if (ic->ic_curmode == IEEE80211_MODE_11B) { /* 11b basic rates: 1, 2Mbps */ ural_write(sc, RAL_TXRX_CSR11, 0x3); } else if (IEEE80211_IS_CHAN_5GHZ(ic->ic_bss->ni_chan)) { /* 11a basic rates: 6, 12, 24Mbps */ ural_write(sc, RAL_TXRX_CSR11, 0x150); } else { /* 11g basic rates: 1, 2, 5.5, 11, 6, 12, 24Mbps */ ural_write(sc, RAL_TXRX_CSR11, 0x15f); } } static void ural_set_bssid(struct ural_softc *sc, const uint8_t *bssid) { uint16_t tmp; tmp = bssid[0] | bssid[1] << 8; ural_write(sc, RAL_MAC_CSR5, tmp); tmp = bssid[2] | bssid[3] << 8; ural_write(sc, RAL_MAC_CSR6, tmp); tmp = bssid[4] | bssid[5] << 8; ural_write(sc, RAL_MAC_CSR7, tmp); DPRINTF(("setting BSSID to %6D\n", bssid, ":")); } static void ural_set_macaddr(struct ural_softc *sc, uint8_t *addr) { uint16_t tmp; tmp = addr[0] | addr[1] << 8; ural_write(sc, RAL_MAC_CSR2, tmp); tmp = addr[2] | addr[3] << 8; ural_write(sc, RAL_MAC_CSR3, tmp); tmp = addr[4] | addr[5] << 8; ural_write(sc, RAL_MAC_CSR4, tmp); DPRINTF(("setting MAC address to %6D\n", addr, ":")); } static void ural_update_promisc(struct ural_softc *sc) { struct ifnet *ifp = sc->sc_ic.ic_ifp; uint32_t tmp; tmp = ural_read(sc, RAL_TXRX_CSR2); tmp &= ~RAL_DROP_NOT_TO_ME; if (!(ifp->if_flags & IFF_PROMISC)) tmp |= RAL_DROP_NOT_TO_ME; ural_write(sc, RAL_TXRX_CSR2, tmp); DPRINTF(("%s promiscuous mode\n", (ifp->if_flags & IFF_PROMISC) ? "entering" : "leaving")); } static const char * ural_get_rf(int rev) { switch (rev) { case RAL_RF_2522: return "RT2522"; case RAL_RF_2523: return "RT2523"; case RAL_RF_2524: return "RT2524"; case RAL_RF_2525: return "RT2525"; case RAL_RF_2525E: return "RT2525e"; case RAL_RF_2526: return "RT2526"; case RAL_RF_5222: return "RT5222"; default: return "unknown"; } } static void ural_read_eeprom(struct ural_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; uint16_t val; ural_eeprom_read(sc, RAL_EEPROM_CONFIG0, &val, 2); val = le16toh(val); sc->rf_rev = (val >> 11) & 0x7; sc->hw_radio = (val >> 10) & 0x1; sc->led_mode = (val >> 6) & 0x7; sc->rx_ant = (val >> 4) & 0x3; sc->tx_ant = (val >> 2) & 0x3; sc->nb_ant = val & 0x3; /* read MAC address */ ural_eeprom_read(sc, RAL_EEPROM_ADDRESS, ic->ic_myaddr, 6); /* read default values for BBP registers */ ural_eeprom_read(sc, RAL_EEPROM_BBP_BASE, sc->bbp_prom, 2 * 16); /* read Tx power for all b/g channels */ ural_eeprom_read(sc, RAL_EEPROM_TXPOWER, sc->txpow, 14); } static int ural_bbp_init(struct ural_softc *sc) { #define N(a) (sizeof (a) / sizeof ((a)[0])) int i, ntries; /* wait for BBP to be ready */ for (ntries = 0; ntries < 100; ntries++) { if (ural_bbp_read(sc, RAL_BBP_VERSION) != 0) break; DELAY(1000); } if (ntries == 100) { device_printf(sc->sc_dev, "timeout waiting for BBP\n"); return EIO; } /* initialize BBP registers to default values */ for (i = 0; i < N(ural_def_bbp); i++) ural_bbp_write(sc, ural_def_bbp[i].reg, ural_def_bbp[i].val); #if 0 /* initialize BBP registers to values stored in EEPROM */ for (i = 0; i < 16; i++) { if (sc->bbp_prom[i].reg == 0xff) continue; ural_bbp_write(sc, sc->bbp_prom[i].reg, sc->bbp_prom[i].val); } #endif return 0; #undef N } static void ural_set_txantenna(struct ural_softc *sc, int antenna) { uint16_t tmp; uint8_t tx; tx = ural_bbp_read(sc, RAL_BBP_TX) & ~RAL_BBP_ANTMASK; if (antenna == 1) tx |= RAL_BBP_ANTA; else if (antenna == 2) tx |= RAL_BBP_ANTB; else tx |= RAL_BBP_DIVERSITY; /* need to force I/Q flip for RF 2525e, 2526 and 5222 */ if (sc->rf_rev == RAL_RF_2525E || sc->rf_rev == RAL_RF_2526 || sc->rf_rev == RAL_RF_5222) tx |= RAL_BBP_FLIPIQ; ural_bbp_write(sc, RAL_BBP_TX, tx); /* update values in PHY_CSR5 and PHY_CSR6 */ tmp = ural_read(sc, RAL_PHY_CSR5) & ~0x7; ural_write(sc, RAL_PHY_CSR5, tmp | (tx & 0x7)); tmp = ural_read(sc, RAL_PHY_CSR6) & ~0x7; ural_write(sc, RAL_PHY_CSR6, tmp | (tx & 0x7)); } static void ural_set_rxantenna(struct ural_softc *sc, int antenna) { uint8_t rx; rx = ural_bbp_read(sc, RAL_BBP_RX) & ~RAL_BBP_ANTMASK; if (antenna == 1) rx |= RAL_BBP_ANTA; else if (antenna == 2) rx |= RAL_BBP_ANTB; else rx |= RAL_BBP_DIVERSITY; /* need to force no I/Q flip for RF 2525e and 2526 */ if (sc->rf_rev == RAL_RF_2525E || sc->rf_rev == RAL_RF_2526) rx &= ~RAL_BBP_FLIPIQ; ural_bbp_write(sc, RAL_BBP_RX, rx); } static void ural_init(void *priv) { #define N(a) (sizeof (a) / sizeof ((a)[0])) struct ural_softc *sc = priv; struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = ic->ic_ifp; struct ural_rx_data *data; uint16_t tmp; usbd_status error; int i, ntries; ural_set_testmode(sc); ural_write(sc, 0x308, 0x00f0); /* XXX magic */ ural_stop(sc); /* initialize MAC registers to default values */ for (i = 0; i < N(ural_def_mac); i++) ural_write(sc, ural_def_mac[i].reg, ural_def_mac[i].val); /* wait for BBP and RF to wake up (this can take a long time!) */ for (ntries = 0; ntries < 100; ntries++) { tmp = ural_read(sc, RAL_MAC_CSR17); if ((tmp & (RAL_BBP_AWAKE | RAL_RF_AWAKE)) == (RAL_BBP_AWAKE | RAL_RF_AWAKE)) break; DELAY(1000); } if (ntries == 100) { printf("%s: timeout waiting for BBP/RF to wakeup\n", device_get_nameunit(sc->sc_dev)); goto fail; } /* we're ready! */ ural_write(sc, RAL_MAC_CSR1, RAL_HOST_READY); /* set basic rate set (will be updated later) */ ural_write(sc, RAL_TXRX_CSR11, 0x15f); if (ural_bbp_init(sc) != 0) goto fail; ural_set_chan(sc, ic->ic_curchan); /* clear statistic registers (STA_CSR0 to STA_CSR10) */ ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof sc->sta); ural_set_txantenna(sc, sc->tx_ant); ural_set_rxantenna(sc, sc->rx_ant); IEEE80211_ADDR_COPY(ic->ic_myaddr, IF_LLADDR(ifp)); ural_set_macaddr(sc, ic->ic_myaddr); /* * Allocate xfer for AMRR statistics requests. */ sc->amrr_xfer = usbd_alloc_xfer(sc->sc_udev); if (sc->amrr_xfer == NULL) { printf("%s: could not allocate AMRR xfer\n", device_get_nameunit(sc->sc_dev)); goto fail; } /* * Open Tx and Rx USB bulk pipes. */ error = usbd_open_pipe(sc->sc_iface, sc->sc_tx_no, USBD_EXCLUSIVE_USE, &sc->sc_tx_pipeh); if (error != 0) { printf("%s: could not open Tx pipe: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); goto fail; } error = usbd_open_pipe(sc->sc_iface, sc->sc_rx_no, USBD_EXCLUSIVE_USE, &sc->sc_rx_pipeh); if (error != 0) { printf("%s: could not open Rx pipe: %s\n", device_get_nameunit(sc->sc_dev), usbd_errstr(error)); goto fail; } /* * Allocate Tx and Rx xfer queues. */ error = ural_alloc_tx_list(sc); if (error != 0) { printf("%s: could not allocate Tx list\n", device_get_nameunit(sc->sc_dev)); goto fail; } error = ural_alloc_rx_list(sc); if (error != 0) { printf("%s: could not allocate Rx list\n", device_get_nameunit(sc->sc_dev)); goto fail; } /* * Start up the receive pipe. */ for (i = 0; i < RAL_RX_LIST_COUNT; i++) { data = &sc->rx_data[i]; usbd_setup_xfer(data->xfer, sc->sc_rx_pipeh, data, data->buf, MCLBYTES, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, ural_rxeof); usbd_transfer(data->xfer); } /* kick Rx */ tmp = RAL_DROP_PHY | RAL_DROP_CRC; if (ic->ic_opmode != IEEE80211_M_MONITOR) { tmp |= RAL_DROP_CTL | RAL_DROP_BAD_VERSION; if (ic->ic_opmode != IEEE80211_M_HOSTAP) tmp |= RAL_DROP_TODS; if (!(ifp->if_flags & IFF_PROMISC)) tmp |= RAL_DROP_NOT_TO_ME; } ural_write(sc, RAL_TXRX_CSR2, tmp); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_drv_flags |= IFF_DRV_RUNNING; if (ic->ic_opmode != IEEE80211_M_MONITOR) { if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); } else ieee80211_new_state(ic, IEEE80211_S_RUN, -1); return; fail: ural_stop(sc); #undef N } static void ural_stop(void *priv) { struct ural_softc *sc = priv; struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = ic->ic_ifp; sc->sc_tx_timer = 0; ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); ieee80211_new_state(ic, IEEE80211_S_INIT, -1); /* disable Rx */ ural_write(sc, RAL_TXRX_CSR2, RAL_DISABLE_RX); /* reset ASIC and BBP (but won't reset MAC registers!) */ ural_write(sc, RAL_MAC_CSR1, RAL_RESET_ASIC | RAL_RESET_BBP); ural_write(sc, RAL_MAC_CSR1, 0); if (sc->amrr_xfer != NULL) { usbd_free_xfer(sc->amrr_xfer); sc->amrr_xfer = NULL; } if (sc->sc_rx_pipeh != NULL) { usbd_abort_pipe(sc->sc_rx_pipeh); usbd_close_pipe(sc->sc_rx_pipeh); sc->sc_rx_pipeh = NULL; } if (sc->sc_tx_pipeh != NULL) { usbd_abort_pipe(sc->sc_tx_pipeh); usbd_close_pipe(sc->sc_tx_pipeh); sc->sc_tx_pipeh = NULL; } ural_free_rx_list(sc); ural_free_tx_list(sc); } static int ural_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, const struct ieee80211_bpf_params *params) { struct ieee80211com *ic = ni->ni_ic; struct ifnet *ifp = ic->ic_ifp; struct ural_softc *sc = ifp->if_softc; /* prevent management frames from being sent if we're not ready */ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { m_freem(m); ieee80211_free_node(ni); return ENETDOWN; } if (sc->tx_queued >= RAL_TX_LIST_COUNT) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; m_freem(m); ieee80211_free_node(ni); return EIO; } if (bpf_peers_present(ic->ic_rawbpf)) bpf_mtap(ic->ic_rawbpf, m); ifp->if_opackets++; if (params == NULL) { /* * Legacy path; interpret frame contents to decide * precisely how to send the frame. */ if (ural_tx_mgt(sc, m, ni) != 0) goto bad; } else { /* * Caller supplied explicit parameters to use in * sending the frame. */ if (ural_tx_raw(sc, m, ni, params) != 0) goto bad; } sc->sc_tx_timer = 5; callout_reset(&sc->watchdog_ch, hz, ural_watchdog, sc); return 0; bad: ifp->if_oerrors++; ieee80211_free_node(ni); return EIO; /* XXX */ } static void ural_amrr_start(struct ural_softc *sc, struct ieee80211_node *ni) { int i; /* clear statistic registers (STA_CSR0 to STA_CSR10) */ ural_read_multi(sc, RAL_STA_CSR0, sc->sta, sizeof sc->sta); ieee80211_amrr_node_init(&sc->amrr, &sc->amn); /* set rate to some reasonable initial value */ for (i = ni->ni_rates.rs_nrates - 1; i > 0 && (ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL) > 72; i--); ni->ni_txrate = i; callout_reset(&sc->amrr_ch, hz, ural_amrr_timeout, sc); } static void ural_amrr_timeout(void *arg) { struct ural_softc *sc = (struct ural_softc *)arg; usb_device_request_t req; /* * Asynchronously read statistic registers (cleared by read). */ req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = RAL_READ_MULTI_MAC; USETW(req.wValue, 0); USETW(req.wIndex, RAL_STA_CSR0); USETW(req.wLength, sizeof sc->sta); usbd_setup_default_xfer(sc->amrr_xfer, sc->sc_udev, sc, USBD_DEFAULT_TIMEOUT, &req, sc->sta, sizeof sc->sta, 0, ural_amrr_update); (void)usbd_transfer(sc->amrr_xfer); } static void ural_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct ural_softc *sc = (struct ural_softc *)priv; struct ifnet *ifp = sc->sc_ic.ic_ifp; if (status != USBD_NORMAL_COMPLETION) { device_printf(sc->sc_dev, "could not retrieve Tx statistics - " "cancelling automatic rate control\n"); return; } /* count TX retry-fail as Tx errors */ ifp->if_oerrors += sc->sta[9]; sc->amn.amn_retrycnt = sc->sta[7] + /* TX one-retry ok count */ sc->sta[8] + /* TX more-retry ok count */ sc->sta[9]; /* TX retry-fail count */ sc->amn.amn_txcnt = sc->amn.amn_retrycnt + sc->sta[6]; /* TX no-retry ok count */ ieee80211_amrr_choose(&sc->amrr, sc->sc_ic.ic_bss, &sc->amn); callout_reset(&sc->amrr_ch, hz, ural_amrr_timeout, sc); } >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Apr 13 22:10:03 2009 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 44527106566C for ; Mon, 13 Apr 2009 22:10: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 32FF68FC17 for ; Mon, 13 Apr 2009 22:10: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.3/8.14.3) with ESMTP id n3DMA3CF083007 for ; Mon, 13 Apr 2009 22:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3DMA3QU083006; Mon, 13 Apr 2009 22:10:03 GMT (envelope-from gnats) Date: Mon, 13 Apr 2009 22:10:03 GMT Message-Id: <200904132210.n3DMA3QU083006@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Paul Webster Cc: Subject: RE: usb/133712 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Webster List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 22:10:03 -0000 The following reply was made to PR usb/133712; it has been noted by GNATS. From: Paul Webster To: bug-followup@FreeBSD.org, paul.g.webster@googlemail.com Cc: Subject: RE: usb/133712 Date: Mon, 13 Apr 2009 21:58:26 +0000 --000e0cd32c2c5df51b046776d0c9 Content-Type: multipart/alternative; boundary=000e0cd32c2c5df516046776d0c7 --000e0cd32c2c5df516046776d0c7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have created a diff that will negate the need for all the debug messages to fix the driver, on a second note im sorry if this gets posted twice im sure the first email/reply I wrote had the wrong subject.. --000e0cd32c2c5df516046776d0c7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have created a diff that will negate the need for all the debug messages to fix the driver, on a second note im sorry if this gets posted twice im sure the first email/reply I wrote had the wrong subject..
--000e0cd32c2c5df516046776d0c7-- --000e0cd32c2c5df51b046776d0c9 Content-Type: application/octet-stream; name="if_ural.diff" Content-Disposition: attachment; filename="if_ural.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fthrmjul0 LS0tIC91c3Ivc3JjL3N5cy9kZXYvdXNiL2lmX3VyYWwuYwkyMDA5LTA0LTEzIDIyOjQ3OjIxLjAw MDAwMDAwMCArMDAwMAorKysgL3Jvb3QvZmJzZG9sZC9zcmMvc3lzL2Rldi91c2IvaWZfdXJhbC5j CTIwMDctMDktMTcgMTk6MDc6MjQuMDAwMDAwMDAwICswMDAwCkBAIC0xOTM3LDExICsxOTM3LDYg QEAKIAlpZiAoc2MtPnJmX3JldiAhPSBSQUxfUkZfMjUyMykgewogCQl0bXAgPSBzYy0+cmZfcmVn c1tSQUxfUkYxXSAmIH5SQUxfUkYxX0FVVE9UVU5FOwogCQl1cmFsX3JmX3dyaXRlKHNjLCBSQUxf UkYxLCB0bXApOwotCQlpZiAoc2MtPnJmX3JldiA9PSBSQUxfUkZfMjUyNikgeyAKLQkJLyogVGhp cyBzdG9wcyBhIHJhY2UgZXZlbnQgZW5kaW5nIGluIGEga2VybmVsIHBhbmljIG9jY3VyaW5nIG9u IHNvbWUgYWRhcHRlcnMgKi8KLQkJCURQUklOVEZOKDIsICgiUkFMX1JGXzI1MjYgd29ya2Fyb3Vu ZDogQWRkaW5nIDAuMSBzZWNvbmQgZGVsYXkuXG4iKSk7Ci0JCQlERUxBWSgxMDAwMDApOyAKLQkJ fQogCX0KIAogCXRtcCA9IHNjLT5yZl9yZWdzW1JBTF9SRjNdICYgflJBTF9SRjNfQVVUT1RVTkU7 Cg== --000e0cd32c2c5df51b046776d0c9-- From owner-freebsd-usb@FreeBSD.ORG Mon Apr 13 23:10:03 2009 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 12BDD1065670 for ; Mon, 13 Apr 2009 23:10: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 F11038FC08 for ; Mon, 13 Apr 2009 23:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3DNA2AY063286 for ; Mon, 13 Apr 2009 23:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3DNA2YV063284; Mon, 13 Apr 2009 23:10:02 GMT (envelope-from gnats) Date: Mon, 13 Apr 2009 23:10:02 GMT Message-Id: <200904132310.n3DNA2YV063284@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Paul Webster Cc: Subject: Re: usb/133712 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Webster List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2009 23:10:03 -0000 The following reply was made to PR usb/133712; it has been noted by GNATS. From: Paul Webster To: bug-followup@FreeBSD.org, paul.g.webster@googlemail.com Cc: Subject: Re: usb/133712 Date: Mon, 13 Apr 2009 23:03:29 +0000 errr. no idea what happened there here it is in the body of the email: --- /usr/src/sys/dev/usb/if_ural.c 2009-04-13 22:47:21.000000000 +0000 +++ /root/fbsdold/src/sys/dev/usb/if_ural.c 2007-09-17 19:07:24.000000000 +0000 @@ -1937,11 +1937,6 @@ if (sc->rf_rev != RAL_RF_2523) { tmp = sc->rf_regs[RAL_RF1] & ~RAL_RF1_AUTOTUNE; ural_rf_write(sc, RAL_RF1, tmp); - if (sc->rf_rev == RAL_RF_2526) { - /* This stops a race event ending in a kernel panic occuring on some adapters */ - DPRINTFN(2, ("RAL_RF_2526 workaround: Adding 0.1 second delay.\n")); - DELAY(100000); - } } tmp = sc->rf_regs[RAL_RF3] & ~RAL_RF3_AUTOTUNE; From owner-freebsd-usb@FreeBSD.ORG Tue Apr 14 00:26:26 2009 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 A88371065813; Tue, 14 Apr 2009 00:26:26 +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 799DF8FC12; Tue, 14 Apr 2009 00:26:26 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3E0QQIu070956; Tue, 14 Apr 2009 00:26:26 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3E0QQPp070952; Tue, 14 Apr 2009 00:26:26 GMT (envelope-from linimon) Date: Tue, 14 Apr 2009 00:26:26 GMT Message-Id: <200904140026.n3E0QQPp070952@freefall.freebsd.org> To: paul.g.webster@googlemail.com, linimon@FreeBSD.org, gnats-admin@FreeBSD.org, freebsd-usb@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/133714: Re: usb/133712: 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, 14 Apr 2009 00:26:28 -0000 Old Synopsis: RE: 133712 New Synopsis: Re: usb/133712: State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Tue Apr 14 00:24:26 UTC 2009 State-Changed-Why: Misfiled followup to usb/133714; content migrated. Responsible-Changed-From-To: gnats-admin->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Tue Apr 14 00:24:26 UTC 2009 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=133714 From owner-freebsd-usb@FreeBSD.ORG Tue Apr 14 20:55:14 2009 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 0F6CD1065676 for ; Tue, 14 Apr 2009 20:55:14 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id 9A6E38FC22 for ; Tue, 14 Apr 2009 20:55:13 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.40,186,1238968800"; d="scan'208";a="213081033" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 14 Apr 2009 22:55:12 +0200 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id EB2971B07B9; Tue, 14 Apr 2009 22:55:11 +0200 (CEST) Date: Tue, 14 Apr 2009 22:55:11 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: Low perfomance when read from usb flash drive 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, 14 Apr 2009 20:55:14 -0000 i'm getting 10000+0 records in 10000+0 records out 655360000 bytes transferred in 54.169996 secs (12098210 bytes/sec) running r191076. alex From owner-freebsd-usb@FreeBSD.ORG Tue Apr 14 21:57:30 2009 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 4123E106568F for ; Tue, 14 Apr 2009 21:57:30 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.freebsd.org (Postfix) with ESMTP id 00B488FC21 for ; Tue, 14 Apr 2009 21:57:29 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with ESMTP id <0KI400HYU2BSE5D0@osl1smout1.broadpark.no> for freebsd-usb@freebsd.org; Tue, 14 Apr 2009 23:57:28 +0200 (CEST) Received: from kg-work2.kg4.no ([80.202.83.38]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0KI4009RX2BR08A0@osl1sminn1.broadpark.no> for freebsd-usb@freebsd.org; Tue, 14 Apr 2009 23:57:28 +0200 (CEST) Date: Tue, 14 Apr 2009 23:57:27 +0200 From: Torfinn Ingolfsen To: freebsd-usb@freebsd.org Message-id: <20090414235727.38d16ee1.torfinn.ingolfsen@broadpark.no> X-Mailer: Sylpheed 2.6.0 (GTK+ 2.16.0; i386-portbld-freebsd7.1) X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH Subject: usb thermometer - TEMPer - FreeBSD 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, 14 Apr 2009 21:57:30 -0000 Hello, I got a new usb gadget, a TEMPer[1]. According to info on the net, this thermometer is a I2C device hooked up to a usb serial chip[2, 3]. The usb-to-serial chip is a WinChipHead 340 / 341, so that should work with the uchcom[4] driver. There was discussion about MFC'in this driver to RELENG_7 in february last year[5], but it doesn't seem to have happened. I tried garbbing the uchcom driver files from cvsweb and compiling the driver on my RELENG_7, but that didn't work. RELENG_7 as in root@kg-work2# uname -a FreeBSD kg-work2.kg4.no 7.1-STABLE FreeBSD 7.1-STABLE #4: Sun Feb 8 20:56:08 CET 2009 root@kg-work2.kg4.no:/usr/obj/usr/src/sys/SX270 i386 Any hints on how I can get this gadget working on FreeBSD? References: 1) http://www.dealextreme.com/details.dx/sku.7003 2) http://err.no/personal/blog/tech/2008-07-22-10-17_kernel_patches_TEMPer_thermometer.html 3) http://tech.arantius.com/working-external-linux-thermometer 4) http://www.freebsd.org/cgi/man.cgi?query=uchcom&apropos=0&sektion=0&manpath=FreeBSD+8-current&format=html 5) http://markmail.org/message/4w324qx4usmnd4ic#query:uchcom+page:1+mid:ecwpudhls4jqpr5s+state:results -- Regards, Torfinn Ingolfsen From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 09:01:46 2009 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 4CCDC10656D5 for ; Thu, 16 Apr 2009 09:01:46 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id D71D78FC1B for ; Thu, 16 Apr 2009 09:01:45 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.40,197,1238968800"; d="scan'208";a="271328760" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 16 Apr 2009 11:01:44 +0200 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 6BCEC1B0763; Thu, 16 Apr 2009 11:01:44 +0200 (CEST) Date: Thu, 16 Apr 2009 11:01:43 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Suspend failed 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, 16 Apr 2009 09:01:47 -0000 hi there, i'm using the following commands to deactivate and activate my mouse: usbconfig -u 1 -a 3 power_off usbconfig -u 1 -a 3 power_on which works great. if i issue the commands shortly after another this is what happens: ums0: at uhub1, port 2, addr 3 (disconnected) ums0: on usbus1 ums0: 7 buttons and [XYZ] coordinates ID=0 however. if i wait for some time before re-activating the mouse it flashes twice and this is what dmesg says: ums0: at uhub1, port 2, addr 3 (disconnected) ums0: on usbus1 ums0: 7 buttons and [XYZ] coordinates ID=0 ums0: Suspend failed the "Suspend failed" warning however isn't causing any problems. the mouse attaches just fine. i'm running r191076 (-CURRENT/usb2). cheers. alex From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 10:55:31 2009 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 ACDC0106564A for ; Thu, 16 Apr 2009 10:55:31 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 42BB78FC14 for ; Thu, 16 Apr 2009 10:55:30 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=gd3adXt36KnuWW8HGZEA:9 a=Ko_i4HeF_Lkx0F_LxSoA:7 a=KfajOLwyBL1-010BoubVdaerY-EA:4 Received: from [81.191.55.181] (account mc467741@c2i.net HELO [10.36.2.183]) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1123888805; Thu, 16 Apr 2009 12:55:28 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 16 Apr 2009 12:58:00 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904161258.01528.hselasky@c2i.net> Cc: Alexander Best Subject: Re: Suspend failed 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, 16 Apr 2009 10:55:31 -0000 On Thursday 16 April 2009, Alexander Best wrote: > hi there, > > i'm using the following commands to deactivate and activate my mouse: > > usbconfig -u 1 -a 3 power_off > usbconfig -u 1 -a 3 power_on > > which works great. if i issue the commands shortly after another this is > what happens: > > ums0: at uhub1, port 2, addr 3 (disconnected) > ums0: on > usbus1 ums0: 7 buttons and [XYZ] coordinates ID=0 > > however. if i wait for some time before re-activating the mouse it flashes > twice and this is what dmesg says: > > ums0: at uhub1, port 2, addr 3 (disconnected) > ums0: on > usbus1 ums0: 7 buttons and [XYZ] coordinates ID=0 > ums0: Suspend failed > > the "Suspend failed" warning however isn't causing any problems. the mouse > attaches just fine. > > i'm running r191076 (-CURRENT/usb2). Try these patches: http://perforce.freebsd.org/chv.cgi?CH=160485 http://perforce.freebsd.org/chv.cgi?CH=160413 --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 11:02:14 2009 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 B6A8F1065672 for ; Thu, 16 Apr 2009 11:02:14 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4B07D8FC18 for ; Thu, 16 Apr 2009 11:02:13 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.40,198,1238968800"; d="scan'208";a="213158276" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 16 Apr 2009 13:02:12 +0200 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 6FCAD1B07B9; Thu, 16 Apr 2009 13:02:12 +0200 (CEST) Date: Thu, 16 Apr 2009 13:02:11 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: <200904161258.01528.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: Suspend failed 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, 16 Apr 2009 11:02:15 -0000 thx a bunch. i'll check out the patches and see if that makes the warning go away. cheers. alex Hans Petter Selasky schrieb am 2009-04-16: > On Thursday 16 April 2009, Alexander Best wrote: > > hi there, > > i'm using the following commands to deactivate and activate my > > mouse: > > usbconfig -u 1 -a 3 power_off > > usbconfig -u 1 -a 3 power_on > > which works great. if i issue the commands shortly after another > > this is > > what happens: > > ums0: at uhub1, port 2, addr 3 (disconnected) > > ums0: > 3> on > > usbus1 ums0: 7 buttons and [XYZ] coordinates ID=0 > > however. if i wait for some time before re-activating the mouse it > > flashes > > twice and this is what dmesg says: > > ums0: at uhub1, port 2, addr 3 (disconnected) > > ums0: > 3> on > > usbus1 ums0: 7 buttons and [XYZ] coordinates ID=0 > > ums0: Suspend failed > > the "Suspend failed" warning however isn't causing any problems. > > the mouse > > attaches just fine. > > i'm running r191076 (-CURRENT/usb2). > Try these patches: > http://perforce.freebsd.org/chv.cgi?CH=160485 > http://perforce.freebsd.org/chv.cgi?CH=160413 > --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 11:27:18 2009 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 746421065675 for ; Thu, 16 Apr 2009 11:27:18 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 0C2298FC1C for ; Thu, 16 Apr 2009 11:27:17 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=5_QDJ_Oqmqii47fqRS0A:9 a=g8RTgb_SefYY4KoMSEoA:7 a=CXeGakrRmblRAiZ8oabce19a_fEA:4 Received: from [81.191.55.181] (account mc467741@c2i.net HELO [10.36.2.183]) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1226116500; Thu, 16 Apr 2009 13:27:16 +0200 From: Hans Petter Selasky To: Alexander Best Date: Thu, 16 Apr 2009 13:29:49 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904161329.50108.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Suspend failed 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, 16 Apr 2009 11:27:18 -0000 On Thursday 16 April 2009, Alexander Best wrote: > thx a bunch. i'll check out the patches and see if that makes the warning > go away. > And this one. http://perforce.freebsd.org/chv.cgi?CH=160614 > > > > Try these patches: > > > > http://perforce.freebsd.org/chv.cgi?CH=160485 > > http://perforce.freebsd.org/chv.cgi?CH=160413 > > > > --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 12:09:36 2009 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 9BC82106571A for ; Thu, 16 Apr 2009 12:09:36 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id 24CA48FC17 for ; Thu, 16 Apr 2009 12:09:35 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.40,198,1238968800"; d="scan'208";a="213162090" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 16 Apr 2009 14:09:35 +0200 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 071311B0763; Thu, 16 Apr 2009 14:09:34 +0200 (CEST) Date: Thu, 16 Apr 2009 14:09:34 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: <200904161329.50108.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: Suspend failed 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, 16 Apr 2009 12:09:43 -0000 thanks. i'm compiling the kernel right now with all the patches in place. i had to get the following files from p4, because they don't seem to exist in -CURRENT: //depot/projects/usb/src/sys/dev/usb/usb_sw_transfer.c //depot/projects/usb/src/sys/dev/usb/usb_sw_transfer.h alex Hans Petter Selasky schrieb am 2009-04-16: > On Thursday 16 April 2009, Alexander Best wrote: > > thx a bunch. i'll check out the patches and see if that makes the > > warning > > go away. > And this one. > http://perforce.freebsd.org/chv.cgi?CH=160614 > > > Try these patches: > > > http://perforce.freebsd.org/chv.cgi?CH=160485 > > > http://perforce.freebsd.org/chv.cgi?CH=160413 > > > --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 12:54:13 2009 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 41807106567D; Thu, 16 Apr 2009 12:54:13 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 160498FC0C; Thu, 16 Apr 2009 12:54:13 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (gavin@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3GCsC8g076992; Thu, 16 Apr 2009 12:54:12 GMT (envelope-from gavin@freefall.freebsd.org) Received: (from gavin@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3GCsCuU076988; Thu, 16 Apr 2009 12:54:12 GMT (envelope-from gavin) Date: Thu, 16 Apr 2009 12:54:12 GMT Message-Id: <200904161254.n3GCsCuU076988@freefall.freebsd.org> To: gavin@FreeBSD.org, freebsd-alpha@FreeBSD.org, freebsd-usb@FreeBSD.org From: gavin@FreeBSD.org Cc: Subject: Re: usb/127248: [ucom] panic while uplcom devices attaach and detach 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, 16 Apr 2009 12:54:14 -0000 Old Synopsis: System crashes when many (7) serial port terminals (vt320-vt510) connected to the server via com to usb adapter and 2-usb hubs. New Synopsis: [ucom] panic while uplcom devices attaach and detach Responsible-Changed-From-To: freebsd-alpha->freebsd-usb Responsible-Changed-By: gavin Responsible-Changed-When: Thu Apr 16 12:49:29 UTC 2009 Responsible-Changed-Why: I suspect this isn't Alpha-specific. http://www.freebsd.org/cgi/query-pr.cgi?pr=127248 From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 17:20:07 2009 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 01AF81065672 for ; Thu, 16 Apr 2009 17:20:07 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id 8B35F8FC0C for ; Thu, 16 Apr 2009 17:20:06 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.40,199,1238968800"; d="scan'208";a="213177439" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 16 Apr 2009 19:20:04 +0200 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 9257B1B07B9; Thu, 16 Apr 2009 19:20:04 +0200 (CEST) Date: Thu, 16 Apr 2009 19:20:04 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: <200904161329.50108.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: Suspend failed 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, 16 Apr 2009 17:20:07 -0000 after recompiling the kernel the warning disappeared. :-) however there still seems to be a difference between turning the power off and on again shortly after another and waiting some time before turning the power on again. my mouse comes with a blue LED. when i do power_off the light goes out. when i do power_on directly afterwards the LED goes on. if i wait for an hour or so before doing power_on the LED goes on, then off again and then on again. cheers. alex Hans Petter Selasky schrieb am 2009-04-16: > On Thursday 16 April 2009, Alexander Best wrote: > > thx a bunch. i'll check out the patches and see if that makes the > > warning > > go away. > And this one. > http://perforce.freebsd.org/chv.cgi?CH=160614 > > > Try these patches: > > > http://perforce.freebsd.org/chv.cgi?CH=160485 > > > http://perforce.freebsd.org/chv.cgi?CH=160413 > > > --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 17:52:11 2009 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 B7DC5106566B for ; Thu, 16 Apr 2009 17:52:11 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id EA7828FC0A for ; Thu, 16 Apr 2009 17:52:09 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.40,199,1238968800"; d="scan'208";a="271356970" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 16 Apr 2009 19:52:08 +0200 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id 2D1741B0763; Thu, 16 Apr 2009 19:52:08 +0200 (CEST) Date: Thu, 16 Apr 2009 19:52:07 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: <200904161329.50108.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: Suspend failed 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, 16 Apr 2009 17:52:12 -0000 i set hw.usb2.debug=15. this is the output when i power the mouse directly on again: Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: ums0: 7 buttons and [XYZ] coordinates ID=0 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:39:11 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:39:11 moshnroll kernel: usb2_probe_and_attach:1225: end of interfaces at 1 Apr 16 21:39:11 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:39:11 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc8c2a8b0 (enter) Apr 16 21:39:11 moshnroll kernel: usb2_callback_wrapper:1893: case 1-4 Apr 16 21:39:11 moshnroll kernel: usb2_start_hardware:1363: xfer=0xc8c2a8b0, pipe=0xc8799c40, nframes=1, dir=read Apr 16 21:39:11 moshnroll kernel: usb2_dump_pipe: pipe=0xc8799c40 edesc=0xc8715c9b isoc_next=0 toggle_next=0 bEndpointAddress=0x81 Apr 16 21:39:11 moshnroll kernel: usb2_dump_queue: pipe=0xc8799c40 xfer: Apr 16 21:39:11 moshnroll kernel: usb2_start_hardware:1382: open Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc8c2a8b0 (enter) Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2514: cb 0xc8c2a8b0 (leave) Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc8c2a8b0 (enter) Apr 16 21:39:11 moshnroll kernel: usb2_pipe_enter:1539: enter Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc8c2a8b0 (enter) Apr 16 21:39:11 moshnroll kernel: usb2_pipe_start:2267: start Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2514: cb 0xc8c2a8b0 (leave) Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2514: cb 0 (leave) Apr 16 21:39:11 moshnroll kernel: usb2_command_wrapper:2514: cb 0 (leave) Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8e000 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8e000 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d000 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d000 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8cc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8cc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:39:12 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 this is the output when i wait for > 1 minute before powering the mouse on again: Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: ums0: 7 buttons and [XYZ] coordinates ID=0 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 0,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 1,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 2,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 3,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 4,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 5,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 6,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 7,1,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 8,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:199: Using last usage Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 16,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 24,8,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 32,16,1 Apr 16 21:48:46 moshnroll kernel: hid_get_item:210: 48,16,1 Apr 16 21:48:46 moshnroll kernel: usb2_probe_and_attach:1225: end of interfaces at 1 Apr 16 21:48:46 moshnroll kernel: usb2_suspend_resume:1327: udev=0xc7d9dc00 do_suspend=0 Apr 16 21:48:46 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d9dc00 bmRequestType=0x00 bRequest=0x01 wValue=0x0001 wIndex=0x0000 wLength=0x0000 Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc7e3a0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_callback_wrapper:1893: case 1-4 Apr 16 21:48:46 moshnroll kernel: usb2_do_request_callback:75: st=0 Apr 16 21:48:46 moshnroll kernel: usb2_start_hardware:1363: xfer=0xc7e3a0b0, pipe=0xc7d9dc78, nframes=1, dir=read Apr 16 21:48:46 moshnroll kernel: usb2_dump_pipe: pipe=0xc7d9dc78 edesc=0xc7d9df25 isoc_next=0 toggle_next=0 bEndpointAddress=0x00 Apr 16 21:48:46 moshnroll kernel: usb2_dump_queue: pipe=0xc7d9dc78 xfer: Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc7e3a0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0xc7e3a0b0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc7e3a0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_pipe_enter:1539: enter Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc7e3a0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_pipe_start:2267: start Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0xc7e3a0b0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_transfer_done:2048: err=USB_ERR_NORMAL_COMPLETION Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc7e3a0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_callback_wrapper:1893: case 1-4 Apr 16 21:48:46 moshnroll kernel: usb2_callback_wrapper_sub:2401: xfer=0xc7e3a0b0 pipe=0xc7d9dc78 sts=0 alen=8, slen=8, afrm=1, nfrm=1 Apr 16 21:48:46 moshnroll kernel: usb2_do_request_callback:75: st=1 Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:48:46 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:48:46 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:48:46 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8dc00 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc874c0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_callback_wrapper:1893: case 1-4 Apr 16 21:48:46 moshnroll kernel: usb2_start_hardware:1363: xfer=0xc874c0b0, pipe=0xc8715480, nframes=1, dir=read Apr 16 21:48:46 moshnroll kernel: usb2_dump_pipe: pipe=0xc8715480 edesc=0xc8decd5b isoc_next=0 toggle_next=0 bEndpointAddress=0x81 Apr 16 21:48:46 moshnroll kernel: usb2_dump_queue: pipe=0xc8715480 xfer: Apr 16 21:48:46 moshnroll kernel: usb2_start_hardware:1382: open Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc874c0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0xc874c0b0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc874c0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_pipe_enter:1539: enter Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2512: cb 0xc874c0b0 (enter) Apr 16 21:48:46 moshnroll kernel: usb2_pipe_start:2267: start Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0xc874c0b0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0 (leave) Apr 16 21:48:46 moshnroll kernel: usb2_command_wrapper:2514: cb 0 (leave) Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0003 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0004 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0005 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8d400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0006 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0002 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0003 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0004 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0005 wLength=0x0004 Apr 16 21:48:47 moshnroll kernel: usb2_do_request_flags:259: udev=0xc7d8c400 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0006 wLength=0x0004 when i set hw.usb2.ums.debug: 15 the output doesn't differ. cheers. alex Hans Petter Selasky schrieb am 2009-04-16: > On Thursday 16 April 2009, Alexander Best wrote: > > thx a bunch. i'll check out the patches and see if that makes the > > warning > > go away. > And this one. > http://perforce.freebsd.org/chv.cgi?CH=160614 > > > Try these patches: > > > http://perforce.freebsd.org/chv.cgi?CH=160485 > > > http://perforce.freebsd.org/chv.cgi?CH=160413 > > > --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 18:34:09 2009 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 69D7E1065672 for ; Thu, 16 Apr 2009 18:34:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swip.net [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 0087E8FC13 for ; Thu, 16 Apr 2009 18:34:08 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6fqitYoBBIFjsZXnPZgA:9 a=-S0oMOuZq_nGEMd_O--8rLJm2RQA:4 Received: from [81.191.55.181] (account mc467741@c2i.net HELO [10.36.2.183]) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1054022556; Thu, 16 Apr 2009 20:34:07 +0200 From: Hans Petter Selasky To: Alexander Best Date: Thu, 16 Apr 2009 20:36:39 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904162036.39918.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Suspend failed 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, 16 Apr 2009 18:34:09 -0000 On Thursday 16 April 2009, Alexander Best wrote: > i set hw.usb2.debug=15. this is the output when i power the mouse directly If you suspend too long, then it will be the same like a detach. I think that's the way of design. That's the problem, right? Else the mouse is working fine after power on? --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Apr 16 19:47:53 2009 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 3129D106566C for ; Thu, 16 Apr 2009 19:47:53 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id BA4D78FC1C for ; Thu, 16 Apr 2009 19:47:51 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.40,200,1238968800"; d="scan'208";a="271362069" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER05.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 16 Apr 2009 21:47:51 +0200 Received: by ZIVMAILUSER05.UNI-MUENSTER.DE (Postfix, from userid 149459) id 0CA661B07E2; Thu, 16 Apr 2009 21:47:51 +0200 (CEST) Date: Thu, 16 Apr 2009 21:47:50 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: In-Reply-To: <200904162036.39918.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Re: Suspend failed 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, 16 Apr 2009 19:47:54 -0000 there's no actual problem. if i turn the mouse off using power_off and turn it on again with power_on the mouse works no matter how long i wait between issuing the two commands. i was just wondering why the LED when i do power_on simply goes on again if i issue the command < 1 minute after doing power_off. but if i do power_on after > 1 minute the LED flashes twice. cheers. alex Hans Petter Selasky schrieb am 2009-04-16: > On Thursday 16 April 2009, Alexander Best wrote: > > i set hw.usb2.debug=15. this is the output when i power the mouse > > directly > If you suspend too long, then it will be the same like a detach. I > think > that's the way of design. That's the problem, right? Else the mouse > is > working fine after power on? > --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Apr 17 13:16:26 2009 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 600BF10656BD for ; Fri, 17 Apr 2009 13:16:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id D22888FC1A for ; Fri, 17 Apr 2009 13:16:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPA id 240586393 for freebsd-usb@freebsd.org; Fri, 17 Apr 2009 15:16:24 +0300 Message-ID: <49E87317.2060103@FreeBSD.org> Date: Fri, 17 Apr 2009 15:16:23 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: freebsd-usb@freebsd.org X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Are usbhidctl/usbhidaction working? 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, 17 Apr 2009 13:16:27 -0000 Hi. I have tried to configure multimedia buttons of my Logitech/BTC keyboard on 8-CURRENT from March 26 and found that it is not working. Keyboard detected as: ugen0.2: at usbus0 ukbd0: on usbus0 kbd2 at ukbd0 kbd2: ukbd0, generic (0), config:0x0, flags:0x3d0000 uhid0: on usbus0 As I have found keyboard supports 3 reports: #1, #2 and #3, while tools only trying to use report #0 and fail. I have tried to hack tools to use report 2, which is most interesting for me, but I have found that data read from uhid device are preceded with 0x02 byte (I think it may be report id) which confuses usbhidaction. Here is some debug I have got from it after just stripping first byte to make it work: read 3 bytes: 02 02 00 2 Consumer:Volume_Decrement 1 0 echo 'Volume_Decrement' >>/qqq 1 system 'echo 'Volume_Decrement' >>/qqq' read 1 bytes: 00 read 3 bytes: 02 00 00 read 1 bytes: 00 read 3 bytes: 02 01 00 1 Consumer:Volume_Increment 1 0 echo 'Volume_Increment' >>/qqq 1 system 'echo 'Volume_Increment' >>/qqq' read 1 bytes: 00 read 3 bytes: 02 00 00 read 1 bytes: 00 So I have a questions: - Are these tools are working at least for somebody now? - Are these tools able to work with several report ids? - Am I right that 0x02 by preceded before report is report id and usbhidaction tool should parse/strip it? - Is it expected way to use uhid with libusd by reading /dev/uhidX device directly? -- Alexander Motin From owner-freebsd-usb@FreeBSD.ORG Fri Apr 17 14:06:17 2009 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 274AC1065670; Fri, 17 Apr 2009 14:06:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4EA8FC17; Fri, 17 Apr 2009 14:06:15 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=cw1_Smm5A_sA:10 a=2jvMbUmxBCYA:10 a=kvlIiVarORbUif6GpjEA:9 a=hedkvpdz3L_Hymbge_IA:7 a=gv_uKVzEcxwLW3HCaLUmP2ujTkcA:4 Received: from [81.191.55.181] (account mc467741@c2i.net HELO [10.36.2.183]) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1226880984; Fri, 17 Apr 2009 16:06:14 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Fri, 17 Apr 2009 16:08:45 +0200 User-Agent: KMail/1.9.7 References: <49E87317.2060103@FreeBSD.org> In-Reply-To: <49E87317.2060103@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904171608.46147.hselasky@c2i.net> Cc: Alexander Motin Subject: Re: Are usbhidctl/usbhidaction working? 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, 17 Apr 2009 14:06:17 -0000 On Friday 17 April 2009, Alexander Motin wrote: > Hi. > > I have tried to configure multimedia buttons of my Logitech/BTC keyboard > on 8-CURRENT from March 26 and found that it is not working. > > Keyboard detected as: > ugen0.2: at usbus0 > ukbd0: > on usbus0 > kbd2 at ukbd0 > kbd2: ukbd0, generic (0), config:0x0, flags:0x3d0000 > uhid0: > on usbus0 > > As I have found keyboard supports 3 reports: #1, #2 and #3, while tools > only trying to use report #0 and fail. > > I have tried to hack tools to use report 2, which is most interesting > for me, but I have found that data read from uhid device are preceded > with 0x02 byte (I think it may be report id) which confuses > usbhidaction. Here is some debug I have got from it after just stripping > first byte to make it work: > > read 3 bytes: 02 02 00 > 2 Consumer:Volume_Decrement 1 0 echo 'Volume_Decrement' >>/qqq 1 > system 'echo 'Volume_Decrement' >>/qqq' > read 1 bytes: 00 > read 3 bytes: 02 00 00 > read 1 bytes: 00 > read 3 bytes: 02 01 00 > 1 Consumer:Volume_Increment 1 0 echo 'Volume_Increment' >>/qqq 1 > system 'echo 'Volume_Increment' >>/qqq' > read 1 bytes: 00 > read 3 bytes: 02 00 00 > read 1 bytes: 00 > > So I have a questions: > - Are these tools are working at least for somebody now? > - Are these tools able to work with several report ids? Some answers: The uhid driver in the kernel is filtering all the descriptors from the interrupt endpoint. The uhid driver needs to be updated, maybe by an ioctl where you can get un-filtered messages. Else use libusb, which should be fairly trivial. Also the hid-descriptor parsing in the user-land hid library needs to get synched with the kernel version. I have no plans for that, hence I have my hands full. > - Am I right that 0x02 by preceded before report is report id and > usbhidaction tool should parse/strip it? > - Is it expected way to use uhid with libusd by reading /dev/uhidX > device directly? --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Apr 17 15:51:11 2009 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 3C2211065679; Fri, 17 Apr 2009 15:51:11 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 29AE68FC1E; Fri, 17 Apr 2009 15:51:11 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (gavin@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3HFpB3x063428; Fri, 17 Apr 2009 15:51:11 GMT (envelope-from gavin@freefall.freebsd.org) Received: (from gavin@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3HFpAeU063417; Fri, 17 Apr 2009 15:51:10 GMT (envelope-from gavin) Date: Fri, 17 Apr 2009 15:51:10 GMT Message-Id: <200904171551.n3HFpAeU063417@freefall.freebsd.org> To: paul.g.webster@googlemail.com, gavin@FreeBSD.org, freebsd-usb@FreeBSD.org, gavin@FreeBSD.org From: gavin@FreeBSD.org Cc: Subject: Re: usb/133712: [ural] [patch] RE: Fixed an issue with ural(4) that was creating kernel panics (trap 12) 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, 17 Apr 2009 15:51:11 -0000 Old Synopsis: RE: Fixed an issue with ural(4) that was creating kernel panics (trap 12) New Synopsis: [ural] [patch] RE: Fixed an issue with ural(4) that was creating kernel panics (trap 12) State-Changed-From-To: open->feedback State-Changed-By: gavin State-Changed-When: Fri Apr 17 15:48:03 UTC 2009 State-Changed-Why: To submitter: can you please show details of the panic itself? If you have compiled the debugger (DDB and KDB) into the kernel, the output of "bt" would be useful. Thanks! Responsible-Changed-From-To: freebsd-usb->gavin Responsible-Changed-By: gavin Responsible-Changed-When: Fri Apr 17 15:48:03 UTC 2009 Responsible-Changed-Why: Track http://www.freebsd.org/cgi/query-pr.cgi?pr=133712 From owner-freebsd-usb@FreeBSD.ORG Fri Apr 17 16:20:01 2009 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 CED381065746 for ; Fri, 17 Apr 2009 16:20:01 +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 AA5D48FC16 for ; Fri, 17 Apr 2009 16:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3HGK1II097423 for ; Fri, 17 Apr 2009 16:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3HGK1SE097422; Fri, 17 Apr 2009 16:20:01 GMT (envelope-from gnats) Resent-Date: Fri, 17 Apr 2009 16:20:01 GMT Resent-Message-Id: <200904171620.n3HGK1SE097422@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vladimir Usenko Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769381065687 for ; Fri, 17 Apr 2009 16:12:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 64CBC8FC1C for ; Fri, 17 Apr 2009 16:12:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3HGCbYn044945 for ; Fri, 17 Apr 2009 16:12:37 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n3HGCbbB044944; Fri, 17 Apr 2009 16:12:37 GMT (envelope-from nobody) Message-Id: <200904171612.n3HGCbbB044944@www.freebsd.org> Date: Fri, 17 Apr 2009 16:12:37 GMT From: Vladimir Usenko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/133817: broken umass 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, 17 Apr 2009 16:20:02 -0000 >Number: 133817 >Category: usb >Synopsis: broken umass >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 17 16:20:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Vladimir Usenko >Release: 7.1-STABLE >Organization: >Environment: FreeBSD phoenix.rootid.org 7.1-STABLE FreeBSD 7.1-STABLE #3: Tue Mar 17 00:42:57 EET 2009 root@phoenix.rootid.org:/usr/obj/usr/src/sys/phoenix i386 >Description: On the fresh update of HEAD if found next issue on during compile kernel: awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/linker_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/serdev_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/pci/agp_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/acpica/acpi_if.m -h rm -f .newdep make -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | MKDEP_CPP="cc -E" CC="cc" xargs mkdep -a -f .newdep -O2 -pipe -fno-strict-aliasing -std=c99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf -I/usr/src/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/gnu/fs/xfs/FreeBSD -I/usr/src/sys/gnu/fs/xfs/FreeBSD/support -I/usr/src/sys/gnu/fs/xfs -I/usr/src/sys/contrib/opensolaris/compat -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding /usr/src/sys/dev/usb/umass.c:121:21: error: usbdevs.h: No such file or directory mkdep: compile failed *** Error code 1 >How-To-Repeat: update to HEAD >Fix: root@phoenix:/usr/src#ls /usr/src/sys/dev/usb/|grep usbdevs usbdevs rename usbdevs to usbdevs.h Thank you. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Fri Apr 17 18:45:03 2009 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 432251065673; Fri, 17 Apr 2009 18:45:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id 755D98FC0C; Fri, 17 Apr 2009 18:45:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=_emBoT2WAAAA:8 a=tiLhCx4uT6L7MrGsmxkA:9 a=Snhi5KJqdMrwccS0HgQA:7 a=wTe_As29UL1G38eF3zb3fm-90V8A:4 Received: from [81.191.55.181] (account mc467741@c2i.net HELO [10.36.2.183]) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1225371441; Fri, 17 Apr 2009 20:45:00 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Fri, 17 Apr 2009 20:47:32 +0200 User-Agent: KMail/1.9.7 References: <200904171612.n3HGCbbB044944@www.freebsd.org> In-Reply-To: <200904171612.n3HGCbbB044944@www.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904172047.33159.hselasky@c2i.net> Cc: freebsd-gnats-submit@freebsd.org, Vladimir Usenko Subject: Re: usb/133817: broken umass 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, 17 Apr 2009 18:45:03 -0000 On Friday 17 April 2009, Vladimir Usenko wrote: > >Number: 133817 > >Category: usb > >Synopsis: broken umass > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: change-request > >Submitter-Id: current-users > >Arrival-Date: Fri Apr 17 16:20:01 UTC 2009 > >Closed-Date: > >Last-Modified: > >Originator: Vladimir Usenko > >Release: 7.1-STABLE > >Organization: > >Environment: > > FreeBSD phoenix.rootid.org 7.1-STABLE FreeBSD 7.1-STABLE #3: Tue Mar 17 > 00:42:57 EET 2009 root@phoenix.rootid.org:/usr/obj/usr/src/sys/phoenix > i386 > > >Description: > > On the fresh update of HEAD if found next issue on during compile kernel: > > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/linker_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/serdev_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/pci/agp_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/acpica/acpi_if.m > -h rm -f .newdep > make -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | MKDEP_CPP="cc -E" CC="cc" > xargs mkdep -a -f .newdep -O2 -pipe -fno-strict-aliasing -std=c99 -Wall > -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter > -I/usr/src/sys/contrib/pf -I/usr/src/sys/dev/ath > -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm > -I/usr/src/sys/dev/twa -I/usr/src/sys/gnu/fs/xfs/FreeBSD > -I/usr/src/sys/gnu/fs/xfs/FreeBSD/support -I/usr/src/sys/gnu/fs/xfs > -I/usr/src/sys/contrib/opensolaris/compat -D_KERNEL > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common > -finline-limit=8000 --param inline-unit-growth=100 --param > large-function-growth=1000 -mno-align-long-strings > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -mno-sse3 -ffreestanding /usr/src/sys/dev/usb/umass.c:121:21: error: > usbdevs.h: No such file or directory mkdep: compile failed > *** Error code 1 > > >How-To-Repeat: > > update to HEAD > > >Fix: > > root@phoenix:/usr/src#ls /usr/src/sys/dev/usb/|grep usbdevs > usbdevs > > rename usbdevs to usbdevs.h > > Thank you. > > >Release-Note: > >Audit-Trail: > >Unformatted: > Can you show the complete kernel config? --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Apr 17 18:50:04 2009 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 119D2106566C for ; Fri, 17 Apr 2009 18: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 DA8278FC0A for ; Fri, 17 Apr 2009 18: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.3/8.14.3) with ESMTP id n3HIo3SK015952 for ; Fri, 17 Apr 2009 18:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3HIo3Aq015951; Fri, 17 Apr 2009 18:50:03 GMT (envelope-from gnats) Date: Fri, 17 Apr 2009 18:50:03 GMT Message-Id: <200904171850.n3HIo3Aq015951@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/133817: broken umass X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 18:50:04 -0000 The following reply was made to PR usb/133817; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Vladimir Usenko , freebsd-gnats-submit@freebsd.org Subject: Re: usb/133817: broken umass Date: Fri, 17 Apr 2009 20:47:32 +0200 On Friday 17 April 2009, Vladimir Usenko wrote: > >Number: 133817 > >Category: usb > >Synopsis: broken umass > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: change-request > >Submitter-Id: current-users > >Arrival-Date: Fri Apr 17 16:20:01 UTC 2009 > >Closed-Date: > >Last-Modified: > >Originator: Vladimir Usenko > >Release: 7.1-STABLE > >Organization: > >Environment: > > FreeBSD phoenix.rootid.org 7.1-STABLE FreeBSD 7.1-STABLE #3: Tue Mar 17 > 00:42:57 EET 2009 root@phoenix.rootid.org:/usr/obj/usr/src/sys/phoenix > i386 > > >Description: > > On the fresh update of HEAD if found next issue on during compile kernel: > > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/linker_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/serdev_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/pci/agp_if.m -h > awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/acpica/acpi_if.m > -h rm -f .newdep > make -V CFILES -V SYSTEM_CFILES -V GEN_CFILES | MKDEP_CPP="cc -E" CC="cc" > xargs mkdep -a -f .newdep -O2 -pipe -fno-strict-aliasing -std=c99 -Wall > -Wredundant-decls -Wnested-externs -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef > -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter > -I/usr/src/sys/contrib/pf -I/usr/src/sys/dev/ath > -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/ngatm > -I/usr/src/sys/dev/twa -I/usr/src/sys/gnu/fs/xfs/FreeBSD > -I/usr/src/sys/gnu/fs/xfs/FreeBSD/support -I/usr/src/sys/gnu/fs/xfs > -I/usr/src/sys/contrib/opensolaris/compat -D_KERNEL > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common > -finline-limit=8000 --param inline-unit-growth=100 --param > large-function-growth=1000 -mno-align-long-strings > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -mno-sse3 -ffreestanding /usr/src/sys/dev/usb/umass.c:121:21: error: > usbdevs.h: No such file or directory mkdep: compile failed > *** Error code 1 > > >How-To-Repeat: > > update to HEAD > > >Fix: > > root@phoenix:/usr/src#ls /usr/src/sys/dev/usb/|grep usbdevs > usbdevs > > rename usbdevs to usbdevs.h > > Thank you. > > >Release-Note: > >Audit-Trail: > >Unformatted: > Can you show the complete kernel config? --HPS