-/* $Id: atapi.c,v 1.8 2002/03/03 19:37:41 ekohl Exp $
+/* $Id: atapi.c,v 1.9 2002/03/04 22:31:06 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS ATAPI miniport driver
return(FALSE);
}
- DevExt->ExpectingInterrupt = FALSE;
-
Srb = DevExt->CurrentSrb;
DPRINT("Srb: %p\n", Srb);
switch (Srb->Cdb[0])
{
case SCSIOP_READ:
- DPRINT1("SCSIOP_READ\n");
+ DPRINT("SCSIOP_READ\n");
/* Update controller/device state variables */
TargetAddress = Srb->DataBuffer;
// DevExt->SectorsTransferred++;
/* Remember whether DRQ should be low at end (last block read) */
- IsLastBlock = Srb->DataTransferLength == 0;
+ IsLastBlock = (Srb->DataTransferLength == 0);
+ DPRINT("IsLastBlock == %s\n", (IsLastBlock)?"TRUE":"FALSE");
/* Wait for DRQ assertion */
for (Retries = 0; Retries < IDE_MAX_DRQ_RETRIES &&
case SCSIOP_WRITE:
DPRINT1("AtapiInterrupt(): SCSIOP_WRITE not implemented yet!\n");
RequestIsComplete = TRUE;
+ IsLastBlock = TRUE;
break;
}
}
#endif
}
- ScsiPortNotification(RequestComplete,
- DeviceExtension,
- Srb);
+ if (IsLastBlock)
+ {
+ DevExt->ExpectingInterrupt = FALSE;
- ScsiPortNotification(NextRequest,
- DeviceExtension,
- NULL);
+ ScsiPortNotification(RequestComplete,
+ DeviceExtension,
+ Srb);
+ ScsiPortNotification(NextRequest,
+ DeviceExtension,
+ NULL);
+ }
+}
DPRINT("AtapiInterrupt() done!\n");
-/* $Id: class2.c,v 1.8 2002/03/03 23:45:30 ekohl Exp $
+/* $Id: class2.c,v 1.9 2002/03/04 22:31:22 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
{
IoMarkIrpPending(Irp);
}
+#endif
if (DeviceExtension->ClassStartIo != NULL)
{
FALSE);
}
}
-#endif
DPRINT1("ScsiClassIoComplete() done (Status %lx)\n", Status);
-/* $Id: disk.c,v 1.6 2002/03/01 23:18:35 ekohl Exp $
+/* $Id: disk.c,v 1.7 2002/03/04 22:31:35 ekohl Exp $
*
*/
}
DiskDeviceExtension = DiskDeviceObject->DeviceExtension;
-// DiskData = (PDISK_DEVICE_EXTENSION)((PUCHAR)DiskDeviceExtension + sizeof(DEVICE_EXTENSION));
-
DiskDeviceExtension->LockCount = 0;
DiskDeviceExtension->DeviceNumber = DiskNumber;
DiskDeviceExtension->PortDeviceObject = PortDeviceObject;
if (!NT_SUCCESS(Status))
{
/* Drive is not ready. */
-// diskData->DriveNotReady = TRUE;
+ DPRINT1("Drive not ready\n");
+ DiskData->DriveNotReady = TRUE;
}
else
{
Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
Irp->IoStatus.Information = 0;
}
+ else if (DeviceExtension->DiskGeometry == NULL)
+ {
+ DPRINT1("No disk geometry available!\n");
+ Irp->IoStatus.Status = STATUS_NO_SUCH_DEVICE;
+ Irp->IoStatus.Information = 0;
+ }
else
{
PDISK_GEOMETRY Geometry;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: scsiport.c,v 1.8 2002/03/03 23:46:01 ekohl Exp $
+/* $Id: scsiport.c,v 1.9 2002/03/04 22:31:51 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
{
case SRB_FUNCTION_EXECUTE_SCSI:
DPRINT1(" SRB_FUNCTION_EXECUTE_SCSI\n");
-
- switch (Srb->Cdb[0])
- {
-#if 0
- case SCSIOP_INQUIRY:
- case SCSIOP_READ_CAPACITY:
- DeviceExtension->Initializing = TRUE;
- if(DeviceExtension->HwStartIo(&DeviceExtension->MiniPortDeviceExtension,
- Srb) == TRUE)
- Status = STATUS_SUCCESS;
- else
- Status = STATUS_UNSUCCESSFUL;
- DeviceExtension->Initializing = FALSE;
- break;
-#endif
-
- default:
- DPRINT1("Starting packet!\n");
- IoStartPacket(DeviceObject, Irp, NULL, NULL);
- DPRINT1("Returning STATUS_PENDING\n");
- return(STATUS_PENDING);
- }
- break;
+ IoStartPacket(DeviceObject, Irp, NULL, NULL);
+ DPRINT1("Returning STATUS_PENDING\n");
+ return(STATUS_PENDING);
case SRB_FUNCTION_CLAIM_DEVICE:
{
PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN Result;
- DPRINT1("ScsiPortIsr() called!\n");
+ DPRINT("ScsiPortIsr() called!\n");
DeviceExtension = (PSCSI_PORT_DEVICE_EXTENSION)ServiceContext;
return(FALSE);
}
- IoRequestDpc(DeviceExtension->DeviceObject,
- DeviceExtension->CurrentIrp,
- DeviceExtension);
+ if (DeviceExtension->IrpFlags)
+ {
+ IoRequestDpc(DeviceExtension->DeviceObject,
+ DeviceExtension->CurrentIrp,
+ DeviceExtension);
+ }
return(TRUE);
}