Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8943 - USB Storage connection makes ata.c disable disk spindown

Attached to Project: Rockbox
Opened by Frank Gevaerts (fg) - Sunday, 27 April 2008, 21:29 GMT+2
Last edited by Frank Gevaerts (fg) - Thursday, 02 October 2008, 23:02 GMT+2
Task Type Bugs
Category Drivers
Status Closed
Assigned To No-one
Player Type PortalPlayer-based
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

ata.c calls usb_wait_for_disconnect() after receiving a SYS_USB_CONNECTED event. This may be correct for hardware ATA/USB bridges, but it is wrong for the rockbox usb stack, because it also disables other events, some of which seem to be used to manage sleep timeouts.

I don't know enough about ata.c to actually touch this, but probaby just make disable usb_wait_for_disconnect() if USE_ROCKBOX_USB and HAVE_USBSTACK are defined is enough (both, because USE_ROCKBOX_USB will probably disappear at some point).
This task depends upon

Closed by  Frank Gevaerts (fg)
Thursday, 02 October 2008, 23:02 GMT+2
Reason for closing:  Accepted
Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 27 August 2008, 15:36 GMT+2
Here is a quick *untested* patch to fix this issue.
   ata_idle_for_swusb.patch (2.6 KiB)
 firmware/drivers/ata.c |   31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

Comment by Bryan Childs (GodEater) - Wednesday, 27 August 2008, 15:58 GMT+2
Just applied this to a build for my Gigabeat S (along with #9312) - no madly spinning disk, everything else appears to work as expected.
Comment by Bryan Childs (GodEater) - Monday, 01 September 2008, 14:03 GMT+2
I spoke too soon.

Whilst this does seem to work okay in conjunction with charging - it does intefer with the USB MSC code. Doing anything to the disk while it's hooked up over USB completely hosed the filesystem. Twice! (I'm a glutton for punishment!)

Comment by Frank Gevaerts (fg) - Monday, 01 September 2008, 14:23 GMT+2
All results between r18327 and r18370 are suspect, since it seems that MSC was really buggy there on everything but sansa (causing massive corruption even without this patch)
Comment by Jacob Brooks (jac0b) - Monday, 01 September 2008, 15:38 GMT+2
Yeah I was having a problem with this a couple days ago with a my build made on 08-28-2008 (I forgot the rev. #). I was transferring about 24GB to my mp3 player and after a while it would freeze my system or just disconnect and when turned back on nothing was there but a bunch of files with weird file names. I did smaller transfers which seemed to work.

Loading...