mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
- Execute the reset command previous the present test for each unit (master/slave).
svn path=/trunk/; revision=10859
This commit is contained in:
parent
5ad00f54e3
commit
581f980ede
1 changed files with 22 additions and 24 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: atapi.c,v 1.53 2004/09/12 18:50:03 weiden Exp $
|
||||
/* $Id: atapi.c,v 1.54 2004/09/14 22:09:06 hbirr Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS ATAPI miniport driver
|
||||
|
@ -1138,8 +1138,18 @@ AtapiFindDevices(PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
for (UnitNumber = 0; UnitNumber < 2; UnitNumber++)
|
||||
{
|
||||
/* Skip initilization of non-existent units */
|
||||
if (!UnitPresent[UnitNumber])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Select drive */
|
||||
IDEWriteDriveHead(CommandPortBase, IDE_DH_FIXED |
|
||||
(UnitNumber ? IDE_DH_DRV1 : IDE_DH_DRV0));
|
||||
/* Soft reset */
|
||||
IDEWriteDriveHead(CommandPortBase, IDE_DH_FIXED);
|
||||
IDEWriteDriveControl(ControlPortBase, IDE_DC_SRST);
|
||||
ScsiPortStallExecution(500);
|
||||
IDEWriteDriveControl(ControlPortBase, IDE_DC_nIEN);
|
||||
|
@ -1161,18 +1171,6 @@ AtapiFindDevices(PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
|||
}
|
||||
}
|
||||
|
||||
for (UnitNumber = 0; UnitNumber < 2; UnitNumber++)
|
||||
{
|
||||
/* Skip initilization of non-existent units */
|
||||
if (!UnitPresent[UnitNumber])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Select drive */
|
||||
IDEWriteDriveHead(CommandPortBase, IDE_DH_FIXED |
|
||||
(UnitNumber ? IDE_DH_DRV1 : IDE_DH_DRV0));
|
||||
|
||||
High = IDEReadCylinderHigh(CommandPortBase);
|
||||
Low = IDEReadCylinderLow(CommandPortBase);
|
||||
|
||||
|
|
Loading…
Reference in a new issue