From owner-freebsd-usb@FreeBSD.ORG Sun Nov 30 21:00:07 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 371F41065676 for ; Sun, 30 Nov 2008 21:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1403B8FC12 for ; Sun, 30 Nov 2008 21:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAUL062A074740 for ; Sun, 30 Nov 2008 21:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAUL06TY074739; Sun, 30 Nov 2008 21:00:06 GMT (envelope-from gnats) Resent-Date: Sun, 30 Nov 2008 21:00:06 GMT Resent-Message-Id: <200811302100.mAUL06TY074739@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, Stéphane Legrand Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62820106564A for ; Sun, 30 Nov 2008 20:58:43 +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 517CA8FC0C for ; Sun, 30 Nov 2008 20:58:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAUKwgNx092368 for ; Sun, 30 Nov 2008 20:58:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mAUKwgOa092367; Sun, 30 Nov 2008 20:58:42 GMT (envelope-from nobody) Message-Id: <200811302058.mAUKwgOa092367@www.freebsd.org> Date: Sun, 30 Nov 2008 20:58:42 GMT From: Stéphane Legrand To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/129311: Instant crash with an USB card reader X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 21:00:07 -0000 >Number: 129311 >Category: usb >Synopsis: Instant crash with an USB card reader >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 30 21:00:06 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Stéphane Legrand >Release: 7.1-PRERELEASE >Organization: >Environment: FreeBSD sequoia.mondomaineamoi.megalo 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #17: Sat Nov 15 17:44:14 CET 2008 stephane@sequoia.mondomaineamoi.megalo:/usr/obj/usr/src/sys/SEQUOIA i386 >Description: Hello, I recently purchased an USB adapter to read SD cards. On my first try, i made a mistake and put the SD card on the wrong side. This instantantly crashed my FreeBSD system. Here is the KDB output : There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... .. Unread portion of the kernel message buffer: panic: kmem_malloc(1848643584): kmem_map too small: 43110400 total allocated cpuid = 0 Uptime: 7h51m49s Physical memory: 1002 MB Dumping 183 MB: 168 152 136 120 104 88 72 56 40 24 8 .. Loaded symbols for /boot/kernel/drm.ko #0 doadump () at pcpu.h:196 196 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); (kgdb) list 191 static __inline struct thread * 192 __curthread(void) 193 { 194 struct thread *td; 195 196 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); 197 return (td); 198 } 199 #define curthread (__curthread()) 200 (kgdb) backtrace #0 doadump () at pcpu.h:196 #1 0xc0754a8f in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc0754d54 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc0965432 in kmem_malloc (map=0xc147108c, size=1848643584, flags=2) at /usr/src/sys/vm/vm_kern.c:312 #4 0xc095c29a in page_alloc (zone=0x0, bytes=1848643584, pflag=0xe4276b4f "\002", wait=2) at /usr/src/sys/vm/uma_core.c:959 #5 0xc095ec0b in uma_large_malloc (size=1848643584, wait=2) at /usr/src/sys/vm/uma_core.c:2713 #6 0xc0745aa4 in malloc (size=1848643584, mtp=0xc0b324a0, flags=2) at /usr/src/sys/kern/kern_malloc.c:393 #7 0xc0700b2c in g_read_data (cp=0xc6644c80, offset=Unhandled dwarf expression opcode 0x93 ) at geom.h:300 #8 0xc06fb6a8 in g_bsd_try (gp=Variable "gp" is not available. ) at /usr/src/sys/geom/geom_bsd.c:211 #9 0xc06fbbf7 in g_bsd_taste (mp=0xc0b321e0, pp=0xc5a23580, flags=0) at /usr/src/sys/geom/geom_bsd.c:549 #10 0xc0703401 in g_new_provider_event (arg=0xc5a23580, flag=0) at /usr/src/sys/geom/geom_subr.c:543 #11 0xc07000bf in g_run_events () at /usr/src/sys/geom/geom_event.c:211 #12 0xc0701317 in g_event_procbody () at /usr/src/sys/geom/geom_kern.c:141 #13 0xc0732d11 in fork_exit (callout=0xc07012ac , arg=0x0, frame=0xe4276d38) at /usr/src/sys/kern/kern_fork.c:804 #14 0xc09d31d0 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:264 Of course, this crash should never happen as i'm supposed to put the SD card on the right side :-) But i prefer to send this PR in case this could be avoided. By the way, when the SD card is put on the right side, it works perfectly well. Regards, Stéphane Legrand. >How-To-Repeat: Plug the USB card reader with a SD card put on the wrong side. >Fix: Put the SD card on the right side! :-) >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Mon Dec 1 11:07:04 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 E62561065672 for ; Mon, 1 Dec 2008 11:07:04 +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 D0C818FC1A for ; Mon, 1 Dec 2008 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mB1B74nM052725 for ; Mon, 1 Dec 2008 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mB1B74vT052721 for freebsd-usb@FreeBSD.org; Mon, 1 Dec 2008 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Dec 2008 11:07:04 GMT Message-Id: <200812011107.mB1B74vT052721@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, 01 Dec 2008 11:07:05 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o usb/129311 usb Instant crash with an USB card reader o usb/129251 usb Liebert UPS being assigned uhid and not ugen o usb/129173 usb [uplcom] [patch] Add support for Corega CG-USBRS232R a o usb/129129 usb panic with device Meizu MiniPlayer M6 (SL) under usb2 o usb/128990 usb [usb] u3g does not handle RTS/CTS available on for exa o usb/128977 usb uaudio is not full duplex o usb/128847 usb Detachment of mounted USB flash drive causes system fr o usb/128803 usb [patch] [quirk] Quirk for I-Tuner Networks USBLCD4X20 o usb/128485 usb Nokia N80 modem support o usb/128425 usb Cannot Connect Maxtor Onetouch 4 USB drive f usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/128324 usb [uplcom] remove baud rate restriction for PL2303X chip p usb/128115 usb [uplcom] [patch] USB-RS232 circuets on chip PL2303HX n o usb/127980 usb [QUIRK] Fix Samsung YP U2 MP3 player on 7.x and 8.x o usb/127926 usb [boot] USB Timeout during bootup o usb/127549 usb [umass] [patch] Meizu MiniPlayer M6 (SL) requires some f usb/127516 usb after csup src-all RELENG_7 s usb/127453 usb [request] ubsa, uark, ubser, uftdi, and friends should o usb/127423 usb [boot] BTX halted on Gigabyte GA-MA69VM-S2 / AMD Sempr o usb/127342 usb [boot] cannot enable usb keyboard and mouse support in o kern/127222 usb [ohci]: Regression in 7.0 usb storage generic driver o usb/126884 usb [patch] Bug in buffer handling in ugen.c f kern/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125736 usb [ukbd] [hang] system hangs after AT keyboard detect if o usb/125631 usb [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/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 a usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/112944 usb [ulpt] [patch] Bi-directional access to HP LaserJet 10 o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an o usb/112631 usb [panic] Problem with SONY DSC-S80 camera on umount s usb/112568 usb [umass] [request] USB mode may wrong when mounting Pla o usb/112463 usb [umass] problem with Samsung USB DVD writer, libscg an o usb/112461 usb [ehci] [request] ehci USB 2.0 doesn't work on nforce4 o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID 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(1): [patch] [request] usbhidctl: add ability o usb/103289 usb [request] USB 2.0 problems on AMD LX-800 CPU and CS-55 o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103025 usb [uhub] [panic] wrong detection of USB device for FreeB o usb/102976 usb [panic] Casio Exilim Digital Camera causes panic on in o usb/102678 usb [keyboard] Dell PowerEdge DRAC5 USB Keyboard does not o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/101761 usb [usb] [patch] [request] usb.h: increase maximal size o o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101096 usb [ural] [panic] USB WLAN occasionally causes kernel-pan o usb/100746 usb [keyboard] system does not boot due to USB keyboard pr o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o 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 s usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R o usb/73307 usb [panic] Kernel panics on USB disconnect s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/71455 usb [umass] Slow USB umass performance of 5.3 o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans s bin/57255 usb [patch] usbd(8) and multi-function devices s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 s usb/51958 usb [urio] [patch] update for urio driver o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o usb/40948 usb [umass] [request] USB HP CDW8200 does not work o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 293 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Dec 1 18:48: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 0A8021065672 for ; Mon, 1 Dec 2008 18:48:07 +0000 (UTC) (envelope-from jrhett@netconsonance.com) Received: from mail.netconsonance.com (mail.netconsonance.com [198.207.204.4]) by mx1.freebsd.org (Postfix) with ESMTP id E0D558FC17 for ; Mon, 1 Dec 2008 18:48:06 +0000 (UTC) (envelope-from jrhett@netconsonance.com) Received: from [10.66.240.106] (public-wireless.sv.svcolo.com [64.13.135.30]) (authenticated bits=0) by mail.netconsonance.com (8.14.1/8.14.2) with ESMTP id mB1IMa9O087722; Mon, 1 Dec 2008 10:22:36 -0800 (PST) (envelope-from jrhett@netconsonance.com) X-Virus-Scanned: amavisd-new at netconsonance.com X-Spam-Flag: NO X-Spam-Score: -1.06 X-Spam-Level: X-Spam-Status: No, score=-1.06 tagged_above=-999 required=3.5 tests=[ALL_TRUSTED=-1.44, AWL=0.380] Message-Id: <31DE68A5-D3CB-4C33-86E6-515581B425E1@netconsonance.com> From: Jo Rhett To: Andriy Gapon In-Reply-To: <492FF127.807@icyb.net.ua> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Mon, 1 Dec 2008 10:22:31 -0800 References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> <492FF127.807@icyb.net.ua> X-Mailer: Apple Mail (2.929.2) Cc: FreeBSD Stable , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt 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, 01 Dec 2008 18:48:07 -0000 Just FYI we are seeing the exact same problem with PS/2 keyboards and the 6.4 loader, so this may not be a USB-only issue. The complete lack of response to serious bug reports about 6.4-REL is fairly shocking. On Nov 28, 2008, at 5:24 AM, Andriy Gapon wrote: > I did more testing and it seems that our loader does have something to > do with the problem. > > If I boot to memtest86 the keyboard keeps working. > If I pause boot menu, wait for many minutes, the keyboard still works. > If I escape to loader prompt, this when the keyboard stops working > after > a few seconds. > > Not sure how to explain this. > I think I've seen some changes to reduce memory usage of loader, I > will > try them to see if that would make any difference for my situation. > > > -- > Andriy Gapon > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org > " -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness From owner-freebsd-usb@FreeBSD.ORG Mon Dec 1 20:40:47 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 C2FFC1065672; Mon, 1 Dec 2008 20:40:47 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from proxy.meer.net (proxy.meer.net [64.13.141.13]) by mx1.freebsd.org (Postfix) with ESMTP id 4E54A8FC1D; Mon, 1 Dec 2008 20:40:47 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mail.meer.net (mail.meer.net [64.13.141.3]) by proxy.meer.net (8.14.2/8.14.2) with ESMTP id mB1K01uC064161; Mon, 1 Dec 2008 12:00:21 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from mail2.meer.net (mail2.meer.net [64.13.141.16]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id mB1JxD1Q083632; Mon, 1 Dec 2008 11:59:13 -0800 (PST) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (209.249.190.254.available.above.net [209.249.190.254] (may be forged)) (authenticated bits=0) by mail2.meer.net (8.14.1/8.14.1) with ESMTP id mB1JxDFu029335; Mon, 1 Dec 2008 11:59:13 -0800 (PST) (envelope-from gnn@neville-neil.com) Date: Mon, 01 Dec 2008 14:59:12 -0500 Message-ID: From: "George V. Neville-Neil" To: Jo Rhett In-Reply-To: <31DE68A5-D3CB-4C33-86E6-515581B425E1@netconsonance.com> References: <4912E462.4090608@icyb.net.ua> <491586B9.2020303@vwsoft.com> <4919851B.7050800@icyb.net.ua> <492FF127.807@icyb.net.ua> <31DE68A5-D3CB-4C33-86E6-515581B425E1@netconsonance.com> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i386-apple-darwin9.5.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Canit-CHI2: 0.50 X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-Spam-Score: 0.80 () [Tag at 5.00] PORN_RP_SHOCKING X-CanItPRO-Stream: default X-Canit-Stats-ID: 2462937 - b7fd3f763812 X-Scanned-By: CanIt (www . roaringpenguin . com) on 64.13.141.13 Cc: FreeBSD Stable , Andriy Gapon , freebsd-usb@freebsd.org Subject: Re: usb keyboard dying at loader prompt 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, 01 Dec 2008 20:40:47 -0000 At Mon, 1 Dec 2008 10:22:31 -0800, Jo Rhett wrote: > > Just FYI we are seeing the exact same problem with PS/2 keyboards and > the 6.4 loader, so this may not be a USB-only issue. > > The complete lack of response to serious bug reports about 6.4-REL is > fairly shocking. > Jo, I have mostly stayed away from these threads because they've often devolved into unproductive finger pointing. Please leave the hyperbole out of your posts, or at least attempt to cut it back. People on these lists are working quite hard to solve problems for the whole of the FreeBSD community and your posts, such as this one, are not helping us to move forward. Thanks, George Neville-Neil From owner-freebsd-usb@FreeBSD.ORG Mon Dec 1 22:53:57 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 749311065672 for ; Mon, 1 Dec 2008 22:53:57 +0000 (UTC) (envelope-from janm@transactionware.com) Received: from mail.transactionware.com (mail.transactionware.com [203.14.245.7]) by mx1.freebsd.org (Postfix) with SMTP id AC7148FC1D for ; Mon, 1 Dec 2008 22:53:55 +0000 (UTC) (envelope-from janm@transactionware.com) Received: (qmail 53678 invoked from network); 1 Dec 2008 22:27:34 -0000 Received: from midgard.transactionware.com (192.168.1.55) by dm.transactionware.com with SMTP; 1 Dec 2008 22:27:34 -0000 Received: (qmail 14051 invoked by uid 907); 1 Dec 2008 22:27:12 -0000 Received: from midgard.transactionware.com (HELO STUDYPC) (192.168.1.55) by midgard.transactionware.com (qpsmtpd/0.40) with ESMTP; Tue, 02 Dec 2008 09:27:12 +1100 From: "Jan Mikkelsen" To: "'Jo Rhett'" , "'Andriy Gapon'" Date: Tue, 2 Dec 2008 09:27:03 +1100 Message-ID: <459EF5063D85400CB8D57DE9529A4D04@STUDYPC> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6838 Importance: Normal In-Reply-To: <31DE68A5-D3CB-4C33-86E6-515581B425E1@netconsonance.com> Thread-Index: AclT4eTpFdXnCmVfT1a5vocktTfRRQAIUOMg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Cc: 'FreeBSD Stable' , freebsd-usb@freebsd.org Subject: RE: usb keyboard dying at loader prompt 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, 01 Dec 2008 22:53:57 -0000 Hi, > Just FYI we are seeing the exact same problem with PS/2 > keyboards and > the 6.4 loader, so this may not be a USB-only issue. > > [ ... ] > > On Nov 28, 2008, at 5:24 AM, Andriy Gapon wrote: > > I did more testing and it seems that our loader does have > something to > > do with the problem. > > > > If I boot to memtest86 the keyboard keeps working. > > If I pause boot menu, wait for many minutes, the keyboard > still works. > > If I escape to loader prompt, this when the keyboard stops working > > after > > a few seconds. > > > > Not sure how to explain this. > > I think I've seen some changes to reduce memory usage of loader, I > > will > > try them to see if that would make any difference for my situation. I have seen a similar problem on a Sun X4240 with 7.1-PRE. Using the ILOM remote keyboard works at the loader prompt but fails at the root filesystem prompt. I could work around the problem by attaching a different keyboard to the front USB port. Have you tried different keyboards? Regards, Jan. From owner-freebsd-usb@FreeBSD.ORG Mon Dec 1 23:18:01 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 247CC106564A for ; Mon, 1 Dec 2008 23:18:01 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: from mail.bindone.de (mail.bindone.de [80.190.134.51]) by mx1.freebsd.org (Postfix) with SMTP id 97A738FC0C for ; Mon, 1 Dec 2008 23:18:00 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: (qmail 34386 invoked by uid 89); 1 Dec 2008 23:17:58 -0000 Received: from unknown (HELO ufo.bindone.de) (mg@bindone.de@87.152.185.48) by mail.bindone.de with ESMTPA; 1 Dec 2008 23:17:58 -0000 Message-ID: <49347075.4080605@bindone.de> Date: Tue, 02 Dec 2008 00:17:09 +0100 From: Michael User-Agent: Thunderbird 2.0.0.18 (X11/20081129) MIME-Version: 1.0 To: Hans Petter Selasky References: <492D6E0D.7020500@bindone.de> <200811261734.27627.hselasky@c2i.net> <492D8A71.10709@bindone.de> <200811261953.04517.hselasky@c2i.net> In-Reply-To: <200811261953.04517.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 01 Dec 2008 23:18:01 -0000 Hans Petter Selasky wrote: > On Wednesday 26 November 2008, Michael wrote: > >> Sorry, this contains some off-topic questions, maybe you have answers >> anyway... >> >> Hans Petter Selasky wrote: >> >>> On Wednesday 26 November 2008, Michael wrote: >>> >>>> Hans Petter Selasky wrote: >>>> >>>>> On Wednesday 26 November 2008, Michael wrote: >>>>> >>>>>> + >>>>>> + /* OEM Sierra MC8775 */ >>>>>> + {{ USB_VENDOR_HP, USB_PRODUCT_HP_HS2300 >>>>>> }, U3GSP_UMTS, U3GFL_NONE }, // XXX >>>>>> + >>>>>> >>>>> The ID table in USB2 has been moved to: >>>>> >>>>> core/usb2_msctest.c >>>>> >>>>> --HPS >>>>> >>>> When? I have a 10 day old checkout here, and the sierra wireless device >>>> appears in core/usbdevs, include/usb2_devid.h include/usb2_devtable.h >>>> and serial/ugensa2.c. Any hint were to find details about what to put >>>> where (seems like amoving target :) >>>> >>> Do you have serial/u3g2.c ? >>> >>> --HPS >>> >> Nope. I used csup to get HEAD on the 15th. CVSWeb says that u3g2.c has >> been checked in 33 hours ago. I would assume that using cvs isn't really >> recommended for current anymore. What is the best way to follow current >> nowadays (SVN/perforce)? My problem is, that I'm actually performing >> work on this machine, so I'm not too keen to upgrade constantly (but I >> required current for various devices) and usb1 works okay right now. So >> maybe somebody can just bring in the devive ids into current that are >> proven to work in USB1 (which works okay for me right now), since >> obviously I'm not authorized to submit changes anyway - if I have some >> extra time I might checkout the usb2 changes of the last couple of >> weeks and test if it actually works with this device entry and report >> back to you. Who is repsonsible for checking in the patches to usb1? >> > > Hi Michael, > > I think SVN is more up to date. Just give it some time and CVS will be updated > aswell. > > >> Btw, are there any advantages of using USB2 in terms of power management >> on a laptop (even with no external devices attached)? >> > > Not yet. Probably I will add some simple power management support after > new-year. Be aware that many USB devices have broken suspend/resume support > and can fail, so leaving the power on is sometimes better. > > When no devices are attached, I am going to add support so that the HC is > turned off. That will save some power. > > Remember that suspend/resume cycles introduce extra latency getting the system > up and running again. > > >> (this might >> actually motivate me to play a little bit more with it - right now the >> overall power consumption is about 40% higher compared to using products >> made in Redmond). >> > > >> I'm also developing a special acpi driver for HP >> machines right now I will most likely submit in a few weeks. Do you >> think it is appropriate to submit this to freebsd-acpi for review? >> > > Yes, and CC "Nate Lawson " > > --HPS > Thanks for the info regarding acpi. I've got my HSDPA enabled SIM card today and have a couple of questions: 1. The Sierra MC8775 chipsets are defined as U3GSP_HSDPA in u3g.c, which matches their marketing (vendor and provider) name, but it seems that based on the downstream definition this means only 1.2MBit/s, while chipset and network are supposed to deliver at least 3.6MBit/s (or optional 7.2), so I think they should be defined as HSPA (7.2MBit up/384kbit down) 2. I tried the card using basically the same ppp profile as before, but at any reasonable amount of traffic (reasonable could by typing ls on a remote host), I get "ucom0: ucomreadcb: IOERROR" and the port stalls. I'm wondering if this is some kind of side-effect of rate switching (I know nothing about the technology, so all I can do is guess). It's just interesting, because it's the same machine, same configuration, the ony differences are a) Different SIM card/provider (E-Plus before, vodafone now) b) HSDPA instead of UMTS (and a higher port speed of course 1.2MBit/7.2Mbit - tried both settings) Using the UMTS SIM I had before I've been able to use the internet at approx. 45KByte/s for >1hour, now it crashes within seconds. 3. I tried using a current checkout of usb2 (and added all the device IDs necessary), but serial_3g is missing (and therefore commented out in sys/modules/usb2/Makefile), so I'm stuck there as well. Is there actual hope that the problem might not appear when using usb2? (all I know about usb2 is that it's supposed to be giant-free, no idea if it can handle these issues any better - seems like at least 50% of USB devices are violating the standard in one way or another anyway). Is there anything else I can do to debug the issue (all I found online were people with issues using motorola and nokia phones and a workaround that basically ignores io erros in ucom, which sounds dirty to me)? /Michael From owner-freebsd-usb@FreeBSD.ORG Tue Dec 2 09:24:34 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 CE9461065678 for ; Tue, 2 Dec 2008 09:24:34 +0000 (UTC) (envelope-from nick@anywi.com) Received: from hpsmtp-eml18.kpnxchange.com (hpsmtp-eml18.KPNXCHANGE.COM [213.75.38.118]) by mx1.freebsd.org (Postfix) with ESMTP id 6A4EF8FC2A for ; Tue, 2 Dec 2008 09:24:34 +0000 (UTC) (envelope-from nick@anywi.com) Received: from cpsmtp-eml114.kpnxchange.com ([213.75.84.114]) by hpsmtp-eml18.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Dec 2008 10:24:32 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtp-eml114.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Dec 2008 10:24:32 +0100 Received: (qmail 76409 invoked by uid 98); 2 Dec 2008 09:24:32 -0000 Received: from 10.66.0.133 (nick@10.66.0.133) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:1(10.66.0.133):. Processed in 0.729963 secs); 02 Dec 2008 09:24:32 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.133) by uitsmijter.van-laarhoven.org with SMTP; 2 Dec 2008 09:24:31 -0000 Received: (nullmailer pid 5083 invoked by uid 1001); Tue, 02 Dec 2008 09:24:29 -0000 From: Nick Hibma Organization: AnyWi To: freebsd-usb@freebsd.org Date: Tue, 2 Dec 2008 10:24:28 +0100 User-Agent: KMail/1.9.10 References: <492D6E0D.7020500@bindone.de> <200811261953.04517.hselasky@c2i.net> <49347075.4080605@bindone.de> In-Reply-To: <49347075.4080605@bindone.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812021024.29364.nick@anywi.com> X-OriginalArrivalTime: 02 Dec 2008 09:24:32.0933 (UTC) FILETIME=[C91A2550:01C9545F] Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 02 Dec 2008 09:24:34 -0000 > 1. The Sierra MC8775 chipsets are defined as U3GSP_HSDPA in u3g.c, > which matches their marketing > (vendor and provider) name, but it seems that based on the > downstream definition this means only 1.2MBit/s, > while chipset and network are supposed to deliver at least 3.6MBit/s > (or optional 7.2), so I think > they should be defined as HSPA (7.2MBit up/384kbit down) Those definition set the buffering but anything above 384k (UMTS) is capped anyway. Unless real performance is lower than expected this is not something to worry about. Nick -- AnyWi Technologies From owner-freebsd-usb@FreeBSD.ORG Tue Dec 2 10:18:58 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 C26A3106568D for ; Tue, 2 Dec 2008 10:18:58 +0000 (UTC) (envelope-from nick@anywi.com) Received: from hpsmtp-eml12.kpnxchange.com (hpsmtp-eml12.KPNXCHANGE.COM [213.75.38.112]) by mx1.freebsd.org (Postfix) with ESMTP id 5AD868FC16 for ; Tue, 2 Dec 2008 10:18:57 +0000 (UTC) (envelope-from nick@anywi.com) Received: from cpsmtp-eml101.kpnxchange.com ([213.75.84.101]) by hpsmtp-eml12.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Dec 2008 11:18:56 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtp-eml101.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Dec 2008 11:18:56 +0100 Received: (qmail 78699 invoked by uid 98); 2 Dec 2008 10:18:55 -0000 Received: from 10.66.0.133 (nick@10.66.0.133) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:1(10.66.0.133):. Processed in 0.821187 secs); 02 Dec 2008 10:18:55 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.133) by uitsmijter.van-laarhoven.org with SMTP; 2 Dec 2008 10:18:54 -0000 Received: (nullmailer pid 5502 invoked by uid 1001); Tue, 02 Dec 2008 10:18:54 -0000 From: Nick Hibma Organization: AnyWi To: freebsd-usb@freebsd.org Date: Tue, 2 Dec 2008 11:18:53 +0100 User-Agent: KMail/1.9.10 References: <492D6E0D.7020500@bindone.de> <49347075.4080605@bindone.de> <200812021024.29364.nick@anywi.com> In-Reply-To: <200812021024.29364.nick@anywi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812021118.53540.nick@anywi.com> X-OriginalArrivalTime: 02 Dec 2008 10:18:56.0750 (UTC) FILETIME=[627D18E0:01C95467] Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 02 Dec 2008 10:18:58 -0000 File a PR if you would like to have it changed. Update all the entries you would have changed. Nick > > 1. The Sierra MC8775 chipsets are defined as U3GSP_HSDPA in u3g.c, > > which matches their marketing > > (vendor and provider) name, but it seems that based on the > > downstream definition this means only 1.2MBit/s, > > while chipset and network are supposed to deliver at least > > 3.6MBit/s (or optional 7.2), so I think > > they should be defined as HSPA (7.2MBit up/384kbit down) > > Those definition set the buffering but anything above 384k (UMTS) is > capped anyway. Unless real performance is lower than expected this is not > something to worry about. > > Nick -- AnyWi Technologies From owner-freebsd-usb@FreeBSD.ORG Tue Dec 2 14:52:04 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 99A841065675 for ; Tue, 2 Dec 2008 14:52:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swip.net [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 2ACAD8FC1D for ; Tue, 2 Dec 2008 14:52:03 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=NpnstxDL3QMA:10 a=P3SC899gXHkOLDnkTYxLZw==:17 a=WplW4So11i5CKLofSOkA:9 a=qXaE9thOgID2wdSRQpjqJfS1LyUA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 989527820; Tue, 02 Dec 2008 15:52:02 +0100 From: Hans Petter Selasky To: Michael Date: Tue, 2 Dec 2008 15:54:16 +0100 User-Agent: KMail/1.9.7 References: <492D6E0D.7020500@bindone.de> <200811261953.04517.hselasky@c2i.net> <49347075.4080605@bindone.de> In-Reply-To: <49347075.4080605@bindone.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200812021554.17516.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 02 Dec 2008 14:52:04 -0000 On Tuesday 02 December 2008, Michael wrote: > 3. I tried using a current checkout of usb2 (and added all the device > IDs necessary), but serial_3g is missing (and therefore > =A0 =A0commented out in sys/modules/usb2/Makefile), so I'm stuck there as > well. Is there actual hope that the problem > =A0 might not appear when using usb2? (all I know about usb2 is that it's > supposed to be giant-free, no idea if it can > =A0 handle these issues any better - seems like at least 50% of USB > devices are violating the standard in one way or > =A0 another anyway). Alfred forgot to add the Makefile. The 3g id's are now in=20 core/usb2_msctest.c . I've sent him a patch to fix this, but have not heard= =20 from him yet, assuming he is very busy. Just copy one of the other serial driver Makefiles and add "u3g2.c". =2D-HPS From owner-freebsd-usb@FreeBSD.ORG Tue Dec 2 23:58:14 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 D7929106564A for ; Tue, 2 Dec 2008 23:58:14 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: from mail.bindone.de (mail.bindone.de [80.190.134.51]) by mx1.freebsd.org (Postfix) with SMTP id 4D8D68FC16 for ; Tue, 2 Dec 2008 23:58:14 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: (qmail 91709 invoked by uid 89); 2 Dec 2008 23:58:11 -0000 Received: from unknown (HELO ufo.bindone.de) (mg@bindone.de@90.186.198.19) by mail.bindone.de with ESMTPA; 2 Dec 2008 23:58:11 -0000 Message-ID: <4935CB2E.2020801@bindone.de> Date: Wed, 03 Dec 2008 00:56:30 +0100 From: Michael User-Agent: Thunderbird 2.0.0.18 (X11/20081129) MIME-Version: 1.0 To: Hans Petter Selasky References: <492D6E0D.7020500@bindone.de> <200811261953.04517.hselasky@c2i.net> <49347075.4080605@bindone.de> <200812021554.17516.hselasky@c2i.net> In-Reply-To: <200812021554.17516.hselasky@c2i.net> Content-Type: multipart/mixed; boundary="------------030700060705010805040303" Cc: freebsd-usb@freebsd.org Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 02 Dec 2008 23:58:15 -0000 This is a multi-part message in MIME format. --------------030700060705010805040303 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hans Petter Selasky wrote: > On Tuesday 02 December 2008, Michael wrote: > >> 3. I tried using a current checkout of usb2 (and added all the device >> IDs necessary), but serial_3g is missing (and therefore >> commented out in sys/modules/usb2/Makefile), so I'm stuck there as >> well. Is there actual hope that the problem >> might not appear when using usb2? (all I know about usb2 is that it's >> supposed to be giant-free, no idea if it can >> handle these issues any better - seems like at least 50% of USB >> devices are violating the standard in one way or >> another anyway). >> > > Alfred forgot to add the Makefile. The 3g id's are now in > core/usb2_msctest.c . I've sent him a patch to fix this, but have not heard > from him yet, assuming he is very busy. > > Just copy one of the other serial driver Makefiles and add "u3g2.c". > > --HPS > Ok, essentially this seems to work, even so there are some caveats: 1. usb2_serial_3g has to be loaded before of usb2_controller_ehci 2. When I disable the device (button or bios command) it is detached correctly, but reattaching it fails 9 out of 10 times with the following error: kernel: usb2_alloc_device:1421: set address 2 failed (ignored) kernel: usb2_alloc_device:1456: getting device descriptor at addr 2 failed! kernel: uhub_reattach_port:402: could not allocate new device! If I kldunload usb2_controller_ehci and reload it, its detected ok. usb1 has no issues performing the same operation. 3. The machine crashed once after reenabling the device. No crashdumps here, mostly because I'm stupid :( 4. There is only one serial device created (/dev/cuaU0), which represents the data interface. The control interface is not detected. (usb1 creates two interfaces /dev/cuaU0.0 for data and /dev/cuaU0.2 for control). This is essential, because even so the data interface supports most commands, it doesn't accept the PIN code entry cmomand (or other maintenance commands). For testing purposes I disabled the PIN entry requirement on the SIM and was able to get reasonable stable service (up to 250kb/s). Let me know if there is anything I can do to help debugging the issues above. I attached the patches for the HS2300 device. br michael --------------030700060705010805040303 Content-Type: text/plain; name="usb2_devid.h.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usb2_devid.h.patch" --- sys/dev/usb2/include/usb2_devid.h.orig 2008-12-01 22:21:57.000000000 +0100 +++ sys/dev/usb2/include/usb2_devid.h 2008-12-01 22:21:57.000000000 +0100 @@ -1436,6 +1436,7 @@ #define USB_PRODUCT_HP_OJ4215 0x3d11 /* OfficeJet 4215 */ #define USB_PRODUCT_HP_HN210E 0x811c /* Ethernet HN210E */ #define USB_PRODUCT_HP2_C500 0x6002 /* PhotoSmart C500 */ +#define USB_PRODUCT_HP_HS2300 0x1e1d /* MC8775 */ /* HTC products */ #define USB_PRODUCT_HTC_WINMOBILE 0x00ce /* HTC USB Sync */ --------------030700060705010805040303 Content-Type: text/plain; name="usb2_devtable.h.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usb2_devtable.h.patch" --- sys/dev/usb2/include/usb2_devtable.h.orig 2008-12-01 22:22:40.000000000 +0100 +++ sys/dev/usb2/include/usb2_devtable.h 2008-12-01 22:22:40.000000000 +0100 @@ -3125,6 +3125,12 @@ "PhotoSmart C500", }, { + USB_VENDOR_HP, USB_PRODUCT_HP_HS2300, + 0, + "Hewlett Packard", + "HS2300", + }, + { USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE, 0, "HTC", --------------030700060705010805040303 Content-Type: text/plain; name="usb2_msctest.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="usb2_msctest.c.patch" --- sys/dev/usb2/core/usb2_msctest.c.orig 2008-12-03 00:51:17.000000000 +0100 +++ sys/dev/usb2/core/usb2_msctest.c 2008-12-03 00:52:20.000000000 +0100 @@ -649,6 +649,7 @@ {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8775_2, U3GINFO(U3GSP_UMTS, U3GFL_NONE))}, /* XXX */ {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8780, U3GINFO(U3GSP_UMTS, U3GFL_NONE))}, /* XXX */ {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8781, U3GINFO(U3GSP_UMTS, U3GFL_NONE))}, /* XXX */ + {USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_HS2300, U3GINFO(U3GSP_HSPA, U3GFL_NONE))}, /* XXX */ /* Sierra TruInstaller device ID */ {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_TRUINSTALL, U3GINFO(U3GSP_UMTS, U3GFL_SIERRA_INIT))}, }; --------------030700060705010805040303-- From owner-freebsd-usb@FreeBSD.ORG Wed Dec 3 15:00: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 9DEC51065670 for ; Wed, 3 Dec 2008 15:00:03 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by mx1.freebsd.org (Postfix) with ESMTP id 5734F8FC12 for ; Wed, 3 Dec 2008 15:00:03 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from smtp4-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp4-g19.free.fr (Postfix) with ESMTP id 0136F3EA145 for ; Wed, 3 Dec 2008 16:00:02 +0100 (CET) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp4-g19.free.fr (Postfix) with ESMTP id BF0573EA134 for ; Wed, 3 Dec 2008 16:00:01 +0100 (CET) Received: from tulipe.herbelot.nom (tulipe.herbelot.nom [192.168.2.5]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id mB3ExxZd004420 for ; Wed, 3 Dec 2008 16:00:00 +0100 (CET) From: Thierry Herbelot To: freebsd-usb@freebsd.org Date: Wed, 3 Dec 2008 15:59:54 +0100 User-Agent: KMail/1.9.10 X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812031559.54335.thierry.herbelot@free.fr> Subject: Asynchronous bulk transfers in usb2 ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2008 15:00:03 -0000 Hello, I've been looking at the usb2 code, and from what I've understood, only synchronous transfers are possible : a read (for exemple) is only scheduled when the userland program calls usb_bulk_read(). Furthermore, only fixed size buffers are used : only one buffer of 32 kbyte per transfer. This seems sub-optimal when reading (or writing) from userland blocks bigger than 32 kbytes, as multiple kernel-to-userland switches are necessary, and there is a latency window where no buffer exists to accept data between the arrival of one block and the posting of the next transfer. One way to work around this kind of limitations is to provide in advance a certain number of transfers, arranged in a ring, where the callback function at the end of a transfer schedules the next, without any further userland intervention. Is there any project for adding asynchronous bulk reads and/or writes to the fine usb2 stack ? TfH From owner-freebsd-usb@FreeBSD.ORG Wed Dec 3 15:29:47 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 B35FE1065679 for ; Wed, 3 Dec 2008 15:29:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 1B6B98FC08 for ; Wed, 3 Dec 2008 15:29:46 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=NpnstxDL3QMA:10 a=P3SC899gXHkOLDnkTYxLZw==:17 a=shm1BUMkvnmcJ-pgenEA:9 a=ydVvMQvSyHpBHYAVMVoA:7 a=NnzZaRbN0PAg5bwYXKmYiFYozbYA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1162419471; Wed, 03 Dec 2008 16:29:44 +0100 From: Hans Petter Selasky To: Michael Date: Wed, 3 Dec 2008 16:31:58 +0100 User-Agent: KMail/1.9.7 References: <492D6E0D.7020500@bindone.de> <200812021554.17516.hselasky@c2i.net> <4935CB2E.2020801@bindone.de> In-Reply-To: <4935CB2E.2020801@bindone.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812031631.59515.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Device IDs for HP hs2300 HSDPA modem X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2008 15:29:47 -0000 On Wednesday 03 December 2008, Michael wrote: > Hans Petter Selasky wrote: > > On Tuesday 02 December 2008, Michael wrote: > >> 3. I tried using a current checkout of usb2 (and added all the device > >> IDs necessary), but serial_3g is missing (and therefore > >> commented out in sys/modules/usb2/Makefile), so I'm stuck there as > >> well. Is there actual hope that the problem > >> might not appear when using usb2? (all I know about usb2 is that it's > >> supposed to be giant-free, no idea if it can > >> handle these issues any better - seems like at least 50% of USB > >> devices are violating the standard in one way or > >> another anyway). > > > > Alfred forgot to add the Makefile. The 3g id's are now in > > core/usb2_msctest.c . I've sent him a patch to fix this, but have not > > heard from him yet, assuming he is very busy. > > > > Just copy one of the other serial driver Makefiles and add "u3g2.c". > > > > --HPS > > Ok, essentially this seems to work, even so there are some caveats: > 1. usb2_serial_3g has to be loaded before of usb2_controller_ehci > 2. When I disable the device (button or bios command) it is detached > correctly, > but reattaching it fails 9 out of 10 times with the following error: > kernel: usb2_alloc_device:1421: set address 2 failed (ignored) > kernel: usb2_alloc_device:1456: getting device descriptor at addr 2 failed! > kernel: uhub_reattach_port:402: could not allocate new device! > If I kldunload usb2_controller_ehci and reload it, its detected ok. > usb1 has no issues performing the same operation. > 3. The machine crashed once after reenabling the device. No crashdumps > here, mostly because I'm stupid :( > 4. There is only one serial device created (/dev/cuaU0), which > represents the data interface. The control interface is not detected. > (usb1 creates two interfaces /dev/cuaU0.0 for data and /dev/cuaU0.2 for > control). This is essential, because even so the data interface supports > most commands, it doesn't accept the PIN code entry cmomand (or other > maintenance commands). For testing purposes I disabled the PIN entry > requirement on the SIM and was able to get reasonable stable service (up > to 250kb/s). > > Let me know if there is anything I can do to help debugging the issues > above. I attached the patches for the HS2300 device. > > br > michael Hi, Try tuning the following knobs, one at a time. sysctl hw.usb2.ehci.no_hs=1 This will disable hooking on devices to high speed. I think there is a problem with your device! Another thing you can try before re-plugging: sysctl hw.usb2.ss_delay=2 Also try: sysctl hw.usb2.pr_recovery_delay=500 --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Dec 3 20:09:57 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 3DF761065678 for ; Wed, 3 Dec 2008 20:09:57 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id F19CB8FC0C for ; Wed, 3 Dec 2008 20:09:56 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smtp2.sentex.ca (smtp2c.sentex.ca [64.7.153.30]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB3JXoJp093005 for ; Wed, 3 Dec 2008 14:33:50 -0500 (EST) (envelope-from gabor@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smtp2.sentex.ca (8.14.3/8.14.3) with ESMTP id mB3JXokg093559; Wed, 3 Dec 2008 14:33:50 -0500 (EST) (envelope-from gabor@sentex.net) Received: from [192.168.43.153] ([192.168.43.153]) by pyroxene.sentex.ca (8.14.3/8.13.8) with ESMTP id mB3JXnxl015860; Wed, 3 Dec 2008 14:33:49 -0500 (EST) (envelope-from gabor@sentex.net) Message-ID: <4936DF1D.8000405@sentex.net> Date: Wed, 03 Dec 2008 14:33:49 -0500 From: Gabor User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: multipart/mixed; boundary="------------050608080606070706030307" X-Virus-Scanned: ClamAV version 0.94, clamav-milter version 0.94 on clamscanner3 X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Subject: ucom serial bug? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gabor@sentex.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2008 20:09:57 -0000 This is a multi-part message in MIME format. --------------050608080606070706030307 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi USB developers, We have a program that communicates through serial ports with a legacy Windows application that we do not control. Using onboard serial ports, everything works fine. When we try to use a USB to serial converter(type doesn't matter, UFTDI or Prolific) we run into problems. The first time we start up our side, everything works. The second time we don't get carrier(DCD). The other side is always running. Since we have no control over the legacy Windows program as it was written by another company we need carrier to be asserted to work. I am including two little programs that illustrate the issue. Also, we do not encounter this issue when using NetBSD and its USB drivers. To illustrate connect one machine to another using a null modem cable and on the end where you use check-carrier.c use the USB dongle. Run the server.c on the other end. Both take as argument the name of the device. Start server.c first. We have reproduced this problem on both CURRENT and RELENG_7. Thanks for any insight. -- Success is the result when preparation meets opportunity. --------------050608080606070706030307 Content-Type: text/plain; name="check-carrier.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="check-carrier.c" #include #include #include #include #include #include int main(int argc, char **argv) { int fd, ctl, state = 0, val; struct termios t; if (argc < 2) { fprintf(stderr, "Usage: %s \n", argv[0]); return 1; } if ((fd = open(argv[1], O_RDWR)) < 0) { fprintf(stderr, "errno: %d, error: %s\n", errno, strerror(errno)); return 1; } if (tcgetattr(fd, &t) >= 0) { t.c_ispeed = 1200; t.c_ospeed = 1200; t.c_lflag &= ~(ICANON | ISIG | IEXTEN | ECHO | ECHOE | ECHOK | ECHOKE | ECHONL | ECHOCTL | ECHOPRT | ALTWERASE | NOFLSH | TOSTOP | FLUSHO | PENDIN | NOKERNINFO | EXTPROC); t.c_iflag &= ~(ISTRIP | ICRNL | INLCR | IGNCR | IXON | IXOFF | IXANY | IMAXBEL | IGNBRK | BRKINT | INPCK | IGNPAR | PARMRK); t.c_iflag |= IGNBRK; t.c_oflag &= ~(OPOST | ONLCR | OCRNL | OXTABS | ONOEOT | ONOCR | ONLRET); t.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CCTS_OFLOW | CRTS_IFLOW | CDTR_IFLOW | CDSR_OFLOW | CCAR_OFLOW); t.c_cflag |= (CS8|CREAD); t.c_cc[VMIN] = 1; t.c_cc[VTIME] = 0; tcsetattr(fd, TCSANOW, &t); val = fcntl(fd, F_GETFL, 0); if (val >= 0) { fcntl(fd, F_SETFL, val | O_NONBLOCK); } } else { fprintf(stderr, "errno: %d, error: %s\n", errno, strerror(errno)); return 1; } if ((ctl = ioctl(fd, TIOCMGET, &state)) < 0) { fprintf(stderr, "errno: %d, error: %s\n", errno, strerror(errno)); return 1; } if ((ctl = ioctl(fd, TIOCMGET, &state)) < 0) { fprintf(stderr, "errno: %d, error: %s\n", errno, strerror(errno)); return 1; } state |= TIOCM_DCD; ioctl(fd, TIOCMSET, &state); if ((ctl = ioctl(fd, TIOCMGET, &state)) < 0) { fprintf(stderr, "errno: %d, error: %s\n", errno, strerror(errno)); return 1; } if ((state & TIOCM_DCD)) { printf("got carrier\n"); } else { printf("%d\n", state); } if ((state & TIOCM_LE)) { printf("TIOCM_LE\n"); } if ((state & TIOCM_DTR)) { printf("TIOCM_DTR\n"); } if ((state & TIOCM_RTS)) { printf("TIOCM_RTS\n"); } if ((state & TIOCM_ST)) { printf("TIOCM_ST\n"); } if ((state & TIOCM_SR)) { printf("TIOCM_SR\n"); } if ((state & TIOCM_CTS)) { printf("TIOCM_CTS\n"); } if ((state & TIOCM_DCD)) { printf("TIOCM_DCD\n"); } if ((state & TIOCM_RI)) { printf("TIOCM_RI\n"); } if ((state & TIOCM_DSR)) { printf("TIOCM_DSR\n"); } return 0; } --------------050608080606070706030307 Content-Type: text/plain; name="server.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="server.c" #include #include #include #include #include #include #include #include int main(int argc, char **argv) { int fd = -1, val, n, len; unsigned char buf[80]; struct termios t; fd_set rin; struct timeval tv; if (argc < 2) { fprintf(stderr, "Usage: %s \n", argv[0]); return 1; } REDO: if (fd > -1) { close(fd); } fd = open(argv[1], O_RDWR); if (fd > 0) { if (tcgetattr(fd, &t) >= 0) { t.c_ispeed = 1200; t.c_ospeed = 1200; t.c_lflag &= ~(ICANON | ISIG | IEXTEN | ECHO | ECHOE | ECHOK | ECHOKE | ECHONL | ECHOCTL | ECHOPRT | ALTWERASE | NOFLSH | TOSTOP | FLUSHO | PENDIN | NOKERNINFO | EXTPROC); t.c_iflag &= ~(ISTRIP | ICRNL | INLCR | IGNCR | IXON | IXOFF | IXANY | IMAXBEL | IGNBRK | BRKINT | INPCK | IGNPAR | PARMRK); t.c_oflag &= ~(OPOST | ONLCR | OCRNL | OXTABS | ONOEOT | ONOCR | ONLRET); t.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CCTS_OFLOW | CRTS_IFLOW | CDTR_IFLOW | CDSR_OFLOW | CCAR_OFLOW); t.c_cflag |= (CS8); t.c_cc[VMIN] = 1; t.c_cc[VTIME] = 0; tcsetattr(fd, TCSANOW, &t); val = fcntl(fd, F_GETFL, 0); if (val >= 0) { fcntl(fd, F_SETFL, val | O_NONBLOCK); } } while (1) { FD_ZERO(&rin); FD_SET(fd, &rin); n = select(fd + 1, &rin, 0, 0, 0); len = 0; if (n > 0 && FD_ISSET(fd, &rin)) { n = read(fd, buf, 1); if (n <= 0) { goto REDO; } len = n; while (1) { FD_ZERO(&rin); FD_SET(fd, &rin); tv.tv_sec = 0; tv.tv_usec = 80000L; n = select(fd + 1, &rin, 0, 0, &tv); if (n > 0 && FD_ISSET(fd, &rin)) { n = read(fd, buf + len, 80); if (n <= 0) { goto REDO; } len += n; if (len == 3) { if (isatty(fileno(stdout))) fprintf(stderr, "."); buf[0] = 0x04 | 0x80; write(fd, buf, 1); break; } } else { goto REDO; } } } else { goto REDO; } } } else { fprintf(stderr, "Unable to open %s: %s\n", argv[1], strerror(errno)); return 1; } return 0; } --------------050608080606070706030307-- From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 09:16: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 ABC951065670 for ; Thu, 4 Dec 2008 09:16:52 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: from mail.bindone.de (mail.bindone.de [80.190.134.51]) by mx1.freebsd.org (Postfix) with SMTP id 245E88FC17 for ; Thu, 4 Dec 2008 09:16:51 +0000 (UTC) (envelope-from freebsdusb@bindone.de) Received: (qmail 62886 invoked by uid 89); 4 Dec 2008 09:16:50 -0000 Received: from unknown (HELO ufo.bindone.de) (mg@bindone.de@87.152.183.153) by mail.bindone.de with ESMTPA; 4 Dec 2008 09:16:50 -0000 Message-ID: <49379FFF.6000007@bindone.de> Date: Thu, 04 Dec 2008 10:16:47 +0100 From: Michael User-Agent: Thunderbird 2.0.0.18 (X11/20081129) MIME-Version: 1.0 To: Hans Petter Selasky References: <492D6E0D.7020500@bindone.de> <200812021554.17516.hselasky@c2i.net> <4935CB2E.2020801@bindone.de> <200812031631.59515.hselasky@c2i.net> In-Reply-To: <200812031631.59515.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 04 Dec 2008 09:16:52 -0000 Hans Petter Selasky wrote: > On Wednesday 03 December 2008, Michael wrote: > >> Hans Petter Selasky wrote: >> >>> On Tuesday 02 December 2008, Michael wrote: >>> >>>> 3. I tried using a current checkout of usb2 (and added all the device >>>> IDs necessary), but serial_3g is missing (and therefore >>>> commented out in sys/modules/usb2/Makefile), so I'm stuck there as >>>> well. Is there actual hope that the problem >>>> might not appear when using usb2? (all I know about usb2 is that it's >>>> supposed to be giant-free, no idea if it can >>>> handle these issues any better - seems like at least 50% of USB >>>> devices are violating the standard in one way or >>>> another anyway). >>>> >>> Alfred forgot to add the Makefile. The 3g id's are now in >>> core/usb2_msctest.c . I've sent him a patch to fix this, but have not >>> heard from him yet, assuming he is very busy. >>> >>> Just copy one of the other serial driver Makefiles and add "u3g2.c". >>> >>> --HPS >>> >> Ok, essentially this seems to work, even so there are some caveats: >> 1. usb2_serial_3g has to be loaded before of usb2_controller_ehci >> 2. When I disable the device (button or bios command) it is detached >> correctly, >> but reattaching it fails 9 out of 10 times with the following error: >> kernel: usb2_alloc_device:1421: set address 2 failed (ignored) >> kernel: usb2_alloc_device:1456: getting device descriptor at addr 2 failed! >> kernel: uhub_reattach_port:402: could not allocate new device! >> If I kldunload usb2_controller_ehci and reload it, its detected ok. >> usb1 has no issues performing the same operation. >> 3. The machine crashed once after reenabling the device. No crashdumps >> here, mostly because I'm stupid :( >> 4. There is only one serial device created (/dev/cuaU0), which >> represents the data interface. The control interface is not detected. >> (usb1 creates two interfaces /dev/cuaU0.0 for data and /dev/cuaU0.2 for >> control). This is essential, because even so the data interface supports >> most commands, it doesn't accept the PIN code entry cmomand (or other >> maintenance commands). For testing purposes I disabled the PIN entry >> requirement on the SIM and was able to get reasonable stable service (up >> to 250kb/s). >> >> Let me know if there is anything I can do to help debugging the issues >> above. I attached the patches for the HS2300 device. >> >> br >> michael >> > > Hi, > > Try tuning the following knobs, one at a time. > > sysctl hw.usb2.ehci.no_hs=1 > > This will disable hooking on devices to high speed. > > I think there is a problem with your device! > > Another thing you can try before re-plugging: > > sysctl hw.usb2.ss_delay=2 > > Also try: > > sysctl hw.usb2.pr_recovery_delay=500 > > --HPS > None of these knobs have a lasting effect. Sometimes it works, sometimes it doesn't. Disconnecting/reconnecting at a fast pace confuses it completely (missing the event completely). That's intersting because usb1 seems to be able to keep track of that ok, so it should be possible. Do you think this relates to caveat 1 (because I think normally loading 3g after ehci should work)? Are there any debugging knobs I should use to get more useful traces? What about 4, is there anything I can do or anybody to contact to figure why the control device doesn't show up at all? (or is more a missing feature than a bug?) thanks michael From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 14:42:44 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C411A1065675 for ; Thu, 4 Dec 2008 14:42:44 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id 32A208FC14 for ; Thu, 4 Dec 2008 14:42:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=NpnstxDL3QMA:10 a=P3SC899gXHkOLDnkTYxLZw==:17 a=BycoXnC7E3d4E-eH3SEA:9 a=LaVGJHW3GLqpaZxSZMUA:7 a=GV1k4_4fFtaLf1YTYjdzLo2YrnoA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 414848064; Thu, 04 Dec 2008 15:42:42 +0100 From: Hans Petter Selasky To: Michael Date: Thu, 4 Dec 2008 15:44:56 +0100 User-Agent: KMail/1.9.7 References: <492D6E0D.7020500@bindone.de> <200812031631.59515.hselasky@c2i.net> <49379FFF.6000007@bindone.de> In-Reply-To: <49379FFF.6000007@bindone.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812041544.57108.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 04 Dec 2008 14:42:45 -0000 On Thursday 04 December 2008, Michael wrote: > Hans Petter Selasky wrote: > > On Wednesday 03 December 2008, Michael wrote: > >> Hans Petter Selasky wrote: > >>> On Tuesday 02 December 2008, Michael wrote: > >>>> 3. I tried using a current checkout of usb2 (and added all the device > >>>> IDs necessary), but serial_3g is missing (and therefore > >>>> commented out in sys/modules/usb2/Makefile), so I'm stuck there as > >>>> well. Is there actual hope that the problem > >>>> might not appear when using usb2? (all I know about usb2 is that > >>>> it's supposed to be giant-free, no idea if it can > >>>> handle these issues any better - seems like at least 50% of USB > >>>> devices are violating the standard in one way or > >>>> another anyway). > >>> > >>> Alfred forgot to add the Makefile. The 3g id's are now in > >>> core/usb2_msctest.c . I've sent him a patch to fix this, but have not > >>> heard from him yet, assuming he is very busy. > >>> > >>> Just copy one of the other serial driver Makefiles and add "u3g2.c". > >>> > >>> --HPS > >> > >> Ok, essentially this seems to work, even so there are some caveats: > >> 1. usb2_serial_3g has to be loaded before of usb2_controller_ehci > >> 2. When I disable the device (button or bios command) it is detached > >> correctly, > >> but reattaching it fails 9 out of 10 times with the following error: > >> kernel: usb2_alloc_device:1421: set address 2 failed (ignored) > >> kernel: usb2_alloc_device:1456: getting device descriptor at addr 2 > >> failed! kernel: uhub_reattach_port:402: could not allocate new device! > >> If I kldunload usb2_controller_ehci and reload it, its detected ok. > >> usb1 has no issues performing the same operation. > >> 3. The machine crashed once after reenabling the device. No crashdumps > >> here, mostly because I'm stupid :( > >> 4. There is only one serial device created (/dev/cuaU0), which > >> represents the data interface. The control interface is not detected. > >> (usb1 creates two interfaces /dev/cuaU0.0 for data and /dev/cuaU0.2 for > >> control). This is essential, because even so the data interface supports > >> most commands, it doesn't accept the PIN code entry cmomand (or other > >> maintenance commands). For testing purposes I disabled the PIN entry > >> requirement on the SIM and was able to get reasonable stable service (up > >> to 250kb/s). > >> > >> Let me know if there is anything I can do to help debugging the issues > >> above. I attached the patches for the HS2300 device. > >> > >> br > >> michael > > > > Hi, > > > > Try tuning the following knobs, one at a time. > > > > sysctl hw.usb2.ehci.no_hs=1 > > > > This will disable hooking on devices to high speed. > > > > I think there is a problem with your device! > > > > Another thing you can try before re-plugging: > > > > sysctl hw.usb2.ss_delay=2 > > > > Also try: > > > > sysctl hw.usb2.pr_recovery_delay=500 > > > > --HPS > > None of these knobs have a lasting effect. Sometimes it works, sometimes > it doesn't. Disconnecting/reconnecting at a fast pace confuses it > completely (missing the event completely). That's intersting because > usb1 seems to be able to keep track of that ok, so it should be > possible. Do you think this relates to caveat 1 (because I think > normally loading 3g after ehci should work)? Are there any debugging > knobs I should use to get more useful traces? See "sysctl hw.usb2" > What about 4, is there anything I can do or anybody to contact to figure > why the control device doesn't show up at all? (or is more a missing > feature than a bug?) Send me a dump of the usb-descriptors using: usbconfig -u xxx -a yyy dump_curr_config_desc And I will have a look at it. I suspect that the device is there, but has another unit ID than you expect. --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 16:02:18 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7F7D1065677 for ; Thu, 4 Dec 2008 16:02:18 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id 3FF368FC27 for ; Thu, 4 Dec 2008 16:02:17 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=X_LqtxM5jtcA:10 a=HnXr4FIqdIEA:10 a=P3SC899gXHkOLDnkTYxLZw==:17 a=Sh_yyNl-t6yRTb5XoCUA:9 a=6PRlk_uiLVK_tEjIRiwA:7 a=PDA6DmdfaypqPH2O7XWCtgz1LvcA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 414896323; Thu, 04 Dec 2008 17:02:16 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 4 Dec 2008 17:04:26 +0100 User-Agent: KMail/1.9.7 References: <200812031559.54335.thierry.herbelot@free.fr> In-Reply-To: <200812031559.54335.thierry.herbelot@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812041704.28290.hselasky@c2i.net> Cc: Thierry Herbelot Subject: Re: Asynchronous bulk transfers in usb2 ? 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, 04 Dec 2008 16:02:18 -0000 On Wednesday 03 December 2008, Thierry Herbelot wrote: > Hello, > > I've been looking at the usb2 code, and from what I've understood, only > synchronous transfers are possible : a read (for exemple) is only scheduled > when the userland program calls usb_bulk_read(). > > Furthermore, only fixed size buffers are used : only one buffer of 32 kbyte > per transfer. This seems sub-optimal when reading (or writing) from > userland blocks bigger than 32 kbytes, as multiple kernel-to-userland > switches are necessary, and there is a latency window where no buffer > exists to accept data between the arrival of one block and the posting of > the next transfer. > > One way to work around this kind of limitations is to provide in advance a > certain number of transfers, arranged in a ring, where the callback > function at the end of a transfer schedules the next, without any further > userland intervention. > > Is there any project for adding asynchronous bulk reads and/or writes to > the fine usb2 stack ? Hi Thierry, There are two USB API's in the USB2 library. See man libusb20. The other API supports all of what you want to do. I.E. all of the USB functionality which is present in the kernel. --HPS Example code for the other USB API: struct libusb20_backend *pbe = libusb20_be_alloc_default(); struct libusb20_device *pdev = NULL; while ((pdev = libusb20_be_device_foreach(pbe, pdev))) { if (strstr(libusb20_dev_get_desc(pdev), argv[1])) { libusb20_be_dequeue_device(pbe, pdev); break; } } /* release data */ libusb20_be_free(pbe); if (pdev == NULL) { printf("No such device\n"); return (0); } printf("Trying to attach ...\n"); if (libusb20_dev_open(pdev, 2)) { err(1, "could not open device"); } xfer_in = libusb20_tr_get_pointer(pdev, 0); ep = 0x81; error = libusb20_tr_open(xfer_in, 65536 /* max block size */, 1 /* # of transfers */, ep /* endpoint */); if (error) { err(1, "could not open endpoint %u, %d", ep, error); } xfer_out = libusb20_tr_get_pointer(pdev, 1); ep = 0x01; error = libusb20_tr_open(xfer_out, 65536, 1, ep); if (error) { err(1, "could not open endpoint %u, %d", ep, error); } usb_pdev = pdev; libusb20_tr_clear_stall_sync(xfer_in); libusb20_tr_clear_stall_sync(xfer_out); do_io(struct libusb20_transfer *xfer, void *buf, uint32_t len, uint32_t timeout) { struct libusb20_device *pdev = usb_pdev; uint32_t max; uint32_t alen; uint32_t slen = 0; if (libusb20_tr_pending(xfer)) { return (-1); /* error */ } repeat: max = libusb20_tr_get_max_total_length(xfer); if (max > len) max = len; //There is also a function to setup multiple bulk transfers at the //same time. See man libusb20 libusb20_tr_setup_bulk(xfer, buf, max, timeout); libusb20_tr_start(xfer); while (libusb20_dev_process(pdev) == 0) { if (libusb20_tr_pending(xfer) == 0) { break; } // there is also an FD that you can poll! // See the libusb20_dev_wait_process() code. libusb20_dev_wait_process(pdev, -1); } if (libusb20_tr_get_status(xfer)) return (-1); alen = libusb20_tr_get_actual_length(xfer); slen += alen; if (alen == max) { len -= alen; if (len) goto repeat; } return (slen); } From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 17:34: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 810D21065673 for ; Thu, 4 Dec 2008 17:34:31 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC8C8FC1C for ; Thu, 4 Dec 2008 17:34:31 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4HKdb9010825 for ; Thu, 4 Dec 2008 12:20:39 -0500 (EST) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id mB4HKdJP017318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 4 Dec 2008 12:20:39 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <200812041720.mB4HKdJP017318@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Thu, 04 Dec 2008 12:20:29 -0500 To: freebsd-usb@freebsd.org From: Mike Tancsa In-Reply-To: <4936DF1D.8000405@sentex.net> References: <4936DF1D.8000405@sentex.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Subject: Re: ucom serial bug? 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, 04 Dec 2008 17:34:31 -0000 At 02:33 PM 12/3/2008, Gabor wrote: >everything works fine. When we try to use a USB to serial >converter(type doesn't matter, UFTDI or Prolific) we run into >problems. The first time we start up our side, everything >works. The second time we don't get carrier(DCD). The other side >is always running. Since we have no control Also tried with the usb2 development stack, and we never see carrier. Id Refs Address Size Name 1 20 0xc0400000 9f8014 kernel (/boot/kernel/kernel) 2 1 0xc4b95000 3000 usb2_serial_ftdi.ko (/boot/kernel/usb2_serial_ftdi.ko) 3 5 0xc4b99000 36000 usb2_core.ko (/boot/kernel/usb2_core.ko) 4 1 0xc4c56000 4000 usb2_serial.ko (/boot/kernel/usb2_serial.ko) 5 1 0xc4cb4000 a000 usb2_controller_uhci.ko (/boot/kernel/usb2_controller_uhci.ko) 6 2 0xc4cbe000 3000 usb2_controller.ko (/boot/kernel/usb2_controller.ko) 7 1 0xc4d50000 d000 usb2_controller_ehci.ko (/boot/kernel/usb2_controller_ehci.ko) ---Mike From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 17:51:23 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 E5BD9106567B for ; Thu, 4 Dec 2008 17:51:23 +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 7EA0F8FC0C for ; Thu, 4 Dec 2008 17:51:23 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=P3SC899gXHkOLDnkTYxLZw==:17 a=Krpc1S98ceiJc87MmZYA:9 a=8JcZgD06bLTEmKjjzIVgvYtZZGwA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1057778412; Thu, 04 Dec 2008 18:51:21 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 4 Dec 2008 18:53:33 +0100 User-Agent: KMail/1.9.7 References: <4936DF1D.8000405@sentex.net> <200812041720.mB4HKdJP017318@lava.sentex.ca> In-Reply-To: <200812041720.mB4HKdJP017318@lava.sentex.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812041853.35539.hselasky@c2i.net> Cc: Subject: Re: ucom serial bug? 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, 04 Dec 2008 17:51:24 -0000 On Thursday 04 December 2008, Mike Tancsa wrote: > At 02:33 PM 12/3/2008, Gabor wrote: > >everything works fine. When we try to use a USB to serial > >converter(type doesn't matter, UFTDI or Prolific) we run into > >problems. The first time we start up our side, everything > >works. The second time we don't get carrier(DCD). The other side > >is always running. Since we have no control > > Also tried with the usb2 development stack, and we never see carrier. > > Id Refs Address Size Name > 1 20 0xc0400000 9f8014 kernel (/boot/kernel/kernel) > 2 1 0xc4b95000 3000 usb2_serial_ftdi.ko > (/boot/kernel/usb2_serial_ftdi.ko) > 3 5 0xc4b99000 36000 usb2_core.ko (/boot/kernel/usb2_core.ko) > 4 1 0xc4c56000 4000 usb2_serial.ko (/boot/kernel/usb2_serial.ko) > 5 1 0xc4cb4000 a000 usb2_controller_uhci.ko > (/boot/kernel/usb2_controller_uhci.ko) > 6 2 0xc4cbe000 3000 usb2_controller.ko > (/boot/kernel/usb2_controller.ko) > 7 1 0xc4d50000 d000 usb2_controller_ehci.ko > (/boot/kernel/usb2_controller_ehci.ko) > Hi, I think this event is not implemented in the driver. Try to diff the NetBSD and FreeBSD uftdi.c files. --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 18:18:34 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 B7B76106564A for ; Thu, 4 Dec 2008 18:18:34 +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 747548FC0A for ; Thu, 4 Dec 2008 18:18:34 +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 mB4IFL0p093861; Thu, 4 Dec 2008 11:15:21 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Dec 2008 11:15:28 -0700 (MST) Message-Id: <20081204.111528.1723218601.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200812041853.35539.hselasky@c2i.net> References: <4936DF1D.8000405@sentex.net> <200812041720.mB4HKdJP017318@lava.sentex.ca> <200812041853.35539.hselasky@c2i.net> 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: freebsd-usb@FreeBSD.org Subject: Re: ucom serial bug? 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, 04 Dec 2008 18:18:34 -0000 In message: <200812041853.35539.hselasky@c2i.net> Hans Petter Selasky writes: : On Thursday 04 December 2008, Mike Tancsa wrote: : > At 02:33 PM 12/3/2008, Gabor wrote: : > >everything works fine. When we try to use a USB to serial : > >converter(type doesn't matter, UFTDI or Prolific) we run into : > >problems. The first time we start up our side, everything : > >works. The second time we don't get carrier(DCD). The other side : > >is always running. Since we have no control : > : > Also tried with the usb2 development stack, and we never see carrier. : > : > Id Refs Address Size Name : > 1 20 0xc0400000 9f8014 kernel (/boot/kernel/kernel) : > 2 1 0xc4b95000 3000 usb2_serial_ftdi.ko : > (/boot/kernel/usb2_serial_ftdi.ko) : > 3 5 0xc4b99000 36000 usb2_core.ko (/boot/kernel/usb2_core.ko) : > 4 1 0xc4c56000 4000 usb2_serial.ko (/boot/kernel/usb2_serial.ko) : > 5 1 0xc4cb4000 a000 usb2_controller_uhci.ko : > (/boot/kernel/usb2_controller_uhci.ko) : > 6 2 0xc4cbe000 3000 usb2_controller.ko : > (/boot/kernel/usb2_controller.ko) : > 7 1 0xc4d50000 d000 usb2_controller_ehci.ko : > (/boot/kernel/usb2_controller_ehci.ko) : > : : Hi, : : I think this event is not implemented in the driver. Try to diff the NetBSD : and FreeBSD uftdi.c files. I have some diffs in my inbox from someone that was trying to implement modem control for uftdi chips. Let me see if they make sense... Warner From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 18:37:00 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 D82D0106564A for ; Thu, 4 Dec 2008 18:37:00 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smarthost2.sentex.ca (smarthost2.sentex.ca [205.211.164.50]) by mx1.freebsd.org (Postfix) with ESMTP id 843378FC19 for ; Thu, 4 Dec 2008 18:37:00 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by smarthost2.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4Iaw3q029363 for ; Thu, 4 Dec 2008 13:36:58 -0500 (EST) (envelope-from gabor@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smtp1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4Iaws0082485 for ; Thu, 4 Dec 2008 13:36:58 -0500 (EST) (envelope-from gabor@sentex.net) Received: from [192.168.43.153] ([192.168.43.153]) by pyroxene.sentex.ca (8.14.3/8.13.8) with ESMTP id mB4Iavdh037610 for ; Thu, 4 Dec 2008 13:36:57 -0500 (EST) (envelope-from gabor@sentex.net) Message-ID: <49382349.5040804@sentex.net> Date: Thu, 04 Dec 2008 13:36:57 -0500 From: Gabor User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <4936DF1D.8000405@sentex.net> <200812041720.mB4HKdJP017318@lava.sentex.ca> <200812041853.35539.hselasky@c2i.net> <20081204.111528.1723218601.imp@bsdimp.com> In-Reply-To: <20081204.111528.1723218601.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on clamscanner3 X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 205.211.164.50 Subject: Re: ucom serial bug? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gabor@sentex.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 18:37:00 -0000 Hi, thanks for looking at this issue. Are you guys saying that this was not meant to work? As in I shouldn't expect to see carrier? On 12/4/08 1:15 PM, M. Warner Losh wrote: > In message: <200812041853.35539.hselasky@c2i.net> > Hans Petter Selasky writes: > : On Thursday 04 December 2008, Mike Tancsa wrote: > : > At 02:33 PM 12/3/2008, Gabor wrote: > : > >everything works fine. When we try to use a USB to serial > : > >converter(type doesn't matter, UFTDI or Prolific) we run into > : > >problems. The first time we start up our side, everything > : > >works. The second time we don't get carrier(DCD). The other side > : > >is always running. Since we have no control > : > > : > Also tried with the usb2 development stack, and we never see carrier. > : > > : > Id Refs Address Size Name > : > 1 20 0xc0400000 9f8014 kernel (/boot/kernel/kernel) > : > 2 1 0xc4b95000 3000 usb2_serial_ftdi.ko > : > (/boot/kernel/usb2_serial_ftdi.ko) > : > 3 5 0xc4b99000 36000 usb2_core.ko (/boot/kernel/usb2_core.ko) > : > 4 1 0xc4c56000 4000 usb2_serial.ko (/boot/kernel/usb2_serial.ko) > : > 5 1 0xc4cb4000 a000 usb2_controller_uhci.ko > : > (/boot/kernel/usb2_controller_uhci.ko) > : > 6 2 0xc4cbe000 3000 usb2_controller.ko > : > (/boot/kernel/usb2_controller.ko) > : > 7 1 0xc4d50000 d000 usb2_controller_ehci.ko > : > (/boot/kernel/usb2_controller_ehci.ko) > : > > : > : Hi, > : > : I think this event is not implemented in the driver. Try to diff the NetBSD > : and FreeBSD uftdi.c files. > > I have some diffs in my inbox from someone that was trying to > implement modem control for uftdi chips. Let me see if they make > sense... > > Warner > _______________________________________________ > 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" > -- Success is the result when preparation meets opportunity. From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 18:51:13 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 251301065670 for ; Thu, 4 Dec 2008 18:51:13 +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 DDFC88FC13 for ; Thu, 4 Dec 2008 18:51:12 +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 mB4ImYKa094292; Thu, 4 Dec 2008 11:48:34 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Dec 2008 11:48:42 -0700 (MST) Message-Id: <20081204.114842.-1540410064.imp@bsdimp.com> To: gabor@sentex.net From: "M. Warner Losh" In-Reply-To: <49382349.5040804@sentex.net> References: <200812041853.35539.hselasky@c2i.net> <20081204.111528.1723218601.imp@bsdimp.com> <49382349.5040804@sentex.net> 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: freebsd-usb@FreeBSD.org Subject: Re: ucom serial bug? 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, 04 Dec 2008 18:51:13 -0000 In message: <49382349.5040804@sentex.net> Gabor writes: : Hi, : : thanks for looking at this issue. Are you guys saying that this was not meant to work? As in I shouldn't expect to see carrier? Ian Lepore sent me this patch a little while ago. I've not had time to look into it. If you could test it and let me know, then I'll be able to commit it more quickly. It is against a slightly hacked version of 6.1, but should translate right over. Warner Index: uftdi.c =================================================================== RCS file: /base/FreeBSD-tsc-6/sys/dev/usb/uftdi.c,v retrieving revision 1.2 diff -u -r1.2 uftdi.c --- uftdi.c 24 Sep 2007 21:37:33 -0000 1.2 +++ uftdi.c 14 Nov 2008 18:17:02 -0000 @@ -457,13 +457,24 @@ { struct uftdi_softc *sc = vsc; u_char msr, lsr; + u_char ftdi_msr; DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", sc, portno, *count)); - msr = FTDI_GET_MSR(*ptr); + ftdi_msr = FTDI_GET_MSR(*ptr); lsr = FTDI_GET_LSR(*ptr); + msr = 0; + if (ftdi_msr & FTDI_SIO_CTS_MASK) + msr |= SER_CTS; + if (ftdi_msr & FTDI_SIO_DSR_MASK) + msr |= SER_DSR; + if (ftdi_msr & FTDI_SIO_RI_MASK) + msr |= SER_RI; + if (ftdi_msr & FTDI_SIO_RLSD_MASK) + msr |= SER_DCD; + #ifdef USB_DEBUG if (*count != 2) DPRINTFN(10,("uftdi_read: sc=%p, port=%d count=%d data[0]=" : : On 12/4/08 1:15 PM, M. Warner Losh wrote: : > In message: <200812041853.35539.hselasky@c2i.net> : > Hans Petter Selasky writes: : > : On Thursday 04 December 2008, Mike Tancsa wrote: : > : > At 02:33 PM 12/3/2008, Gabor wrote: : > : > >everything works fine. When we try to use a USB to serial : > : > >converter(type doesn't matter, UFTDI or Prolific) we run into : > : > >problems. The first time we start up our side, everything : > : > >works. The second time we don't get carrier(DCD). The other side : > : > >is always running. Since we have no control : > : > : > : > Also tried with the usb2 development stack, and we never see carrier. : > : > : > : > Id Refs Address Size Name : > : > 1 20 0xc0400000 9f8014 kernel (/boot/kernel/kernel) : > : > 2 1 0xc4b95000 3000 usb2_serial_ftdi.ko : > : > (/boot/kernel/usb2_serial_ftdi.ko) : > : > 3 5 0xc4b99000 36000 usb2_core.ko (/boot/kernel/usb2_core.ko) : > : > 4 1 0xc4c56000 4000 usb2_serial.ko (/boot/kernel/usb2_serial.ko) : > : > 5 1 0xc4cb4000 a000 usb2_controller_uhci.ko : > : > (/boot/kernel/usb2_controller_uhci.ko) : > : > 6 2 0xc4cbe000 3000 usb2_controller.ko : > : > (/boot/kernel/usb2_controller.ko) : > : > 7 1 0xc4d50000 d000 usb2_controller_ehci.ko : > : > (/boot/kernel/usb2_controller_ehci.ko) : > : > : > : : > : Hi, : > : : > : I think this event is not implemented in the driver. Try to diff the NetBSD : > : and FreeBSD uftdi.c files. : > : > I have some diffs in my inbox from someone that was trying to : > implement modem control for uftdi chips. Let me see if they make : > sense... : > : > Warner : > _______________________________________________ : > 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" : > : : -- : Success is the result when preparation meets opportunity. : _______________________________________________ : 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 Dec 4 19:00: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 4A13E106564A for ; Thu, 4 Dec 2008 19:00:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id C9B7F8FC20 for ; Thu, 4 Dec 2008 19:00:07 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=P3SC899gXHkOLDnkTYxLZw==:17 a=6I5d2MoRAAAA:8 a=7SrIWfg7hh2o9yjhpRoA:9 a=eIsZ1hal6RpIVt4yOdt7Eo8SuTgA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1159834693; Thu, 04 Dec 2008 20:00:03 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 4 Dec 2008 20:02:05 +0100 User-Agent: KMail/1.9.7 References: <200812041853.35539.hselasky@c2i.net> <49382349.5040804@sentex.net> <20081204.114842.-1540410064.imp@bsdimp.com> In-Reply-To: <20081204.114842.-1540410064.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812042002.09860.hselasky@c2i.net> Cc: Subject: Re: ucom serial bug? 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, 04 Dec 2008 19:00:08 -0000 On Thursday 04 December 2008, M. Warner Losh wrote: > Ian Lepore Here is the patch for USB2: http://perforce.freebsd.org/chv.cgi?CH=154057 --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 19:20:27 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 27892106570A for ; Thu, 4 Dec 2008 19:20:27 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smarthost2.sentex.ca (smarthost2.sentex.ca [205.211.164.50]) by mx1.freebsd.org (Postfix) with ESMTP id E20508FC2A for ; Thu, 4 Dec 2008 19:20:26 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by smarthost2.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4JKLYU037950; Thu, 4 Dec 2008 14:20:21 -0500 (EST) (envelope-from gabor@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smtp1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4JKKCL018767; Thu, 4 Dec 2008 14:20:20 -0500 (EST) (envelope-from gabor@sentex.net) Received: from [192.168.43.153] ([192.168.43.153]) by pyroxene.sentex.ca (8.14.3/8.13.8) with ESMTP id mB4JKKoi038288; Thu, 4 Dec 2008 14:20:20 -0500 (EST) (envelope-from gabor@sentex.net) Message-ID: <49382D74.1030907@sentex.net> Date: Thu, 04 Dec 2008 14:20:20 -0500 From: Gabor User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: freebsd-usb@FreeBSD.org References: <200812041853.35539.hselasky@c2i.net> <20081204.111528.1723218601.imp@bsdimp.com> <49382349.5040804@sentex.net> <20081204.114842.-1540410064.imp@bsdimp.com> In-Reply-To: <20081204.114842.-1540410064.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on clamscanner4 X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 205.211.164.50 Cc: Subject: Re: ucom serial bug? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gabor@sentex.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 19:20:27 -0000 Hi Warner, this patch did not seem to fix the issue. In fact this time after unloading the module and reloading it, and then checking the carrier doesn't raise carrier even on the first try. On 12/4/08 1:48 PM, M. Warner Losh wrote: > In message: <49382349.5040804@sentex.net> > Gabor writes: > : Hi, > : > : thanks for looking at this issue. Are you guys saying that this was not meant to work? As in I shouldn't expect to see carrier? > > Ian Lepore sent me this patch a little while ago. I've not had time > to look into it. If you could test it and let me know, then I'll be > able to commit it more quickly. It is against a slightly hacked > version of 6.1, but should translate right over. > > Warner > > Index: uftdi.c > =================================================================== > RCS file: /base/FreeBSD-tsc-6/sys/dev/usb/uftdi.c,v > retrieving revision 1.2 > diff -u -r1.2 uftdi.c > --- uftdi.c 24 Sep 2007 21:37:33 -0000 1.2 > +++ uftdi.c 14 Nov 2008 18:17:02 -0000 > @@ -457,13 +457,24 @@ > { > struct uftdi_softc *sc = vsc; > u_char msr, lsr; > + u_char ftdi_msr; > > DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", sc, portno, > *count)); > > - msr = FTDI_GET_MSR(*ptr); > + ftdi_msr = FTDI_GET_MSR(*ptr); > lsr = FTDI_GET_LSR(*ptr); > > + msr = 0; > + if (ftdi_msr & FTDI_SIO_CTS_MASK) > + msr |= SER_CTS; > + if (ftdi_msr & FTDI_SIO_DSR_MASK) > + msr |= SER_DSR; > + if (ftdi_msr & FTDI_SIO_RI_MASK) > + msr |= SER_RI; > + if (ftdi_msr & FTDI_SIO_RLSD_MASK) > + msr |= SER_DCD; > + > #ifdef USB_DEBUG > if (*count != 2) > DPRINTFN(10,("uftdi_read: sc=%p, port=%d count=%d data[0]=" > > : > : On 12/4/08 1:15 PM, M. Warner Losh wrote: > : > In message: <200812041853.35539.hselasky@c2i.net> > : > Hans Petter Selasky writes: > : > : On Thursday 04 December 2008, Mike Tancsa wrote: > : > : > At 02:33 PM 12/3/2008, Gabor wrote: > : > : > >everything works fine. When we try to use a USB to serial > : > : > >converter(type doesn't matter, UFTDI or Prolific) we run into > : > : > >problems. The first time we start up our side, everything > : > : > >works. The second time we don't get carrier(DCD). The other side > : > : > >is always running. Since we have no control > : > : > > : > : > Also tried with the usb2 development stack, and we never see carrier. > : > : > > : > : > Id Refs Address Size Name > : > : > 1 20 0xc0400000 9f8014 kernel (/boot/kernel/kernel) > : > : > 2 1 0xc4b95000 3000 usb2_serial_ftdi.ko > : > : > (/boot/kernel/usb2_serial_ftdi.ko) > : > : > 3 5 0xc4b99000 36000 usb2_core.ko (/boot/kernel/usb2_core.ko) > : > : > 4 1 0xc4c56000 4000 usb2_serial.ko (/boot/kernel/usb2_serial.ko) > : > : > 5 1 0xc4cb4000 a000 usb2_controller_uhci.ko > : > : > (/boot/kernel/usb2_controller_uhci.ko) > : > : > 6 2 0xc4cbe000 3000 usb2_controller.ko > : > : > (/boot/kernel/usb2_controller.ko) > : > : > 7 1 0xc4d50000 d000 usb2_controller_ehci.ko > : > : > (/boot/kernel/usb2_controller_ehci.ko) > : > : > > : > : > : > : Hi, > : > : > : > : I think this event is not implemented in the driver. Try to diff the NetBSD > : > : and FreeBSD uftdi.c files. > : > > : > I have some diffs in my inbox from someone that was trying to > : > implement modem control for uftdi chips. Let me see if they make > : > sense... > : > > : > Warner > : > _______________________________________________ > : > 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" > : > > : > : -- > : Success is the result when preparation meets opportunity. > : _______________________________________________ > : 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" > : > : > -- Success is the result when preparation meets opportunity. From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 20:39: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 20D401065672 for ; Thu, 4 Dec 2008 20:39:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.tele2.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id AC7548FC08 for ; Thu, 4 Dec 2008 20:39:11 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=P3SC899gXHkOLDnkTYxLZw==:17 a=6TQk3gx1ZfH_AwWd-UoA:9 a=jaEq7pJzijfvRiAn7DVxHEIb0yYA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 418246676; Thu, 04 Dec 2008 21:39:09 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, gabor@sentex.net Date: Thu, 4 Dec 2008 21:41:18 +0100 User-Agent: KMail/1.9.7 References: <200812041853.35539.hselasky@c2i.net> <20081204.114842.-1540410064.imp@bsdimp.com> <49382D74.1030907@sentex.net> In-Reply-To: <49382D74.1030907@sentex.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812042141.20836.hselasky@c2i.net> Cc: Subject: Re: ucom serial bug? 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, 04 Dec 2008 20:39:12 -0000 On Thursday 04 December 2008, Gabor wrote: > Hi Warner, > > this patch did not seem to fix the issue. In fact this time after > unloading the module and reloading it, and then checking the carrier > doesn't raise carrier even on the first try. > Can it be that the new mpsafetty layer does not remember the TTY state (MSR bits) betweeen two open/close sessions ? The uftdi driver will only report deltas in the MSR register. --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 21:15: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 C780B106564A for ; Thu, 4 Dec 2008 21:15:05 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 735E88FC1B for ; Thu, 4 Dec 2008 21:15:05 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smtp2.sentex.ca (smtp2c.sentex.ca [64.7.153.30]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4LF1kA057018; Thu, 4 Dec 2008 16:15:01 -0500 (EST) (envelope-from gabor@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smtp2.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4LF0Vq071539; Thu, 4 Dec 2008 16:15:01 -0500 (EST) (envelope-from gabor@sentex.net) Received: from [192.168.43.153] ([192.168.43.153]) by pyroxene.sentex.ca (8.14.3/8.13.8) with ESMTP id mB4LF0wg040683; Thu, 4 Dec 2008 16:15:00 -0500 (EST) (envelope-from gabor@sentex.net) Message-ID: <49384854.8000008@sentex.net> Date: Thu, 04 Dec 2008 16:15:00 -0500 From: Gabor User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <200812041853.35539.hselasky@c2i.net> <20081204.114842.-1540410064.imp@bsdimp.com> <49382D74.1030907@sentex.net> <200812042141.20836.hselasky@c2i.net> In-Reply-To: <200812042141.20836.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on clamscanner3 X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: Subject: Re: ucom serial bug? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gabor@sentex.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 21:15:05 -0000 Hi Hans, we just tested against RELENG_7 with the patch and we get the same behaviour. First time we get carrier but not on the second or subsequent try. Here is the patch we used. --- uftdi.c.orig 2008-12-04 15:54:42.000000000 -0500 +++ uftdi.c 2008-12-04 15:54:45.000000000 -0500 @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -457,13 +458,25 @@ { struct uftdi_softc *sc = vsc; u_char msr, lsr; + u_char ftdi_msr; DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", sc, portno, *count)); - msr = FTDI_GET_MSR(*ptr); + ftdi_msr = FTDI_GET_MSR(*ptr); lsr = FTDI_GET_LSR(*ptr); + msr = 0; + if (ftdi_msr & FTDI_SIO_CTS_MASK) + msr |= SER_CTS; + if (ftdi_msr & FTDI_SIO_DSR_MASK) + msr |= SER_DSR; + if (ftdi_msr & FTDI_SIO_RI_MASK) + msr |= SER_RI; + if (ftdi_msr & FTDI_SIO_RLSD_MASK) + msr |= SER_DCD; + + #ifdef USB_DEBUG if (*count != 2) DPRINTFN(10,("uftdi_read: sc=%p, port=%d count=%d data[0]=" On 12/4/08 3:41 PM, Hans Petter Selasky wrote: > On Thursday 04 December 2008, Gabor wrote: >> Hi Warner, >> >> this patch did not seem to fix the issue. In fact this time after >> unloading the module and reloading it, and then checking the carrier >> doesn't raise carrier even on the first try. >> > > Can it be that the new mpsafetty layer does not remember the TTY state (MSR > bits) betweeen two open/close sessions ? > > The uftdi driver will only report deltas in the MSR register. > > --HPS > -- Success is the result when preparation meets opportunity. From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 21:54: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 DDD4D106564A for ; Thu, 4 Dec 2008 21:54:01 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id A1E998FC17 for ; Thu, 4 Dec 2008 21:54:01 +0000 (UTC) (envelope-from gabor@sentex.net) Received: from smtp2.sentex.ca (smtp2c.sentex.ca [64.7.153.30]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4LrxIi065909 for ; Thu, 4 Dec 2008 16:53:59 -0500 (EST) (envelope-from gabor@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smtp2.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4LrxBM074057 for ; Thu, 4 Dec 2008 16:53:59 -0500 (EST) (envelope-from gabor@sentex.net) Received: from [192.168.43.153] ([192.168.43.153]) by pyroxene.sentex.ca (8.14.3/8.13.8) with ESMTP id mB4Lrw93041275 for ; Thu, 4 Dec 2008 16:53:58 -0500 (EST) (envelope-from gabor@sentex.net) Message-ID: <49385176.3070104@sentex.net> Date: Thu, 04 Dec 2008 16:53:58 -0500 From: Gabor User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: freebsd-usb@freebsd.org References: <200812041853.35539.hselasky@c2i.net> <20081204.111528.1723218601.imp@bsdimp.com> <49382349.5040804@sentex.net> <20081204.114842.-1540410064.imp@bsdimp.com> <49382D74.1030907@sentex.net> In-Reply-To: <49382D74.1030907@sentex.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on clamscanner2 X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Subject: Re: ucom serial bug? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gabor@sentex.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2008 21:54:02 -0000 Some more twists to this. As I said if I kill off our program and restart it, it never sees carrier unless the module was reloaded. However, if I unplug the serial cable from the Windows box and re-plug it, carrier goes and comes back as expected but only as long as our software is running. If our software is not running and we unplug the serial cable from the Windows box, carrier does not come back when we start up our program with the cable plugged back in. On 12/4/08 2:20 PM, Gabor wrote: > Hi Warner, > > this patch did not seem to fix the issue. In fact this time after > unloading the module and reloading it, and then checking the carrier > doesn't raise carrier even on the first try. > > On 12/4/08 1:48 PM, M. Warner Losh wrote: >> In message: <49382349.5040804@sentex.net> >> Gabor writes: >> : Hi, >> : : thanks for looking at this issue. Are you guys saying that this >> was not meant to work? As in I shouldn't expect to see carrier? >> >> Ian Lepore sent me this patch a little while ago. I've not had time >> to look into it. If you could test it and let me know, then I'll be >> able to commit it more quickly. It is against a slightly hacked >> version of 6.1, but should translate right over. >> >> Warner >> >> Index: uftdi.c >> =================================================================== >> RCS file: /base/FreeBSD-tsc-6/sys/dev/usb/uftdi.c,v >> retrieving revision 1.2 >> diff -u -r1.2 uftdi.c >> --- uftdi.c 24 Sep 2007 21:37:33 -0000 1.2 >> +++ uftdi.c 14 Nov 2008 18:17:02 -0000 >> @@ -457,13 +457,24 @@ >> { >> struct uftdi_softc *sc = vsc; >> u_char msr, lsr; >> + u_char ftdi_msr; >> >> DPRINTFN(15,("uftdi_read: sc=%p, port=%d count=%d\n", sc, portno, >> *count)); >> >> - msr = FTDI_GET_MSR(*ptr); >> + ftdi_msr = FTDI_GET_MSR(*ptr); >> lsr = FTDI_GET_LSR(*ptr); >> >> + msr = 0; >> + if (ftdi_msr & FTDI_SIO_CTS_MASK) >> + msr |= SER_CTS; >> + if (ftdi_msr & FTDI_SIO_DSR_MASK) >> + msr |= SER_DSR; >> + if (ftdi_msr & FTDI_SIO_RI_MASK) >> + msr |= SER_RI; >> + if (ftdi_msr & FTDI_SIO_RLSD_MASK) >> + msr |= SER_DCD; >> + >> #ifdef USB_DEBUG >> if (*count != 2) >> DPRINTFN(10,("uftdi_read: sc=%p, port=%d count=%d data[0]=" >> >> : : On 12/4/08 1:15 PM, M. Warner Losh wrote: >> : > In message: <200812041853.35539.hselasky@c2i.net> >> : > Hans Petter Selasky writes: >> : > : On Thursday 04 December 2008, Mike Tancsa wrote: >> : > : > At 02:33 PM 12/3/2008, Gabor wrote: >> : > : > >everything works fine. When we try to use a USB to serial >> : > : > >converter(type doesn't matter, UFTDI or Prolific) we run into >> : > : > >problems. The first time we start up our side, everything >> : > : > >works. The second time we don't get carrier(DCD). The other >> side >> : > : > >is always running. Since we have no control >> : > : > >> : > : > Also tried with the usb2 development stack, and we never see >> carrier. >> : > : > >> : > : > Id Refs Address Size Name >> : > : > 1 20 0xc0400000 9f8014 kernel (/boot/kernel/kernel) >> : > : > 2 1 0xc4b95000 3000 usb2_serial_ftdi.ko >> : > : > (/boot/kernel/usb2_serial_ftdi.ko) >> : > : > 3 5 0xc4b99000 36000 usb2_core.ko >> (/boot/kernel/usb2_core.ko) >> : > : > 4 1 0xc4c56000 4000 usb2_serial.ko >> (/boot/kernel/usb2_serial.ko) >> : > : > 5 1 0xc4cb4000 a000 usb2_controller_uhci.ko >> : > : > (/boot/kernel/usb2_controller_uhci.ko) >> : > : > 6 2 0xc4cbe000 3000 usb2_controller.ko >> : > : > (/boot/kernel/usb2_controller.ko) >> : > : > 7 1 0xc4d50000 d000 usb2_controller_ehci.ko >> : > : > (/boot/kernel/usb2_controller_ehci.ko) >> : > : > >> : > : : > : Hi, >> : > : : > : I think this event is not implemented in the driver. Try >> to diff the NetBSD : > : and FreeBSD uftdi.c files. >> : > : > I have some diffs in my inbox from someone that was trying to >> : > implement modem control for uftdi chips. Let me see if they make >> : > sense... >> : > : > Warner >> : > _______________________________________________ >> : > 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" >> : > : : -- : Success is the result when preparation meets opportunity. >> : _______________________________________________ >> : 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" >> : : > -- Success is the result when preparation meets opportunity. From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 22:18:36 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 BAE701065676 for ; Thu, 4 Dec 2008 22:18:36 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 5310B8FC0C for ; Thu, 4 Dec 2008 22:18:36 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=P3SC899gXHkOLDnkTYxLZw==:17 a=Kzi9jfM1gJ_jg7_zSqsA:9 a=9rninjGaosjlm-v0ZH7BcJp1VdgA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 418284293; Thu, 04 Dec 2008 23:18:34 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, gabor@sentex.net Date: Thu, 4 Dec 2008 23:20:47 +0100 User-Agent: KMail/1.9.7 References: <200812041853.35539.hselasky@c2i.net> <49382D74.1030907@sentex.net> <49385176.3070104@sentex.net> In-Reply-To: <49385176.3070104@sentex.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812042320.48818.hselasky@c2i.net> Cc: Subject: Re: ucom serial bug? 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, 04 Dec 2008 22:18:36 -0000 On Thursday 04 December 2008, Gabor wrote: > Some more twists to this. As I said if I kill off our program and restart > it, it never sees carrier unless the module was reloaded. However, if I > unplug the serial cable from the Windows box and re-plug it, carrier goes > and comes back as expected but only as long as our software is running. If > our software is not running and we unplug the serial cable from the Windows > box, carrier does not come back when we start up our program with the cable > plugged back in. Maybe you can try setting the MSR to zero when the modem is opened in the uftdi.c driver file. In USB2 there is also a sysctl for UFTDI debugging which you can check. --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Dec 4 22:37: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 D493B1065672 for ; Thu, 4 Dec 2008 22:37:35 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 995358FC1D for ; Thu, 4 Dec 2008 22:37:35 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB4MbWMa071525; Thu, 4 Dec 2008 17:37:32 -0500 (EST) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id mB4MbWLK018707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Dec 2008 17:37:32 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <200812042237.mB4MbWLK018707@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Thu, 04 Dec 2008 17:37:23 -0500 To: Hans Petter Selasky , freebsd-usb@freebsd.org From: Mike Tancsa In-Reply-To: <200812042320.48818.hselasky@c2i.net> References: <200812041853.35539.hselasky@c2i.net> <49382D74.1030907@sentex.net> <49385176.3070104@sentex.net> <200812042320.48818.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: Subject: Re: ucom serial bug? 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, 04 Dec 2008 22:37:35 -0000 At 05:20 PM 12/4/2008, Hans Petter Selasky wrote: >On Thursday 04 December 2008, Gabor wrote: > > Some more twists to this. As I said if I kill off our program and restart > > it, it never sees carrier unless the module was reloaded. However, if I > > unplug the serial cable from the Windows box and re-plug it, carrier goes > > and comes back as expected but only as long as our software is running. If > > our software is not running and we unplug the serial cable from the Windows > > box, carrier does not come back when we start up our program with the cable > > plugged back in. > >Maybe you can try setting the MSR to zero when the modem is opened in the >uftdi.c driver file. > >In USB2 there is also a sysctl for UFTDI debugging which you can check. Hi, In the regular USB stack, I did run it with some debugging enabled. The diff between the first run and the second run is below using Gabor's check carrier program I havent tried with debugging enabled and just pulling the serial cable out yet. I will try that tomorrow when back at the office! In terms of setting the MSR to zero, do you mean in static int uftdi_open(void *vsc, int portno) ? First run where the program sees carrier : ucom0 on uhub3 : ucomtty_param: sc = 0xc47faa80 : ucomstopread: enter : ucomstopread: bulkin pipe NULL : uftdi_param: sc=0xc47faa80 : ucomstartread: start : ucom_dtr: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : ucom0: ucomtty_open: tp = 0xc4c7c800 : ucom_dtr: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : uftdi_open: sc=0xc47faa80 : uftdi_param: sc=0xc47faa80 : ucomtty_open: open pipes in = 129 out = 2 : ucomstartread: start : ucomioctl: cmd = 0x402c7413 : ucomioctl: cmd = 0x802c7414 : ucomtty_param: sc = 0xc47faa80 : ucomstopread: enter : ucomreadcb: status = 6 : ucomstopread: leave : uftdi_param: sc=0xc47faa80 : ucomstartread: start : ucomioctl: cmd = 0x8004667e : ucomioctl: cmd = 0x8004667d : ucomioctl: cmd = 0x4004746a : ucomioctl: cmd = 0x4004746a : ucomioctl: cmd = 0x8004746d : ucom_dtr: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 : ucomreadcb: status = 0 : ucomreadcb: got 2 chars, tp = 0xc4c7c800 : uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x00) : uftdi_status: msr=0xb0 lsr=0x60 : ucom_status_change: about to check sc->sc_poll it is 1 : ucom_status_change: DCD changed to 1 : ucomstartread: start : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : ucomioctl: cmd = 0x4004746a : ucom0: ucomtty_close : ucom_cleanup: closing pipes : ucom_shutdown : ucom_dtr: onoff = 0 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=0 : ucomreadcb: status = 0 : ucomreadcb: got 2 chars, tp = 0xc4c7c800 : uftdi_read: status change msr=0x00(0xb0) lsr=0x60(0x60) : uftdi_status: msr=0x00 lsr=0x60 : ucom_status_change: about to check sc->sc_poll it is 1 : ucom_status_change: DCD changed to 0 : ucomstartread: start : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : ucomreadcb: status = 0 : ucomreadcb: got 2 chars, tp = 0xc4c7c800 : uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x60) : uftdi_status: msr=0xb0 lsr=0x60 : ucom_status_change: about to check sc->sc_poll it is 1 : ucom_status_change: DCD changed to 1 : ucomstartread: start : ucomreadcb: status = 6 and second run, where it does not : ucomtty_param: sc = 0xc47faa80 : ucomstopread: enter : ucomstopread: leave : uftdi_param: sc=0xc47faa80 : ucomstartread: start : ucom_dtr: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : ucom0: ucomtty_open: tp = 0xc4c7c800 : ucom_dtr: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : uftdi_open: sc=0xc47faa80 : uftdi_param: sc=0xc47faa80 : ucomtty_open: open pipes in = 129 out = 2 : ucomstartread: start : ucomioctl: cmd = 0x402c7413 : ucomioctl: cmd = 0x802c7414 : ucomtty_param: sc = 0xc47faa80 : ucomstopread: enter : ucomreadcb: status = 6 : ucomstopread: leave : uftdi_param: sc=0xc47faa80 : ucomstartread: start : ucomioctl: cmd = 0x8004667e : ucomioctl: cmd = 0x8004667d : ucomioctl: cmd = 0x4004746a : ucomioctl: cmd = 0x4004746a : ucomioctl: cmd = 0x8004746d : ucom_dtr: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 : ucomreadcb: status = 0 : ucomreadcb: got 2 chars, tp = 0xc4c7c800 : ucomstartread: start : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : ucomioctl: cmd = 0x4004746a : ucom0: ucomtty_close : ucom_cleanup: closing pipes : ucom_shutdown : ucom_dtr: onoff = 0 : uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=0 : ucomreadcb: status = 0 : ucomreadcb: got 2 chars, tp = 0xc4c7c800 : uftdi_read: status change msr=0x00(0xb0) lsr=0x60(0x60) : uftdi_status: msr=0x00 lsr=0x60 : ucomstartread: start : ucom_rts: onoff = 1 : uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 : ucomreadcb: status = 0 : ucomreadcb: got 2 chars, tp = 0xc4c7c800 : uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x60) : uftdi_status: msr=0xb0 lsr=0x60 : ucom_status_change: about to check sc->sc_poll it is 1 : ucom_status_change: DCD changed to 1 : ucomstartread: start : ucomreadcb: status = 6 % diff a b 2d1 < : ucom0 on uhub3 5c4 < : ucomstopread: bulkin pipe NULL --- > : ucomstopread: leave 38,41d36 < : uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x00) < : uftdi_status: msr=0xb0 lsr=0x60 < : ucom_status_change: about to check sc->sc_poll it is 1 < : ucom_status_change: DCD changed to 1 55,56d49 < : ucom_status_change: about to check sc->sc_poll it is 1 < : ucom_status_change: DCD changed to 0 From owner-freebsd-usb@FreeBSD.ORG Fri Dec 5 21:38: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 3A5F3106564A for ; Fri, 5 Dec 2008 21:38:24 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 0679E8FC0C for ; Fri, 5 Dec 2008 21:38:23 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB5LcJvO041816; Fri, 5 Dec 2008 16:38:19 -0500 (EST) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id mB5LcId3024797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Dec 2008 16:38:18 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <200812052138.mB5LcId3024797@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Fri, 05 Dec 2008 16:38:11 -0500 To: Hans Petter Selasky , freebsd-usb@freebsd.org From: Mike Tancsa In-Reply-To: <7.1.0.9.0.20081204172610.16c1d868@sentex.net> References: <200812041853.35539.hselasky@c2i.net> <49382D74.1030907@sentex.net> <49385176.3070104@sentex.net> <200812042320.48818.hselasky@c2i.net> <7.1.0.9.0.20081204172610.16c1d868@sentex.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: Subject: Re: ucom serial bug? 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, 05 Dec 2008 21:38:24 -0000 At 05:37 PM 12/4/2008, Mike Tancsa wrote: >At 05:20 PM 12/4/2008, Hans Petter Selasky wrote: >>On Thursday 04 December 2008, Gabor wrote: >> > Some more twists to this. As I said if I kill off our program and restart >> > it, it never sees carrier unless the module was reloaded. However, if I >> > unplug the serial cable from the Windows box and re-plug it, carrier goes >> > and comes back as expected but only as long as our software is >> running. If >> > our software is not running and we unplug the serial cable from >> the Windows >> > box, carrier does not come back when we start up our program >> with the cable >> > plugged back in. >> >>Maybe you can try setting the MSR to zero when the modem is opened in the >>uftdi.c driver file. >> >>In USB2 there is also a sysctl for UFTDI debugging which you can check. > >Hi, > In the regular USB stack, I did run it with some debugging > enabled. The diff between the first run and the second run is > below using Gabor's check carrier program > >I havent tried with debugging enabled and just pulling the serial >cable out yet. I will try that tomorrow when back at the office! While the program is running and has /dev/cuaU0 open and NOT seeing carrier (when it should) its just a series of Dec 5 15:56:50 current kernel: ucomstartread: start Dec 5 15:56:50 current kernel: ucomreadcb: status = 0 Dec 5 15:56:50 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:50 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:50 current kernel: ucomstartread: start with 4 ioctls in a 1 second span # grep 15:56:50 all.log | grep ioc Dec 5 15:56:50 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:50 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:50 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:50 current kernel: ucomioctl: cmd = 0x4004746a When I go and unplug the serial cable and then plug it back in I see Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: uftdi_read: status change msr=0x20(0x00) lsr=0x60(0x60) Dec 5 15:56:52 current kernel: uftdi_status: msr=0x20 lsr=0x60 Dec 5 15:56:52 current kernel: ucom_status_change: DCD changed to 1 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: uftdi_read: status change msr=0xa0(0x20) lsr=0x60(0x60) Dec 5 15:56:52 current kernel: uftdi_status: msr=0xa0 lsr=0x60 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:52 current kernel: ucomtty_outwakeup: sc = 0xc4568d80 Dec 5 15:56:52 current kernel: uftdi_write: sc=0xc4568d80, port=1 tp=0xc4d19000, count=64 Dec 5 15:56:52 current kernel: ucomtty_outwakeup: 3 chars Dec 5 15:56:52 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:52 current kernel: ucomwritecb: status = 0 Dec 5 15:56:52 current kernel: ucomwritecb: cc = 3 Dec 5 15:56:52 current kernel: ucomtty_outwakeup: sc = 0xc4568d80 Dec 5 15:56:52 current kernel: uftdi_write: sc=0xc4568d80, port=1 tp=0xc4d19000, count=64 Dec 5 15:56:52 current kernel: ucomtty_outwakeup: cnt == 0 Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: uftdi_read: status change msr=0xb0(0xa0) lsr=0x60(0x60) Dec 5 15:56:52 current kernel: uftdi_status: msr=0xb0 lsr=0x60 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 3 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=3 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=3 data[0]=0x84 Dec 5 15:56:52 current kernel: ucomreadcb: char = 0x84 Dec 5 15:56:52 current kernel: ucomstartread: start Dec 5 15:56:52 current kernel: ucomreadcb: status = 0 Dec 5 15:56:52 current kernel: ucomreadcb: got 2 chars, tp = 0xc4d19000 Dec 5 15:56:52 current kernel: uftdi_read: sc=0xc4568d80, port=1 count=2 Dec 5 15:56:52 current kernel: uftdi_read: status change msr=0xa0(0xb0) lsr=0x60(0x60) Dec 5 15:56:52 current kernel: uftdi_status: msr=0xa0 lsr=0x60 Dec 5 15:56:52 current kernel: ucomstartread: start # grep "15:56:5[1-4]" all.log | grep ioc Dec 5 15:56:51 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:51 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:51 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:51 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:52 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:52 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:52 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:52 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:52 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:53 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x2000745e Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x4004746a Dec 5 15:56:54 current kernel: ucomioctl: cmd = 0x2000745e Any ideas ? ---Mike >In terms of setting the MSR to zero, do you mean in > >static int uftdi_open(void *vsc, int portno) > >? > > > > >First run where the program sees carrier > >: ucom0 on uhub3 >: ucomtty_param: sc = 0xc47faa80 >: ucomstopread: enter >: ucomstopread: bulkin pipe NULL >: uftdi_param: sc=0xc47faa80 >: ucomstartread: start >: ucom_dtr: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: ucom0: ucomtty_open: tp = 0xc4c7c800 >: ucom_dtr: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: uftdi_open: sc=0xc47faa80 >: uftdi_param: sc=0xc47faa80 >: ucomtty_open: open pipes in = 129 out = 2 >: ucomstartread: start >: ucomioctl: cmd = 0x402c7413 >: ucomioctl: cmd = 0x802c7414 >: ucomtty_param: sc = 0xc47faa80 >: ucomstopread: enter >: ucomreadcb: status = 6 >: ucomstopread: leave >: uftdi_param: sc=0xc47faa80 >: ucomstartread: start >: ucomioctl: cmd = 0x8004667e >: ucomioctl: cmd = 0x8004667d >: ucomioctl: cmd = 0x4004746a >: ucomioctl: cmd = 0x4004746a >: ucomioctl: cmd = 0x8004746d >: ucom_dtr: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 >: ucomreadcb: status = 0 >: ucomreadcb: got 2 chars, tp = 0xc4c7c800 >: uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x00) >: uftdi_status: msr=0xb0 lsr=0x60 >: ucom_status_change: about to check sc->sc_poll it is 1 >: ucom_status_change: DCD changed to 1 >: ucomstartread: start >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: ucomioctl: cmd = 0x4004746a >: ucom0: ucomtty_close >: ucom_cleanup: closing pipes >: ucom_shutdown >: ucom_dtr: onoff = 0 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=0 >: ucomreadcb: status = 0 >: ucomreadcb: got 2 chars, tp = 0xc4c7c800 >: uftdi_read: status change msr=0x00(0xb0) lsr=0x60(0x60) >: uftdi_status: msr=0x00 lsr=0x60 >: ucom_status_change: about to check sc->sc_poll it is 1 >: ucom_status_change: DCD changed to 0 >: ucomstartread: start >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: ucomreadcb: status = 0 >: ucomreadcb: got 2 chars, tp = 0xc4c7c800 >: uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x60) >: uftdi_status: msr=0xb0 lsr=0x60 >: ucom_status_change: about to check sc->sc_poll it is 1 >: ucom_status_change: DCD changed to 1 >: ucomstartread: start >: ucomreadcb: status = 6 > >and second run, where it does not > > > >: ucomtty_param: sc = 0xc47faa80 >: ucomstopread: enter >: ucomstopread: leave >: uftdi_param: sc=0xc47faa80 >: ucomstartread: start >: ucom_dtr: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: ucom0: ucomtty_open: tp = 0xc4c7c800 >: ucom_dtr: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: uftdi_open: sc=0xc47faa80 >: uftdi_param: sc=0xc47faa80 >: ucomtty_open: open pipes in = 129 out = 2 >: ucomstartread: start >: ucomioctl: cmd = 0x402c7413 >: ucomioctl: cmd = 0x802c7414 >: ucomtty_param: sc = 0xc47faa80 >: ucomstopread: enter >: ucomreadcb: status = 6 >: ucomstopread: leave >: uftdi_param: sc=0xc47faa80 >: ucomstartread: start >: ucomioctl: cmd = 0x8004667e >: ucomioctl: cmd = 0x8004667d >: ucomioctl: cmd = 0x4004746a >: ucomioctl: cmd = 0x4004746a >: ucomioctl: cmd = 0x8004746d >: ucom_dtr: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=1 >: ucomreadcb: status = 0 >: ucomreadcb: got 2 chars, tp = 0xc4c7c800 >: ucomstartread: start >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: ucomioctl: cmd = 0x4004746a >: ucom0: ucomtty_close >: ucom_cleanup: closing pipes >: ucom_shutdown >: ucom_dtr: onoff = 0 >: uftdi_set: sc=0xc47faa80, port=1 reg=1 onoff=0 >: ucomreadcb: status = 0 >: ucomreadcb: got 2 chars, tp = 0xc4c7c800 >: uftdi_read: status change msr=0x00(0xb0) lsr=0x60(0x60) >: uftdi_status: msr=0x00 lsr=0x60 >: ucomstartread: start >: ucom_rts: onoff = 1 >: uftdi_set: sc=0xc47faa80, port=1 reg=2 onoff=1 >: ucomreadcb: status = 0 >: ucomreadcb: got 2 chars, tp = 0xc4c7c800 >: uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x60) >: uftdi_status: msr=0xb0 lsr=0x60 >: ucom_status_change: about to check sc->sc_poll it is 1 >: ucom_status_change: DCD changed to 1 >: ucomstartread: start >: ucomreadcb: status = 6 > > > > >% diff a b >2d1 >< : ucom0 on uhub3 >5c4 >< : ucomstopread: bulkin pipe NULL >--- > > : ucomstopread: leave >38,41d36 >< : uftdi_read: status change msr=0xb0(0x00) lsr=0x60(0x00) >< : uftdi_status: msr=0xb0 lsr=0x60 >< : ucom_status_change: about to check sc->sc_poll it is 1 >< : ucom_status_change: DCD changed to 1 >55,56d49 >< : ucom_status_change: about to check sc->sc_poll it is 1 >< : ucom_status_change: DCD changed to 0 From owner-freebsd-usb@FreeBSD.ORG Sat Dec 6 09:46: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 813931065673 for ; Sat, 6 Dec 2008 09:46:02 +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 19C578FC19 for ; Sat, 6 Dec 2008 09:46:01 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=P3SC899gXHkOLDnkTYxLZw==:17 a=zE7-c0Y5vamB5KS24LAA:9 a=LkYXMFspB-0M6NTYBkf4_19eQvgA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 110231654; Sat, 06 Dec 2008 10:45:59 +0100 From: Hans Petter Selasky To: Mike Tancsa Date: Sat, 6 Dec 2008 10:48:12 +0100 User-Agent: KMail/1.9.7 References: <200812041853.35539.hselasky@c2i.net> <200812042320.48818.hselasky@c2i.net> <200812042237.mB4MbWLK018707@lava.sentex.ca> In-Reply-To: <200812042237.mB4MbWLK018707@lava.sentex.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812061048.13136.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: ucom serial bug? 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, 06 Dec 2008 09:46:02 -0000 On Thursday 04 December 2008, Mike Tancsa wrote: > At 05:20 PM 12/4/2008, Hans Petter Selasky wrote: > >On Thursday 04 December 2008, Gabor wrote: > > In terms of setting the MSR to zero, do you mean in > > static int uftdi_open(void *vsc, int portno) > > ? Yes. Do you have MSN/AIM/ICQ/Skype or something like that so that we can debug this issue rapidly? --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Dec 6 10:19:01 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 BB647106564A for ; Sat, 6 Dec 2008 10:19:01 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 4F5498FC12 for ; Sat, 6 Dec 2008 10:19:01 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=NpnstxDL3QMA:10 a=P3SC899gXHkOLDnkTYxLZw==:17 a=6I5d2MoRAAAA:8 a=vocDXL71BTMOUZ-YOagA:9 a=fu8xWykqyJ6QIyaPlqtcvFLJNqQA:4 a=LY0hPdMaydYA:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1160740864; Sat, 06 Dec 2008 11:18:59 +0100 From: Hans Petter Selasky To: Michael Date: Sat, 6 Dec 2008 11:21:12 +0100 User-Agent: KMail/1.9.7 References: <492D6E0D.7020500@bindone.de> <200812021554.17516.hselasky@c2i.net> <4935CB2E.2020801@bindone.de> In-Reply-To: <4935CB2E.2020801@bindone.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200812061121.13760.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Device IDs for HP hs2300 HSDPA modem 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, 06 Dec 2008 10:19:01 -0000 On Wednesday 03 December 2008, Michael wrote: > +=A0=A0=A0=A0=A0=A0=A0{USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_HS2300, U3GI= NFO(U3GSP_HSPA, > U3GFL_NONE))},=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0/* XXX */ Comitted to P4: http://perforce.freebsd.org/chv.cgi?CH=3D154173 =2D-HPS From owner-freebsd-usb@FreeBSD.ORG Sat Dec 6 12:32:44 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 371E1106564A; Sat, 6 Dec 2008 12:32:44 +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 6C5A88FC1A; Sat, 6 Dec 2008 12:32:42 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=OxQIQV-UnBUA:10 a=OldrGD9YyLYA:10 a=P3SC899gXHkOLDnkTYxLZw==:17 a=6I5d2MoRAAAA:8 a=Ypr3F3R0nPgr0K2cb5IA:9 a=rfxohL1yYNVgKBw6gWQ67BqpItMA:4 a=50e4U0PicR4A:10 Received: from [62.113.133.240] (account mc467741@c2i.net [62.113.133.240] verified) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1159579682; Sat, 06 Dec 2008 13:32:41 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 6 Dec 2008 13:34:54 +0100 User-Agent: KMail/1.9.7 References: <20081107082740.GA1334@icarus.home.lan> <200811081023.10058.hselasky@freebsd.org> <200811161408.21562.hselasky@c2i.net> In-Reply-To: <200811161408.21562.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812061334.55365.hselasky@c2i.net> Cc: Scott Long , freebsd-current@freebsd.org Subject: Re: [Serious] busdma bug in -current in relation to USB hardware - review wanted 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, 06 Dec 2008 12:32:44 -0000 Hi, After various feedback from several people I have made a new patch proposal that will fix the busdma problem. See: http://perforce.freebsd.org/chv.cgi?CH=154181 Review wanted! I don't know how to patch the psyco interface for SUN. Maybe there is nothing that needs to be patched? --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Dec 6 17:45:06 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 B075B106564A; Sat, 6 Dec 2008 17:45:06 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout022.mac.com (asmtpout022.mac.com [17.148.16.97]) by mx1.freebsd.org (Postfix) with ESMTP id 688438FC08; Sat, 6 Dec 2008 17:45:06 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from [192.168.1.94] (209-128-86-226.BAYAREA.NET [209.128.86.226]) by asmtp022.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KBG000P5UN55O30@asmtp022.mac.com>; Sat, 06 Dec 2008 09:45:06 -0800 (PST) Message-id: <031DE609-3E5B-4508-BAB0-95800B7F02F4@mac.com> From: Marcel Moolenaar To: Hans Petter Selasky In-reply-to: <200812061334.55365.hselasky@c2i.net> Date: Sat, 06 Dec 2008 09:45:04 -0800 References: <20081107082740.GA1334@icarus.home.lan> <200811081023.10058.hselasky@freebsd.org> <200811161408.21562.hselasky@c2i.net> <200812061334.55365.hselasky@c2i.net> X-Mailer: Apple Mail (2.929.2) Cc: freebsd-current@freebsd.org, freebsd-usb@freebsd.org Subject: Re: [Serious] busdma bug in -current in relation to USB hardware - review wanted 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, 06 Dec 2008 17:45:06 -0000 On Dec 6, 2008, at 4:34 AM, Hans Petter Selasky wrote: > Hi, > > After various feedback from several people I have made a new patch > proposal > that will fix the busdma problem. > > See: > > http://perforce.freebsd.org/chv.cgi?CH=154181 > > Review wanted! The USB stack has a fixed page size of 4K. On our 64-bit platforms PAGE_SIZE is at least 8K. Your change is sloppy in that respect and doesn't make the distinction. That makes the patch a kluge. The definition of BUS_DMA_NO_REALIGN is based on circumstantial evidence only and as such, works as a side-effect. I don't think that's a good design. I don't think there's any reason not to preserve the page offset in all cases. So far all hardware worked whether or not their DMA pages were bounced and the non-bounced pages would have a possible non-zero page offset, whereas the bounced pages would always have a zero page offset. In short: it works either way. In particular, it works with the page offset preserved. Why not preserve it always? What's the downside? -- Marcel Moolenaar xcllnt@mac.com