mirror of
https://github.com/reactos/reactos.git
synced 2024-11-02 12:53:33 +00:00
Gracefully handle the case where the BIOS insists there is a floppy drive, but there is no controller. Patch by Cameron Gutman (aicommander at gmail dot com) from Bug 1508.
svn path=/trunk/; revision=28899
This commit is contained in:
parent
f63bea010c
commit
77a5b5a508
|
@ -687,6 +687,22 @@ static NTSTATUS NTAPI InitController(PCONTROLLER_INFO ControllerInfo)
|
|||
return STATUS_IO_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
/* Check if floppy drive exists */
|
||||
if(HwSenseInterruptStatus(ControllerInfo) != STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT("floppy: Floppy drive not detected! Returning STATUS_IO_DEVICE_ERROR\n");
|
||||
return STATUS_IO_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
DPRINT("floppy: InitController: resetting the controller after floppy detection\n");
|
||||
|
||||
/* Reset the controller */
|
||||
if(HwReset(ControllerInfo) != STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT("floppy: InitController: unable to reset controller\n");
|
||||
return STATUS_IO_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
DPRINT("floppy: InitController: setting data rate\n");
|
||||
|
||||
/* Set data rate */
|
||||
|
|
Loading…
Reference in a new issue