From owner-freebsd-usb@FreeBSD.ORG Mon Sep 8 02:22:29 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F8F106566B for ; Mon, 8 Sep 2008 02:22:29 +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 B752A8FC29 for ; Mon, 8 Sep 2008 02:22:29 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m882MTo6006855 for ; Mon, 8 Sep 2008 02:22:29 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m882MT6Z006851 for freebsd-usb@FreeBSD.org; Mon, 8 Sep 2008 02:22:29 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 8 Sep 2008 02:22:29 GMT Message-Id: <200809080222.m882MT6Z006851@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, 08 Sep 2008 02:22:29 -0000 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 -------------------------------------------------------------------------------- o usb/126884 usb [patch] Bug in buffer handling in ugen.c f kern/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126845 usb [usb_quirks] Cyberpower UPS is attached as uhid instea o usb/126776 usb [umass/geom] confusing mixed output (but no panic!) af 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 [usb][ums] kernel panic during bootup while 'Logitech o usb/125510 usb repeated plug and unplug of USB mass storage devices l 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 Habu Mouse turns off in X o usb/125088 usb Touchpad not detected on Adesso AKB-430UG USB kbd/pad o usb/125072 usb [uplcom] [patch] add Mobile Action MA-620 Infrared Ada 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 panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124604 usb Wireless Mouse doesn't work o usb/123969 usb Supermicro H8SMi-2 usb problem o usb/123714 usb Panic when hald-storage-probe runs with umass device i o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb Panic on USB device insertion when usb loaded as a mod 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 Add Option GTMAX3.6/7.2 and Quallcomm MMC module devic o usb/123351 usb Add Reiner SCT cyberJack, Omnikey [26]020, Fujitsu Sie p usb/123211 usb [udav] if_udav driver doesn't support Davicom 9601 USB p usb/123148 usb [uscanner] [patch] Epson DX8400/50 needs uscanner to s o usb/122992 usb MotoROKR Z6 Phone not recognised by umass as USB disk. o usb/122956 usb Support for Novatel Wireless XU870 3G Card 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 Patch to provide dynamic additions to the usb quirks t o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122712 usb [usbdevs] [patch] Sony Vaio RF keyboard/mouse receiver o usb/122621 usb [patch] [request] New driver for Sierra Wireless 3G US p usb/122610 usb Add Verizon v740 support to ubsa(4) 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 [patch] uscanner does not attach to Epson RX620 printe 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 CardBus card removal causes reboot sometimes o 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 Kernel panic when forced umount of a dettached USB Har 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/120017 usb [ehci] [patch] CS5536 (AMD Geode) USB 2.0 quirk 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 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/119150 usb [usbdevs] [patch] new usbdevs for CDMA 1xEVDO devices 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/117546 usb [uftdi] [patch] Add MaxStream ZigBee product ID to uft o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117205 usb [uscanner] [patch] uscanner support for HP ScanJet 447 o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117185 usb [umodem] [patch] Add support for UNION interface descr o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/117075 usb [scsi_da] [patch] quirk: USB Samsung YP-U3 MP3 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 o 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 s usb/110991 usb [usbdevs] [patch] QUIRK: Super Top IDE DEVICE (depends o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um 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/107446 usb [umass] umass problems (usb and fw disks) 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 HP printer is not detected by kernel when ACPI ena 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] 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] [patch] [request] usbhidctl: add ability t 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 f usb/102096 usb [patch] usbd(8) does not handle multiple devices in on 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 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 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 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 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 a 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 o bin/57255 usb 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 conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 276 problems total. Bugs can be in one of several states: o - open A problem report has been submitted, no sanity checking performed. a - analyzed The problem is understood and a solution is being sought. f - feedback Further work requires additional information from the originator or the community - possibly confirmation of the effectiveness of a proposed solution. p - patched A patch has been committed, but some issues (MFC and / or confirmation from originator) are still open. r - repocopy The resolution of the problem report is dependent on a repocopy operation within the CVS repository which is awaiting completion. s - suspended The problem is not being worked on, due to lack of information or resources. This is a prime candidate for somebody who is looking for a project to do. If the problem cannot be solved at all, it will be closed, rather than suspended. c - closed A problem report is closed when any changes have been integrated, documented, and tested -- or when fixing the problem is abandoned. From owner-freebsd-usb@FreeBSD.ORG Mon Sep 8 20:45:51 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A7C7106567B; Mon, 8 Sep 2008 20:45:51 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 654488FC18; Mon, 8 Sep 2008 20:45:51 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from freefall.freebsd.org (remko@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m88Kjpq0044930; Mon, 8 Sep 2008 20:45:51 GMT (envelope-from remko@freefall.freebsd.org) Received: (from remko@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m88KjpNq044926; Mon, 8 Sep 2008 20:45:51 GMT (envelope-from remko) Date: Mon, 8 Sep 2008 20:45:51 GMT Message-Id: <200809082045.m88KjpNq044926@freefall.freebsd.org> To: remko@FreeBSD.org, freebsd-i386@FreeBSD.org, freebsd-usb@FreeBSD.org From: remko@FreeBSD.org Cc: Subject: Re: kern/127222: [ohci]: Regression in 7.0 usb storage generic driver 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, 08 Sep 2008 20:45:51 -0000 Old Synopsis: Regression in 7.0 usb storage generic driver New Synopsis: [ohci]: Regression in 7.0 usb storage generic driver Responsible-Changed-From-To: freebsd-i386->freebsd-usb Responsible-Changed-By: remko Responsible-Changed-When: Mon Sep 8 20:45:25 UTC 2008 Responsible-Changed-Why: This is something USB-ish http://www.freebsd.org/cgi/query-pr.cgi?pr=127222 From owner-freebsd-usb@FreeBSD.ORG Tue Sep 9 19:33:50 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50406106567B for ; Tue, 9 Sep 2008 19:33:50 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id F23D68FC08 for ; Tue, 9 Sep 2008 19:33:49 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.2/8.14.2) with ESMTP id m89JG5jF027707 for ; Tue, 9 Sep 2008 13:16:05 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.2/8.14.2/Submit) with ESMTP id m89JG4rT027704 for ; Tue, 9 Sep 2008 13:16:04 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Tue, 9 Sep 2008 13:16:04 -0600 (MDT) From: Warren Block To: usb@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (wonkity.com [127.0.0.1]); Tue, 09 Sep 2008 13:16:05 -0600 (MDT) Cc: Subject: usbhidaction with non-HID devices 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, 09 Sep 2008 19:33:50 -0000 My Epson scanner has one button. I'd like to have that button activate a program. usbhidaction(1) does that for uhid devices. Of course, the scanner is not a HID, and usbhidaction doesn't like non-HID devices: % usbhidaction -v -c usbhid.conf -f uscanner0 usbhidaction: hid_get_report_desc() failed: Operation not supported by device Is there an existing way to do this? If not, is it possible to modify usbhidaction or uscanner to support it? -Warren Block * Rapid City, South Dakota USA From owner-freebsd-usb@FreeBSD.ORG Tue Sep 9 20:00:43 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE1CE1065682; Tue, 9 Sep 2008 20:00:43 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C89368FC12; Tue, 9 Sep 2008 20:00:43 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from freefall.freebsd.org (remko@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m89K0hWm005793; Tue, 9 Sep 2008 20:00:43 GMT (envelope-from remko@freefall.freebsd.org) Received: (from remko@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m89K0hBf005789; Tue, 9 Sep 2008 20:00:43 GMT (envelope-from remko) Date: Tue, 9 Sep 2008 20:00:43 GMT Message-Id: <200809092000.m89K0hBf005789@freefall.freebsd.org> To: mlindgren@gmail.com, remko@FreeBSD.org, freebsd-usb@FreeBSD.org, remko@FreeBSD.org From: remko@FreeBSD.org Cc: Subject: Re: usb/126845: [usb_quirks] Cyberpower UPS is attached as uhid instead of ugen 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, 09 Sep 2008 20:00:44 -0000 Synopsis: [usb_quirks] Cyberpower UPS is attached as uhid instead of ugen State-Changed-From-To: open->patched State-Changed-By: remko State-Changed-When: Tue Sep 9 20:00:22 UTC 2008 State-Changed-Why: Patched in current Responsible-Changed-From-To: freebsd-usb->remko Responsible-Changed-By: remko Responsible-Changed-When: Tue Sep 9 20:00:22 UTC 2008 Responsible-Changed-Why: take over the ticket http://www.freebsd.org/cgi/query-pr.cgi?pr=126845 From owner-freebsd-usb@FreeBSD.ORG Tue Sep 9 23:14:54 2008 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 747331065676 for ; Tue, 9 Sep 2008 23:14:54 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4F38FC13 for ; Tue, 9 Sep 2008 23:14:54 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.2/8.14.2) with ESMTP id m89NErBD028560 for ; Tue, 9 Sep 2008 17:14:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.2/8.14.2/Submit) with ESMTP id m89NErNP028557 for ; Tue, 9 Sep 2008 17:14:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Tue, 9 Sep 2008 17:14:53 -0600 (MDT) From: Warren Block To: usb@freebsd.org In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (wonkity.com [127.0.0.1]); Tue, 09 Sep 2008 17:14:53 -0600 (MDT) Cc: Subject: Re: usbhidaction with non-HID devices 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, 09 Sep 2008 23:14:54 -0000 On Tue, 9 Sep 2008, Warren Block wrote: > My Epson scanner has one button. I'd like to have that button activate a > program. usbhidaction(1) does that for uhid devices. > > Of course, the scanner is not a HID, and usbhidaction doesn't like non-HID > devices: > > % usbhidaction -v -c usbhid.conf -f uscanner0 > usbhidaction: hid_get_report_desc() failed: Operation not supported by > device > > Is there an existing way to do this? Responding to my own post: /usr/ports/sysutils/scanbuttond can do this--if you use ugen instead of uscanner. It polls, but the port shows a clever way to set it up so devd starts scanbuttond when the scanner is turned on, and kills it when the scanner is turned off. All of this leads me to ask: Besides a known device name (uscanner), what does uscanner provide that ugen does not? -Warren Block * Rapid City, South Dakota USA From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 08:11:35 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD7351065676; Thu, 11 Sep 2008 08:11:35 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 2E3098FC22; Thu, 11 Sep 2008 08:11:34 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=3dBypTT4MX8A:10 a=FyBB3-7IvmoA:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=PLKaUx0NHm0iIjSv34UA:9 a=avy4jcLu0dMg-gKMBLBrV-n4OQoA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 21348764; Thu, 11 Sep 2008 10:11:32 +0200 From: Hans Petter Selasky To: Volker Date: Thu, 11 Sep 2008 10:13:22 +0200 User-Agent: KMail/1.9.7 References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48B0EA50.2090105@mawer.org> <48B3299F.5080101@vwsoft.com> In-Reply-To: <48B3299F.5080101@vwsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809111013.23994.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org, current@freebsd.org, Antony Mawer Subject: Re: "legacy" usb stack fixes (was: Re: HEADSUP new usb code coming in.) 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, 11 Sep 2008 08:11:35 -0000 On Monday 25 August 2008, Volker wrote: > > > Anyway, I've already had those crashes even with the "new" usb stack > (but it doesn't happen everytime - YMMV). > Hi, I also see crashes with my new stuff and the umass driver when the USB device is un-plugged too early. The backtraces I've got so far does not indicate a USB problem, though .... --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 10:51:07 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE2631065672; Thu, 11 Sep 2008 10:51:07 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 66E6C8FC19; Thu, 11 Sep 2008 10:51:07 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id DBC4A6D41A; Thu, 11 Sep 2008 12:33:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NPJakWZTD1bJ; Thu, 11 Sep 2008 12:33:43 +0200 (CEST) Received: by mx1.rink.nu (Postfix, from userid 1000) id 66CF96D42B; Thu, 11 Sep 2008 12:33:43 +0200 (CEST) Date: Thu, 11 Sep 2008 12:33:43 +0200 From: Rink Springer To: Hans Petter Selasky Message-ID: <20080911103343.GH1413@rink.nu> References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48B0EA50.2090105@mawer.org> <48B3299F.5080101@vwsoft.com> <200809111013.23994.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809111013.23994.hselasky@c2i.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Volker , current@freebsd.org, freebsd-usb@freebsd.org, Antony Mawer Subject: Re: "legacy" usb stack fixes (was: Re: HEADSUP new usb code coming in.) 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, 11 Sep 2008 10:51:07 -0000 On Thu, Sep 11, 2008 at 10:13:22AM +0200, Hans Petter Selasky wrote: > I also see crashes with my new stuff and the umass driver when the USB device > is un-plugged too early. The backtraces I've got so far does not indicate a > USB problem, though .... That is correct, this is a bug in CAM. More specifically, CAM does not handle the removal of busses well. There are two possible options: 1) Obviously, fix CAM to handle this scenarion DragonflyBSD seems to have a lot of fixes in this area, which I intend to take a look at 'some day' (no thanks to $reallife...) 2) Create a CAM bus per USB bus I think this is reasonable, and it makes a lot more sense than the one-bus-per-device approach that we have now. The idea is that every USB controller hub creates a CAM bus, and umass(4) attaches to this bus instead of creating its own. Of course, until CAM is fixed, detaching PCMCIA or equivalent USB cards will still cause panics, but it would be a lot better than it is now... Personally, I'd like to see option 2 implemented in the USB2 stack, as it avoids the issue and makes a lot more sense from user perspective (I'm probably onot the only one who gets scared by 'camcontrol devlist' if you have a single MP3 player which advertises 2 disks :-)) Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 14:24:22 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 194811065671; Thu, 11 Sep 2008 14:24:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id AEC4E8FC28; Thu, 11 Sep 2008 14:24:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m8BENaX2060103; Thu, 11 Sep 2008 08:23:36 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 11 Sep 2008 08:24:18 -0600 (MDT) Message-Id: <20080911.082418.775964060.imp@bsdimp.com> To: rink@freebsd.org From: "M. Warner Losh" In-Reply-To: <20080911103343.GH1413@rink.nu> References: <48B3299F.5080101@vwsoft.com> <200809111013.23994.hselasky@c2i.net> <20080911103343.GH1413@rink.nu> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: volker@vwsoft.com, fbsd-current@mawer.org, current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: "legacy" usb stack fixes 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, 11 Sep 2008 14:24:22 -0000 In message: <20080911103343.GH1413@rink.nu> Rink Springer writes: : On Thu, Sep 11, 2008 at 10:13:22AM +0200, Hans Petter Selasky wrote: : > I also see crashes with my new stuff and the umass driver when the USB device : > is un-plugged too early. The backtraces I've got so far does not indicate a : > USB problem, though .... : : That is correct, this is a bug in CAM. More specifically, CAM does not : handle the removal of busses well. There are two possible options: : : 1) Obviously, fix CAM to handle this scenarion : DragonflyBSD seems to have a lot of fixes in this area, which I : intend to take a look at 'some day' (no thanks to $reallife...) This is the better option. : 2) Create a CAM bus per USB bus : I think this is reasonable, and it makes a lot more sense than the : one-bus-per-device approach that we have now. The idea is that : every USB controller hub creates a CAM bus, and umass(4) attaches to : this bus instead of creating its own. Of course, until CAM is fixed, : detaching PCMCIA or equivalent USB cards will still cause panics, but : it would be a lot better than it is now... This would mitigate the problem, but there's a lot of people that use CardBus USB cards, and they complain to me from time to time of the problem. Fortunately, the wireless broadband cards that are a usb host controller plus usb device in CardBus format aren't affected... : Personally, I'd like to see option 2 implemented in the USB2 stack, as : it avoids the issue and makes a lot more sense from user perspective : (I'm probably onot the only one who gets scared by 'camcontrol devlist' : if you have a single MP3 player which advertises 2 disks :-)) It may make good sense for other reasons as well. Firewire does something similar, and also umass used to do exactly this. There's also problems right now with huge bus load leading to devices disconnecting and reconnecting for some suck-ass, but common, chipsets. If things were implemented this way, then there'd be options to silently reconnect the device when it goes away and comes back a few hundred milliseconds later... Firewire handles this case too, at the expense of never disconnecting the disk, which isn't so good for a thumb drive... Warner From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 16:38:15 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C5E106567B for ; Thu, 11 Sep 2008 16:38:15 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outT.internet-mail-service.net (outt.internet-mail-service.net [216.240.47.243]) by mx1.freebsd.org (Postfix) with ESMTP id 8B45C8FC1C for ; Thu, 11 Sep 2008 16:38:15 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 497502433; Thu, 11 Sep 2008 09:23:10 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 9C7922D603A; Thu, 11 Sep 2008 09:23:09 -0700 (PDT) Message-ID: <48C945EE.4070805@elischer.org> Date: Thu, 11 Sep 2008 09:23:10 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Rink Springer References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48B0EA50.2090105@mawer.org> <48B3299F.5080101@vwsoft.com> <200809111013.23994.hselasky@c2i.net> <20080911103343.GH1413@rink.nu> In-Reply-To: <20080911103343.GH1413@rink.nu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Volker , Antony Mawer , current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: "legacy" usb stack fixes 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, 11 Sep 2008 16:38:15 -0000 Rink Springer wrote: > On Thu, Sep 11, 2008 at 10:13:22AM +0200, Hans Petter Selasky wrote: >> I also see crashes with my new stuff and the umass driver when the USB device >> is un-plugged too early. The backtraces I've got so far does not indicate a >> USB problem, though .... > > That is correct, this is a bug in CAM. More specifically, CAM does not > handle the removal of busses well. There are two possible options: > > 1) Obviously, fix CAM to handle this scenarion > DragonflyBSD seems to have a lot of fixes in this area, which I > intend to take a look at 'some day' (no thanks to $reallife...) > > 2) Create a CAM bus per USB bus > I think this is reasonable, and it makes a lot more sense than the > one-bus-per-device approach that we have now. The idea is that > every USB controller hub creates a CAM bus, and umass(4) attaches to > this bus instead of creating its own. Of course, until CAM is fixed, > detaching PCMCIA or equivalent USB cards will still cause panics, but > it would be a lot better than it is now... > This is how it was originally. There was a reason that it was changed, so make sure you look into the history to figure out what the tradeoff was. > Personally, I'd like to see option 2 implemented in the USB2 stack, as > it avoids the issue and makes a lot more sense from user perspective > (I'm probably onot the only one who gets scared by 'camcontrol devlist' > if you have a single MP3 player which advertises 2 disks :-)) > > Regards, > From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 18:42:53 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C40ED106566B; Thu, 11 Sep 2008 18:42:53 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swipnet.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id CB3568FC22; Thu, 11 Sep 2008 18:42:52 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=Oy1DYfew5nZeFjP_vPEA:9 a=FqOpp-xSOPsjGo8MRkMA:7 a=pSd-cDr9dDQpHpamyPJ9oN1o94AA:4 a=SV7veod9ZcQA:10 a=50e4U0PicR4A:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 331725583; Thu, 11 Sep 2008 20:42:51 +0200 From: Hans Petter Selasky To: "M. Warner Losh" Date: Thu, 11 Sep 2008 20:44:42 +0200 User-Agent: KMail/1.9.7 References: <48B3299F.5080101@vwsoft.com> <20080911103343.GH1413@rink.nu> <20080911.082418.775964060.imp@bsdimp.com> In-Reply-To: <20080911.082418.775964060.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809112044.43749.hselasky@c2i.net> Cc: volker@vwsoft.com, current@freebsd.org, freebsd-usb@freebsd.org, fbsd-current@mawer.org Subject: Re: "legacy" usb stack fixes 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, 11 Sep 2008 18:42:53 -0000 Hi, Would anyone object if I make one non-Giant locked CAM bus for all USB2 devices? Something like: static void umass_create_cam_bus_sysinit() { devq = cam_simq_alloc(1 /* maximum openings */ ); if (devq == NULL) { return (ENOMEM); } umass_global_sim = cam_sim_alloc (&umass_cam_action, &umass_cam_poll, DEVNAME_SIM, NULL /* priv */ , 0 /* unit number */ , #if (__FreeBSD_version >= 700037) &umass_global_mtx /* mutex */ , #endif 1 /* maximum device openings */ , 0 /* maximum tagged device openings */ , devq); return; } static void umass_destroy_cam_bus_sysuninit() { .... } SYSINIT(&umass_create_cam_bus_sysinit); SYSUNINIT(&umass_destroy_cam_bus_sysuninit); --HPS On Thursday 11 September 2008, M. Warner Losh wrote: > In message: <20080911103343.GH1413@rink.nu> > > Rink Springer writes: > : On Thu, Sep 11, 2008 at 10:13:22AM +0200, Hans Petter Selasky wrote: > : > I also see crashes with my new stuff and the umass driver when the USB > : > device is un-plugged too early. The backtraces I've got so far does not > : > indicate a USB problem, though .... > : > : That is correct, this is a bug in CAM. More specifically, CAM does not > : handle the removal of busses well. There are two possible options: > : > : 1) Obviously, fix CAM to handle this scenarion > : DragonflyBSD seems to have a lot of fixes in this area, which I > : intend to take a look at 'some day' (no thanks to $reallife...) > > This is the better option. > > : 2) Create a CAM bus per USB bus > : I think this is reasonable, and it makes a lot more sense than the > : one-bus-per-device approach that we have now. The idea is that > : every USB controller hub creates a CAM bus, and umass(4) attaches to > : this bus instead of creating its own. Of course, until CAM is fixed, > : detaching PCMCIA or equivalent USB cards will still cause panics, but > : it would be a lot better than it is now... > > This would mitigate the problem, but there's a lot of people that use > CardBus USB cards, and they complain to me from time to time of the > problem. > > Fortunately, the wireless broadband cards that are a usb host > controller plus usb device in CardBus format aren't affected... > > : Personally, I'd like to see option 2 implemented in the USB2 stack, as > : it avoids the issue and makes a lot more sense from user perspective > : (I'm probably onot the only one who gets scared by 'camcontrol devlist' > : if you have a single MP3 player which advertises 2 disks :-)) > > It may make good sense for other reasons as well. Firewire does > something similar, and also umass used to do exactly this. There's > also problems right now with huge bus load leading to devices > disconnecting and reconnecting for some suck-ass, but common, > chipsets. If things were implemented this way, then there'd be > options to silently reconnect the device when it goes away and comes > back a few hundred milliseconds later... Firewire handles this case > too, at the expense of never disconnecting the disk, which isn't so > good for a thumb drive... > > Warner From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 20:09:03 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20B131065671 for ; Thu, 11 Sep 2008 20:09:03 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from frontmail.ipactive.de (frontmail.maindns.de [85.214.95.103]) by mx1.freebsd.org (Postfix) with ESMTP id 2274D8FC2B for ; Thu, 11 Sep 2008 20:09:01 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7ccf.q.ppp-pool.de [89.53.124.207]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id A93C312883F; Thu, 11 Sep 2008 22:08:51 +0200 (CEST) Received: from cesar.sz.vwsoft.com (cesar.sz.vwsoft.com [192.168.16.3]) by mail.vtec.ipme.de (Postfix) with ESMTP id DA7F92E90F; Thu, 11 Sep 2008 22:06:15 +0200 (CEST) Message-ID: <48C97ACA.70307@vwsoft.com> Date: Thu, 11 Sep 2008 22:08:42 +0200 From: Volker User-Agent: Thunderbird 2.0.0.16 (X11/20080727) MIME-Version: 1.0 To: Hans Petter Selasky References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48B0EA50.2090105@mawer.org> <48B3299F.5080101@vwsoft.com> <200809111013.23994.hselasky@c2i.net> In-Reply-To: <200809111013.23994.hselasky@c2i.net> X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit MailScanner-NULL-Check: 1221768380.80261@rkHmFAHZTR4hwPaKEo07ig X-MailScanner-ID: DA7F92E90F.ED3BF X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com X-ipactive-MailScanner-Information: Please contact the ISP for more information X-ipactive-MailScanner: Found to be clean X-ipactive-MailScanner-From: volker@vwsoft.com Cc: freebsd-usb@freebsd.org, Antony Mawer Subject: Re: "legacy" usb stack fixes 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, 11 Sep 2008 20:09:03 -0000 On 09/11/08 10:13, Hans Petter Selasky wrote: > On Monday 25 August 2008, Volker wrote: >> >> Anyway, I've already had those crashes even with the "new" usb stack >> (but it doesn't happen everytime - YMMV). >> > > Hi, > > I also see crashes with my new stuff and the umass driver when the USB device > is un-plugged too early. The backtraces I've got so far does not indicate a > USB problem, though .... > > --HPS > // dropped current@ from CC Hans Petter, the device unplug problem is not just with usb, but these devices are the most frequent unplugged devices so far. Early this week, I discovered a new problem. I've fetched fresh RELENG_7 sources, patched your usb stack in and recompiled kernel (using usb, not usb2). I've seen situations with a process holding open file descriptors for a ugen device being killed but a thread was still hanging in "usbdrain" state (sleeping on a mutex for draining). The process is still holding open file descriptors (I see output from ``fstat | grep ugen'' listing the already killed process), even while the process itself is already killed and not in the process list as a whole. Only a thread of that former process can be seen by ``ps -alxcH'', but it can't be killed. I'm pretty sure I'm able to patch kern_exit.c to have that process being freed completely but I'm also pretty sure, this will just kill a symptom but not the source. While in that situation, the usb port does not react to plug/unplug events anymore. I haven't been able to debug that situation as I do have too much stress at other places as well. Probably I'll find the time tomorrow for debugging. BTW, can you give a quick explanation about usb2? What's different, better? What needs to be done at the driver side to port something over to usb2? Thanks, Volker From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 20:13:56 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF42C106566B for ; Thu, 11 Sep 2008 20:13:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outS.internet-mail-service.net (outs.internet-mail-service.net [216.240.47.242]) by mx1.freebsd.org (Postfix) with ESMTP id C70CD8FC12 for ; Thu, 11 Sep 2008 20:13:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id C348E2447; Thu, 11 Sep 2008 13:13:56 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id ED2FA2D605F; Thu, 11 Sep 2008 13:13:55 -0700 (PDT) Message-ID: <48C97C04.6030603@elischer.org> Date: Thu, 11 Sep 2008 13:13:56 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Volker References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48B0EA50.2090105@mawer.org> <48B3299F.5080101@vwsoft.com> <200809111013.23994.hselasky@c2i.net> <48C97ACA.70307@vwsoft.com> In-Reply-To: <48C97ACA.70307@vwsoft.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Antony Mawer , freebsd-usb@freebsd.org Subject: Re: "legacy" usb stack fixes 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, 11 Sep 2008 20:13:57 -0000 Volker wrote: > On 09/11/08 10:13, Hans Petter Selasky wrote: >> On Monday 25 August 2008, Volker wrote: >>> Anyway, I've already had those crashes even with the "new" usb stack >>> (but it doesn't happen everytime - YMMV). >>> >> Hi, >> >> I also see crashes with my new stuff and the umass driver when the USB device >> is un-plugged too early. The backtraces I've got so far does not indicate a >> USB problem, though .... >> >> --HPS >> > > // dropped current@ from CC > > Hans Petter, > > the device unplug problem is not just with usb, but these devices are > the most frequent unplugged devices so far. > > Early this week, I discovered a new problem. I've fetched fresh RELENG_7 > sources, patched your usb stack in and recompiled kernel (using usb, not > usb2). > > I've seen situations with a process holding open file descriptors for a > ugen device being killed but a thread was still hanging in "usbdrain" > state (sleeping on a mutex for draining). The process is still holding > open file descriptors (I see output from ``fstat | grep ugen'' listing > the already killed process), even while the process itself is already > killed and not in the process list as a whole. > > Only a thread of that former process can be seen by ``ps -alxcH'', but > it can't be killed. what is the thread waiting on? > > I'm pretty sure I'm able to patch kern_exit.c to have that process being > freed completely but I'm also pretty sure, this will just kill a symptom > but not the source. While in that situation, the usb port does not react > to plug/unplug events anymore. > > I haven't been able to debug that situation as I do have too much stress > at other places as well. Probably I'll find the time tomorrow for debugging. > > BTW, can you give a quick explanation about usb2? What's different, > better? What needs to be done at the driver side to port something over > to usb2? > > Thanks, > > Volker > > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 20:32:28 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BAC11065686 for ; Thu, 11 Sep 2008 20:32:28 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from frontmail.ipactive.de (frontmail.maindns.de [85.214.95.103]) by mx1.freebsd.org (Postfix) with ESMTP id 29DFF8FC1C for ; Thu, 11 Sep 2008 20:32:27 +0000 (UTC) (envelope-from volker@vwsoft.com) Received: from mail.vtec.ipme.de (Q7ccf.q.ppp-pool.de [89.53.124.207]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by frontmail.ipactive.de (Postfix) with ESMTP id 9511C128844; Thu, 11 Sep 2008 22:32:16 +0200 (CEST) Received: from cesar.sz.vwsoft.com (cesar.sz.vwsoft.com [192.168.16.3]) by mail.vtec.ipme.de (Postfix) with ESMTP id 7A2EB2E90F; Thu, 11 Sep 2008 22:29:36 +0200 (CEST) Message-ID: <48C98043.3040807@vwsoft.com> Date: Thu, 11 Sep 2008 22:32:03 +0200 From: Volker User-Agent: Thunderbird 2.0.0.16 (X11/20080727) MIME-Version: 1.0 To: Julian Elischer References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48B0EA50.2090105@mawer.org> <48B3299F.5080101@vwsoft.com> <200809111013.23994.hselasky@c2i.net> <48C97ACA.70307@vwsoft.com> <48C97C04.6030603@elischer.org> In-Reply-To: <48C97C04.6030603@elischer.org> X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit MailScanner-NULL-Check: 1221769786.15703@XtbLvj9LxVqJkIFu02wOlw X-MailScanner-ID: 7A2EB2E90F.C52B1 X-VWSoft-MailScanner: Found to be clean X-MailScanner-From: volker@vwsoft.com X-ipactive-MailScanner-Information: Please contact the ISP for more information X-ipactive-MailScanner: Found to be clean X-ipactive-MailScanner-From: volker@vwsoft.com Cc: Antony Mawer , freebsd-usb@freebsd.org Subject: usbdrain problem (was: Re: "legacy" usb stack fixes) 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, 11 Sep 2008 20:32:28 -0000 On 09/11/08 22:13, Julian Elischer wrote: > Volker wrote: >> On 09/11/08 10:13, Hans Petter Selasky wrote: >>> On Monday 25 August 2008, Volker wrote: >>>> Anyway, I've already had those crashes even with the "new" usb stack >>>> (but it doesn't happen everytime - YMMV). >>>> >>> Hi, >>> >>> I also see crashes with my new stuff and the umass driver when the >>> USB device is un-plugged too early. The backtraces I've got so far >>> does not indicate a USB problem, though .... >>> >>> --HPS >>> >> >> // dropped current@ from CC >> >> Hans Petter, >> >> the device unplug problem is not just with usb, but these devices are >> the most frequent unplugged devices so far. >> >> Early this week, I discovered a new problem. I've fetched fresh RELENG_7 >> sources, patched your usb stack in and recompiled kernel (using usb, not >> usb2). >> >> I've seen situations with a process holding open file descriptors for a >> ugen device being killed but a thread was still hanging in "usbdrain" >> state (sleeping on a mutex for draining). The process is still holding >> open file descriptors (I see output from ``fstat | grep ugen'' listing >> the already killed process), even while the process itself is already >> killed and not in the process list as a whole. >> >> Only a thread of that former process can be seen by ``ps -alxcH'', but >> it can't be killed. > > what is the thread waiting on? I have no idea as I was unable to find time to debug this. The kill signal may come in the middle of a transfer (or even not - ENOTIME for deep inspection). While the process is on the usbdrain lock, I'm unable to attach gdb to it (gdb complains about 'no such process' for the pid). Debugging the ugen driver is hard as I don't have a serial debugger at work (and I don't feel that comfortable with DDB at the console, but will try to look at that, also ;). >From looking at the sources, the ugen driver is seeing the transfer flag being set before closing the device, sets the drain flag and sleeping on the usbdrain mutex. It never wakes up. Without finding time to debug this (too much interrupts at work), I thought I might try to set a timeout value for the mutex and see if I can find a deal out of that situation. Hopefully I'll find some time tomorrow for that problem, as it's causing a lot of trouble. Again, this is for the hps stack, not what the old $subject said (changed now). Volker From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 21:33:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F9B31065671 for ; Thu, 11 Sep 2008 21:33:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 25B9E8FC14 for ; Thu, 11 Sep 2008 21:33:41 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=ZDRWBqcLkqwA:10 a=n1bwc_erhw0A:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=Y77L5IS0r_cWMgp8GgsA:9 a=z4jYXEc1vMBSRYdefg9ktFs5s28A:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 903153749; Thu, 11 Sep 2008 23:18:39 +0200 From: Hans Petter Selasky To: Volker Date: Thu, 11 Sep 2008 23:20:23 +0200 User-Agent: KMail/1.9.7 References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48C97C04.6030603@elischer.org> <48C98043.3040807@vwsoft.com> In-Reply-To: <48C98043.3040807@vwsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809112320.25758.hselasky@c2i.net> Cc: Julian Elischer , freebsd-usb@freebsd.org, Antony Mawer Subject: Re: usbdrain problem (was: Re: "legacy" usb stack fixes) 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, 11 Sep 2008 21:33:42 -0000 On Thursday 11 September 2008, Volker wrote: > On 09/11/08 22:13, Julian Elischer wrote: > > Volker wrote: > >> On 09/11/08 10:13, Hans Petter Selasky wrote: > >>> On Monday 25 August 2008, Volker wrote: > >>>> Anyway, I've already had those crashes even with the "new" usb stack > >>>> (but it doesn't happen everytime - YMMV). > >>> > >> > >> // dropped current@ from CC > >> > >> Hans Petter, > >> > >> the device unplug problem is not just with usb, but these devices are > >> the most frequent unplugged devices so far. > >> > >> Early this week, I discovered a new problem. I've fetched fresh RELENG_7 > >> sources, patched your usb stack in and recompiled kernel (using usb, not > >> usb2). Hi Volker, There has been significant changes to ugen between usb and usb2. It looks to me like that ugen started the transfer again after the USB transfer drain process started, so the drain will never exit. Probably it could need an extra flag there to catch that case, to prevent the start after trying to unsetup the transfer! Try to turn on USB debugging: sysctl hw.usb.debug=15 And grep for transfer start and stop. --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 21:43:24 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 300F41065671 for ; Thu, 11 Sep 2008 21:43:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B13538FC19 for ; Thu, 11 Sep 2008 21:43:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m8BLhA3k037663; Thu, 11 Sep 2008 17:43:10 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 11 Sep 2008 16:23:23 -0400 User-Agent: KMail/1.9.7 References: <48B3299F.5080101@vwsoft.com> <20080911.082418.775964060.imp@bsdimp.com> <200809112044.43749.hselasky@c2i.net> In-Reply-To: <200809112044.43749.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809111623.24539.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 11 Sep 2008 17:43:11 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8220/Thu Sep 11 17:27:09 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: fbsd-current@mawer.org, freebsd-usb@freebsd.org, volker@vwsoft.com Subject: Re: "legacy" usb stack fixes 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, 11 Sep 2008 21:43:24 -0000 On Thursday 11 September 2008 02:44:42 pm Hans Petter Selasky wrote: > Hi, > > Would anyone object if I make one non-Giant locked CAM bus for all USB2 > devices? Something like: Ask scottl@, I think he had mentioned having one bus for all USB devices before. > static void > umass_create_cam_bus_sysinit() > { > devq = cam_simq_alloc(1 /* maximum openings */ ); > if (devq == NULL) { > return (ENOMEM); > } > umass_global_sim = cam_sim_alloc > (&umass_cam_action, &umass_cam_poll, > DEVNAME_SIM, > NULL /* priv */ , > 0 /* unit number */ , > #if (__FreeBSD_version >= 700037) > &umass_global_mtx /* mutex */ , > #endif > 1 /* maximum device openings */ , > 0 /* maximum tagged device openings */ , > devq); > > return; > } > > static void > umass_destroy_cam_bus_sysuninit() > { > .... > } > > SYSINIT(&umass_create_cam_bus_sysinit); > SYSUNINIT(&umass_destroy_cam_bus_sysuninit); > > --HPS > > On Thursday 11 September 2008, M. Warner Losh wrote: > > In message: <20080911103343.GH1413@rink.nu> > > > > Rink Springer writes: > > : On Thu, Sep 11, 2008 at 10:13:22AM +0200, Hans Petter Selasky wrote: > > : > I also see crashes with my new stuff and the umass driver when the USB > > : > device is un-plugged too early. The backtraces I've got so far does not > > : > indicate a USB problem, though .... > > : > > : That is correct, this is a bug in CAM. More specifically, CAM does not > > : handle the removal of busses well. There are two possible options: > > : > > : 1) Obviously, fix CAM to handle this scenarion > > : DragonflyBSD seems to have a lot of fixes in this area, which I > > : intend to take a look at 'some day' (no thanks to $reallife...) > > > > This is the better option. > > > > : 2) Create a CAM bus per USB bus > > : I think this is reasonable, and it makes a lot more sense than the > > : one-bus-per-device approach that we have now. The idea is that > > : every USB controller hub creates a CAM bus, and umass(4) attaches to > > : this bus instead of creating its own. Of course, until CAM is fixed, > > : detaching PCMCIA or equivalent USB cards will still cause panics, but > > : it would be a lot better than it is now... > > > > This would mitigate the problem, but there's a lot of people that use > > CardBus USB cards, and they complain to me from time to time of the > > problem. > > > > Fortunately, the wireless broadband cards that are a usb host > > controller plus usb device in CardBus format aren't affected... > > > > : Personally, I'd like to see option 2 implemented in the USB2 stack, as > > : it avoids the issue and makes a lot more sense from user perspective > > : (I'm probably onot the only one who gets scared by 'camcontrol devlist' > > : if you have a single MP3 player which advertises 2 disks :-)) > > > > It may make good sense for other reasons as well. Firewire does > > something similar, and also umass used to do exactly this. There's > > also problems right now with huge bus load leading to devices > > disconnecting and reconnecting for some suck-ass, but common, > > chipsets. If things were implemented this way, then there'd be > > options to silently reconnect the device when it goes away and comes > > back a few hundred milliseconds later... Firewire handles this case > > too, at the expense of never disconnecting the disk, which isn't so > > good for a thumb drive... > > > > Warner > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- John Baldwin From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 21:45:16 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FF2E106567B for ; Thu, 11 Sep 2008 21:45:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1208FC23 for ; Thu, 11 Sep 2008 21:45:15 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=ZDRWBqcLkqwA:10 a=n1bwc_erhw0A:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=6I5d2MoRAAAA:8 a=9RvkUw-GMvgYniXX67gA:9 a=Zxt7ybwJIYK7HBTSXRsA:7 a=6p8VR9avoxXGAIy7KVmmLvVSyLAA:4 a=SV7veod9ZcQA:10 a=50e4U0PicR4A:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 903180783; Thu, 11 Sep 2008 23:45:14 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 11 Sep 2008 23:46:58 +0200 User-Agent: KMail/1.9.7 References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48C98043.3040807@vwsoft.com> <200809112320.25758.hselasky@c2i.net> In-Reply-To: <200809112320.25758.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809112347.00510.hselasky@c2i.net> Cc: Volker , Julian Elischer , Antony Mawer Subject: Re: usbdrain problem (was: Re: "legacy" usb stack fixes) 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, 11 Sep 2008 21:45:16 -0000 Hi Volker, Could you try the following. Add an extra check for "UGEN_CLOSING" to the code statement in ugen.c in the function ugenclose(): if ((!(sce->state & UGEN_CLOSING)) && (sce->state & (UGEN_OPEN_DEV | UGEN_OPEN_IN | UGEN_OPEN_OUT)) .... The ugenclose() is called from both "detach()" and "close()" and maybe there is a race there! --HPS static int ugenclose(struct cdev *dev, int flag, int mode, struct thread *p) { struct ugen_softc *sc = DEV2SC(dev); struct ugen_endpoint *sce = DEV2SCE(dev); struct usbd_xfer *temp_xfer[4]; int32_t error; PRINTFN(5, ("flag=%d, mode=%d\n", flag, mode)); if ((sc == NULL) || (sce == NULL)) { return (0); } mtx_lock(&sc->sc_mtx); here >>> if (sce->state & (UGEN_OPEN_DEV | UGEN_OPEN_IN | UGEN_OPEN_OUT)) { /* control endpoint is also ``closed'' here */ sce->state |= UGEN_CLOSING; On Thursday 11 September 2008, Hans Petter Selasky wrote: > On Thursday 11 September 2008, Volker wrote: > > On 09/11/08 22:13, Julian Elischer wrote: > > > Volker wrote: > > >> On 09/11/08 10:13, Hans Petter Selasky wrote: > > >>> On Monday 25 August 2008, Volker wrote: > > >>>> Anyway, I've already had those crashes even with the "new" usb stack > > >>>> (but it doesn't happen everytime - YMMV). > > >> > > >> // dropped current@ from CC > > >> > > >> Hans Petter, > > >> > > >> the device unplug problem is not just with usb, but these devices are > > >> the most frequent unplugged devices so far. > > >> > > >> Early this week, I discovered a new problem. I've fetched fresh > > >> RELENG_7 sources, patched your usb stack in and recompiled kernel > > >> (using usb, not usb2). > > Hi Volker, > > There has been significant changes to ugen between usb and usb2. > > It looks to me like that ugen started the transfer again after the USB > transfer drain process started, so the drain will never exit. Probably it > could need an extra flag there to catch that case, to prevent the start > after trying to unsetup the transfer! > > Try to turn on USB debugging: > > sysctl hw.usb.debug=15 > > And grep for transfer start and stop. > > --HPS > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Thu Sep 11 22:45:21 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C7C21065674; Thu, 11 Sep 2008 22:45:21 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 7479E8FC0A; Thu, 11 Sep 2008 22:45:17 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id m8BMB7E0040194; Thu, 11 Sep 2008 16:11:08 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <48C9977C.2030104@samsco.org> Date: Thu, 11 Sep 2008 16:11:08 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Hans Petter Selasky References: <48B3299F.5080101@vwsoft.com> <20080911103343.GH1413@rink.nu> <20080911.082418.775964060.imp@bsdimp.com> <200809112044.43749.hselasky@c2i.net> In-Reply-To: <200809112044.43749.hselasky@c2i.net> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: current@freebsd.org, fbsd-current@mawer.org, freebsd-usb@freebsd.org, volker@vwsoft.com Subject: Re: "legacy" usb stack fixes 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, 11 Sep 2008 22:45:21 -0000 This is close to How Things Should Be. Each umass target having its own SIM and bus is indeed wrong, but I'm not sure if it's correct for all USB controllers and buses to be under a single SIM. What would be the most correct is for each physical USB controller/bus instance to have its own SIM instance. I don't know if it's better to do the attachment in ehci/ohci/uhci controller drivers or in usb bus driver; up in the controller drivers is probably more correct. I don't like this hack of attaching stuff in a SYSINIT. Scott Hans Petter Selasky wrote: > Hi, > > Would anyone object if I make one non-Giant locked CAM bus for all USB2 > devices? Something like: > > static void > umass_create_cam_bus_sysinit() > { > devq = cam_simq_alloc(1 /* maximum openings */ ); > if (devq == NULL) { > return (ENOMEM); > } > umass_global_sim = cam_sim_alloc > (&umass_cam_action, &umass_cam_poll, > DEVNAME_SIM, > NULL /* priv */ , > 0 /* unit number */ , > #if (__FreeBSD_version >= 700037) > &umass_global_mtx /* mutex */ , > #endif > 1 /* maximum device openings */ , > 0 /* maximum tagged device openings */ , > devq); > > return; > } > > static void > umass_destroy_cam_bus_sysuninit() > { > .... > } > > SYSINIT(&umass_create_cam_bus_sysinit); > SYSUNINIT(&umass_destroy_cam_bus_sysuninit); > > --HPS > > On Thursday 11 September 2008, M. Warner Losh wrote: >> In message: <20080911103343.GH1413@rink.nu> >> >> Rink Springer writes: >> : On Thu, Sep 11, 2008 at 10:13:22AM +0200, Hans Petter Selasky wrote: >> : > I also see crashes with my new stuff and the umass driver when the USB >> : > device is un-plugged too early. The backtraces I've got so far does not >> : > indicate a USB problem, though .... >> : >> : That is correct, this is a bug in CAM. More specifically, CAM does not >> : handle the removal of busses well. There are two possible options: >> : >> : 1) Obviously, fix CAM to handle this scenarion >> : DragonflyBSD seems to have a lot of fixes in this area, which I >> : intend to take a look at 'some day' (no thanks to $reallife...) >> >> This is the better option. >> >> : 2) Create a CAM bus per USB bus >> : I think this is reasonable, and it makes a lot more sense than the >> : one-bus-per-device approach that we have now. The idea is that >> : every USB controller hub creates a CAM bus, and umass(4) attaches to >> : this bus instead of creating its own. Of course, until CAM is fixed, >> : detaching PCMCIA or equivalent USB cards will still cause panics, but >> : it would be a lot better than it is now... >> >> This would mitigate the problem, but there's a lot of people that use >> CardBus USB cards, and they complain to me from time to time of the >> problem. >> >> Fortunately, the wireless broadband cards that are a usb host >> controller plus usb device in CardBus format aren't affected... >> >> : Personally, I'd like to see option 2 implemented in the USB2 stack, as >> : it avoids the issue and makes a lot more sense from user perspective >> : (I'm probably onot the only one who gets scared by 'camcontrol devlist' >> : if you have a single MP3 player which advertises 2 disks :-)) >> >> It may make good sense for other reasons as well. Firewire does >> something similar, and also umass used to do exactly this. There's >> also problems right now with huge bus load leading to devices >> disconnecting and reconnecting for some suck-ass, but common, >> chipsets. If things were implemented this way, then there'd be >> options to silently reconnect the device when it goes away and comes >> back a few hundred milliseconds later... Firewire handles this case >> too, at the expense of never disconnecting the disk, which isn't so >> good for a thumb drive... >> >> Warner > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Fri Sep 12 18:23:08 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92005106564A for ; Fri, 12 Sep 2008 18:23:08 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 443368FC15 for ; Fri, 12 Sep 2008 18:23:08 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id m8CIMtXY048645; Fri, 12 Sep 2008 12:22:56 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <48CAB37F.50002@samsco.org> Date: Fri, 12 Sep 2008 12:22:55 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Hans Petter Selasky References: <48B3299F.5080101@vwsoft.com> <20080911103343.GH1413@rink.nu> <20080911.082418.775964060.imp@bsdimp.com> <200809112044.43749.hselasky@c2i.net> <48C9977C.2030104@samsco.org> In-Reply-To: <48C9977C.2030104@samsco.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: current@freebsd.org, fbsd-current@mawer.org, freebsd-usb@freebsd.org, volker@vwsoft.com Subject: Re: "legacy" usb stack fixes 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, 12 Sep 2008 18:23:08 -0000 Scott Long wrote: > This is close to How Things Should Be. Each umass target having its own > SIM and bus is indeed wrong, but I'm not sure if it's correct for all > USB controllers and buses to be under a single SIM. What would be the > most correct is for each physical USB controller/bus instance to have > its own SIM instance. I don't know if it's better to do the attachment > in ehci/ohci/uhci controller drivers or in usb bus driver; up in the > controller drivers is probably more correct. I don't like this hack of > attaching stuff in a SYSINIT. > > Scott > > Now that I've thought some on it, I'll go one step further and say that registering a single SIM for multiple controller+bus instances in a SYSINIT will be highly undesirable thing to do. Since you have to register a lock with the CAM when you register the SIM, you'll wind up serializing all of the USB controllers under a single lock. Or you'll probably try something dangerous and tricky with dropping the new global lock and picking up an individual lock, then swizzling locks in the completion and event paths, with the result being rather unsatisfying and unpleasant. So I know that you'll do what you believe is correct, but please take my advice on the matter anyways. Scott From owner-freebsd-usb@FreeBSD.ORG Fri Sep 12 20:17:55 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 522671065675 for ; Fri, 12 Sep 2008 20:17:55 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.188]) by mx1.freebsd.org (Postfix) with ESMTP id D58BC8FC1A for ; Fri, 12 Sep 2008 20:17:54 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by fk-out-0910.google.com with SMTP id k31so814951fkk.11 for ; Fri, 12 Sep 2008 13:17:53 -0700 (PDT) Received: by 10.180.217.1 with SMTP id p1mr3517535bkg.80.1221248769780; Fri, 12 Sep 2008 12:46:09 -0700 (PDT) Received: by 10.180.207.17 with HTTP; Fri, 12 Sep 2008 12:46:09 -0700 (PDT) Message-ID: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> Date: Fri, 12 Sep 2008 21:46:09 +0200 From: "Olivier SMEDTS" To: freebsd-usb@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: new usb2 stack : -current patch with mpsafe tty layer available ? 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, 12 Sep 2008 20:17:55 -0000 Hi, Since the new usb2 stack announcement in http://lists.freebsd.org/pipermail/freebsd-current/2008-August/087610.html I haven't seen any patch update (on freebsd-usb or freebsd-current) for use in CURRENT and its MPSAFE TTY layer. Code in i4b's anoncvs seems old too. Where can I find (if there are) usb2 diffs for use with latest CURRENT src tree ? Olivier -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-usb@FreeBSD.ORG Fri Sep 12 20:57:16 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D8081065679; Fri, 12 Sep 2008 20:57:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 29AB48FC0C; Fri, 12 Sep 2008 20:57:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m8CKudfw095070; Fri, 12 Sep 2008 14:56:40 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 12 Sep 2008 14:57:24 -0600 (MDT) Message-Id: <20080912.145724.-1750800872.imp@bsdimp.com> To: scottl@samsco.org From: "M. Warner Losh" In-Reply-To: <48CAB37F.50002@samsco.org> References: <200809112044.43749.hselasky@c2i.net> <48C9977C.2030104@samsco.org> <48CAB37F.50002@samsco.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: current@freebsd.org, fbsd-current@mawer.org, freebsd-usb@freebsd.org, volker@vwsoft.com Subject: Re: "legacy" usb stack fixes 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, 12 Sep 2008 20:57:16 -0000 In message: <48CAB37F.50002@samsco.org> Scott Long writes: : Scott Long wrote: : > This is close to How Things Should Be. Each umass target having its own : > SIM and bus is indeed wrong, but I'm not sure if it's correct for all : > USB controllers and buses to be under a single SIM. What would be the : > most correct is for each physical USB controller/bus instance to have : > its own SIM instance. I don't know if it's better to do the attachment : > in ehci/ohci/uhci controller drivers or in usb bus driver; up in the : > controller drivers is probably more correct. I don't like this hack of : > attaching stuff in a SYSINIT. : > : > Scott : > : > : : Now that I've thought some on it, I'll go one step further and say that : registering a single SIM for multiple controller+bus instances in a : SYSINIT will be highly undesirable thing to do. Since you have to : register a lock with the CAM when you register the SIM, you'll wind up : serializing all of the USB controllers under a single lock. Or you'll : probably try something dangerous and tricky with dropping the new global : lock and picking up an individual lock, then swizzling locks in the : completion and event paths, with the result being rather unsatisfying : and unpleasant. So I know that you'll do what you believe is correct, : but please take my advice on the matter anyways. Yes. A SIM will serialize all operations, and the most logical place for that is the computer <-> usb interface, which is the host controller. So having one SIM per host controller would be the optimal placement. Having one SIM per usb device doesn't result in any more real parallelism because the host controller necessarily serializes things because of how USB is defined... Warner From owner-freebsd-usb@FreeBSD.ORG Fri Sep 12 21:29:43 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4C531065682 for ; Fri, 12 Sep 2008 21:29:43 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 6C80D8FC13 for ; Fri, 12 Sep 2008 21:29:43 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.home (pooker.samsco.home [192.168.254.1]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id m8CLTWCJ050377; Fri, 12 Sep 2008 15:29:33 -0600 (MDT) (envelope-from scottl@samsco.org) Date: Fri, 12 Sep 2008 15:29:32 -0600 (MDT) From: Scott Long To: "M. Warner Losh" In-Reply-To: <20080912.145724.-1750800872.imp@bsdimp.com> Message-ID: <20080912150630.C39726@pooker.samsco.org> References: <200809112044.43749.hselasky@c2i.net> <48C9977C.2030104@samsco.org> <48CAB37F.50002@samsco.org> <20080912.145724.-1750800872.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: current@freebsd.org, fbsd-current@mawer.org, freebsd-usb@freebsd.org, volker@vwsoft.com Subject: Re: "legacy" usb stack fixes 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, 12 Sep 2008 21:29:43 -0000 On Fri, 12 Sep 2008, M. Warner Losh wrote: > In message: <48CAB37F.50002@samsco.org> > Scott Long writes: > : Scott Long wrote: > : > This is close to How Things Should Be. Each umass target having its own > : > SIM and bus is indeed wrong, but I'm not sure if it's correct for all > : > USB controllers and buses to be under a single SIM. What would be the > : > most correct is for each physical USB controller/bus instance to have > : > its own SIM instance. I don't know if it's better to do the attachment > : > in ehci/ohci/uhci controller drivers or in usb bus driver; up in the > : > controller drivers is probably more correct. I don't like this hack of > : > attaching stuff in a SYSINIT. > : > > : > Scott > : > > : > > : > : Now that I've thought some on it, I'll go one step further and say that > : registering a single SIM for multiple controller+bus instances in a > : SYSINIT will be highly undesirable thing to do. Since you have to > : register a lock with the CAM when you register the SIM, you'll wind up > : serializing all of the USB controllers under a single lock. Or you'll > : probably try something dangerous and tricky with dropping the new global > : lock and picking up an individual lock, then swizzling locks in the > : completion and event paths, with the result being rather unsatisfying > : and unpleasant. So I know that you'll do what you believe is correct, > : but please take my advice on the matter anyways. > > Yes. A SIM will serialize all operations, and the most logical place > for that is the computer <-> usb interface, which is the host > controller. So having one SIM per host controller would be the > optimal placement. Having one SIM per usb device doesn't result in > any more real parallelism because the host controller necessarily > serializes things because of how USB is defined... > Correct. Another argument for having a SIM per controller/bus and not per target is that the SIM is responsible for managing all resources on a controller. USB is still a bus topology, and thus certain resources are finite and shared, be they bandwidth, arbitration, or concurrency. Granted, USB is simple enough that it doesn't give you much control over these resources, but having the SIM be at the target level gives the system even less control and visibility. If a future enhancement to USB grows the ability to do useful things like more concurrency, it'll be essential for the SIM to have a controller-wide view of this. Scott From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 04:09:52 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6395E1065671 for ; Sat, 13 Sep 2008 04:09:52 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outI.internet-mail-service.net (outi.internet-mail-service.net [216.240.47.232]) by mx1.freebsd.org (Postfix) with ESMTP id 4863C8FC15 for ; Sat, 13 Sep 2008 04:09:46 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id ADB3A2355; Fri, 12 Sep 2008 21:09:46 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 099192D6013; Fri, 12 Sep 2008 21:09:45 -0700 (PDT) Message-ID: <48CB3D09.4050908@elischer.org> Date: Fri, 12 Sep 2008 21:09:45 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Scott Long References: <200809112044.43749.hselasky@c2i.net> <48C9977C.2030104@samsco.org> <48CAB37F.50002@samsco.org> <20080912.145724.-1750800872.imp@bsdimp.com> <20080912150630.C39726@pooker.samsco.org> In-Reply-To: <20080912150630.C39726@pooker.samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org, fbsd-current@mawer.org, freebsd-usb@freebsd.org, volker@vwsoft.com Subject: Re: "legacy" usb stack fixes 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: Sat, 13 Sep 2008 04:09:52 -0000 Scott Long wrote: > On Fri, 12 Sep 2008, M. Warner Losh wrote: > >> In message: <48CAB37F.50002@samsco.org> >> Scott Long writes: >> : Scott Long wrote: >> : > This is close to How Things Should Be. Each umass target having >> its own >> : > SIM and bus is indeed wrong, but I'm not sure if it's correct for all >> : > USB controllers and buses to be under a single SIM. What would be >> the >> : > most correct is for each physical USB controller/bus instance to have >> : > its own SIM instance. I don't know if it's better to do the >> attachment >> : > in ehci/ohci/uhci controller drivers or in usb bus driver; up in the >> : > controller drivers is probably more correct. I don't like this >> hack of >> : > attaching stuff in a SYSINIT. >> : > >> : > Scott >> : > >> : > >> : >> : Now that I've thought some on it, I'll go one step further and say that >> : registering a single SIM for multiple controller+bus instances in a >> : SYSINIT will be highly undesirable thing to do. Since you have to >> : register a lock with the CAM when you register the SIM, you'll wind up >> : serializing all of the USB controllers under a single lock. Or you'll >> : probably try something dangerous and tricky with dropping the new >> global >> : lock and picking up an individual lock, then swizzling locks in the >> : completion and event paths, with the result being rather unsatisfying >> : and unpleasant. So I know that you'll do what you believe is correct, >> : but please take my advice on the matter anyways. >> >> Yes. A SIM will serialize all operations, and the most logical place >> for that is the computer <-> usb interface, which is the host >> controller. So having one SIM per host controller would be the >> optimal placement. Having one SIM per usb device doesn't result in >> any more real parallelism because the host controller necessarily >> serializes things because of how USB is defined... >> > > Correct. Another argument for having a SIM per controller/bus and not > per target is that the SIM is responsible for managing all resources on a > controller. USB is still a bus topology, and thus certain resources are > finite and shared, be they bandwidth, arbitration, or concurrency. > Granted, USB is simple enough that it doesn't give you much control over > these resources, but having the SIM be at the target level gives the > system even less control and visibility. If a future enhancement to USB > grows the ability to do useful things like more concurrency, it'll be > essential for the SIM to have a controller-wide view of this. cam/umass used to have a SIM per USB bus but it got changed sometime around 1999-2001 from memory. It was haled at the time as a great step forward when each device got its own SIM but I could never work out why. it did solve some problems though I forget what they where. > > Scott > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 06:20:02 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A11D1065682 for ; Sat, 13 Sep 2008 06:20:02 +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 DCA048FC19 for ; Sat, 13 Sep 2008 06: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.2/8.14.2) with ESMTP id m8D6K1al064603 for ; Sat, 13 Sep 2008 06:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8D6K17o064602; Sat, 13 Sep 2008 06:20:01 GMT (envelope-from gnats) Resent-Date: Sat, 13 Sep 2008 06:20:01 GMT Resent-Message-Id: <200809130620.m8D6K17o064602@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, Greg Scarcelli Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF9E0106566C for ; Sat, 13 Sep 2008 06:14:27 +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 D01998FC14 for ; Sat, 13 Sep 2008 06:14:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m8D6ERKa052424 for ; Sat, 13 Sep 2008 06:14:27 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m8D6ER01052423; Sat, 13 Sep 2008 06:14:27 GMT (envelope-from nobody) Message-Id: <200809130614.m8D6ER01052423@www.freebsd.org> Date: Sat, 13 Sep 2008 06:14:27 GMT From: Greg Scarcelli To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/127342: cannot enable usb keyboard and mouse support in the bios 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: Sat, 13 Sep 2008 06:20:02 -0000 >Number: 127342 >Category: usb >Synopsis: cannot enable usb keyboard and mouse support in the bios >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 13 06:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Greg Scarcelli >Release: 7.0 >Organization: >Environment: FreeBSD coolbreeze-unix 7.0-RELEASE #0 Sun Feb 24 UTC 2008 i386 >Description: Get the following errors when enabling usb keyboard and mouse support in the BIOS... hptrr no controller detected panic ohci_add_done addr 0xbfef1ca0 not found cannot dump: no dump device found The system will then reboot... Boots whenever usb keyboard and mouse support are disabled... Motherboard Ga-Ma74gm-S2h Gigabyte Am2+ Hdmi Aio Manufacturers: Gigabyte Model GA-MA74GM-S2H GAMA74GMS2H Description Gigabyte GA-MA74GM-S2H Socket AM2+/AM2 Athlon™64/Athlon™64 FX/Athlon™64 X2/Phenom™/Phenom™ FX/Sempron™ AMD 740G Micro ATX Motherboard Features * Supports AMD AM2+ Phenom*/ AM2 Athlon 64 series processors * Solid capacitors design in CPU VRM * Dual Channel DDR2 800 for outstanding system performance * Integrated ATI Radeon 2100-based graphics * Ultimate graphics performance with PCI-Ex16 interface * Integrated SATA 3Gb/s with RAID function * Features high speed Gigabit Ethernet connection * Integrated 6/8-Channel** High Definition audio * Integrated HDMI/ DVI interface with HDCP Model No. GA-MA74GM-S2H CPU Phenom™ FX/Phenom™/Athlon™64 FX/Athlon™64 X2/Athlon™64/Sempron™ Front Side Bus 2000MT/S Socket AM2+/AM2 Chipset - Southbridge AMD SB700 Chipset Manufacturer AMD Chipset Model 740G Memory 2 x DDR2 800/667MHz DIMM Max Memory Supported 8GB Storage 6 x SATA 3Gb/s RAID + 1 x IDE Total Expansion Slots 4 PCI 2 PCI-E x1 1 PCI-E 2.0 x16 1 LAN 10/100/1000Mbps Audio Realtek ALC888 7.1-Channel HD Audio Integrated Graphic ATI Radeon 2100 Internal I/O Connectors 1xEIDE/1xFDD/1xCOM/4xUSB2.0/1xSPDIF-Out Rear Panel I/O Ports 1xPS2-KB/1xLPT/1xVGA/1xDVI-D/1xHDMI/1xSPDIF-Out/4xUSB2.0/1xLAN/3xAudio USB Type USB2.0 Form Factor Micro ATX >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 10:13:05 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48676106566C for ; Sat, 13 Sep 2008 10:13:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id CD9748FC15 for ; Sat, 13 Sep 2008 10:13:04 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=twss2o89-wcA:10 a=UuSVL50luqwA:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=6I5d2MoRAAAA:8 a=7QH8WUwtSGw06BIZH_sA:9 a=I7CmP7o6NpAfv3xeMt0A:7 a=pBTgTmvmKuhFJ-5tw92cDCO-iGoA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 24250505; Sat, 13 Sep 2008 12:13:02 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 13 Sep 2008 12:14:45 +0200 User-Agent: KMail/1.9.7 References: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> In-Reply-To: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809131214.49314.hselasky@c2i.net> Cc: Subject: Re: new usb2 stack : -current patch with mpsafe tty layer available ? 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: Sat, 13 Sep 2008 10:13:05 -0000 On Friday 12 September 2008, Olivier SMEDTS wrote: > Hi, > > Since the new usb2 stack announcement in > http://lists.freebsd.org/pipermail/freebsd-current/2008-August/087610.html > I haven't seen any patch update (on freebsd-usb or freebsd-current) > for use in CURRENT and its MPSAFE TTY layer. Code in i4b's anoncvs > seems old too. > > Where can I find (if there are) usb2 diffs for use with latest CURRENT > src tree ? > > Olivier Hi Oliver, I will do an integrate on my tree to cach up with the MPSAFE TTY changes today. I just wrapped up an install script so that you are always up to date with my USB2 branch: svn --username anonsvn --password anonsvn \ checkout svn://svn.turbocat.net/i4b cd i4b/trunk/i4b/FreeBSD.usb2 make all # and read the instructions make install # and read the instructions in the end --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 11:08:50 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53ED71065673 for ; Sat, 13 Sep 2008 11:08:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id B0D528FC0C for ; Sat, 13 Sep 2008 11:08:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=JP8p9NPrEe3r11CP3ZIA:9 a=dfM8LvlN1hMkq6fQo9gA:7 a=s1rUxnOM9vspRvAl1GCOEm68ehQA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1072697741; Sat, 13 Sep 2008 13:08:42 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, freebsd-arm@freebsd.org Date: Sat, 13 Sep 2008 13:10:32 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809131310.33495.hselasky@c2i.net> Cc: Subject: Openmoko phones and USB on 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: Sat, 13 Sep 2008 11:08:50 -0000 Hi, There are some problems using the dfu-util to flash Openmoko phones from FreeBSD. The problem resides in the USB stack on the phone, which does not support the libusb-0.1 string requests. I'm planning to work around this in the kernel to avoid future problems. I have tested patches for this, but they have not committed yet. Secondly I plan to add support for RNDIS so that you can access the OpenMoko phone through USB ethernet. I'm currently awaiting approval from the Linux people to port their RNDIS driver to the new USB stack under a BSD license. Really they should have used CDC ethernet, but there are too many Windows users out there I guess :-) --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 12:25:16 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9A1B1065677; Sat, 13 Sep 2008 12:25:16 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 250118FC2D; Sat, 13 Sep 2008 12:25:15 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id OAA19072; Sat, 13 Sep 2008 14:14:42 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) Received: from ppp-93-104-115-110.dynamic.mnet-online.de(93.104.115.110) by hunter.Sisis.de via smap (V2.1) id xma018990; Sat, 13 Sep 08 14:14:05 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m8DCMK8O003502; Sat, 13 Sep 2008 14:22:20 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Sat, 13 Sep 2008 14:22:20 +0200 From: Matthias Apitz To: Hans Petter Selasky Message-ID: <20080913122220.GA3162@rebelion.Sisis.de> References: <200809131310.33495.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200809131310.33495.hselasky@c2i.net> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) Cc: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Openmoko phones and USB on FreeBSD X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 12:25:17 -0000 El día Saturday, September 13, 2008 a las 01:10:32PM +0200, Hans Petter Selasky escribió: > Hi, > > There are some problems using the dfu-util to flash Openmoko phones from > FreeBSD. The problem resides in the USB stack on the phone, which does not > support the libusb-0.1 string requests. I'm planning to work around this in > the kernel to avoid future problems. I have tested patches for this, but they > have not committed yet. Hi Hans, I'm using FreeBSD on my normal laptop and my eeePC 900 gadget; my Openmoko will arrive next week (hopefully) and so I'm interested and willing to test your stuff (hoping that it is based on RELENG_7); > Secondly I plan to add support for RNDIS so that you can access the OpenMoko > phone through USB ethernet. I'm currently awaiting approval from the Linux > people to port their RNDIS driver to the new USB stack under a BSD license. > Really they should have used CDC ethernet, but there are too many Windows > users out there I guess :-) Concerning accessing the Openmoko through USB I thought that this is possible, at least the Openmoko's Wiki says this: http://wiki.openmoko.org/wiki/USB_Networking#FreeBSD or are you talking about running FreeBSD on the Openmoko at all (this would be great news :-)) Thx matthias PD: I'm only subscribed to -arm, not to -usb; -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 13:53:12 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E20001065673 for ; Sat, 13 Sep 2008 13:53:12 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 788F38FC12 for ; Sat, 13 Sep 2008 13:53:12 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by fg-out-1718.google.com with SMTP id l26so775197fgb.35 for ; Sat, 13 Sep 2008 06:53:11 -0700 (PDT) Received: by 10.180.237.12 with SMTP id k12mr3868621bkh.106.1221313989830; Sat, 13 Sep 2008 06:53:09 -0700 (PDT) Received: by 10.180.207.17 with HTTP; Sat, 13 Sep 2008 06:53:09 -0700 (PDT) Message-ID: <367b2c980809130653m1ac21a79l95f4def1323c9c7d@mail.gmail.com> Date: Sat, 13 Sep 2008 15:53:09 +0200 From: "Olivier SMEDTS" To: "Hans Petter Selasky" In-Reply-To: <200809131214.49314.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> <200809131214.49314.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: new usb2 stack : -current patch with mpsafe tty layer available ? 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: Sat, 13 Sep 2008 13:53:13 -0000 2008/9/13 Hans Petter Selasky : > svn --username anonsvn --password anonsvn \ > checkout svn://svn.turbocat.net/i4b > > cd i4b/trunk/i4b/FreeBSD.usb2 > make all # and read the instructions > make install # and read the instructions in the end Ok, that works. Previously I was using "i4b/trunk/i4b/FreeBSD.usb" (found that on http://turbocat.net/~hselasky/usb4bsd/index.html). Now I'm using usb2, without usb2_serial and usb2_sound. I only use an USB mouse. % dmesg | grep GIANT atkbd0: [GIANT-LOCKED] Wow, I'm going to buy an USB keyboard too :) Thanks for the great work ! Olivier -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 14:31:35 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90E05106566B; Sat, 13 Sep 2008 14:31:35 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id E66A98FC08; Sat, 13 Sep 2008 14:31:34 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=0DHSzo6Uc4gA:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=OCGuPPFrAAAA:8 a=1SJrhn37x-ojIz45z9oA:9 a=KQWXEiOvhUgapV7ZGnwA:7 a=s59pC9ttPYbFCkWEZwPZP6pk1boA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 905374355; Sat, 13 Sep 2008 16:31:32 +0200 From: Hans Petter Selasky To: Matthias Apitz Date: Sat, 13 Sep 2008 16:33:18 +0200 User-Agent: KMail/1.9.7 References: <200809131310.33495.hselasky@c2i.net> <20080913122220.GA3162@rebelion.Sisis.de> In-Reply-To: <20080913122220.GA3162@rebelion.Sisis.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200809131633.21922.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Openmoko phones and USB on 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: Sat, 13 Sep 2008 14:31:35 -0000 Hi Matthias, The OpenMoko distributions I've tried so far does not come with CDC-etherne= t=20 like default. The network page you are referring to assumes that the OpenMo= ko=20 software is programmed for CDC ethernet on the device side. No, I'm not talking about FreeBSD on the OpenMoko itself. =2D-HPS On Saturday 13 September 2008, Matthias Apitz wrote: > El d=EDa Saturday, September 13, 2008 a las 01:10:32PM +0200, Hans Petter= =20 Selasky escribi=F3: > > Hi, > > > > There are some problems using the dfu-util to flash Openmoko phones from > > FreeBSD. The problem resides in the USB stack on the phone, which does > > not support the libusb-0.1 string requests. I'm planning to work around > > this in the kernel to avoid future problems. I have tested patches for > > this, but they have not committed yet. > > Hi Hans, > > I'm using FreeBSD on my normal laptop and my eeePC 900 gadget; my > Openmoko will arrive next week (hopefully) and so I'm interested and > willing to test your stuff (hoping that it is based on RELENG_7); > > > Secondly I plan to add support for RNDIS so that you can access the > > OpenMoko phone through USB ethernet. I'm currently awaiting approval fr= om > > the Linux people to port their RNDIS driver to the new USB stack under a > > BSD license. Really they should have used CDC ethernet, but there are t= oo > > many Windows users out there I guess :-) > > Concerning accessing the Openmoko through USB I thought that this is > possible, at least the Openmoko's Wiki says this: > http://wiki.openmoko.org/wiki/USB_Networking#FreeBSD > > or are you talking about running FreeBSD on the Openmoko at all (this > would be great news :-)) > > Thx > > matthias From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 17:36:28 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69BCE106566C; Sat, 13 Sep 2008 17:36:28 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 030798FC12; Sat, 13 Sep 2008 17:36:22 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m8DH8t9d043850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 13 Sep 2008 19:08:56 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id m8DH8p1K099805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Sep 2008 19:08:51 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id m8DH8pxq092238; Sat, 13 Sep 2008 19:08:51 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id m8DH8kuv092237; Sat, 13 Sep 2008 19:08:46 +0200 (CEST) (envelope-from ticso) Date: Sat, 13 Sep 2008 19:08:45 +0200 From: Bernd Walter To: Julian Elischer Message-ID: <20080913170845.GT1147@cicely7.cicely.de> References: <200809112044.43749.hselasky@c2i.net> <48C9977C.2030104@samsco.org> <48CAB37F.50002@samsco.org> <20080912.145724.-1750800872.imp@bsdimp.com> <20080912150630.C39726@pooker.samsco.org> <48CB3D09.4050908@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48CB3D09.4050908@elischer.org> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.068, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: Scott Long , current@freebsd.org, fbsd-current@mawer.org, freebsd-usb@freebsd.org, volker@vwsoft.com Subject: Re: "legacy" usb stack fixes X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 17:36:28 -0000 On Fri, Sep 12, 2008 at 09:09:45PM -0700, Julian Elischer wrote: > Scott Long wrote: > >On Fri, 12 Sep 2008, M. Warner Losh wrote: > >>Yes. A SIM will serialize all operations, and the most logical place > >>for that is the computer <-> usb interface, which is the host > >>controller. So having one SIM per host controller would be the > >>optimal placement. Having one SIM per usb device doesn't result in > >>any more real parallelism because the host controller necessarily > >>serializes things because of how USB is defined... > > > >Correct. Another argument for having a SIM per controller/bus and not > >per target is that the SIM is responsible for managing all resources on a > >controller. USB is still a bus topology, and thus certain resources are > >finite and shared, be they bandwidth, arbitration, or concurrency. > >Granted, USB is simple enough that it doesn't give you much control over > >these resources, but having the SIM be at the target level gives the > >system even less control and visibility. If a future enhancement to USB > >grows the ability to do useful things like more concurrency, it'll be > >essential for the SIM to have a controller-wide view of this. > > cam/umass used to have a SIM per USB bus but it got changed sometime > around 1999-2001 from memory. It was haled at the time as a great step > forward when each device got its own SIM but I could never work out why. I did the change at that time and it was not fully agreed by everyone. There was a single global SIM for all umass devices. One of the limitations was that each umass device was represented with a single ID and the maxid was hardcoded. The reason for the change however was that the SIM wasn't reprobed correctly and a manual camcontrol rescan was required under some conditions - especially with multi LUN devices. None of the persons who disagreed with the change switched it back to single SIM with a better fix. > it did solve some problems though I forget what they where. Yes it did, but it could have been fixed in a different way with a single SIM as well. At that time I thought multi SIM would be good idea, but I'm not that sure anymore, since there are also some good arguments against. One of the positive effects is that it is a bit easier to get from the USB device notified by devd to the CAM device to automatically handle things if e.g. your picture camera is connected or start syncing important data if your backup disk gets connected. Another point that I saw was using USB to SCSI converters, where you can have a single USB device owning a complete SCSI bus, but those devices are rare and not umass compliant. All in all the multi SIM as we have today is more a workaround for different other problems. In short: the original reasons for the change are not strong enough to keep it that way. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 18:14:25 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABC5E1065674 for ; Sat, 13 Sep 2008 18:14:25 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id 345B18FC13 for ; Sat, 13 Sep 2008 18:14:19 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=twss2o89-wcA:10 a=UuSVL50luqwA:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=OdR5sfXFAAAA:8 a=V-iW4D3-hLBC3HSAQ6sA:9 a=E5B2g61hbVpoRj43ERoA:7 a=KGZ_zaxsvxALyJdMpQvLymXGHHoA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1073070098; Sat, 13 Sep 2008 20:14:18 +0200 From: Hans Petter Selasky To: "Olivier SMEDTS" Date: Sat, 13 Sep 2008 20:16:10 +0200 User-Agent: KMail/1.9.7 References: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> <200809131214.49314.hselasky@c2i.net> <367b2c980809130653m1ac21a79l95f4def1323c9c7d@mail.gmail.com> In-Reply-To: <367b2c980809130653m1ac21a79l95f4def1323c9c7d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809132016.10604.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: new usb2 stack : -current patch with mpsafe tty layer available ? 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: Sat, 13 Sep 2008 18:14:25 -0000 On Saturday 13 September 2008, Olivier SMEDTS wrote: > 2008/9/13 Hans Petter Selasky : > > svn --username anonsvn --password anonsvn \ > > checkout svn://svn.turbocat.net/i4b > > > > cd i4b/trunk/i4b/FreeBSD.usb2 > > make all # and read the instructions > > make install # and read the instructions in the end > > Ok, that works. Previously I was using "i4b/trunk/i4b/FreeBSD.usb" > (found that on http://turbocat.net/~hselasky/usb4bsd/index.html). > Now I'm using usb2, without usb2_serial and usb2_sound. I only use an USB > mouse. Yes, I need to update my hompage :-) BTW: If you do a SVN update now on my tree, it should be up to date with mpsafe TTY so usb2_serial should build fine. --HPS > > % dmesg | grep GIANT > atkbd0: [GIANT-LOCKED] > > Wow, I'm going to buy an USB keyboard too :) > > Thanks for the great work ! > > Olivier From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 19:46:55 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 856CE1065676; Sat, 13 Sep 2008 19:46:55 +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 3B05B8FC1B; Sat, 13 Sep 2008 19:46:55 +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 <0K75009Z5DHZ4FC0@osl1smout1.broadpark.no>; Sat, 13 Sep 2008 20:46:47 +0200 (CEST) Received: from kg-work2.kg4.no ([80.202.72.251]) by osl1sminn1.broadpark.no (Sun Java(tm) System Messaging Server 6.3-3.01 (built Jul 12 2007; 32bit)) with SMTP id <0K7500D1FDHY5C10@osl1sminn1.broadpark.no>; Sat, 13 Sep 2008 20:46:47 +0200 (CEST) Date: Sat, 13 Sep 2008 20:46:46 +0200 From: Torfinn Ingolfsen To: freebsd-usb@freebsd.org Message-id: <20080913204646.fe60109d.torfinn.ingolfsen@broadpark.no> In-reply-to: <20080913122220.GA3162@rebelion.Sisis.de> References: <200809131310.33495.hselasky@c2i.net> <20080913122220.GA3162@rebelion.Sisis.de> X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) 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 Cc: freebsd-arm@freebsd.org Subject: Re: Openmoko phones and USB on 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: Sat, 13 Sep 2008 19:46:55 -0000 On Sat, 13 Sep 2008 14:22:20 +0200 Matthias Apitz wrote: > Concerning accessing the Openmoko through USB I thought that this is > possible, at least the Openmoko's Wiki says this: > http://wiki.openmoko.org/wiki/USB_Networking#FreeBSD Yes, this is possible. When I plug in my Neo FreeRunner into this FreeeBSD workstation, I get this in /var/log/messages: Sep 13 20:36:14 kg-work2 root: Unknown USB device: vendor 0x1457 product 0x5122 bus uhub1 Sep 13 20:36:15 kg-work2 kernel: cdce0: on uhub1 Sep 13 20:36:15 kg-work2 kernel: cdce0: faking MAC address Sep 13 20:36:15 kg-work2 kernel: cdce0: Ethernet address: 2a:fd:05:61:9b:00 Sep 13 20:36:15 kg-work2 kernel: cdce0: if_start running deferred for Giant This machine is running: tingo@kg-work2$ uname -a FreeBSD kg-work2.kg4.no 7.0-STABLE FreeBSD 7.0-STABLE #0: Mon Jul 21 20:40:31 CEST 2008 root@kg-work2.kg4.no:/usr/obj/usr/src/sys/GENERIC i386 Lets set up the interface: root@kg-work2# ifconfig cdce0 inet 192.168.0.200 netmask 255.255.255.0 root@kg-work2# ifconfig cdce0 cdce0: flags=108843 metric 0 mtu 1500 ether 2a:fd:05:61:9b:00 inet 192.168.0.200 netmask 0xffffff00 broadcast 192.168.0.255 media: Ethernet 10baseT/UTP status: active root@kg-work2# ping 192.168.0.202 PING 192.168.0.202 (192.168.0.202): 56 data bytes 64 bytes from 192.168.0.202: icmp_seq=0 ttl=64 time=5.501 ms 64 bytes from 192.168.0.202: icmp_seq=1 ttl=64 time=0.856 ms 64 bytes from 192.168.0.202: icmp_seq=2 ttl=64 time=1.672 ms ^C --- 192.168.0.202 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.856/2.676/5.501/2.025 ms Ok, try ssh now: root@kg-work2# ssh 192.168.0.202 root@192.168.0.202's password: root@om-gta02:~# uptime 20:43:48 up 7 days, 22:36, 2 users, load average: 0.28, 0.37, 0.45 root@om-gta02:~# uname -a Linux om-gta02 2.6.24 #1 PREEMPT Tue Aug 26 08:33:29 CST 2008 armv4tl unknown root@om-gta02:~# cat /etc/angstrom-version Angstrom P1-Snapshot-20080902 HTH -- Regards, Torfinn Ingolfsen From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 20:32:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AF721065673 for ; Sat, 13 Sep 2008 20:32:42 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.190]) by mx1.freebsd.org (Postfix) with ESMTP id 34D908FC1C for ; Sat, 13 Sep 2008 20:32:41 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by fk-out-0910.google.com with SMTP id k31so1222662fkk.11 for ; Sat, 13 Sep 2008 13:32:40 -0700 (PDT) Received: by 10.180.205.1 with SMTP id c1mr4144978bkg.72.1221337960310; Sat, 13 Sep 2008 13:32:40 -0700 (PDT) Received: by 10.180.207.17 with HTTP; Sat, 13 Sep 2008 13:32:40 -0700 (PDT) Message-ID: <367b2c980809131332l1d07ff8ah7072f912e357782@mail.gmail.com> Date: Sat, 13 Sep 2008 22:32:40 +0200 From: "Olivier SMEDTS" To: "Hans Petter Selasky" In-Reply-To: <200809132016.10604.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> <200809131214.49314.hselasky@c2i.net> <367b2c980809130653m1ac21a79l95f4def1323c9c7d@mail.gmail.com> <200809132016.10604.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: new usb2 stack : -current patch with mpsafe tty layer available ? 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: Sat, 13 Sep 2008 20:32:42 -0000 2008/9/13 Hans Petter Selasky : > BTW: If you do a SVN update now on my tree, it should be up to date with > mpsafe TTY so usb2_serial should build fine. What are the needed patchs in order to build usb2_sound ? I use latest HDA patchs from ariff. -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 20:43:31 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 726C1106566B for ; Sat, 13 Sep 2008 20:43: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 D05BC8FC1D for ; Sat, 13 Sep 2008 20:43:30 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=twss2o89-wcA:10 a=UuSVL50luqwA:10 a=ZtwMFzhc6XSROYQlMkMA/A==:17 a=P5cRHfBawXX1qdusQwkA:9 a=2a7NSrnlS5m-QOCSKI0A:7 a=f9b9f4_cv0ms1oi5xjX1iZCzIYoA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.113.133.218] (account mc467741@c2i.net [62.113.133.218] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 972976722; Sat, 13 Sep 2008 22:43:22 +0200 From: Hans Petter Selasky To: "Olivier SMEDTS" Date: Sat, 13 Sep 2008 22:45:13 +0200 User-Agent: KMail/1.9.7 References: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> <200809132016.10604.hselasky@c2i.net> <367b2c980809131332l1d07ff8ah7072f912e357782@mail.gmail.com> In-Reply-To: <367b2c980809131332l1d07ff8ah7072f912e357782@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809132245.14748.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: new usb2 stack : -current patch with mpsafe tty layer available ? 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: Sat, 13 Sep 2008 20:43:31 -0000 On Saturday 13 September 2008, Olivier SMEDTS wrote: > 2008/9/13 Hans Petter Selasky : > > BTW: If you do a SVN update now on my tree, it should be up to date with > > mpsafe TTY so usb2_serial should build fine. > > What are the needed patchs in order to build usb2_sound ? > I use latest HDA patchs from ariff. Hi, You need the following three additional patches: ==== src/sys/dev/sound/pcm/channel.c @@ -570,13 +570,26 @@ void chn_intr(struct pcm_channel *c) { - CHN_LOCK(c); + uint8_t do_unlock; + if (CHN_LOCK_OWNED(c)) { + /* + * Allow sound drivers to call this function with + * "CHN_LOCK()" locked: + */ + do_unlock = 0; + } else { + do_unlock = 1; + CHN_LOCK(c); + } c->interrupts++; if (c->direction == PCMDIR_PLAY) chn_wrintr(c); else chn_rdintr(c); - CHN_UNLOCK(c); + if (do_unlock) { + CHN_UNLOCK(c); + } + return; } u_int32_t ==== src/sys/dev/sound/pcm/channel.h @@ -258,11 +258,13 @@ #endif #ifdef USING_MUTEX +#define CHN_LOCK_OWNED(c) mtx_owned((struct mtx *)((c)->lock)) #define CHN_LOCK(c) mtx_lock((struct mtx *)((c)->lock)) #define CHN_UNLOCK(c) mtx_unlock((struct mtx *)((c)->lock)) #define CHN_TRYLOCK(c) mtx_trylock((struct mtx *)((c)->lock)) #define CHN_LOCKASSERT(c) mtx_assert((struct mtx *)((c)->lock), MA_OWNED) #else +#define CHN_LOCK_OWNED(c) 0 #define CHN_LOCK(c) #define CHN_UNLOCK(c) #define CHN_TRYLOCK(c) ==== //depot/vendor/freebsd/src/sys/dev/sound/pcm/mixer.c#41 (text+ko) - //depot/projects/usb/src/sys/dev/sound/pcm/mixer.c#11 (text+ko) ==== content @@ -589,7 +589,7 @@ KASSERT(m->type == MIXER_TYPE_SECONDARY, ("%s(): illegal mixer type=%d", __func__, m->type)); - snd_mtxlock(m->lock); + /* mixer uninit can sleep --hps */ MIXER_UNINIT(m); @@ -704,14 +704,24 @@ return EBUSY; } + /* destroy dev can sleep --hps */ + + snd_mtxunlock(m->lock); + pdev->si_drv1 = NULL; destroy_dev(pdev); + snd_mtxlock(m->lock); + for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) mixer_set(m, i, 0); mixer_setrecsrc(m, SOUND_MASK_MIC); + snd_mtxunlock(m->lock); + + /* mixer uninit can sleep --hps */ + MIXER_UNINIT(m); snd_mtxfree(m->lock); @@ -1280,3 +1290,16 @@ return (EINVAL); } + +/* + * Allow the sound driver to use the mixer lock to protect its mixer + * data: + */ +struct mtx * +mixer_get_lock(struct snd_mixer *m) +{ + if (m->lock == NULL) { + return (&Giant); + } + return (m->lock); +} ==== src/sys/dev/sound/pcm/mixer.h @@ -56,6 +56,7 @@ u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev); u_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev); void *mix_getdevinfo(struct snd_mixer *m); +struct mtx *mixer_get_lock(struct snd_mixer *m); extern int mixer_count; --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Sep 13 23:47:02 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26E2A106566B for ; Sat, 13 Sep 2008 23:47:02 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id AEB918FC17 for ; Sat, 13 Sep 2008 23:47:01 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by fg-out-1718.google.com with SMTP id l26so891108fgb.35 for ; Sat, 13 Sep 2008 16:47:00 -0700 (PDT) Received: by 10.181.2.2 with SMTP id e2mr4201819bki.49.1221349619057; Sat, 13 Sep 2008 16:46:59 -0700 (PDT) Received: by 10.180.207.17 with HTTP; Sat, 13 Sep 2008 16:46:59 -0700 (PDT) Message-ID: <367b2c980809131646n2b5bd8e9gc44a22147dacbd5@mail.gmail.com> Date: Sun, 14 Sep 2008 01:46:59 +0200 From: "Olivier SMEDTS" To: "Hans Petter Selasky" In-Reply-To: <200809132245.14748.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <367b2c980809121246j16fba781s29c0da806f555ebe@mail.gmail.com> <200809132016.10604.hselasky@c2i.net> <367b2c980809131332l1d07ff8ah7072f912e357782@mail.gmail.com> <200809132245.14748.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: new usb2 stack : -current patch with mpsafe tty layer available ? 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: Sat, 13 Sep 2008 23:47:02 -0000 Thanks for the patchs. I've got it working, no problem with my usb mouse and FAT32 formatted usb flash key. One glitch though : a warning in usb2_serial with latest CURRENT, which made gcc fail with -Werror : cc -O2 -pipe -march=native -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /work/src/sys/modules/usb2/serial/../../../dev/usb2/serial/usb2_serial.c cc1: warnings being treated as errors /work/src/sys/modules/usb2/serial/../../../dev/usb2/serial/usb2_serial.c: In function 'usb2_com_put_data': /work/src/sys/modules/usb2/serial/../../../dev/usb2/serial/usb2_serial.c:1043: warning: 'cnt' may be used uninitialized in this function I had to compile it without -Werror. Olivier 2008/9/13 Hans Petter Selasky : > On Saturday 13 September 2008, Olivier SMEDTS wrote: >> 2008/9/13 Hans Petter Selasky : >> > BTW: If you do a SVN update now on my tree, it should be up to date with >> > mpsafe TTY so usb2_serial should build fine. >> >> What are the needed patchs in order to build usb2_sound ? >> I use latest HDA patchs from ariff. > > Hi, > > You need the following three additional patches: > > ==== src/sys/dev/sound/pcm/channel.c > @@ -570,13 +570,26 @@ > void > chn_intr(struct pcm_channel *c) > { > - CHN_LOCK(c); > + uint8_t do_unlock; > + if (CHN_LOCK_OWNED(c)) { > + /* > + * Allow sound drivers to call this function with > + * "CHN_LOCK()" locked: > + */ > + do_unlock = 0; > + } else { > + do_unlock = 1; > + CHN_LOCK(c); > + } > c->interrupts++; > if (c->direction == PCMDIR_PLAY) > chn_wrintr(c); > else > chn_rdintr(c); > - CHN_UNLOCK(c); > + if (do_unlock) { > + CHN_UNLOCK(c); > + } > + return; > } > > u_int32_t > ==== src/sys/dev/sound/pcm/channel.h > @@ -258,11 +258,13 @@ > #endif > > #ifdef USING_MUTEX > +#define CHN_LOCK_OWNED(c) mtx_owned((struct mtx *)((c)->lock)) > #define CHN_LOCK(c) mtx_lock((struct mtx *)((c)->lock)) > #define CHN_UNLOCK(c) mtx_unlock((struct mtx *)((c)->lock)) > #define CHN_TRYLOCK(c) mtx_trylock((struct mtx *)((c)->lock)) > #define CHN_LOCKASSERT(c) mtx_assert((struct mtx *)((c)->lock), MA_OWNED) > #else > +#define CHN_LOCK_OWNED(c) 0 > #define CHN_LOCK(c) > #define CHN_UNLOCK(c) > #define CHN_TRYLOCK(c) > ==== //depot/vendor/freebsd/src/sys/dev/sound/pcm/mixer.c#41 (text+ko) - //depot/projects/usb/src/sys/dev/sound/pcm/mixer.c#11 (text+ko) ==== content > @@ -589,7 +589,7 @@ > KASSERT(m->type == MIXER_TYPE_SECONDARY, > ("%s(): illegal mixer type=%d", __func__, m->type)); > > - snd_mtxlock(m->lock); > + /* mixer uninit can sleep --hps */ > > MIXER_UNINIT(m); > > @@ -704,14 +704,24 @@ > return EBUSY; > } > > + /* destroy dev can sleep --hps */ > + > + snd_mtxunlock(m->lock); > + > pdev->si_drv1 = NULL; > destroy_dev(pdev); > > + snd_mtxlock(m->lock); > + > for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) > mixer_set(m, i, 0); > > mixer_setrecsrc(m, SOUND_MASK_MIC); > > + snd_mtxunlock(m->lock); > + > + /* mixer uninit can sleep --hps */ > + > MIXER_UNINIT(m); > > snd_mtxfree(m->lock); > @@ -1280,3 +1290,16 @@ > > return (EINVAL); > } > + > +/* > + * Allow the sound driver to use the mixer lock to protect its mixer > + * data: > + */ > +struct mtx * > +mixer_get_lock(struct snd_mixer *m) > +{ > + if (m->lock == NULL) { > + return (&Giant); > + } > + return (m->lock); > +} > ==== src/sys/dev/sound/pcm/mixer.h > @@ -56,6 +56,7 @@ > u_int32_t mix_getparent(struct snd_mixer *m, u_int32_t dev); > u_int32_t mix_getchild(struct snd_mixer *m, u_int32_t dev); > void *mix_getdevinfo(struct snd_mixer *m); > +struct mtx *mixer_get_lock(struct snd_mixer *m); > > extern int mixer_count; > > > > > --HPS > -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas."