Bug 208928 - USB mass storage fails on razr v3i
Summary: USB mass storage fails on razr v3i
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 6
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pete Zaitcev
QA Contact: Brian Brock
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-02 17:40 UTC by Mark Patton
Modified: 2008-04-04 17:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-04 17:33:48 UTC
Type: ---
Embargoed:


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

Description Mark Patton 2006-10-02 17:40:46 UTC
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:

Very.



Steps to Reproduce:
1. Connect phone to laptop with usb cable
2.
3.
  
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 17:40:47 UTC
Created attachment 137576 [details]
system log

Comment 2 Pete Zaitcev 2006-10-02 22:25:15 UTC
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 12:21:03 UTC
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 17:34:11 UTC
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 17:41:32 UTC
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 17:54:15 UTC
Created attachment 137675 [details]
proc usb devices output

Comment 7 Mark Patton 2006-10-03 17:55:50 UTC
I can build kernels and test patches.



Comment 8 Pete Zaitcev 2006-10-03 19:01:48 UTC
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 19:13:41 UTC
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 19:18:38 UTC
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 22:43:59 UTC
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-09 04:14:08 UTC
Sent patch to Phil for integration.


Comment 13 Pete Zaitcev 2007-08-28 04:03:16 UTC
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-04 03:54:07 UTC
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.
http://fedoraproject.org/wiki/LifeCycle/EOL

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:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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 12:42:23 UTC
(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. :(

Mark



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