Bug 208928 - USB mass storage fails on razr v3i
USB mass storage fails on razr v3i
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-10-02 13:40 EDT by Mark Patton
Modified: 2008-04-04 13:33 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 13:33:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
system log (15.14 KB, text/plain)
2006-10-02 13:40 EDT, Mark Patton
no flags Details
proc usb devices output (2.48 KB, text/plain)
2006-10-03 13:54 EDT, Mark Patton
no flags Details
Test 1 - just the size (668 bytes, patch)
2006-10-03 15:13 EDT, Pete Zaitcev
no flags Details | Diff

  None (edit)
Description Mark Patton 2006-10-02 13:40:46 EDT
Description of problem:

The razr v3i cell phone has usb connectivy. On windows and mac machines I can
hook up the phone and access the internal flash card through the usb mass
storage protocol. Under Fedora this fails.

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1. Connect phone to laptop with usb cable
Actual results:

Fails to mount the phone. Complains in system log.

Expected results:

Mounts the phone.

Additional info:

System log messages attached
Comment 1 Mark Patton 2006-10-02 13:40:47 EDT
Created attachment 137576 [details]
system log
Comment 2 Pete Zaitcev 2006-10-02 18:25:15 EDT
Looks like the device lies about its size, then something (vfat?)
accesses the device closer to the end at sector 494013, and this
causes the firmware to crash.

We really have to do something about theses accesses towards the end.
I remember that Matt Domsch made EFI partition not to read its last
block all the time, which helped. But either it returned, or it's vfat.

Axboe's blktrace is probably the only way to tell what component is
accessing the device at those offsets.
Comment 3 Mark Patton 2006-10-03 08:21:03 EDT
The phone says the memory card is 247040 kb. Given that both a mac and a windows
machine were able to read the card, I suspect the card is vfat. 

It looks like fc6test3 has support for running blktrace. I'll give it a shot.

Comment 4 Mark Patton 2006-10-03 13:34:11 EDT
I ran blktrace while attempting to mount the scsi device created for the phone.
No events showed up. The system log has the same error log about failure to read
sector 101. The only additional message was "FAT: unable to read boot sector".
Comment 5 Pete Zaitcev 2006-10-03 13:41:32 EDT
Sorry that it didn't work.

My thinking was as follows. The partition table is recognized at first.
This requires reading and the data must be sane. So that works.
Then, we see accesses failing first at large offsets, then at 101,
and it the end, at 0. But MBR was read. This means that the device
worked at first, then stopped (same as iPod does in such case).

Since partitioning was recognized, I blamed vfat, but it's not 100%.

247040 * 2 = 494080, but the phone says 494081 sectors. This seems like a
typical off-by-one error. Can you build your own kernels and test patches?

Also, I need to see your /proc/bus/usb/devices.
Comment 6 Mark Patton 2006-10-03 13:54:15 EDT
Created attachment 137675 [details]
proc usb devices output
Comment 7 Mark Patton 2006-10-03 13:55:50 EDT
I can build kernels and test patches.

Comment 8 Pete Zaitcev 2006-10-03 15:01:48 EDT
While we're on topic, there's something to test. Please do this:
 echo ub > /sys/module/libusual/parameters/bias
Then unplug and plug the phone. Maybe that works.
Comment 9 Pete Zaitcev 2006-10-03 15:13:41 EDT
Created attachment 137686 [details]
Test 1 - just the size

Someone else reported a residue problem. Let's split-test the size and residue.
Comment 10 Mark Patton 2006-10-03 15:18:38 EDT
Changing /sys/module/libusual/parametres/bias as above works like a charm.

When I plug in the phone, after a bunch of messages like
"ub(3,4): dir r len/act 512/0 [sense 3 12 00] retry 1"' a /dev/uba1 device is
created and I can mount it as vfat.
Comment 11 Pete Zaitcev 2006-10-03 18:43:59 EDT
Yeah, that's the problem... The ub works, but only because it presents some
very primitive capabilities and this causes an unknown component not to do
something to /dev/uba which it would do to /dev/sda. The ub gets fooled by
the incorrect size just like sd and you can cause the phone to collapse by
running "dd if=/dev/uba of=/dev/null". So the excercise with blktrace was
intended to find the culprit.

BTW, error 3/12/00 indicates a meda error and it should not be correctable
on flash. If flash's block is dead, it's dead. I think it's a bug in the
phone. Although.... tried a different microSD card? Maybe it's actually
a duff card.
Comment 12 Pete Zaitcev 2007-03-08 23:14:08 EST
Sent patch to Phil for integration.
Comment 13 Pete Zaitcev 2007-08-28 00:03:16 EDT
OK, it's upstreamed. I'm afraid it missed the F-7, but maybe update made it.
Mark, does it work? Give me a kernel release regardless please.
Also, what is the result of this:
  grep -i 22b8 /lib/modules/$(uname -r)/modules.alias
It should return something like:
alias usb:v22B8p4810d0001dc*dsc*dp*ic*isc*ip* libusual
Comment 14 Bug Zapper 2008-04-03 23:54:07 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 15 Mark Patton 2008-04-04 08:42:23 EDT
(In reply to comment #13)
> OK, it's upstreamed. I'm afraid it missed the F-7, but maybe update made it.
> Mark, does it work? Give me a kernel release regardless please.
> Also, what is the result of this:
>   grep -i 22b8 /lib/modules/$(uname -r)/modules.alias
> It should return something like:
> alias usb:v22B8p4810d0001dc*dsc*dp*ic*isc*ip* libusual

Unfortunately I no longer have the phone so I can't test. :(


Note You need to log in before you can comment on or make changes to this bug.