Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 141512 - Cannot read individual files from memory card
Summary: Cannot read individual files from memory card
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-23 11:29 UTC by Troels Nilsson
Modified: 2006-10-04 07:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
lsusb -v output with the device attached (lsusb_output.txt,10.06 KB, text/plain)
2006-08-12 08:50 UTC, Troels Nilsson
Details
Patch (nokia-6280.patch,644 bytes, patch)
2006-09-08 18:14 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Troels Nilsson 2006-07-23 11:29:49 UTC
When trying to read individual files from my Nokia 6280 phone's memory card via an USB cable, the read fails. Writing files is no problem, and dumping the entire contents of the card using dd also works (one can even mount the dump in loopback and read the files!), but when trying to read a file directly it hangs for a while and finally exits with an input/output error.

Both Windows XP and Knoppix 3.8 works without any problems.

The relevant lines from kern.log:
Jul 22 22:25:35 tn kernel: usb 2-2: new full speed USB device using ohci_hcd and address 3
Jul 22 22:25:36 tn kernel: usb 2-2: configuration #1 chosen from 1 choice
Jul 22 22:25:36 tn kernel: Initializing USB Mass Storage driver...
Jul 22 22:25:36 tn kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jul 22 22:25:36 tn kernel: usb-storage: device found at 3
Jul 22 22:25:36 tn kernel: usb-storage: waiting for device to settle before scanning
Jul 22 22:25:36 tn kernel: usbcore: registered new driver usb-storage
Jul 22 22:25:36 tn kernel: USB Mass Storage support registered.
Jul 22 22:25:41 tn kernel:   Vendor: Nokia     Model: Nokia 6280        Rev: 0000
Jul 22 22:25:41 tn kernel:   Type:   Direct-Access                      ANSI SCSI revision: 04
Jul 22 22:25:41 tn kernel: SCSI device sdb: 124161 512-byte hdwr sectors (64 MB)
Jul 22 22:25:41 tn kernel: sdb: test WP failed, assume Write Enabled
Jul 22 22:25:41 tn kernel: sdb: assuming drive cache: write through
Jul 22 22:25:41 tn kernel: SCSI device sdb: 124161 512-byte hdwr sectors (64 MB)
Jul 22 22:25:41 tn kernel: sdb: test WP failed, assume Write Enabled
Jul 22 22:25:41 tn kernel: sdb: assuming drive cache: write through
Jul 22 22:25:41 tn kernel:  sdb:
Jul 22 22:25:41 tn kernel: sd 2:0:0:0: Attached scsi removable disk sdb
Jul 22 22:25:41 tn kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jul 22 22:25:41 tn kernel: usb-storage: device scan complete
Jul 22 22:25:42 tn kernel: sdb: Current: sense key=0x0
Jul 22 22:25:42 tn kernel:     ASC=0x0 ASCQ=0x0
Jul 22 22:25:52 tn kernel: UDF-fs: No partition found (1)
Jul 22 22:25:53 tn kernel: Unable to identify CD-ROM format.
Jul 22 22:33:26 tn kernel: usb 2-2: reset full speed USB device using ohci_hcd and address 3
Jul 22 22:33:57 tn kernel: usb 2-2: reset full speed USB device using ohci_hcd and address 3
Jul 22 22:35:01 tn last message repeated 5 times
Jul 22 22:35:41 tn last message repeated 2 times
Jul 22 22:35:47 tn kernel: sd 2:0:0:0: SCSI error: return code = 0x50000
Jul 22 22:35:47 tn kernel: end_request: I/O error, dev sdb, sector 285
Jul 22 22:35:48 tn kernel: usb 2-2: reset full speed USB device using ohci_hcd and address 3
Jul 22 22:36:28 tn last message repeated 2 times
Jul 22 22:36:35 tn kernel: usb 2-2: reset full speed USB device using ohci_hcd and address 3
Jul 22 22:36:35 tn kernel: usb 2-2: device descriptor read/64, error -110
Jul 22 22:36:36 tn kernel: usb 2-2: device descriptor read/64, error -110
Jul 22 22:36:36 tn kernel: usb 2-2: reset full speed USB device using ohci_hcd and address 3
Jul 22 22:36:36 tn kernel: usb 2-2: device descriptor read/64, error -110
Jul 22 22:36:36 tn kernel: usb 2-2: device descriptor read/64, error -110
Jul 22 22:36:36 tn kernel: usb 2-2: reset full speed USB device using ohci_hcd and address 3
Jul 22 22:36:37 tn kernel: usb 2-2: device not accepting address 3, error -110
Jul 22 22:36:37 tn kernel: usb 2-2: USB disconnect, address 3
Jul 22 22:36:37 tn kernel: sd 2:0:0:0: SCSI error: return code = 0x10000
Jul 22 22:36:37 tn kernel: end_request: I/O error, dev sdb, sector 293
Jul 22 22:36:37 tn kernel: sd 2:0:0:0: rejecting I/O to device being removed
Jul 22 22:36:37 tn last message repeated 2 times
Jul 22 22:36:37 tn kernel: sd 2:0:0:0: SCSI error: return code = 0x10000
Jul 22 22:36:37 tn kernel: end_request: I/O error, dev sdb, sector 525
Jul 22 22:36:37 tn kernel: sd 2:0:0:0: rejecting I/O to device being removed
Jul 22 22:36:37 tn kernel: VFS: busy inodes on changed media.
Jul 22 22:36:37 tn kernel:  2:0:0:0: rejecting I/O to dead device
Jul 22 22:36:37 tn last message repeated 3 times
Jul 22 22:36:37 tn kernel: sdb : READ CAPACITY failed.
Jul 22 22:36:37 tn kernel: sdb : status=0, message=00, host=1, driver=00
Jul 22 22:36:37 tn kernel: sdb : sense not available.
Jul 22 22:36:37 tn kernel:  2:0:0:0: rejecting I/O to dead device
Jul 22 22:36:37 tn kernel: sdb: Write Protect is off
Jul 22 22:36:37 tn kernel: sdb: Mode Sense: 00 00 00 00
Jul 22 22:36:37 tn kernel: sdb: assuming drive cache: write through
Jul 22 22:36:37 tn kernel:  2:0:0:0: rejecting I/O to dead device
Jul 22 22:36:43 tn kernel: usb 2-2: new full speed USB device using ohci_hcd and address 4
Jul 22 22:36:43 tn kernel: usb 2-2: configuration #1 chosen from 1 choice
Jul 22 22:37:08 tn kernel:  2:0:0:0: rejecting I/O to dead device
Jul 22 22:37:08 tn kernel: FAT: unable to read inode block for updating (i_pos 4500)


