From owner-freebsd-usb@FreeBSD.ORG Sun May 29 15:14:59 2011 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 23D64106564A for ; Sun, 29 May 2011 15:14:59 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A7F8E8FC0C for ; Sun, 29 May 2011 15:14:57 +0000 (UTC) Received: by bwz12 with SMTP id 12so3456710bwz.13 for ; Sun, 29 May 2011 08:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:from:date:message-id :subject:to:content-type; bh=zYFTqdzC7JauI1ijh8Fhuau2db9W0OOY0hkavE3qkT8=; b=VFw0I2Wr/7/S3qo+vTbfmytNWvgskEg08zjAqnqcfbXjk7g0IsTpYL4dAhugN6yqCT Fg7eArEktUGzZuVuMN02J4h1rBf69tNbv8QEWxLa4ojdSQW2sckgQEnpQqU6237hlCES 9ntx6MQLSDPcgPECDR/jPcNG8p8I0o2+TdtlQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; b=CoHwAZi9KmG/TCyRAjxxRPTFd377/hWTueV9wUNgSS/s43hUXxm5psdaJ0GwHURAZf 0Sn9JVJmTv84llZGRWdVGtiDXX2XNvh1qEFZ7lg7AF4KHADkX+JMA7Pf1xGwNczi/s5N k/vjyC1iWC0/1cd/UTz/uuSf2qPpTKS06nauo= Received: by 10.204.57.135 with SMTP id c7mr3400568bkh.88.1306680778448; Sun, 29 May 2011 07:52:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.66.81 with HTTP; Sun, 29 May 2011 07:52:28 -0700 (PDT) From: Chris Rees Date: Sun, 29 May 2011 15:52:28 +0100 Message-ID: To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: USB hard drive g_vfs_done() error=5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2011 15:14:59 -0000 Hi all, I'm afraid I've also got the infamous error 5 problem on my Macbook. USB hard drive seems to work fine as it's newfs'd a couple of times, but after a little while (using USB hard drive as backup destination with rsync) it gives me these: [crees@zeus]~% dmesg |tail g_vfs_done():da0s1[WRITE(offset=41748480, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41750528, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41752576, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41754624, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41756672, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41758720, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41760768, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41762816, length=12288)]error = 5 g_vfs_done():da0s1[WRITE(offset=41775104, length=2048)]error = 5 g_vfs_done():da0s1[WRITE(offset=41777152, length=2048)]error = 5 Unfortunately I can't seem to stop it doing this, and every time I've just unplugged the drive in the past the system panics... I'd really rather avoid that since it's my main server. [crees@zeus]~% uname -a FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Sat Apr 30 15:09:06 BST 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386 Kernel config file is at [1]. I've tried the patch from [2], and this stops the AutoSense failed messages I used to get, but not these. Perhaps oddly related, when these messages start tab-completion in tcsh sometimes hangs -- even for unrelated directories such as % ls /roo^VTAB causes a hang. Any ideas/patches/information I've missed? The drive works perfectly in 'Windows', and I also tried it on my Ubuntu netbook. Chris [1] http://www.bayofrum.net/~crees/ZEUS (diff to GENERIC at http://www.bayofrum.net/~crees/ZEUS.diff) [2] http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/150401 From owner-freebsd-usb@FreeBSD.ORG Sun May 29 15:22:05 2011 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 6A6CF106566B for ; Sun, 29 May 2011 15:22:05 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id EB1CB8FC0A for ; Sun, 29 May 2011 15:22:04 +0000 (UTC) Received: by bwz12 with SMTP id 12so3460156bwz.13 for ; Sun, 29 May 2011 08:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=c0vPFcp/TyFhFqfva4rIUoBMvBobMxa0OyDiyyBg2H0=; b=f/uKHmuZYnNbK9O6uRLrijWuLiOp+GIhfPrREFtiDwPpsPeK5Mo5T4RbKoECBOS22U fi8kweWDIZh8sr1Rqz4+K83vC4Y6d3HknbnyYKo74O802WWoRHqg1SCP23fP6MAsDWo3 LACkmYfHk/Xy7mwn9iurZww3HLe/B/WtazDeE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; b=UXTIz1LUp3x5NYMQ2FDFejZijYjiV3P53LyDqEt9+7D6GA4gQAhR0DieSNtCr2imHD IufgFNMVlNetrywhTFxJrhx4L97Osvgqzk55qmNK0hZPG4IseTlZTzjvnfnChpIVEJeH bN5wOUsRTwY36vQhYg9vQCEsA3jpvln43JBPM= Received: by 10.204.82.149 with SMTP id b21mr3380856bkl.196.1306681040090; Sun, 29 May 2011 07:57:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.66.81 with HTTP; Sun, 29 May 2011 07:56:50 -0700 (PDT) In-Reply-To: References: From: Chris Rees Date: Sun, 29 May 2011 15:56:50 +0100 Message-ID: To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: USB hard drive g_vfs_done() error=5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2011 15:22:05 -0000 On 29 May 2011 15:52, Chris Rees wrote: > Hi all, > > I'm afraid I've also got the infamous error 5 problem on my Macbook. > > USB hard drive seems to work fine as it's newfs'd a couple of times, > but after a little while (using USB hard drive as backup destination > with rsync) it gives me these: > > [crees@zeus]~% dmesg |tail > g_vfs_done():da0s1[WRITE(offset=3D41748480, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41750528, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41752576, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41754624, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41756672, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41758720, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41760768, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41762816, length=3D12288)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41775104, length=3D2048)]error =3D 5 > g_vfs_done():da0s1[WRITE(offset=3D41777152, length=3D2048)]error =3D 5 > > Unfortunately I can't seem to stop it doing this, and every time I've > just unplugged the drive in the past the system panics... I'd really > rather avoid that since it's my main server. > > [crees@zeus]~% uname -a > FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: > Sat Apr 30 15:09:06 BST 2011 > root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS =A0i386 > > Kernel config file is at [1]. > > I've tried the patch from [2], and this stops the AutoSense failed > messages I used to get, but not these. > > Perhaps oddly related, when these messages start tab-completion in > tcsh sometimes hangs -- even for unrelated directories such as % ls > /roo^VTAB causes a hang. > > Any ideas/patches/information I've missed? The drive works perfectly > in 'Windows', and I also tried it on my Ubuntu netbook. > > Chris > > > [1] http://www.bayofrum.net/~crees/ZEUS (diff to GENERIC at > http://www.bayofrum.net/~crees/ZEUS.diff) > [2] http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dusb/150401 Sorry to reply to my own post. I should clarify that I have only tried enabling some USB quirks _after_ the problem has started, but my main problem is now that the disk is 'stuck' in the computer. Is there a trick to removing that drive now without causing a panic? I've tried umount -f (hangs, but now mount doesn't show it mounted, although newfs can't open for writing), followed by camcontrol eject da0 (fails). Chris From owner-freebsd-usb@FreeBSD.ORG Sun May 29 17:15:18 2011 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 404F4106564A for ; Sun, 29 May 2011 17:15:18 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id 8DB088FC0C for ; Sun, 29 May 2011 17:15:16 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=PvOwS0pD1JWuCk2fMyCiv7x8TRi/oBifOus6FmFACNc= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=yUhmhmwYHtkA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=pGLkceISAAAA:8 a=ZB5LerlCAAAA:8 a=6I5d2MoRAAAA:8 a=LDFoPj9JVhm876QIXScA:9 a=w29AcMPwINq_yB8kPkEA:7 a=wPNLvfGTeEIA:10 a=MSl-tDqOz04A:10 a=Nuq3ByQcxgxoZltA:21 a=YnoduxtkD0z-rUip:21 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 133322295; Sun, 29 May 2011 19:15:14 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, utisoft@gmail.com Date: Sun, 29 May 2011 19:13:55 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105291913.55786.hselasky@c2i.net> Cc: Subject: Re: USB hard drive g_vfs_done() error=5 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, 29 May 2011 17:15:18 -0000 On Sunday 29 May 2011 16:56:50 Chris Rees wrote: > On 29 May 2011 15:52, Chris Rees wrote: > > Hi all, > > > > I'm afraid I've also got the infamous error 5 problem on my Macbook. > > > > USB hard drive seems to work fine as it's newfs'd a couple of times, > > but after a little while (using USB hard drive as backup destination > > with rsync) it gives me these: > > > > [crees@zeus]~% dmesg |tail > > g_vfs_done():da0s1[WRITE(offset=41748480, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41750528, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41752576, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41754624, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41756672, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41758720, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41760768, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41762816, length=12288)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41775104, length=2048)]error = 5 > > g_vfs_done():da0s1[WRITE(offset=41777152, length=2048)]error = 5 > > > > Unfortunately I can't seem to stop it doing this, and every time I've > > just unplugged the drive in the past the system panics... I'd really > > rather avoid that since it's my main server. > > > > [crees@zeus]~% uname -a > > FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: > > Sat Apr 30 15:09:06 BST 2011 > > root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386 > > > > Kernel config file is at [1]. > > > > I've tried the patch from [2], and this stops the AutoSense failed > > messages I used to get, but not these. > > > > Perhaps oddly related, when these messages start tab-completion in > > tcsh sometimes hangs -- even for unrelated directories such as % ls > > /roo^VTAB causes a hang. > > > > Any ideas/patches/information I've missed? The drive works perfectly > > in 'Windows', and I also tried it on my Ubuntu netbook. > > > > Chris > > > > > > [1] http://www.bayofrum.net/~crees/ZEUS (diff to GENERIC at > > http://www.bayofrum.net/~crees/ZEUS.diff) > > [2] http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/150401 > > Sorry to reply to my own post. > > I should clarify that I have only tried enabling some USB quirks > _after_ the problem has started, but my main problem is now that the > disk is 'stuck' in the computer. > > Is there a trick to removing that drive now without causing a panic? > > I've tried umount -f (hangs, but now mount doesn't show it mounted, > although newfs can't open for writing), followed by camcontrol eject > da0 (fails). Hi, Does your device have sufficient power? --HPS From owner-freebsd-usb@FreeBSD.ORG Mon May 30 11:07:10 2011 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 88B53106564A for ; Mon, 30 May 2011 11:07:10 +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 776558FC28 for ; Mon, 30 May 2011 11:07:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4UB7AqD050541 for ; Mon, 30 May 2011 11:07:10 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4UB79F9050539 for freebsd-usb@FreeBSD.org; Mon, 30 May 2011 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 May 2011 11:07:09 GMT Message-Id: <201105301107.p4UB79F9050539@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, 30 May 2011 11:07:10 -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/157376 usb LaCie USB disk not recognized o usb/156898 usb [keyboard] usb keyboard does not work while boot (ps2 o usb/156735 usb Need Quirk for Goflex USB Disk Drives o usb/156725 usb USB stack stall cause complete system input loss o usb/156596 usb [ehci] Extremely high interrupt rate on ehci/uhci IRQ1 o usb/156000 usb rum(4) Fatal trap 18: integer divide fault while in ke o usb/155996 usb NanoBSD not booted as Disk o usb/155784 usb Problem with Transcend StoreJet 25M3 (2AJ1) on Asus M2 o usb/155663 usb [usbdevs] [patch] Add support for Supertop Nano 1GB US o usb/155496 usb [usb][patch] support BUFFALO WLI-U2-SG54HG wireless o usb/154753 usb [usbdevs] [patch] Support for Qualcomm USB modem/stora o usb/154710 usb [ugen] Conexant USB Modem is not working in 8.x. In 7. o usb/154506 usb [umass] Copying dir with large files makes FreeBSD loa o usb/154192 usb [umass] In Garmin Oregon GPS, only the first umass dev o i386/153851 usb [keyboard] keyboard issues on new Intel Mother boards. o usb/153703 usb [keyboard] My USB keyboard can not be used in 8-STABLE o usb/153609 usb [zyd] [panic] kernel: Fatal trap 12: page fault while o usb/153599 usb [usbdevs] [patch] Feiya Elango USB MicroSD reader sync o usb/153149 usb [umass] USB stick quirk regression [regression] o usb/152075 usb [usb8] [ehci] [request] Add quirk for CS5536 USB o usb/150892 usb [zyd] Whenever network contacted in any shape, way or o usb/150189 usb [run] [usb8] [patch] if_run appears to corrupt IP traf p usb/149934 usb [patch] [usb8] Transcend JetFlash V85 poor performance p usb/149900 usb [uftdi] [patch] FreeBSD 8.1 uftdi patch to support usb p usb/149764 usb [u3g] [patch] usbdevs update: Huawei K3765 3G modem o usb/149283 usb [uftdi] avrdude unable to talk to Arduino board (via u o usb/149162 usb [ural] ASUS WL-167g doesn't work in 8.1 (continue of 1 s usb/148702 usb [usb8] [request] IO DATA USB-RSAQ5 support on FreeBSD- o usb/148080 usb usbconfig(8) sometimes does not turn off the device o usb/147516 usb [umass] [usb67] kernel unable to deal with Olympus USB o i386/147475 usb [install] FreeBSD 8.x does not install on ASUS K8N4-E p usb/146871 usb [usbdevs] [usb8] [patch] provide descriprive string fo o usb/146840 usb [hang] FreeBSD 7.2 / 7.3 / 8.0 hang at startup after e o usb/146153 usb [axe] [usb8] Hosts in network doesn't receive any pack o usb/146054 usb [urtw] [usb8] urtw driver potentially out of date f usb/145513 usb [usb8] New USB stack: no new devices after forced usb p usb/145455 usb [usb8] [patch] USB debug support cannot be disabled o usb/145415 usb [umass] [usb8] USB card reader does not create slices a usb/145184 usb GENERIC can't mount root from USB on Asus EEE o usb/145165 usb [keyboard] [usb8] ukbd_set_leds_callback: error=USB_ER f kern/144938 usb [keyboard] [boot] Boot Failure with Apple (MB869LL/A) o usb/144387 usb [run] [panic] if_run panic o usb/144043 usb [umass] [usb8] USB DLT tape drive throws random errors a usb/143790 usb [boot] [cam] can not boot from usb hdd f usb/143620 usb [cdce] [usb8] the module if_cdce doesn't support my Op f usb/143294 usb [usb8] copying process stops at some time (10 - 50 sec o usb/143286 usb [ukbd] [usb8] [boot] boot failures on RELENG_8 system p usb/143186 usb [usbdevs] [usb8] [patch] add USB device IDs for Google a usb/143139 usb [umass] [usb8] [patch] Quirk for Century EX35SW4_SB4 J o usb/143045 usb [umass] [usb8] [patch] mounting Fujitsu 2600Z camera d o usb/142991 usb [uftdi] [usb67] [patch] Patch to add Crystalfontz 533 f usb/142989 usb [usb8] canon eos 50D attaches but detaches after few s f usb/142957 usb [umass] [usb8] [patch] patch for USB disk SYNCHRONIZE o usb/142719 usb [urtw] [usb8] AirLive WL-1600USB (RTL8187L chipset) fa o usb/142713 usb [usb67] [panic] Kernel Panik when connecting an IPhone f usb/142276 usb [umass] [usb8] Cache Synchronization Error with Olympu o usb/142229 usb [ums] [usb8] [hang] connecting a USB mouse to a Dell P o usb/141777 usb [usb8] [usbdevs] [rum] [patch] Support usbdevs / rum(4 f usb/141680 usb [uath] [usb8] Netgear WG111T not working with uath dri o usb/141664 usb [pcm] [usb8] Logitech USB microphone failure [regressi o usb/141474 usb [boot] [usb8] FreeBSD 8.0 can not install from USB CDR o usb/141327 usb [ukbd] [usb67] USB kbd not working with 7.1+PAE on IBM o usb/141212 usb [ukbd] [usb8] ukbd_set_leds_callback:700: error=USB_ER o kern/141011 usb [usb8] Encrypted root, geli password at boot; enter ke o usb/140920 usb [install] [usb8] USB based install fails on 8.0-RELEAS o usb/140893 usb [urtw] [usb8] WPA2 not working on rtl8187b o kern/140849 usb [ums] [usb8] USB mouse doesn't work under FreeBSD 8.0- a usb/140810 usb [uftdi] [usb8] 8.X copy and paste problem / tty overfl o usb/140477 usb [umass] [usb8] [patch] allow boot-time attachment of d o usb/140236 usb [msdosfs] [usb8] Labels wiped on external Journaled US o usb/140160 usb [usb8] [acpi] USB ports are no longer "active" after A s usb/139990 usb [panic] [patch] [usb67] Kernel frequently panics after a usb/139598 usb [umass] [usb8] CAM reports "xptioctl: put "device pass o usb/139243 usb [uhci] [usb67] unplug prolific USB serial -> uhci_abor a usb/138904 usb [rum] [panic] [usb67] unpluging USB wifi card panics s f usb/138882 usb [ohci] [panic] [usb67] Can't install FreeBSD 7.2 due t o usb/138798 usb [boot] [usb8] 8.0-BETA4 can't boot from USB flash driv o usb/138659 usb [usb8][uftdi] driver broken in RELENG_8/CURRENT s usb/138570 usb [usb67] [panic] USB mass device panics current 7.2-STA o usb/138175 usb [usb67] [boot] System cannot boot, when USB reader wit o usb/138124 usb [snd_uaudio] [usb8] Axed uaudio functionality in the u o usb/138119 usb [usb67] [usb8] MultiBay CDROM (probably on USB bus) is o usb/137872 usb [usb67] [boot] slow booting on usb flash drive o usb/137806 usb [ukbd] [usb67] USB keyboard doesn't work until it's un o usb/137763 usb [usb67][ukbd] Logitech wireless keyboard media keys no o usb/137377 usb [usb8] request support for Huawei E180 o usb/137341 usb [usb8][rum] driver if_rum doesn't work at all and thro f usb/137190 usb [usb8][patch] inhibit spurious button releases for som o usb/137189 usb [usb8][patch] create and use sysctl nodes for HID repo p usb/137188 usb [usb8][patch] correctly handle USB report descriptors o usb/137129 usb [ums] [usb8] SteelSeries Ikari USB laser mouse not att p usb/136761 usb [usbdevs][usb67][patch] Teach usbdevs / u3g(4) about H o usb/135938 usb [aue] [usb67] aue driver only passes traffic in promis o usb/135542 usb [keyboard] boot loader does not work with a usb keyboa o usb/135348 usb [umass] [patch] USB Drive Hangs with ZFS (JMicron USB2 o usb/135206 usb machine reboots when inserted USB device f usb/135200 usb SAMSUNG i740 usb mass: Synchronize cache failed, statu o usb/135182 usb UMASS quirk - Olympus FE20 camera o usb/134950 usb Lowering DTR for USB-modem via ubsa is not possible o usb/134299 usb Kernel Panic plugging in MF626 USB UMTS Stick u3g o usb/134193 usb System freeze on usb MP3 player insertion o usb/134085 usb [umass] Adding usb quirk for Sony USB flash drive o usb/133989 usb [usb8] [ukbd] USB keyboard dead at mountroot> prompt o usb/133712 usb [ural] [patch] RE: Fixed an issue with ural(4) that wa o usb/133390 usb umass crashes system in 7.1 when Olympus D-540 attache o usb/133296 usb [rum] driver not working properly in hostap mode o usb/132594 usb USB subsystem causes page fault and crashes o usb/132080 usb [patch] [usb] [rum] [panic] Kernel panic after NOMEM c o usb/132066 usb [ukbd] Keyboard failure USB keyboard DELL 760 o usb/132036 usb [panic] page fault when connecting Olympus C740 camera o usb/131583 usb [umass] Failure when detaching umass Device o usb/131576 usb [aue] ADMtek USB To LAN Converter can't send data o usb/131521 usb Registering Belkin UPS to usb_quirks.c p usb/131123 usb [patch] [usb67] re-add UQ_ASSUME_CM_OVER_DATA USB quir o usb/131074 usb no run-time detection of usb devices plugged into exte o usb/130736 usb Page fault unplugging USB stick o usb/130230 usb [patch] [quirk] [usb67] [usb] [cam] [umass] Samsung El o usb/130208 usb Boot process severely hampered by umass0 error o usb/130122 usb [usb8] DVD drive detects as 'da' device f usb/129766 usb [usb] [panic] plugging in usb modem HUAWEI E226 panics o usb/129500 usb [umass] [panic] FreeBSD Crashes when connecting SanDis o usb/129311 usb [usb] [panic] Instant crash with an USB card reader s usb/128990 usb [usb] u3g does not handle RTS/CTS available on for exa o usb/128977 usb [usb67] [patch] uaudio is not full duplex p usb/128803 usb [usbdevs] [patch] Quirk for I-Tuner Networks USBLCD4X2 o usb/128485 usb [umodem] [patch] Nokia N80 modem support o usb/128425 usb [umass] Cannot Connect Maxtor Onetouch 4 USB drive o usb/128418 usb [panic] [rum] loading if_rum causes panic, looks like o usb/127926 usb [boot] USB Timeout during bootup s usb/127453 usb [request] ubsa, uark, ubser, uftdi, and friends should o usb/127342 usb [boot] [panic] enabling usb keyboard and mouse support o usb/127248 usb [ucom] panic while uplcom devices attach and detach o usb/127222 usb [ohci] Regression in 7.0 usb storage generic driver o usb/126884 usb [ugen] [patch] Bug in buffer handling in ugen.c o usb/126848 usb [usb]: USB Keyboard hangs during Installation o usb/126740 usb [ulpt] doesn't work on 7.0-RELEASE, 10 second stall be o usb/126519 usb [usb] [panic] panic when plugging in an iphone o kern/126396 usb [panic] kernel panic after unplug USB Bluetooth device o usb/125631 usb [ums] [panic] kernel panic during bootup while 'Logite o usb/125510 usb [panic] repeated plug and unplug of USB mass storage d o usb/125450 usb [panic] Removing USB flash card while being accessed c o usb/125088 usb [keyboard] Touchpad not detected on Adesso AKB-430UG U o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124758 usb [rum] [panic] rum panics SMP kernel o usb/124708 usb [panic] Kernel panic on USB KVM reattach o kern/124130 usb [usb] gmirror fails to start usb devices that were pre o usb/123969 usb [usb] Supermicro H8SMi-2 usb problem: port reset faile o usb/123714 usb [usb] [panic] Panic when hald-storage-probe runs with o usb/123691 usb usbd(8): usbd hangs o usb/123690 usb [usb] [panic] Panic on USB device insertion when usb l o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/122992 usb [umass] [patch] MotoROKR Z6 Phone not recognised by um o usb/122936 usb [ucom] [ubsa] Device does not receive interrupt o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa s usb/122819 usb [usb67] [patch] Patch to provide dynamic additions to o usb/122813 usb [udbp] [request] udbp driver should be removed in favo 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/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/121275 usb [boot] [panic] FreeBSD fails to boot with usb legacy s f usb/121232 usb [usb67] [panic] USB CardBus card removal causes reboot 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 f usb/120786 usb [usb] [panic] Kernel panic when forced umount of a det o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/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/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/119509 usb [usb] USB flaky on Dell Optiplex 755 o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/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 [snd_uaudio] [patch] Not possible to record with Plant o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a p usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th p usb/116699 usb [usb] [usb67] USB HID devices do not initialize at sys 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 [usb67] [usb8] [umass] [patch] Problem with connection o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff s usb/113060 usb [usb67] [ulpt] [patch] Samsung printer not working in o usb/110856 usb [usb67] [ugen] [patch] interrupt in msgs are truncated o usb/107827 usb [usb67] [ohci] [panic] ohci_add_done addr not found o usb/107388 usb [usb67] [usb8] [new driver] [patch] add utoppy device o usb/106041 usb [usb67] [usb8] [request] FreeBSD does not recognise Mu o usb/105361 usb [usb67] [panic] Kernel panic during unmounting mass st s usb/103917 usb [usb67] [uhub] USB driver reports "Addr 0 should never o usb/103418 usb [usb67] [usb8] [patch] [request] usbhidctl(8) add abil o usb/103046 usb [usb67] [ulpt] [patch] ulpt event driven I/O with sele p usb/101775 usb [usb67] [libusbhid] [patch] possible error in report d o usb/101761 usb [usb67] [patch] [request] usb.h: increase maximal size o usb/100746 usb [usb67] [ukbd] system does not boot due to USB keyboar o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o kern/99200 usb [usb67] SMP-Kernel crashes reliably when Bluetooth con 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/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work 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 f 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/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. f usb/87224 usb [usb] Cannot mount USB Zip750 o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/86298 usb [mouse] Known good USB mouse won't work with correct s s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a 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 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 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/80854 usb [patch] [request] suggestion for new iface-no-probe me 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 f usb/80040 usb [sound] [hang] Use of sound mixer causes system freeze o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/78984 usb [umass] [patch] Creative MUVO umass failure f usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/76732 usb [ums] Mouse problems with USB KVM Switch o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device f 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/75764 usb [umass] [patch] "umass0: Phase Error" - no device for f usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) f 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/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 usb/40948 usb [umass] [request] USB HP CDW8200 does not work o usb/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem 314 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon May 30 15:18:21 2011 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 D4808106564A for ; Mon, 30 May 2011 15:18:21 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 60BDF8FC1C for ; Mon, 30 May 2011 15:18:20 +0000 (UTC) Received: by bwz12 with SMTP id 12so4381842bwz.13 for ; Mon, 30 May 2011 08:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=qFWxSLEd7QFQjsWAQfnRxksU27p1XsDmY/Ry8kTiN68=; b=q+69IgjjcTEBMmFMkWrFlOCCKTamRM6WpE3ghVcJA9ACiZ6Qhy7r8rukqm/smhqjuO KijzJt3+6LFfcJHcZ8WlPLBaCZf5y0noLLu2bpwUe3Mcg/ZzP3hywPdRtw6puYfcwxsL R6ULI+qe+oOgtoU6in+t2jOYhCoVcdwCiFFO4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=tH3+2XlCCcQyi1DYZrJ4GnM+rMgXzcUy7jh6FHK+gpwe/adS3hWDrLFKGZt02f8Mae x9q7ERQJlulQyz+eAWBXgokrXJugXspYUby0rFDMVTavNbBh4MKJOnpGFA+hrmMuUUUJ i1HDdxLo0SfktdgKaRmbEHSVqdnShZUkdTr0k= Received: by 10.204.137.68 with SMTP id v4mr4611818bkt.115.1306768700172; Mon, 30 May 2011 08:18:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.66.81 with HTTP; Mon, 30 May 2011 08:17:50 -0700 (PDT) In-Reply-To: <201105291913.55786.hselasky@c2i.net> References: <201105291913.55786.hselasky@c2i.net> From: Chris Rees Date: Mon, 30 May 2011 16:17:50 +0100 Message-ID: To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-usb@freebsd.org Subject: Re: USB hard drive g_vfs_done() error=5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2011 15:18:22 -0000 On 29 May 2011 18:13, Hans Petter Selasky wrote: > On Sunday 29 May 2011 16:56:50 Chris Rees wrote: >> On 29 May 2011 15:52, Chris Rees wrote: >> > Hi all, >> > >> > I'm afraid I've also got the infamous error 5 problem on my Macbook. >> > >> > USB hard drive seems to work fine as it's newfs'd a couple of times, >> > but after a little while (using USB hard drive as backup destination >> > with rsync) it gives me these: >> > >> > [crees@zeus]~% dmesg |tail >> > g_vfs_done():da0s1[WRITE(offset=3D41748480, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41750528, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41752576, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41754624, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41756672, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41758720, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41760768, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41762816, length=3D12288)]error =3D = 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41775104, length=3D2048)]error =3D 5 >> > g_vfs_done():da0s1[WRITE(offset=3D41777152, length=3D2048)]error =3D 5 >> > >> > Unfortunately I can't seem to stop it doing this, and every time I've >> > just unplugged the drive in the past the system panics... I'd really >> > rather avoid that since it's my main server. >> > >> > [crees@zeus]~% uname -a >> > FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: >> > Sat Apr 30 15:09:06 BST 2011 >> > root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS =A0i386 >> > >> > Kernel config file is at [1]. >> > >> > I've tried the patch from [2], and this stops the AutoSense failed >> > messages I used to get, but not these. >> > >> > Perhaps oddly related, when these messages start tab-completion in >> > tcsh sometimes hangs -- even for unrelated directories such as % ls >> > /roo^VTAB causes a hang. >> > >> > Any ideas/patches/information I've missed? The drive works perfectly >> > in 'Windows', and I also tried it on my Ubuntu netbook. >> > >> > Chris >> > >> > >> > [1] http://www.bayofrum.net/~crees/ZEUS (diff to GENERIC at >> > http://www.bayofrum.net/~crees/ZEUS.diff) >> > [2] http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dusb/150401 >> >> Sorry to reply to my own post. >> >> I should clarify that I have only tried enabling some USB quirks >> _after_ the problem has started, but my main problem is now that the >> disk is 'stuck' in the computer. >> >> Is there a trick to removing that drive now without causing a panic? >> >> I've tried umount -f (hangs, but now mount doesn't show it mounted, >> although newfs can't open for writing), followed by camcontrol eject >> da0 (fails). > > Hi, > > Does your device have sufficient power? > It's a HDD form factor 2.5 of your 'inches', in an enclosure and works fine in other OS's -- AFAICS there's no need for an external power supply with the 2.5" drive. I bit the bullet and just yanked it out, and the server handled it fine. I'm going to start trying quirks on my other FreeBSD box to find out what works, but pointers would be really helpful, if anyone has any ideas :) The chip in question is a Sunplus SPIF225A. Chris From owner-freebsd-usb@FreeBSD.ORG Mon May 30 15:19:29 2011 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 8BAC81065670 for ; Mon, 30 May 2011 15:19:29 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id DAE7F8FC13 for ; Mon, 30 May 2011 15:19:28 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=6YwywTXDltnW4viG0YW+xGnSOPPSCXZBKiVv2UswsZM= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=yUhmhmwYHtkA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=8kQB0OdkAAAA:8 a=pGLkceISAAAA:8 a=ZB5LerlCAAAA:8 a=6I5d2MoRAAAA:8 a=x_lxXKqxBRlfBJ0OCMYA:9 a=UIG8RJyoADGO5mum-ikA:7 a=wPNLvfGTeEIA:10 a=9aOQ2cSd83gA:10 a=MSl-tDqOz04A:10 a=LKh46M3rBoS16e9D:21 a=p_yft4XXEi7dGZ5m:21 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 133717496; Mon, 30 May 2011 17:19:26 +0200 From: Hans Petter Selasky To: utisoft@gmail.com Date: Mon, 30 May 2011 17:18:08 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201105291913.55786.hselasky@c2i.net> In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105301718.08245.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: USB hard drive g_vfs_done() error=5 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, 30 May 2011 15:19:29 -0000 On Monday 30 May 2011 17:17:50 Chris Rees wrote: > On 29 May 2011 18:13, Hans Petter Selasky wrote: > > On Sunday 29 May 2011 16:56:50 Chris Rees wrote: > >> On 29 May 2011 15:52, Chris Rees wrote: > >> > Hi all, > >> > > >> > I'm afraid I've also got the infamous error 5 problem on my Macbook. > >> > > >> > USB hard drive seems to work fine as it's newfs'd a couple of times, > >> > but after a little while (using USB hard drive as backup destination > >> > with rsync) it gives me these: > >> > > >> > [crees@zeus]~% dmesg |tail > >> > g_vfs_done():da0s1[WRITE(offset=41748480, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41750528, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41752576, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41754624, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41756672, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41758720, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41760768, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41762816, length=12288)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41775104, length=2048)]error = 5 > >> > g_vfs_done():da0s1[WRITE(offset=41777152, length=2048)]error = 5 > >> > > >> > Unfortunately I can't seem to stop it doing this, and every time I've > >> > just unplugged the drive in the past the system panics... I'd really > >> > rather avoid that since it's my main server. > >> > > >> > [crees@zeus]~% uname -a > >> > FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: > >> > Sat Apr 30 15:09:06 BST 2011 > >> > root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386 > >> > > >> > Kernel config file is at [1]. > >> > > >> > I've tried the patch from [2], and this stops the AutoSense failed > >> > messages I used to get, but not these. > >> > > >> > Perhaps oddly related, when these messages start tab-completion in > >> > tcsh sometimes hangs -- even for unrelated directories such as % ls > >> > /roo^VTAB causes a hang. > >> > > >> > Any ideas/patches/information I've missed? The drive works perfectly > >> > in 'Windows', and I also tried it on my Ubuntu netbook. > >> > > >> > Chris > >> > > >> > > >> > [1] http://www.bayofrum.net/~crees/ZEUS (diff to GENERIC at > >> > http://www.bayofrum.net/~crees/ZEUS.diff) > >> > [2] http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/150401 > >> > >> Sorry to reply to my own post. > >> > >> I should clarify that I have only tried enabling some USB quirks > >> _after_ the problem has started, but my main problem is now that the > >> disk is 'stuck' in the computer. > >> > >> Is there a trick to removing that drive now without causing a panic? > >> > >> I've tried umount -f (hangs, but now mount doesn't show it mounted, > >> although newfs can't open for writing), followed by camcontrol eject > >> da0 (fails). > > > > Hi, > > > > Does your device have sufficient power? > > It's a HDD form factor 2.5 of your 'inches', in an enclosure and works > fine in other OS's -- AFAICS there's no need for an external power > supply with the 2.5" drive. > > I bit the bullet and just yanked it out, and the server handled it > fine. I'm going to start trying quirks on my other FreeBSD box to find > out what works, but pointers would be really helpful, if anyone has > any ideas :) > > The chip in question is a Sunplus SPIF225A. > > Chris Try the NO synchronize cache quirk? kldload usb_quirk --HPS From owner-freebsd-usb@FreeBSD.ORG Mon May 30 16:27:26 2011 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 CE1691065670 for ; Mon, 30 May 2011 16:27:26 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3008FC08 for ; Mon, 30 May 2011 16:27:25 +0000 (UTC) Received: by bwz12 with SMTP id 12so4444496bwz.13 for ; Mon, 30 May 2011 09:27:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=iUV6BG9rFH4KO9v0Hr8bsrVbeXSpHLunG07yS4jIq98=; b=v/jA1hFHMaL18o5JV8NBFj+D3Tb/zBIIY6zm247pnqvK06OEFiMgSfBfHFSsVorDVC vHsaCMB9ndDxO2YL62pgz//8eRxcS7qrLMxyhv6Bm5Tood9HSIItsr6hbQTyNHO+6Dmh Erd3e3H37kC22JB9iqd9+tBwB/AU4HT+24LpI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; b=fueTjSh+4oFlvc3UuX9JM6xcldErRV42aqjsJ2TSIO+FZiT7agTzZjHPzzIHsVNdXC G4nHq1JCdAgByWqI0HFK7xMhDXnaDdjGcNANMtUFWKyeIXLiu7sweOvo5uyocjBhCrOV h4OMepflRccx3akjHdXwnRNUTMhW4FNgfOwGE= Received: by 10.204.57.135 with SMTP id c7mr4483460bkh.88.1306772845186; Mon, 30 May 2011 09:27:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.66.81 with HTTP; Mon, 30 May 2011 09:26:55 -0700 (PDT) In-Reply-To: <201105301718.08245.hselasky@c2i.net> References: <201105291913.55786.hselasky@c2i.net> <201105301718.08245.hselasky@c2i.net> From: Chris Rees Date: Mon, 30 May 2011 17:26:55 +0100 Message-ID: To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-usb@freebsd.org Subject: Re: USB hard drive g_vfs_done() error=5 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2011 16:27:26 -0000 On 30 May 2011 16:18, Hans Petter Selasky wrote: > On Monday 30 May 2011 17:17:50 Chris Rees wrote: >> It's a HDD form factor 2.5 of your 'inches', in an enclosure and works >> fine in other OS's -- AFAICS there's no need for an external power >> supply with the 2.5" drive. >> >> I bit the bullet and just yanked it out, and the server handled it >> fine. I'm going to start trying quirks on my other FreeBSD box to find >> out what works, but pointers would be really helpful, if anyone has >> any ideas :) >> >> The chip in question is a Sunplus SPIF225A. >> >> Chris > > Try the NO synchronize cache quirk? > > kldload usb_quirk > Thanks, it seems that quirk was already enabled for it. I'm going to keep trying! Chris From owner-freebsd-usb@FreeBSD.ORG Tue May 31 20:12:56 2011 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 145F41065672; Tue, 31 May 2011 20:12:56 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id A624F8FC1B; Tue, 31 May 2011 20:12:55 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:d929:8867:6867:1b37]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id BC9084AC1C; Wed, 1 Jun 2011 00:12:53 +0400 (MSD) Date: Wed, 1 Jun 2011 00:12:51 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1618757683.20110601001251@serebryakov.spb.ru> To: freebsd-usb@freebsd.org, n_hibma@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 20:12:56 -0000 Hello, Freebsd-usb. I'm author of `comms/umcs7840' port, which is module for usbcom, like `uftdi' and `uplcom' in base system. Last changes, committed to 8-STABLE (and, earlier to HEAD), breaks some API/ABI for such modules. I have tow questions: (1) How could I detect which version have user at compile time? I don't use any autoconf/automake framework, my build framework is baed on FreeBSD-native bsd.*.mk framework, so I need some define or something like this to distinguish these versions. I could not find anything suitable in revision 221612 commit. (2) WHY, OR WHY old module was loaded without problems?! ABI is broken (ucom_detach()? size of struct ucom_softc) and old module should complain on load, IMHO! Users will be very surprised when computer will reboot after system update! --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-usb@FreeBSD.ORG Tue May 31 20:40:10 2011 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 4460A1065672 for ; Tue, 31 May 2011 20:40:10 +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 0A9AF8FC1B for ; Tue, 31 May 2011 20:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p4VKe9Mv032690 for ; Tue, 31 May 2011 20:40:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p4VKe9p5032689; Tue, 31 May 2011 20:40:09 GMT (envelope-from gnats) Resent-Date: Tue, 31 May 2011 20:40:09 GMT Resent-Message-Id: <201105312040.p4VKe9p5032689@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, "Lev A.Serebryakov" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE7831065673; Tue, 31 May 2011 20:35:33 +0000 (UTC) (envelope-from lev@onlyone.friendlyhosting.spb.ru) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 78B788FC20; Tue, 31 May 2011 20:35:33 +0000 (UTC) Received: by onlyone.friendlyhosting.spb.ru (Postfix, from userid 1000) id AB8244AC2D; Wed, 1 Jun 2011 00:35:32 +0400 (MSD) Message-Id: <20110531203532.AB8244AC2D@onlyone.friendlyhosting.spb.ru> Date: Wed, 1 Jun 2011 00:35:32 +0400 (MSD) From: "Lev A. Serebryakov" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: n_hibma@FreeBSD.org Subject: usb/157474: svn revisions 221612 (for stable/8) and 214831/214761 (for head) breaks API/ABI without any notice. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Lev A.Serebryakov" List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 20:40:10 -0000 >Number: 157474 >Category: usb >Synopsis: svn revisions 221612 (for stable/8) and 214831/214761 (for head) breaks API/ABI without any notice. >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 31 20:40:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Lev A. Serebryakov >Release: FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD blob.home.serebryakov.spb.ru 8.2-STABLE FreeBSD 8.2-STABLE #17: Tue May 31 22:07:48 MSD 2011 lev@blob.home.serebryakov.spb.ru:/usr/obj/usr/src/sys/BLOB amd64 >Description: Revisions 214831 and 214761 (in HEAD), MFCed as 221612 into stable/8, change number of function arguments and size of sttructures, used by 3rd party USB2COM modules, without bumping OSVERSION. As result, old 3rd party modules (like umcs7840) could be (and will be) loaded which leads to almost immedate kernel panic. Other porblem is, that there is no way for modules authors to distingusih old and new API in sources. >How-To-Repeat: Upgrade system without recompiling `comms/umcs7840' module, reboot. >Fix: I don't know. Bump OSVERSION, maybe? >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Tue May 31 22:24:45 2011 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 84AD1106567C; Tue, 31 May 2011 22:24:45 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 6448E8FC0A; Tue, 31 May 2011 22:24:45 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id p4VMOiBC088744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 31 May 2011 15:24:44 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id p4VMOicf088743; Tue, 31 May 2011 15:24:44 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA08186; Tue, 31 May 11 15:19:24 PDT Date: Tue, 31 May 2011 15:19:19 -0700 From: perryh@pluto.rain.com To: lev@freebsd.org Message-Id: <4de56967.hsb/BTr4tE/mP0bE%perryh@pluto.rain.com> References: <1618757683.20110601001251@serebryakov.spb.ru> In-Reply-To: <1618757683.20110601001251@serebryakov.spb.ru> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org, n_hibma@freebsd.org Subject: Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches? 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, 31 May 2011 22:24:45 -0000 Lev Serebryakov wrote: > Last changes, committed to 8-STABLE ... breaks some API/ABI ... AFAIK, changes that break API/ABI are not supposed to be MFCd. Perhaps that one needs to be backed out of 8-STABLE? From owner-freebsd-usb@FreeBSD.ORG Tue May 31 22:31:40 2011 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 EF589106566B; Tue, 31 May 2011 22:31:40 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8BA468FC14; Tue, 31 May 2011 22:31:40 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:d929:8867:6867:1b37]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id B36824AC1C; Wed, 1 Jun 2011 02:31:38 +0400 (MSD) Date: Wed, 1 Jun 2011 02:31:36 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <974003934.20110601023136@serebryakov.spb.ru> To: perryh@pluto.rain.com In-Reply-To: <4de56967.hsb/BTr4tE/mP0bE%perryh@pluto.rain.com> References: <1618757683.20110601001251@serebryakov.spb.ru> <4de56967.hsb/BTr4tE/mP0bE%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: freebsd-usb@freebsd.org, n_hibma@freebsd.org Subject: Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 22:31:41 -0000 Hello, Perryh. You wrote 1 =E8=FE=ED=FF 2011 =E3., 2:19:19: >> Last changes, committed to 8-STABLE ... breaks some API/ABI ... > AFAIK, changes that break API/ABI are not supposed to be MFCd. > Perhaps that one needs to be backed out of 8-STABLE? I'm not sure, is this applicable to ABI for kernel modules, which are recommended to be in sync with kernel in any case. And even if they will be backed out from 8-STABLE, there will be problem to distinguish between tow versions of ABI on HEAD in any case. Many ABI changes leads to bumping OSVERSION, but not this one (I've checked appropriate HEAD commits). Other problem is, that old modules still can be loaded in new kernel, and AFAIK, here is some mechanism to prevent it, like OSVERSION too. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-usb@FreeBSD.ORG Wed Jun 1 01:39:06 2011 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 B5674106564A; Wed, 1 Jun 2011 01:39:06 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8D24C8FC0A; Wed, 1 Jun 2011 01:39:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p511d6YF007550; Wed, 1 Jun 2011 01:39:06 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p511d6jK007546; Wed, 1 Jun 2011 01:39:06 GMT (envelope-from linimon) Date: Wed, 1 Jun 2011 01:39:06 GMT Message-Id: <201106010139.p511d6jK007546@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-usb@FreeBSD.org, n_hibma@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: usb/157474: svn revisions 221612 (for stable/8) and 214831/214761 (for head) breaks API/ABI without any notice. 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, 01 Jun 2011 01:39:06 -0000 Synopsis: svn revisions 221612 (for stable/8) and 214831/214761 (for head) breaks API/ABI without any notice. Responsible-Changed-From-To: freebsd-usb->n_hibma Responsible-Changed-By: linimon Responsible-Changed-When: Wed Jun 1 01:26:20 UTC 2011 Responsible-Changed-Why: Over to committer of MFC in question. http://www.freebsd.org/cgi/query-pr.cgi?pr=157474 From owner-freebsd-usb@FreeBSD.ORG Wed Jun 1 06:53:12 2011 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 2D7F8106566B; Wed, 1 Jun 2011 06:53:12 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtpb-ews02.kpnxchange.com (cpsmtpb-ews02.kpnxchange.com [213.75.39.5]) by mx1.freebsd.org (Postfix) with ESMTP id A8E298FC13; Wed, 1 Jun 2011 06:53:11 +0000 (UTC) Received: from cpbrm-ews17.kpnxchange.com ([10.94.84.148]) by cpsmtpb-ews02.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 1 Jun 2011 08:41:00 +0200 Received: from CPSMTPM-CMT102.kpnxchange.com ([195.121.3.18]) by cpbrm-ews17.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 1 Jun 2011 08:41:00 +0200 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by CPSMTPM-CMT102.kpnxchange.com with Microsoft SMTPSVC(7.0.6002.18264); Wed, 1 Jun 2011 08:40:59 +0200 Received: from [10.87.50.88] (unknown [80.187.193.111]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by uitsmijter.van-laarhoven.org (Postfix) with ESMTPSA id 19D824273; Wed, 1 Jun 2011 08:40:58 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Nick Hibma In-Reply-To: <1618757683.20110601001251@serebryakov.spb.ru> Date: Wed, 1 Jun 2011 08:40:55 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <10256681-CB7D-4330-8533-9D64949A4C47@van-laarhoven.org> References: <1618757683.20110601001251@serebryakov.spb.ru> To: lev@FreeBSD.org X-Mailer: Apple Mail (2.1084) X-OriginalArrivalTime: 01 Jun 2011 06:40:59.0914 (UTC) FILETIME=[DE6886A0:01CC2026] X-RcptDomain: freebsd.org Cc: n_hibma@FreeBSD.org, freebsd-usb@freebsd.org Subject: Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches? 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, 01 Jun 2011 06:53:12 -0000 Lev, ABI's change. You need to use __FreeBSD_version. See = /usr/include/osreldate.h. But could we include the driver in the kernel? That way it would be = updated when needed. Nick Hibma nick@van-laarhoven.org Want to feel like going on a holiday tomorrow? Try GTD. On 31 May 2011, at 22:12, Lev Serebryakov wrote: > Hello, Freebsd-usb. >=20 > I'm author of `comms/umcs7840' port, which is module for usbcom, > like `uftdi' and `uplcom' in base system. >=20 > Last changes, committed to 8-STABLE (and, earlier to HEAD), breaks > some API/ABI for such modules. >=20 > I have tow questions: >=20 > (1) How could I detect which version have user at compile time? I > don't use any autoconf/automake framework, my build framework is baed > on FreeBSD-native bsd.*.mk framework, so I need some define or > something like this to distinguish these versions. I could not find > anything suitable in revision 221612 commit. >=20 > (2) WHY, OR WHY old module was loaded without problems?! ABI is > broken (ucom_detach()? size of struct ucom_softc) and old module > should complain on load, IMHO! Users will be very surprised when > computer will reboot after system update! >=20 > --=20 > // Black Lion AKA Lev Serebryakov >=20 From owner-freebsd-usb@FreeBSD.ORG Wed Jun 1 07:00:37 2011 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 25AA7106564A for ; Wed, 1 Jun 2011 07:00:37 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtpb-ews03.kpnxchange.com (cpsmtpb-ews03.kpnxchange.com [213.75.39.6]) by mx1.freebsd.org (Postfix) with ESMTP id 9E64E8FC17 for ; Wed, 1 Jun 2011 07:00:36 +0000 (UTC) Received: from cpbrm-ews19.kpnxchange.com ([10.94.84.150]) by cpsmtpb-ews03.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 1 Jun 2011 08:48:31 +0200 Received: from CPSMTPM-CMT104.kpnxchange.com ([195.121.3.20]) by cpbrm-ews19.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 1 Jun 2011 08:48:31 +0200 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by CPSMTPM-CMT104.kpnxchange.com with Microsoft SMTPSVC(7.0.6002.18264); Wed, 1 Jun 2011 08:48:31 +0200 Received: from [10.87.50.88] (unknown [80.187.193.111]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by uitsmijter.van-laarhoven.org (Postfix) with ESMTPSA id 8323C4273; Wed, 1 Jun 2011 08:48:30 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Nick Hibma In-Reply-To: <4de56967.hsb/BTr4tE/mP0bE%perryh@pluto.rain.com> Date: Wed, 1 Jun 2011 08:48:17 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1618757683.20110601001251@serebryakov.spb.ru> <4de56967.hsb/BTr4tE/mP0bE%perryh@pluto.rain.com> To: perryh@pluto.rain.com X-Mailer: Apple Mail (2.1084) X-OriginalArrivalTime: 01 Jun 2011 06:48:31.0571 (UTC) FILETIME=[EB9DEA30:01CC2027] X-RcptDomain: freebsd.org Cc: freebsd-usb@freebsd.org Subject: Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches? 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, 01 Jun 2011 07:00:37 -0000 > Lev Serebryakov wrote: >=20 >> Last changes, committed to 8-STABLE ... breaks some API/ABI ... >=20 > AFAIK, changes that break API/ABI are not supposed to be MFCd. > Perhaps that one needs to be backed out of 8-STABLE? Adding of PNP Info to usb devices = http://svnweb.freebsd.org/base/head/sys/dev/usb/usbdi.h?r1=3D213435&r2=3D2= 14429&pathrev=3D214429 This is necessary to be able to map u3gX1 devices to /dev/cuaUX2.Y ttys = . This was discussed and requested to be MFCed by HPS. Nick From owner-freebsd-usb@FreeBSD.ORG Wed Jun 1 07:40:00 2011 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 279A31065694 for ; Wed, 1 Jun 2011 07:40:00 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.c2i.net [212.247.154.66]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2A38FC15 for ; Wed, 1 Jun 2011 07:39:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mailfe03.swip.net X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,BAYES_05 autolearn=ham version=3.3.1 X-TFF-CGPSA-Version: 1.7 X-T2-CGPSA-Filter: Scanned X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=XhvKh6hw6gtWAjxtOxwWgtcklmtjSp9nA2IQor2M4rA= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=fQmy22zS-R0A:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=6I5d2MoRAAAA:8 a=OJusCqqohCLCder1wCYA:9 a=wPNLvfGTeEIA:10 a=SV7veod9ZcQA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 134681973; Wed, 01 Jun 2011 09:39:56 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 1 Jun 2011 09:38:33 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <1618757683.20110601001251@serebryakov.spb.ru> <4de56967.hsb/BTr4tE/mP0bE%perryh@pluto.rain.com> In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106010938.33528.hselasky@c2i.net> Cc: Subject: Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches? 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, 01 Jun 2011 07:40:00 -0000 On Wednesday 01 June 2011 08:48:17 Nick Hibma wrote: > > Lev Serebryakov wrote: > >> Last changes, committed to 8-STABLE ... breaks some API/ABI ... > > > > AFAIK, changes that break API/ABI are not supposed to be MFCd. > > Perhaps that one needs to be backed out of 8-STABLE? > > Adding of PNP Info to usb devices > > http://svnweb.freebsd.org/base/head/sys/dev/usb/usbdi.h?r1=213435&r2=21442 > 9&pathrev=214429 > > This is necessary to be able to map u3gX1 devices to /dev/cuaUX2.Y ttys . > This was discussed and requested to be MFCed by HPS. Hi, Probably we should import the driver in question into the kernel. Is the author fine about this? We try to keep API's consistent within USB aswell, and not change globally exported structures or functions. --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jun 1 10:41:22 2011 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 BFFE9106566B; Wed, 1 Jun 2011 10:41:22 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5BA3E8FC0C; Wed, 1 Jun 2011 10:41:22 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:d929:8867:6867:1b37]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 4326E4AC1C; Wed, 1 Jun 2011 14:41:20 +0400 (MSD) Date: Wed, 1 Jun 2011 14:41:17 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <388749638.20110601144117@serebryakov.spb.ru> To: Nick Hibma In-Reply-To: <10256681-CB7D-4330-8533-9D64949A4C47@van-laarhoven.org> References: <1618757683.20110601001251@serebryakov.spb.ru> <10256681-CB7D-4330-8533-9D64949A4C47@van-laarhoven.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: lev@FreeBSD.org, n_hibma@FreeBSD.org, freebsd-usb@freebsd.org Subject: Re: Changes to usb/serial: how to distinguish between old and new interfaces in 8-STABLE and 9-CURRENT branches? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2011 10:41:22 -0000 Hello, Nick. You wrote 1 =E8=FE=ED=FF 2011 =E3., 10:40:55: > ABI's change. You need to use __FreeBSD_version. See /usr/include/osrelda= te.h. Hm, I look at this: http://svnweb.freebsd.org/base?view=3Drevision&revision=3D221612 And I don't see any changes to "sys/sys/param.h" which contains "master" value for __FreeBSD_version, so I can not understand, how should I know proper value of __FreeBSD_version for this change. Also, http://svnweb.freebsd.org/base/stable/8/sys/sys/param.h doesn't show any commits related to USB serial code changes -- only KHook, KPI, TCP congestion control modularization, gcc, etc. I affraid, that there is no notes about this in `doc/en_US.ISO8859-1/books/porters-handbook/book.sgml' too, as it seems, that many people forgot to update it even after param.h update. > But could we include the driver in the kernel? That way it would be updat= ed when needed. Yes, of course :) I'll be very glad to see my driver in base system. Latest code (not adapted for new version yet, but it is trivial change, of course) is in `comms/umcs7840' port. License is FreeBSD-compatible (2-clause BSD + AS-IS), code is `clear', as it is written by me from scratches according to vendor datasheet, not adapted/ported from Linux or any other OS or source. It is prepared to build as module via our bsd.*.mk system, so it doesn't need to be ported from auto*-framework or any exotic make version. I've tried to make code style(9) compatible too, but I will not swear, that it 100% style(9)-proof :) --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-usb@FreeBSD.ORG Fri Jun 3 10:04:21 2011 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 B239E1065670; Fri, 3 Jun 2011 10:04:21 +0000 (UTC) (envelope-from freebsdlists@bsdunix.ch) Received: from conversation.bsdunix.ch (ns1.bsdunix.ch [82.220.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id 725AF8FC1E; Fri, 3 Jun 2011 10:04:21 +0000 (UTC) Received: from conversation.bsdunix.ch (localhost [127.0.0.1]) by conversation.bsdunix.ch (Postfix) with ESMTP id 01C6F4CB6; Fri, 3 Jun 2011 09:46:02 +0000 (UTC) X-Virus-Scanned: by amavisd-new at mail.bsdunix.ch Received: from conversation.bsdunix.ch ([127.0.0.1]) by conversation.bsdunix.ch (conversation.bsdunix.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SJUyESwci3wQ; Fri, 3 Jun 2011 09:46:01 +0000 (UTC) Received: from ernie.mlan.solnet.ch (ernie.mlan.solnet.ch [212.101.1.20]) by conversation.bsdunix.ch (Postfix) with ESMTPA id A1FF14CB3; Fri, 3 Jun 2011 09:46:01 +0000 (UTC) Message-ID: <4DE8AD59.1010304@bsdunix.ch> Date: Fri, 03 Jun 2011 11:46:01 +0200 From: Thomas User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: LabJack with FreeBSD? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 10:04:21 -0000 Hello Has someone ever tried to run LabJack U3 with FreeBSD? http://labjack.com/u3 Labjack offers a combined OSX and Linux driver. It supports libusb. Maybe it could work with freebsd too. Regards, Thomas From owner-freebsd-usb@FreeBSD.ORG Fri Jun 3 13:13:55 2011 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 A98E8106566B; Fri, 3 Jun 2011 13:13:55 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 1C4518FC0A; Fri, 3 Jun 2011 13:13:54 +0000 (UTC) Received: from [192.168.11.213] ([193.214.121.5]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p53DDev5068207 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 3 Jun 2011 22:43:45 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <4DE8AD59.1010304@bsdunix.ch> Date: Fri, 3 Jun 2011 15:13:39 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4DE8AD59.1010304@bsdunix.ch> To: Thomas X-Mailer: Apple Mail (2.1084) X-Spam-Score: -0.272 () BAYES_00,RDNS_NONE X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-embedded@freebsd.org, freebsd-usb@freebsd.org Subject: Re: LabJack with FreeBSD? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 13:13:55 -0000 On 03/06/2011, at 11:46, Thomas wrote: > Has someone ever tried to run LabJack U3 with FreeBSD? >=20 > http://labjack.com/u3 >=20 > Labjack offers a combined OSX and Linux driver. It supports libusb. > Maybe it could work with freebsd too. Have you tried building it on FreeBSD? I would expect it to compile with minimal changes, although it may = complain you don't have libusb installed depending on how it detects it. If it uses pkg-config you can put the following in = /usr/local/libdata/pkgconfig/libusb.pc prefix=3D/usr exec_prefix=3D${prefix} libdir=3D${exec_prefix}/lib includedir=3D${prefix}/include Name: libusb Description: USB access library Version: 0.1 Libs: -L${libdir} -lusb Cflags: -I${includedir} and this in /usr/local/libdata/pkgconfig/libusb-1.0.pc=20 prefix=3D/usr exec_prefix=3D${prefix} libdir=3D${exec_prefix}/lib includedir=3D${prefix}/include Name: libusb Description: USB access library Version: 1.0.1 Libs: -L${libdir} -lusb Cflags: -I${includedir} (I am assuming you're running 8.x or higher). -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-usb@FreeBSD.ORG Sat Jun 4 11:16:40 2011 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 B62771065674 for ; Sat, 4 Jun 2011 11:16:40 +0000 (UTC) (envelope-from zeus@relay.ibs.dn.ua) Received: from relay.ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) by mx1.freebsd.org (Postfix) with ESMTP id 1AEAF8FC0A for ; Sat, 4 Jun 2011 11:16:39 +0000 (UTC) Received: from relay.ibs.dn.ua (localhost [127.0.0.1]) by relay.ibs.dn.ua with ESMTP id p54B1XkR006755 for ; Sat, 4 Jun 2011 14:01:33 +0300 (EEST) Received: (from zeus@localhost) by relay.ibs.dn.ua (8.14.4/8.14.4/Submit) id p54B1XWn006754 for freebsd-usb@freebsd.org; Sat, 4 Jun 2011 14:01:33 +0300 (EEST) Date: Sat, 4 Jun 2011 14:01:33 +0300 From: Zeus V Panchenko To: freebsd-usb@freebsd.org Message-ID: <20110604110133.GC30213@relay.ibs.dn.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 8.1-RELEASE X-Editor: GNU Emacs 23.2.1 X-Face: iVBORw0KGgoAAAANSUhEUgAAACoAAAAqBAMAAAA37dRoAAAAFVBMVEWjjoiZhHDWzcZuW1U wOT+RcGxziJxEN0lIAAABrklEQVQokV2STXLbMAyFQaraE3a5dzSTfR1IF7CQrM3QuECn9z9DH0 gxzgSyFvr88PBD0uJxoR6BE+e8LtRgohE5ZB50sODP/REbfUnte/z12+llCekLUSKenFIMke6Be WinE8H0RJHSN71rUQp64gFDmtDDhRk0zam3FzpNVFprhwPGaFo6oY9wDBJQ9Qz6EuKyROJjDGa+ uza4VOTa8iHlN58Yv5BF9+4BGl0LA5pUD5xKXg4aQlVZm0co3NKxCGxQpu3aC352Gv3DZONmwQd tkrlaylV3YSew7bWtwAZF/zi9jblmprPoL7ktzeFSxmarVNmWRi+Bmxg7Y7tbGtR8XZUxLTo86G thANsssetjp3POuBvMBRlw6jRa5pKN7yVlP+F2lyiZGSMf5hnSU6eAVupmtfjRcxy0momwpxDnz 06hwnOWvBnUdR8U2/KX7cq26u1Jy5xFZMPOVONRbRUrwey8Qar6cWgf12xSymQuVX0DfYd4R8kN Hg0qCtLeaYZcj8B90M2N0cEX1P0vKSxw7NLy/3X8Qeriusu66jNA37P4Mn5QRTG2hz4d9D/6E3a EX852nwAAAABJRU5ErkJggg== Subject: recommend GPS tracker, pls X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: zeus@ibs.dn.ua List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2011 11:16:40 -0000 Hi, please, recommend GPS tracker vendor/model to use for data download (from the device to PC) under FreeBSD recently i'd taken Qstartz BT-1200 Solar and was thinking i'm happy (while the track was short and i didn't have any problem to download it using gpsbabel) but when track growed up > 150Kb, gpsbabel fails to download the data from the device :( so, may somebody share, which vendor/model to choose? -- Zeus V. Panchenko JID:zeus@gnu.org.ua GMT+2 (EET) From owner-freebsd-usb@FreeBSD.ORG Sat Jun 4 17:26:00 2011 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 6FFCC106564A for ; Sat, 4 Jun 2011 17:26:00 +0000 (UTC) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id D73E68FC08 for ; Sat, 4 Jun 2011 17:25:59 +0000 (UTC) Received: from mail-gw13.york.ac.uk ([144.32.129.163]) by gse-mta-27.emailfiltering.com with emfmta (version 4.8.1.33) by TLS id 1024497456 for freebsd-usb@freebsd.org; 952778c1655231ce; Sat, 04 Jun 2011 18:08:23 +0100 Received: from ury.york.ac.uk ([144.32.108.81]:53583) by mail-gw13.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QSuKk-0005f1-UF for freebsd-usb@freebsd.org; Sat, 04 Jun 2011 18:08:22 +0100 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1QSuKk-0007Zu-OO for freebsd-usb@freebsd.org; Sat, 04 Jun 2011 18:08:22 +0100 Date: Sat, 4 Jun 2011 18:08:22 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@"ury.york.ac.uk." To: freebsd-usb@freebsd.org Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Subject: USB suspend/resume 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, 04 Jun 2011 17:26:00 -0000 Hi all, I've been trying to get a IBM ThinkPad X60 suspend/resume working correctly, and discovered that with uhci loaded, the machine would hang on resume. This is on head, but I believe this is aslo the cause of the laptop not resuming on stable/8. It turns out that this is because we sleep in the resume path. The resume path appears to run with interrupts disabled, and as a result we never wake up. A comment above uhci_suspend() saggests similar: /* NOTE: suspend/resume is called from * interrupt context and cannot sleep! However, we do sleep. We call usb_pause_mtx() several times during both tthe suspend and resume path, and on resume this is fatal. usb_pause_mtx() will use DELAY() when called before the machine has finished booting (ie cold != 0), but will call pause() once booted. To prove this, I've tested the following gross hack, which fixes suspend/resume on the ThinkPad X60: Index: sys/dev/usb/controller/ehci_pci.c =================================================================== --- sys/dev/usb/controller/ehci_pci.c (revision 222417) +++ sys/dev/usb/controller/ehci_pci.c (working copy) @@ -118,10 +118,16 @@ ehci_pci_resume(device_t self) { ehci_softc_t *sc = device_get_softc(self); + int mycold; + mycold = cold; + cold = 1; + ehci_pci_takecontroller(self); ehci_resume(sc); + cold = mycold; + bus_generic_resume(self); return (0); Index: sys/dev/usb/controller/uhci_pci.c =================================================================== --- sys/dev/usb/controller/uhci_pci.c (revision 222417) +++ sys/dev/usb/controller/uhci_pci.c (working copy) @@ -104,11 +104,17 @@ uhci_pci_resume(device_t self) { uhci_softc_t *sc = device_get_softc(self); + int mycold; + mycold = cold; + cold = 1; + pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); uhci_resume(sc); + cold = mycold; + bus_generic_resume(self); return (0); } The above hack fixes this X60 and allows suspend/resume to work, and USB devices work perfectly after the suspend/resume. Other controllers look like they may also be affected - at least ohci does the same. So, I guess my question to the USB experts is: What is the correct fix? I see two possibilities: 1) Have a variable somewhere called "suspres" or similar, which is set at the start of the suspend, and cleared at the end of the resume. usb_pause_mtx() then changes it's behaviour on (cold || suspres). This may have to be a global variable, being incremented on suspend and decremented on resume, as we don't pass a softc into usb_pause_mtx(), however then we have issues relating to when one controller suspends before the others, or resume before the others. 2) Kick off a separate task to do the resume. Problems with this is thet it doesn't fix the suspend path, but also that we may need to rely on USB being back before the rest of the resume completes. (What happens if we have / or another filesystem mounted from a USB device?) I guess #1 is the simplest solution, and should have fewest side effects, however it does mean that every attachment would need to be modified in order to set and clear the variable. It sort of feels like this should be handled more centrally, but I'm not sure of the best way to achieve this. Any [other] suggestions? Gavin From owner-freebsd-usb@FreeBSD.ORG Sat Jun 4 18:33:00 2011 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 EF60B106566C for ; Sat, 4 Jun 2011 18:33:00 +0000 (UTC) (envelope-from superedgarvm@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id BA7AC8FC0C for ; Sat, 4 Jun 2011 18:33:00 +0000 (UTC) Received: by iyj12 with SMTP id 12so3378188iyj.13 for ; Sat, 04 Jun 2011 11:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=+VShatkk5kkYtqHIFoP2KGBcLpI65xAtRY0AQw8PrAY=; b=ecOQReg7wnY1l25LbD9YDBdDWRxGL1nZTcHYCACxw3Xpz9gJSIfa9zB+GHzmkNu1gm irvIzJEuqgeKiVlju/6pvybOTPvhhpXDhw/L48feRfQAJOdA1EujPWZx7w9aT7rZVnHy Ow/s49V9hNG4YUSFXSlfrZy4+ddzw8oqIBzh8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=BiZADGgDU6Wt8CoiUbg3iXiUQC89ESvnwDaGwXjcnv0nUZIcvi6X+sxrJHbd7ihoUf yJ12h/ZSPEIRSqrJ90RNPpdbGpn6kUr/hAFY2NgsOx40fHAlczHjJa/Boev40J4ik7ce Y8MAdvDcs9S5y/k/Pu7WBEtjv5zJDwHrEVqq8= MIME-Version: 1.0 Received: by 10.231.116.32 with SMTP id k32mr4993830ibq.119.1307210901313; Sat, 04 Jun 2011 11:08:21 -0700 (PDT) Received: by 10.231.152.138 with HTTP; Sat, 4 Jun 2011 11:08:21 -0700 (PDT) Date: Sat, 4 Jun 2011 18:08:21 +0000 Message-ID: From: Edgar Velasquez Mercado To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: FreeBSD does not recognize USB devices in INTEL D102GGC2 motherboard 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, 04 Jun 2011 18:33:01 -0000 Hi everyone: I have a machine with Intel D102GGC2 motherboard running FreeBSD 8.2, it is not able to recognize any USB device, how could I fix that? From owner-freebsd-usb@FreeBSD.ORG Sat Jun 4 18:39:30 2011 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 57E281065672 for ; Sat, 4 Jun 2011 18:39:30 +0000 (UTC) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id BC9498FC1D for ; Sat, 4 Jun 2011 18:39:29 +0000 (UTC) Received: from mail-gw13.york.ac.uk ([144.32.129.163]) by gse-mta-27.emailfiltering.com with emfmta (version 4.8.1.33) by TLS id 1024524744 for superedgarvm@gmail.com; 932d67e9a36c8050; Sat, 04 Jun 2011 19:39:27 +0100 Received: from ury.york.ac.uk ([144.32.108.81]:42518) by mail-gw13.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QSvks-0000B0-SO; Sat, 04 Jun 2011 19:39:26 +0100 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1QSvks-0007uE-MC; Sat, 04 Jun 2011 19:39:26 +0100 Date: Sat, 4 Jun 2011 19:39:26 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@"ury.york.ac.uk." To: Edgar Velasquez Mercado In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: freebsd-usb@freebsd.org Subject: Re: FreeBSD does not recognize USB devices in INTEL D102GGC2 motherboard 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, 04 Jun 2011 18:39:30 -0000 On Sat, 4 Jun 2011, Edgar Velasquez Mercado wrote: > Hi everyone: > I have a machine with Intel D102GGC2 motherboard running FreeBSD 8.2, it is > not able to recognize any USB device, how could I fix that? Can you provide the output of "pciconf -lv" please? Gavin From owner-freebsd-usb@FreeBSD.ORG Sat Jun 4 20:13:37 2011 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 EEE1F106566C for ; Sat, 4 Jun 2011 20:13:36 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2BA9D8FC18 for ; Sat, 4 Jun 2011 20:13:35 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=EsGlCpMeIw85Gy1IHWHJoTo3ieATU4tNmYze/bSqBec= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=bBMXLvXXTA6HtZ2qePoA:9 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 135749588; Sat, 04 Jun 2011 22:13:33 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 4 Jun 2011 22:12:12 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106042212.12397.hselasky@c2i.net> Cc: Gavin Atkinson Subject: Re: USB suspend/resume 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, 04 Jun 2011 20:13:37 -0000 On Saturday 04 June 2011 19:08:22 Gavin Atkinson wrote: > Hi all, > > I've been trying to get a IBM ThinkPad X60 suspend/resume working > correctly, and discovered that with uhci loaded, the machine would hang on > resume. This is on head, but I believe this is aslo the cause of the > laptop not resuming on stable/8. > > It turns out that this is because we sleep in the resume path. The resume > path appears to run with interrupts disabled, and as a result we never > wake up. A comment above uhci_suspend() saggests similar: > > /* NOTE: suspend/resume is called from > * interrupt context and cannot sleep! > > However, we do sleep. We call usb_pause_mtx() several times during both > tthe suspend and resume path, and on resume this is fatal. > usb_pause_mtx() will use DELAY() when called before the machine has > finished booting (ie cold != 0), but will call pause() once booted. To > prove this, I've tested the following gross hack, which fixes > suspend/resume on the ThinkPad X60: > > Index: sys/dev/usb/controller/ehci_pci.c > =================================================================== > --- sys/dev/usb/controller/ehci_pci.c (revision 222417) > +++ sys/dev/usb/controller/ehci_pci.c (working copy) > @@ -118,10 +118,16 @@ > ehci_pci_resume(device_t self) > { > ehci_softc_t *sc = device_get_softc(self); > + int mycold; > > + mycold = cold; > + cold = 1; > + > ehci_pci_takecontroller(self); > ehci_resume(sc); > > + cold = mycold; > + > bus_generic_resume(self); > > return (0); > Index: sys/dev/usb/controller/uhci_pci.c > =================================================================== > --- sys/dev/usb/controller/uhci_pci.c (revision 222417) > +++ sys/dev/usb/controller/uhci_pci.c (working copy) > @@ -104,11 +104,17 @@ > uhci_pci_resume(device_t self) > { > uhci_softc_t *sc = device_get_softc(self); > + int mycold; > > + mycold = cold; > + cold = 1; > + > pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); > > uhci_resume(sc); > > + cold = mycold; > + > bus_generic_resume(self); > return (0); > } > > > The above hack fixes this X60 and allows suspend/resume to work, and USB > devices work perfectly after the suspend/resume. Other controllers look > like they may also be affected - at least ohci does the same. > > So, I guess my question to the USB experts is: What is the correct fix? > I see two possibilities: > > 1) Have a variable somewhere called "suspres" or similar, which is set at > the start of the suspend, and cleared at the end of the resume. > usb_pause_mtx() then changes it's behaviour on (cold || suspres). > This may have to be a global variable, being incremented on suspend and > decremented on resume, as we don't pass a softc into usb_pause_mtx(), > however then we have issues relating to when one controller suspends > before the others, or resume before the others. > > 2) Kick off a separate task to do the resume. Problems with this is thet > it doesn't fix the suspend path, but also that we may need to rely on > USB being back before the rest of the resume completes. (What happens > if we have / or another filesystem mounted from a USB device?) > > I guess #1 is the simplest solution, and should have fewest side effects, > however it does mean that every attachment would need to be modified in > order to set and clear the variable. It sort of feels like this should be > handled more centrally, but I'm not sure of the best way to achieve this. > > Any [other] suggestions? > > Gavin Where is it documented that the resume/suspend callbacks are not run from a thread context? --HPS From owner-freebsd-usb@FreeBSD.ORG Sat Jun 4 23:38:40 2011 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 2EB3F106566B for ; Sat, 4 Jun 2011 23:38:40 +0000 (UTC) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com [194.116.199.158]) by mx1.freebsd.org (Postfix) with ESMTP id 93AE98FC08 for ; Sat, 4 Jun 2011 23:38:39 +0000 (UTC) Received: from mail-gw5.york.ac.uk ([144.32.129.29]) by ixe-mta-27.emailfiltering.com with emfmta (version 4.8.1.33) by TLS id 1121460926 for hselasky@c2i.net; 3e56b1e6c85fdff9; Sun, 05 Jun 2011 00:38:31 +0100 Received: from ury.york.ac.uk ([144.32.108.81]:34793) by mail-gw5.york.ac.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QT0QE-0004rE-II; Sun, 05 Jun 2011 00:38:26 +0100 Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1QT0QE-0000nP-An; Sun, 05 Jun 2011 00:38:26 +0100 Date: Sun, 5 Jun 2011 00:38:26 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@"ury.york.ac.uk." To: Hans Petter Selasky In-Reply-To: <201106042212.12397.hselasky@c2i.net> Message-ID: References: <201106042212.12397.hselasky@c2i.net> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Cc: freebsd-usb@freebsd.org Subject: Re: USB suspend/resume 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, 04 Jun 2011 23:38:40 -0000 On Sat, 4 Jun 2011, Hans Petter Selasky wrote: > On Saturday 04 June 2011 19:08:22 Gavin Atkinson wrote: > > Hi all, > > > > I've been trying to get a IBM ThinkPad X60 suspend/resume working > > correctly, and discovered that with uhci loaded, the machine would hang on > > resume. This is on head, but I believe this is aslo the cause of the > > laptop not resuming on stable/8. > > > > It turns out that this is because we sleep in the resume path. The resume > > path appears to run with interrupts disabled, and as a result we never > > wake up. A comment above uhci_suspend() saggests similar: > > > > /* NOTE: suspend/resume is called from > > * interrupt context and cannot sleep! > > > > However, we do sleep. We call usb_pause_mtx() several times during both > > tthe suspend and resume path, and on resume this is fatal. > > usb_pause_mtx() will use DELAY() when called before the machine has > > finished booting (ie cold != 0), but will call pause() once booted. > > [snip] > > > > So, I guess my question to the USB experts is: What is the correct fix? > > I see two possibilities: > > > > 1) Have a variable somewhere called "suspres" or similar, which is set at > > the start of the suspend, and cleared at the end of the resume. > > usb_pause_mtx() then changes it's behaviour on (cold || suspres). > > This may have to be a global variable, being incremented on suspend and > > decremented on resume, as we don't pass a softc into usb_pause_mtx(), > > however then we have issues relating to when one controller suspends > > before the others, or resume before the others. > > > > 2) Kick off a separate task to do the resume. Problems with this is thet > > it doesn't fix the suspend path, but also that we may need to rely on > > USB being back before the rest of the resume completes. (What happens > > if we have / or another filesystem mounted from a USB device?) > > > > I guess #1 is the simplest solution, and should have fewest side effects, > > however it does mean that every attachment would need to be modified in > > order to set and clear the variable. It sort of feels like this should be > > handled more centrally, but I'm not sure of the best way to achieve this. > > > > Where is it documented that the resume/suspend callbacks are not run from a > thread context? As far as I can tell, it does run in a thread context. I've not found any specific documentation saying what can and cannot be done during suspend/resume, other than that comment in uhci.c above uhci_suspend(). Do you have any idea where you got that information from? The old stack had this comment: * We need to switch to polling mode here, because this routine is * called from an interrupt context. This is all right since we * are almost suspended anyway. It was purely based on htat comment that I investigated the possibility that this was related to pause(). I believe that the reason that this works on some machines but not this one right now is purely down to the order in which things are brought back. On this laptop, hpet(4) is resumed after the USB busses. Presumably from that point onwards, it is possible to sleep for a length of time? I'm not sure. Before that, pause() hangs indefinitely, waiting for an interrupt that never happens. This is just a theory - I've not proved it conclusively yet. I'm sort of hoping that somebody who knows more about suspend/resume can offer some pointers here. Gavin