* 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.10 2002/03/08 11:59:49 ekohl Exp $
+/* $Id: class2.c,v 1.11 2002/03/20 19:55:08 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
StartingOffset = CurrentIrpStack->Parameters.Read.ByteOffset;
/* calculate logical block address */
- StartingBlock.QuadPart = StartingOffset.QuadPart / 512; // >> deviceExtension->SectorShift;
+ StartingBlock.QuadPart = StartingOffset.QuadPart >> DeviceExtension->SectorShift;
LogicalBlockAddress = (ULONG)StartingBlock.u.LowPart;
DPRINT("Logical block address: %lu\n", LogicalBlockAddress);
Srb->TargetId = DeviceExtension->TargetId;
Srb->Lun = DeviceExtension->Lun;
Srb->Function = SRB_FUNCTION_EXECUTE_SCSI;
- Srb->DataBuffer = MmGetMdlVirtualAddress(Irp->MdlAddress);
+ Srb->DataBuffer = MmGetSystemAddressForMdl(Irp->MdlAddress);
Srb->DataTransferLength = CurrentIrpStack->Parameters.Read.Length;
Srb->QueueAction = SRB_SIMPLE_TAG_REQUEST;
Srb->QueueSortKey = LogicalBlockAddress;
PIRP Irp;
*PortCapabilities = NULL;
- Buffer = ExAllocatePool(NonPagedPool, /* FIXME: use paged pool */
+ Buffer = ExAllocatePool(NonPagedPool,
sizeof(IO_SCSI_CAPABILITIES));
if (Buffer == NULL)
{
KEVENT Event;
PIRP Irp;
- DPRINT1("ScsiClassGetInquiryData() called\n");
+ DPRINT("ScsiClassGetInquiryData() called\n");
*ConfigInfo = NULL;
Buffer = ExAllocatePool(NonPagedPool,
*ConfigInfo = Buffer;
}
- DPRINT1("ScsiClassGetInquiryData() done\n");
+ DPRINT("ScsiClassGetInquiryData() done\n");
return(Status);
}
DeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
- CapacityBuffer = ExAllocatePool(NonPagedPool, //NonPagedPoolCacheAligned,
+ CapacityBuffer = ExAllocatePool(NonPagedPool,
sizeof(READ_CAPACITY_DATA));
if (CapacityBuffer == NULL)
{
TransferLength = IrpStack->Parameters.Read.Length;
-
-
if ((DeviceObject->Flags & DO_VERIFY_VOLUME) &&
!(IrpStack->Flags & SL_OVERRIDE_VERIFY_VOLUME))
{
IrpStack->Parameters.Read.Length);
#if 0
- if (IrpStack->Parameters.Read.Length > maximumTransferLength ||
+ if (TransferLength > maximumTransferLength ||
TransferPages > DeviceExtension->PortCapabilities->MaximumPhysicalPages)
{
-
+ /* FIXME: split request */
}
#endif