From 4fd3b07f1da6aab02724738e50d1d6173d0701f9 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 22 Mar 2002 23:06:58 +0000 Subject: [PATCH] Started using lookaside lists for SRBs. Fixed a typo. svn path=/trunk/; revision=2769 --- reactos/drivers/storage/class2/class2.c | 35 ++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/storage/class2/class2.c b/reactos/drivers/storage/class2/class2.c index dd4f0bfe93d..6815b416d68 100644 --- a/reactos/drivers/storage/class2/class2.c +++ b/reactos/drivers/storage/class2/class2.c @@ -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: class2.c,v 1.12 2002/03/22 20:34:15 ekohl Exp $ +/* $Id: class2.c,v 1.13 2002/03/22 23:06:58 ekohl Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -42,6 +42,8 @@ #define VERSION "0.0.1" +#define TAG_SRBT TAG('S', 'r', 'b', 'T') + #define INQUIRY_DATA_SIZE 2048 @@ -671,11 +673,38 @@ ScsiClassInitialize(PVOID Argument1, } +/********************************************************************** + * NAME EXPORTED + * ScsiClassInitializeSrbLookasideList + * + * DESCRIPTION + * Initializes a lookaside list for SRBs. + * + * RUN LEVEL + * PASSIVE_LEVEL + * + * ARGUMENTS + * DeviceExtension + * Class specific device extension. + * + * NumberElements + * Maximum number of elements of the lookaside list. + * + * RETURN VALUE + * None. + */ + VOID STDCALL ScsiClassInitializeSrbLookasideList(PDEVICE_EXTENSION DeviceExtension, ULONG NumberElements) { - UNIMPLEMENTED; + ExInitializeNPagedLookasideList(&DeviceExtension->SrbLookasideListHead, + NULL, + NULL, + NonPagedPool, + sizeof(SCSI_REQUEST_BLOCK), + TAG_SRBT, + (USHORT)NumberElements); } @@ -879,7 +908,7 @@ ScsiClassReadDriveCapacity(IN PDEVICE_OBJECT DeviceObject) sizeof(DISK_GEOMETRY)); DeviceExtension->DiskGeometry->BytesPerSector = 512; DeviceExtension->SectorShift = 9; - DeviceExtension->Partitionlength.QuadPart = 0; + DeviceExtension->PartitionLength.QuadPart = 0; if (DeviceObject->Characteristics & FILE_REMOVABLE_MEDIA) {