Rockbox

Tasklist

FS#9986 - Portal Player USB Stack is not working properly with LBA48

Attached to Project: Rockbox
Opened by Brian Sutherland (rmaniac) - Thursday, 05 March 2009, 21:20 GMT
Last edited by Frank Gevaerts (fg) - Thursday, 05 March 2009, 22:53 GMT
Task Type Bugs
Category Bootloader
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Seems to be some issues with LBA48 with the USB code I have been running 3.1 on my iPod 5.5G with a 240GB drive. I have it all patched and working. I decided to try out the usb stack. So I recompiled the daily build from today with my usual patches and changes for the large drive. I plugged it in and saw it on my powerbook.. but the finder could never really see the files.. then I plugged it into a linux box.. which saw the files and showed the right amount of space available and filled but my whole Ogg dir was empty! There was some 180GB or so of Oggs in there.. I am now re-rsyncing those files.

I just did some more testing.. When I look under disk utility while using the RB USB Stack it reports this:
128GB Toshiba MK2431GAH Media
Capacity : 127.9 GB (137,307,346,944 Bytes)
Available : 213.0 GB (228,728,569,856 Bytes)

On the Apple firmware it says:
223.6GB Apple iPod Media
Capacity : 223.4 GB (239,925,803,008 Bytes)
Available : 213.0 GB (228,728,012,800 Bytes)

The boot firmware and rockbox itself seem to be respecting my LBA48 define but the USB stack is not. This is something that should be looked into I expect.
This task depends upon

Closed by  Frank Gevaerts (fg)
Thursday, 05 March 2009, 22:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r20208
Comment by Frank Gevaerts (fg) - Thursday, 05 March 2009, 21:35 GMT
Can you post the linux dmesg output for both the OF and rockbox?
Comment by Brian Sutherland (rmaniac) - Thursday, 05 March 2009, 21:44 GMT
The top part is the apple firmware (it's labeled as such) the bottom is the RB Firmware and the errors that follow (more than you need I expect)
   two.dmsg (8.1 KiB)
Comment by Frank Gevaerts (fg) - Thursday, 05 March 2009, 22:02 GMT
OK. This is unrelated to LBA48. What actually happens is that the sector size is wrong somewhere. I'm trying to find out where exactly
Comment by Frank Gevaerts (fg) - Thursday, 05 March 2009, 22:03 GMT
Actually no. It's something else again...
Comment by Brian Sutherland (rmaniac) - Thursday, 05 March 2009, 22:05 GMT
Also to allow this drive to work I added/changed these things in the config-ipodvideo.h:

/* Add LBA48 for my 240GB */
#define HAVE_LBA48

/* define this if the device has larger sectors when accessed via USB */
/* (only relevant in disk.c, fat.c now always supports large virtual sectors) */
#define MAX_LOG_SECTOR_SIZE 16384

/* define this if the hard drive uses large physical sectors (ATA-7 feature) */
/* and doesn't handle them in the drive firmware */
#define MAX_PHYS_SECTOR_SIZE 4096

Comment by Frank Gevaerts (fg) - Thursday, 05 March 2009, 22:17 GMT
OK. This seems to be LBA48 after all. Can you try again with r20208?
Comment by Brian Sutherland (rmaniac) - Thursday, 05 March 2009, 22:46 GMT
As you can see this looks much happier. One thing I find interesting though... when I flash my firmware it says the drive has 2048 byte sectors.. and so does this
dmesg.. As you can see above I set it to 4096.. the reason for that was when I boot a standard iPod Video build it says that it does not support 4096 sectors.. So I assumed
that was the setting I needed. So I guess my question is.. should I try to set my sector size to a lower value in the config? Is it hurting anything as it is? Lack of ram, speed, anything?


Comment by Frank Gevaerts (fg) - Thursday, 05 March 2009, 22:52 GMT
It shouldn't hurt, but I don't really know. Anyway that discussion doesn't really belong here I think.

Loading...