Rockbox

Tasklist

FS#12458 - [Fuze+] The SD card is not reported in usb mode

Attached to Project: Rockbox
Opened by amaury pouly (pamaury) - Friday, 16 December 2011, 08:17 GMT
Last edited by amaury pouly (pamaury) - Tuesday, 30 October 2012, 12:27 GMT
Task Type Bugs
Category Operating System/Drivers
Status Closed
Assigned To amaury pouly (pamaury)
Operating System Sansa Fuze+
Severity Low
Priority Normal
Reported Version Release 3.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Some users have reported that the SD card does not show up on usb mode.
This task depends upon

Closed by  amaury pouly (pamaury)
Tuesday, 30 October 2012, 12:27 GMT
Reason for closing:  Out of Date
Additional comments about closing:  reopen if still a problem
Comment by Andrej (rarog) - Friday, 16 December 2011, 14:30 GMT
Everything worked fine on my side besides when booting with usb plugged in. But this was due to firmware without SD support. While the wiki doesn't link to v3 firmware with SD support, I uploaded a freshly compiled one temporarily to http://rghost.net/35041581

This should probably solve all problems.
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Friday, 16 December 2011, 18:30 GMT
on r31323 (bootloader an firmware) there seems to remain a problem with insertion's detection

- On bootloader usb sd insertion doesn't get detected. If plugged with device off while sd already inserted, then it works
- On normal usb mode if sd card get inserted while already plugged:
Divide by zero at 6006E434
backtrace start
pc: 0x6006E434
sp: 0x600CE9D0
A: 0x00000000
backtrace end

