forked from len0rd/rockbox
only reconnect mass storage if there is actually an active usb connection, with mass storage enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17098 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b90a766d01
commit
be77cf5279
1 changed files with 6 additions and 3 deletions
|
|
@ -306,11 +306,14 @@ void usb_storage_notify_hotswap(int volume,bool inserted)
|
||||||
void usb_storage_reconnect(void)
|
void usb_storage_reconnect(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
if(usb_core_driver_enabled(USB_DRIVER_MASS_STORAGE)
|
||||||
|
&& usb_inserted()) {
|
||||||
for(i=0;i<NUM_VOLUMES;i++)
|
for(i=0;i<NUM_VOLUMES;i++)
|
||||||
ejected[i] = !check_disk_present(IF_MV(i));
|
ejected[i] = !check_disk_present(IF_MV(i));
|
||||||
|
|
||||||
usb_request_exclusive_ata();
|
usb_request_exclusive_ata();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* called by usb_code_init() */
|
/* called by usb_code_init() */
|
||||||
void usb_storage_init(void)
|
void usb_storage_init(void)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue