Fix sector size for AT LBA drives at 512 bytes

svn path=/trunk/; revision=3889
This commit is contained in:
Gé van Geldorp 2002-12-22 11:38:41 +00:00
parent 67cf4a374e
commit ccf4643b4c

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: atapi.c,v 1.34 2002/12/15 00:23:31 sedwards Exp $ /* $Id: atapi.c,v 1.35 2002/12/22 11:38:41 gvg Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS ATAPI miniport driver * PROJECT: ReactOS ATAPI miniport driver
@ -1372,6 +1372,13 @@ AtapiIdentifyDevice(IN ULONG CommandPort,
DrvParms->TMSectorCountLo, DrvParms->TMSectorCountLo,
(ULONG)((DrvParms->TMSectorCountHi << 16) + DrvParms->TMSectorCountLo)); (ULONG)((DrvParms->TMSectorCountHi << 16) + DrvParms->TMSectorCountLo));
if (! Atapi && 0 != (DrvParms->Capabilities & IDE_DRID_LBA_SUPPORTED))
{
/* LBA ATA drives always have a sector size of 512 */
DrvParms->BytesPerSector = 512;
}
else
{
DPRINT("BytesPerSector %d\n", DrvParms->BytesPerSector); DPRINT("BytesPerSector %d\n", DrvParms->BytesPerSector);
if (DrvParms->BytesPerSector == 0) if (DrvParms->BytesPerSector == 0)
{ {
@ -1388,6 +1395,7 @@ AtapiIdentifyDevice(IN ULONG CommandPort,
} }
} }
} }
}
DPRINT("BytesPerSector %d\n", DrvParms->BytesPerSector); DPRINT("BytesPerSector %d\n", DrvParms->BytesPerSector);
return(TRUE); return(TRUE);