if entering usb normal mode with sd card already in then it works
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Friday, 16 December 2011, 19:10 GMT
sometime connecting the device into normal usb with sdcard already inserted bring:
Data abord at 60072160
FSR 0x1
(domain 0, fault 1)
address 0x00074665
backtrace start
pc: 0x60072160
sp: 0x60000230
A: 0x00000000
backtrace end
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Friday, 16 December 2011, 19:20 GMT
find_adress for the divide by zero:
jean-louis@debian:~/Bureau/rockbox-devtree/rockbox/buidl$ ../utils/analysis/find_addr.pl 0x6006E434 1
/home/jean-louis/Bureau/rockbox-devtree/rockbox/buidl/firmware/libfirmware.a(usb_storage.o) -> usb_storage_control_request
jean-louis@debian:~/Bureau/rockbox-devtree/rockbox/buidl$ ../utils/analysis/find_addr.pl 0x600CE9D0 1
/home/jean-louis/Bureau/rockbox-devtree/rockbox/buidl/firmware/libfirmware.a(usb.o) ->
for the data abort:
jean-louis@debian:~/Bureau/rockbox-devtree/rockbox/buidl$ ../utils/analysis/find_addr.pl 0x60072160 1
/home/jean-louis/Bureau/rockbox-devtree/rockbox/buidl/firmware/libfirmware.a(font_cache.o) ->
jean-louis@debian:~/Bureau/rockbox-devtree/rockbox/buidl$ ../utils/analysis/find_addr.pl 0x00074665 1
/home/jean-louis/Bureau/rockbox-devtree/rockbox/buidl/firmware/libfirmware.a(thread.o) -> threads
jean-louis@debian:~/Bureau/rockbox-devtree/rockbox/buidl$ ../utils/analysis/find_addr.pl 0x60000230 1/home/jean-louis/Bureau/rockbox-devtree/rockbox/buidl/firmware/target/arm/imx233/crt0.o -> start
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Friday, 16 December 2011, 19:35 GMT
on those data abort here is the output from dmesg:
[ 60.388239] usb 3-1.2: new high speed USB device number 4 using ehci_hcd
[ 60.689300] usb 3-1.2: New USB device found, idVendor=0781, idProduct=74e1
[ 60.689310] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 60.689316] usb 3-1.2: Product: Rockbox media player
[ 60.689321] usb 3-1.2: Manufacturer: Rockbox.org
[ 60.716847] scsi7 : usb-storage 3-1.2:1.0
[ 60.719163] input: Rockbox.org Rockbox media player as /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.2/3-1.2:1.1/input/input15
[ 60.719620] generic-usb 0003:0781:74E1.0003: input,hidraw2: USB HID v1.10 Keyboard [Rockbox.org Rockbox media player] on usb-0000:00:1d.0-1.2/input1
[ 61.719379] scsi 7:0:0:0: Direct-Access Rockbox Internal Storage 0.00 PQ: 0 ANSI: 4
[ 61.721372] scsi 7:0:0:1: Direct-Access Rockbox SD Card Slot 0.00 PQ: 0 ANSI: 4
[ 61.721591] scsi: killing requests for dead queue
[ 61.721834] scsi: killing requests for dead queue
[ 61.722041] scsi: killing requests for dead queue
[ 61.722219] scsi: killing requests for dead queue
[ 61.722378] scsi: killing requests for dead queue
[ 61.722529] scsi: killing requests for dead queue
[ 61.722679] scsi: killing requests for dead queue
[ 61.722789] scsi: killing requests for dead queue
[ 61.725391] sd 7:0:0:0: [sdd] 7748864 2048-byte logical blocks: (15.8 GB/14.7 GiB)
[ 61.728387] sd 7:0:0:0: [sdd] Write Protect is off
[ 61.728401] sd 7:0:0:0: [sdd] Mode Sense: 0b 00 00 08
[ 61.731091] sd 7:0:0:1: [sde] 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB)
[ 61.732416] sd 7:0:0:0: [sdd] No Caching mode page present
[ 61.732428] sd 7:0:0:0: [sdd] Assuming drive cache: write through
[ 61.734385] sd 7:0:0:1: [sde] Write Protect is off
[ 61.734394] sd 7:0:0:1: [sde] Mode Sense: 0b 00 00 08
[ 61.742882] sd 7:0:0:1: [sde] No Caching mode page present
[ 61.742893] sd 7:0:0:1: [sde] Assuming drive cache: write through
[ 61.746691] sd 7:0:0:0: [sdd] 7748864 2048-byte logical blocks: (15.8 GB/14.7 GiB)
[ 61.753681] sd 7:0:0:0: [sdd] No Caching mode page present
[ 61.753692] sd 7:0:0:0: [sdd] Assuming drive cache: write through
[ 61.757876] sdd: sdd1
[ 61.759721] sd 7:0:0:1: [sde] No Caching mode page present
[ 61.759728] sd 7:0:0:1: [sde] Assuming drive cache: write through
[ 61.764146] sde: sde1
[ 61.769977] sd 7:0:0:0: [sdd] 7748864 2048-byte logical blocks: (15.8 GB/14.7 GiB)
[ 61.775960] sd 7:0:0:0: [sdd] No Caching mode page present
[ 61.775969] sd 7:0:0:0: [sdd] Assuming drive cache: write through
[ 61.775976] sd 7:0:0:0: [sdd] Attached SCSI removable disk
[ 61.786956] sd 7:0:0:1: [sde] No Caching mode page present
[ 61.786966] sd 7:0:0:1: [sde] Assuming drive cache: write through
[ 61.786972] sd 7:0:0:1: [sde] Attached SCSI removable disk
[ 63.166933] FAT-fs (sdd1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 63.491700] FAT-fs (sde1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Comment by amaury pouly (pamaury) - Friday, 16 December 2011, 21:04 GMT
The bootloader is not compiled with sd detection so if the sd card is not plugged at boot, it will not be reported to the host in bootloader usb mode. As for the division by 0, it's probably because of the disk_sector_multiplier which get set to 0, don't know why. The data abort is a bit strange however.
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Friday, 16 December 2011, 21:20 GMT
actually I've got also problem with usb connection even without sd since last update: sometimes the normal usb mode just hang. HID is still worjing but the screen get some corruption and the player remains in usb mode idle after deconnection
Comment by Andrej (rarog) - Sunday, 18 December 2011, 23:45 GMT
Ok, here are my testing results. I reflashed firmware and put the rockbox with revision r31355.

a) Starting in boot mode by connecting without sd and inserting sd provokes following error: "Divide by zero at 6010C4DC"-
b) Starting in boot mode by connecting with sd card shows both drives, removing the sd also removes the sd card from list of mountable drives, reinserting the sd doesn't bring the drive into the list back, but neither provokes any error.
c) Starting rockbox and connecting via usb without sd and inserting it doesn't bring the card to the list of mountable drives. After this removing and reinserting the card doesn't bring it back until the rolo.
d) Starting rockbox and connecting via usb with sd card, then removing it, removes the drive from the list, after this it duplicates the behavior of case c).

