From owner-freebsd-current@FreeBSD.ORG Fri Jun 5 15:42:51 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B96961065677 for ; Fri, 5 Jun 2009 15:42:51 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 5B33E8FC41 for ; Fri, 5 Jun 2009 15:42:49 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n55FghWK014539; Fri, 5 Jun 2009 11:42:44 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Fri, 05 Jun 2009 11:42:44 -0400 (EDT) Date: Fri, 5 Jun 2009 11:42:43 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: ticso@cicely.de In-Reply-To: <20090605084841.GR12403@cicely7.cicely.de> Message-ID: References: <4A20F485.2030803@omnilan.de> <200905301203.20769.hselasky@c2i.net> <200905301610.45520.hselasky@c2i.net> <20090605084841.GR12403@cicely7.cicely.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Harald Schmalzbauer , freebsd-current@freebsd.org, Hans Petter Selasky Subject: Re: USB (internally fixed) card reader questions X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2009 15:42:52 -0000 On Fri, 5 Jun 2009, Bernd Walter wrote: > On Sat, May 30, 2009 at 10:25:02AM -0400, Daniel Eischen wrote: >> On Sat, 30 May 2009, Daniel Eischen wrote: >> >>> On Sat, 30 May 2009, Hans Petter Selasky wrote: >>> >>>> On Saturday 30 May 2009, Daniel Eischen wrote: >>>>> On Sat, 30 May 2009, Hans Petter Selasky wrote: >>>> >>>>> It is not just USB flash cards. I have similar problem with >>>>> external USB disk drives. See earlier (unanswered) posting: >>>>> >>>>> http://lists.freebsd.org/pipermail/freebsd-current/2009-May/006964.html >>>>> >>>>> And usbconfig(8) could be a little more helpful (the commands >>>>> could use a description for what they do). >>>> >>>> I'm not sure who is at fault, USB or hald. It looks to me like hald does >>>> not >>>> detect that the flash card is plugged in during startup, and does not >>>> mount >>>> it. >>> >>> Is hald needed for this? I am not currently running X because >>> it doesn't work any longer with my Intel 945GM chipset. >>> >>> I will try removing hald from the equation. >> >> Hmm, how about that! Removing hald (and dbus) solved the >> problem. I can attach and detach the external drive without >> any problems. > > It is just guessing, but maybe hald keeps the device opened, so GEOM > never retastes the drive. I don't know, but I was able to "dd if=/dev/da0 of=/tmp/da0.bb count=1" from a good and bad attachment. When the problem occurs, it seems like the data read by dd is skewed off by 12 bytes. The first 12 bytes are 0, followed by the same data (from byte 0) as the dd from the good attachment. [deischen@rigel ~]$ od -x da0.mbr.noworky 0000000 0000 0000 0000 0000 0000 0000 0000 0000 0000020 0000 0000 0000 0000 31fc 8ec0 8ec0 8ed8 0000040 bcd0 7c00 e689 00bf b906 0100 a5f3 fd89 0000060 08b1 abf3 45fe e9f2 8a00 46f6 20bb 0875 ... 0000720 02b1 8f80 00b6 0100 0001 fe06 043f 003f 0000740 0000 3986 0001 0000 0501 fe07 ffff 39c5 0000760 0001 f44f 01ba 0080 ffc1 fea5 ffff 2e14 [deischen@rigel ~]$ od -x da0.mbr.worky 0000000 31fc 8ec0 8ec0 8ed8 bcd0 7c00 e689 00bf 0000020 b906 0100 a5f3 fd89 08b1 abf3 45fe e9f2 0000040 8a00 46f6 20bb 0875 d284 0778 4e80 40bb 0000060 568a 88ba 0056 fae8 5200 c2bb 3107 88d2 ... 0000720 0501 fe07 ffff 39c5 0001 f44f 01ba 0080 0000740 ffc1 fea5 ffff 2e14 01bc 7275 0513 0000 0000760 0000 0000 0000 0000 0000 0000 0000 aa55 There are other side-effects from hald also. Trying to use camcontrol rescan, reset, and disconnecting/reconnecting the drive eventually leads to a hung system necessitating a reboot. Without hald, it seems I can connect/disconnect the drive as many times as I want. -- DE