Re: [PATCH] New unusual device: Nokia 6288

Andrew Nayenko <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
> What happens when you try to use the 6288 without US_FL_MAX_SECTORS_64?

cp hangs when I try to read a big file (about 90KB or larger, 84KB or smaller files are read with no problems) from the phone. For example (excuse me long listing):

==================== begin of trace =================
$ strace cp /media/disk/Мелодии/Fast-flying.aac .Trash/
execve("/bin/cp", ["cp", "/media/disk/\320\234\320\265\320\273\320\276\320\264\320"..., ".Trash/"], [/* 36 vars */]) = 0
brk(0)                                  = 0x888f000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fca000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=59946, ...}) = 0
mmap2(NULL, 59946, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbb000
close(3)                                = 0
open("/lib/libacl.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0ps\263\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=26028, ...}) = 0
mmap2(0xb36000, 27288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb36000
mmap2(0xb3c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0xb3c000
close(3)                                = 0
open("/lib/libselinux.so.1", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\305"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=93512, ...}) = 0
mmap2(0x729000, 93016, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x729000
mmap2(0x73e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0x73e000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pP\234\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1576920, ...}) = 0
mmap2(0x9af000, 1295780, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x9af000
mmap2(0xae6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x137) = 0xae6000
mmap2(0xae9000, 9636, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xae9000
close(3)                                = 0
open("/lib/libattr.so.1", O_RDONLY)     = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\254\213"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=15972, ...}) = 0
mmap2(0x8ba000, 17248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x8ba000
mmap2(0x8be000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0x8be000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\353"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=16528, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fba000
mmap2(0xaee000, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xaee000
mmap2(0xaf0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xaf0000
close(3)                                = 0
open("/lib/libsepol.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300?n\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=245376, ...}) = 0
mmap2(0x6e1000, 285024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x6e1000
mmap2(0x71c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3b) = 0x71c000
mmap2(0x71d000, 39264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x71d000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fb9000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fb96d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xae6000, 8192, PROT_READ)     = 0
mprotect(0xaf0000, 4096, PROT_READ)     = 0
mprotect(0x9ab000, 4096, PROT_READ)     = 0
munmap(0xb7fbb000, 59946)               = 0
access("/etc/selinux/", F_OK)           = 0
brk(0)                                  = 0x888f000
brk(0x88b0000)                          = 0x88b0000
open("/etc/selinux/config", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc9000
read(3, "# This file controls the state o"..., 4096) = 511
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7fc9000, 4096)                = 0
open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fc9000
read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 1024) = 748
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xb7fc9000, 4096)                = 0
open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 4095) = 316
close(3)                                = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=55566336, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7db9000
close(3)                                = 0
geteuid32()                             = 500
stat64(".Trash/", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/media/disk/Мелодии/Fast-flying.aac", {st_mode=S_IFREG|0755, st_size=95216, ...}) = 0
stat64(".Trash/Fast-flying.aac", {st_mode=S_IFREG|0755, st_size=16384, ...}) = 0
open("/media/disk/Мелодии/Fast-flying.aac", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=95216, ...}) = 0
open(".Trash/Fast-flying.aac", O_WRONLY|O_TRUNC|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0755, st_size=0, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0755, st_size=95216, ...}) = 0
read(3, "\377\361P@\1\177\374\0\0\0\7\377\361P@\1\177\374\0\0\0"..., 4096) = 4096
write(4, "\377\361P@\1\177\374\0\0\0\7\377\361P@\1\177\374\0\0\0"..., 4096) = 4096
read(3, "\343E~\n\n\345AA~\v\301\5\25Du\330~\3211\22\203\26]\224"..., 4096) = 4096
write(4, "\343E~\n\n\345AA~\v\301\5\25Du\330~\3211\22\203\26]\224"..., 4096) = 4096
read(3, "\264\266~\207\263\3615A\331\323:\223\337\20\237\242\345"..., 4096) = 4096
write(4, "\264\266~\207\263\3615A\331\323:\223\337\20\237\242\345"..., 4096) = 4096
read(3, "\221\354r\0\0S&Z\336\365\375\257:\313 .\2\\`\36\36 r\201"..., 4096) = 4096
write(4, "\221\354r\0\0S&Z\336\365\375\257:\313 .\2\\`\36\36 r\201"..., 4096) = 4096
read(3, 
=================== end of trace ===================

After that cp just hangs and dmesg says the following:

================== begin of dmesg ==================
usb 4-1: new full speed USB device using uhci_hcd and address 3
usb 4-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
scsi 1:0:0:0: Direct-Access     Nokia    Nokia 6288       0000 PQ: 0 ANSI: 4
SCSI device sda: 1000449 512-byte hdwr sectors (512 MB)
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
SCSI device sda: 1000449 512-byte hdwr sectors (512 MB)
sda: test WP failed, assume Write Enabled
sda: assuming drive cache: write through
 sda:
sd 1:0:0:0: Attached scsi removable disk sda
sd 1:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
sda: Current: sense key: No Sense
    Additional sense: No additional sense information
sda: Current: sense key: No Sense
    Additional sense: No additional sense information
usb 4-1: reset full speed USB device using uhci_hcd and address 3
=================== end of dmesg ======================

Sometimes the last line of dmesg ("usb 4-1: reset full speed") is missing.

With US_FL_MAX_SECTORS_64 everything works fine. Nokia 6288 is internally almost the same as Nokia 6233 (both are built on the Series40 v3 platform), so I think it has the same issue as 6233.

    Best regards,

    Andrew Nayenko AKA Relan



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.