If the card wasn't inserted properly and jumps out again a panic is provoked, but this should be the desired behavior by now.
Comment by Andrej (rarog) - Monday, 19 December 2011, 01:08 GMT
r31356 instantly fixed cases a) and changed c) and d), no more division by zero.

If connected to usb and sd card is inserted for the first time, it is recognized and offered to mount, removing it, removes the offer to mount it, reinserting doesn't offer it to mount again. This happens equally in bootloader and in normal rockbox usb mode.
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Monday, 19 December 2011, 12:54 GMT
the issue I reported were related to theme lebellium Samsung-like and doesn't happen otherwise.
the divide by zero issue is still there with last source
Comment by Andrej (rarog) - Monday, 19 December 2011, 13:24 GMT
Which address is shown for you? Your source is r31356 or later?
Comment by Jean-Louis Biasini (JeanLouisBiasini) - Monday, 19 December 2011, 14:13 GMT
r31360. divide by zero the very same address. And it's related to mount the device. Sometimes my usb automount in gnome get confused and do not automount devices anymore. If I mount manually the sd, it goes into divided by zero. Another interesting thing is that when booting with sd in, the bootloader show sd device and sd (for example as /dev/sde and /dev/sde1) but when booting without sd in, the sd device shows up but no partition (only /dev/sde) even after inserting sd. The divide by zero occurs if I try to mount the device (i.e. /dev/sde) unstead of the partition (i.e /dev/sde1). So I suppose the insertion get correctly detected: gnome usually try to mount it. But the sd driver does not give the right address to the partition?
Comment by Andrej (rarog) - Monday, 19 December 2011, 15:45 GMT
Do you boot in boot mode by plugging your device into an off fuze+ or normal rockbox boot and then connecting to usb? Did you re-flash the firmware? The last change also changes boot mode behavior.

Also, does the same divide by zero occur if you don't use gnome for mounting and use console instead to mount manually?
Comment by Andrej (rarog) - Tuesday, 20 December 2011, 00:41 GMT
Ok, now that according to IRC logs, this doesn't happen to for Jean-Louis Biasini anymore, this can bug can be closed. I'm removing the reference to this bug from the wiki and bump SD support to 100%.
Comment by Andrej (rarog) - Friday, 06 January 2012, 12:18 GMT
I tested the bug reported in the forum that only the internal drive is shown with Windows and I can confirm this. I disabled USB-HID in Rockbox to have pure mass storage USB in Windows and connected with Rockbox and with OF. I attach the report made by USBDeview tool.
Comment by Andrej (rarog) - Friday, 06 January 2012, 12:46 GMT
I cleaned CurrentControlSet of the registry and connected with OF and Rockbox, I attached the settings created in the registry.
Comment by Michael Rodger (megal0maniac) - Friday, 27 January 2012, 22:17 GMT
This is still an issue for me as of d684858. Only in Windows though. Regardless of whether I plug USB in with the player off, or on with HID enabled.
SD card pops up in Linux, and on Windows with Clip+, but not with the Fuze+ and Windows...
Comment by Dmitry (Mystos) - Monday, 13 February 2012, 20:04 GMT
I am sorry for my bad English. I use the translator.

I have put today Rockbox on the Fuze +. Has found out the similar problem described in 12458. Internal memory and SD card are not mounted in Windows simultaneously. If parametre USB Hide Internal Drive = YES - mounted internal memory. If USB Hide Internal Drive = NO - mounted SD card.
Comment by Dmitry (Mystos) - Monday, 13 February 2012, 21:30 GMT
Excuse me, I was mistaken.
If parametre USB Hide Internal Drive = NO - mounted internal memory. If USB Hide Internal Drive = YES - mounted SD card.
Comment by mysiak (mysiak) - Tuesday, 14 February 2012, 14:29 GMT
I confirm the same behavior - rockbox doesn't show both drives at once, I can access only internal memory (USB Hide Internal Drive = NO) or memory card (USB Hide Internal Drive = YES). HID settings doesn't impact this - doesn't matter if On or Off
Comment by Andrej (rarog) - Saturday, 03 March 2012, 10:09 GMT
This is what following command tells me:
sudo sdparm -all -v /dev/sde

sde is in currenct configuration the internal drive.
Rockbox doesn't give any specific information it seems.

Loading...