Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jun 2009 11:42:43 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        ticso@cicely.de
Cc:        Harald Schmalzbauer <h.schmalzbauer@omnilan.de>, freebsd-current@freebsd.org, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: USB (internally fixed) card reader questions
Message-ID:  <Pine.GSO.4.64.0906051140030.25194@sea.ntplx.net>
In-Reply-To: <20090605084841.GR12403@cicely7.cicely.de>
References:  <4A20F485.2030803@omnilan.de> <200905301203.20769.hselasky@c2i.net> <Pine.GSO.4.64.0905300950190.22838@sea.ntplx.net> <200905301610.45520.hselasky@c2i.net> <Pine.GSO.4.64.0905301010010.22838@sea.ntplx.net> <Pine.GSO.4.64.0905301017510.22838@sea.ntplx.net> <20090605084841.GR12403@cicely7.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0906051140030.25194>