Re: bug report: Olympus MAUSB-200 card reader and 1GB Type H xD-Picture Card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009-09-19 15:28 +0800, Eric Ding indited:
> On 2009-09-19 04:10 +0800, Alan Stern indited:
>> On Fri, 18 Sep 2009, Eric Ding wrote:
>>
>>> On 2009-09-17 21:38 +0800, Alan Stern indited:
>>>> On Thu, 17 Sep 2009, Eric Ding wrote:
>>>>
>>>>> I'm using the mainline 2.6.31 kernel with an Olympus MAUSB-200 USB xD-Picture
>>>>> Card reader and my Olympus 1GB Type H xD-Picture Card, and have had consistent
>>>>> problems trying to access and use the card on my Linux system.  This card
>>>>> (reader) works perfectly fine with my Fujifilm F20 digicam and on my Windows XP
>>>>> system, but on my Linux system, the usb-storage driver seems to have problems
>>>>> even getting partition information for it.
>>>>>
>>> [original report trimmed]
>>>>> I've included the output of lsusb -v and output from dmesg below.
>>>> There isn't enough information in the log to tell what's wrong.  We
>>>> need to see a usbmon trace showing what happens when you plug the card
>>>> reader in.
>>> No sweat, see below!  Thanks again...
>> The trace shows that the card has 2048000 sectors.  A bunch of reads
>> take place successfully (including a read of the very last sector).  
>> Then the following happens:
>>
> [analysis clipped]
>> As for why it works under Windows, I can only guess it's because
>> Windows doesn't try to read 64 sectors starting at sector 2047768.  
>> Perhaps if some Windows program tried to do so, the same failure would
>> happen.
>>
>> Probably the Linux program that does the offending read is udev's 
>> vol_id.  If you disable that then perhaps the reader won't crash.
> 
> Hmm... I'm not too familiar with the inner workings of udev, but here's
> what I have tried so far:
> 
> 1) Comment out all lines in /lib/udev/rules.d files that refer to
> vol_id.  Errors still occur.  If I look further, it appears that
> hald-probe-volume is running while errors are popping up, so I conclude
> that hald-probe-volume is provoking this error.  So next, I...
> 
> 2) Turn off udev daemon altogether.  This eliminates the error, and I can
> now manually mount /dev/sdb1 and read/write files to and from the card reader.
> 
> OK, so now I've concluded that the way udev and hald interact with my USB
> card reader tickle this bug/issue in my card (reader).  I suspect I'm
> wandering outside the domain of this list, since it seems you're implying
> that there's no kernel workaround for this bug.  So now what?  Is there a
> way to tell hald/udev to treat this device specially and not probe it in
> this way?  Or is there some kind of a kernel workaround I could try?

Just to follow up: I browsed the source code of udev and did a *lot* of
trial-and-error playing around with vol_id, and have stumbled on what I
cautiously will call a successful workaround.  It appears that the part of
vol_id which probes for RAID filesystem types is causing the problem...
since I don't use RAID at all (and certainly not on my memory card!), I
passed the --skip-raid argument to vol_id, and now everything seems to
work... for now.

A glance at the development sources for udev suggests that vol_id will soon
be deprecated, and blkid from e2fsprogs will be used instead.  Hopefully
that will mean no more workaround in the future, rather than a need for a
whole new workaround.  :)

Thanks,
Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux