1
0
Fork 0
forked from len0rd/rockbox

remember to test a bit more when doing larger changes...

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16621 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2008-03-10 21:16:31 +00:00
parent 5731d37894
commit a0290607e0
2 changed files with 8 additions and 4 deletions

View file

@ -303,16 +303,20 @@ static void usb_thread(void)
#endif
usb_state = USB_EXTRACTED;
#ifdef HAVE_USBSTACK
if(exclusive_ata_access)
{
exclusive_ata_access = false;
#endif
/* Tell all threads that we are back in business */
num_acks_to_expect =
queue_broadcast(SYS_USB_DISCONNECTED, 0) - 1;
waiting_for_ack = true;
DEBUGF("USB extracted. Waiting for ack from %d threads...\n",
num_acks_to_expect);
#ifdef HAVE_USBSTACK
}
#endif
break;
case SYS_USB_DISCONNECTED_ACK:

View file

@ -262,7 +262,7 @@ static enum {
SENDING_CSW
} state = WAITING_FOR_COMMAND;
static bool check_disk_present(int volume)
static bool check_disk_present(IF_MV(int volume))
{
unsigned char sector[512];
return ata_read_sectors(IF_MV2(volume,)0,1,sector) == 0;
@ -290,7 +290,7 @@ static void try_release_ata(void)
void usb_storage_notify_hotswap(int volume,bool inserted)
{
logf("notify %d",inserted);
if(inserted && check_disk_present(volume)) {
if(inserted && check_disk_present(IF_MV(volume))) {
ejected[volume] = false;
}
else {
@ -305,7 +305,7 @@ void usb_storage_reconnect(void)
{
int i;
for(i=0;i<NUM_VOLUMES;i++)
ejected[i] = !check_disk_present(i);
ejected[i] = !check_disk_present(IF_MV(i));
usb_request_exclusive_ata();
}
@ -315,7 +315,7 @@ void usb_storage_init(void)
{
int i;
for(i=0;i<NUM_VOLUMES;i++) {
ejected[i] = !check_disk_present(i);
ejected[i] = !check_disk_present(IF_MV(i));
}
logf("usb_storage_init done");
}