emerge --info:
Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r13 i686)
=================================================================
System uname: 2.6.16-gentoo-r13 i686 AMD Athlon(tm) XP 2700+
Gentoo Base System version 1.6.15
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.2.3-r6, 2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.gentoo.no/ http://ds.thn.htu.se/linux/gentoo http://mirror.pudas.net/gentoo http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://shuttle/gentoo-portage"
USE="x86 3dnow 3dnowext X alsa apache2 apm arts avi berkdb bitmap-fonts bzip2 cli crypt cups dlloader doc dri dvd eds emboss encode exif fam ffmpeg flac foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 hal idn imagemagick imlib ipv6 isdnlog java jbig jpeg jpeg2k kde kdeenablefinal lcms libg++ libwww mad mikmod mmx mmxext motif mp3 mpeg ncurses nls nptl ogg opengl pam pcre pdf pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection samba scanner sdl session spell spl sse ssl svg tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis xml xorg xv zlib elibc_glibc input_devices_joystick input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nvidia video_cards_nv video_cards_vesa video_cards_vga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Troels Nilsson 2006-07-27 11:54:43 UTC
Tried with a gentoo-2.6.14-r7 kernel and reading works with this kernel, so I guess it's a bug introduced in newer kernels.
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2006-08-12 04:39:51 UTC
Please reproduce this on the latest stable kernel (currently 2.6.17) and if the bug still exists, post "lsusb -v" output while the device is attached.
Comment 3 Troels Nilsson 2006-08-12 08:50:20 UTC
Created attachment 94061 [details]
lsusb -v output with the device attached
Comment 4 Troels Nilsson 2006-08-12 08:52:16 UTC
(In reply to comment #3)
> Created an attachment (id=94061) [edit]
> lsusb -v output with the device attached
> 

I have reproduced the error using the 2.6.17-gentoo-r4 kernel and attached the output from lsusb.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2006-09-08 18:14:23 UTC
Created attachment 96450 [details, diff]
Patch

This is completely guesswork but as Nokia have been messing up a fair few firmwares recently it is worth trying this patch...
Comment 6 Troels Nilsson 2006-09-09 03:15:51 UTC
(In reply to comment #5)
> Created an attachment (id=96450) [edit]
> Patch
> 
> This is completely guesswork but as Nokia have been messing up a fair few
> firmwares recently it is worth trying this patch...
> 

I still have the same problem with this patch applied - but maybe it is the firmware that needs updating. There was a reply on the forum http://forums.gentoo.org/viewtopic.php?p=3565726#3565726 :

This may interest you:
Linux taiga 2.6.16-gentoo-r9 #4 Sat Sep 2 14:42:04 CEST 2006 x86_64 AMD Athlon(tm) 64 Processor 3500+ GNU/Linux
... and I can read files. At least the few files I have read had no problems.
I'm still looking for a way to access the contents of the phone itself rather than the card. :)
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2006-09-16 20:05:51 UTC
Please enable USB storage debugging (CONFIG_USB_STORAGE_DEBUG) and attach dmesg after this problem has occurred. Preferably on the latest development kernel, currently 2.6.18-rc7.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2006-10-04 07:04:08 UTC
see comment #7