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