forked from len0rd/rockbox
Now runs SET_MULTIPLE_MODE after usb disconnect, since the windows driver sets it to a non-default value.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2214 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e82f701fa4
commit
34fa70e321
1 changed files with 22 additions and 0 deletions
|
|
@ -661,6 +661,26 @@ static int identify(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int set_multiple_mode(int sectors)
|
||||
{
|
||||
if(!wait_for_rdy()) {
|
||||
DEBUGF("set_multiple_mode() - not RDY\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ATA_SELECT = ata_device;
|
||||
ATA_NSECTOR = sectors;
|
||||
ATA_COMMAND = CMD_SET_MULTIPLE_MODE;
|
||||
|
||||
if (!wait_for_rdy())
|
||||
{
|
||||
DEBUGF("set_multiple_mode() - CMD failed\n");
|
||||
return -2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ata_init(void)
|
||||
{
|
||||
mutex_init(&ata_mtx);
|
||||
|
|
@ -692,6 +712,8 @@ int ata_init(void)
|
|||
sizeof(ata_stack), ata_thread_name);
|
||||
initialized = true;
|
||||
}
|
||||
if (set_multiple_mode(multisectors))
|
||||
return -6;
|
||||
|
||||
ATA_SELECT = SELECT_LBA;
|
||||
ATA_CONTROL = CONTROL_nIEN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue