mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:45:41 +00:00
Implemented ATAPI support.
svn path=/trunk/; revision=2739
This commit is contained in:
parent
5731706583
commit
42922e8b27
1 changed files with 135 additions and 188 deletions
|
@ -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.13 2002/03/16 16:13:57 ekohl Exp $
|
/* $Id: atapi.c,v 1.14 2002/03/19 00:48:52 ekohl 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
|
||||||
|
@ -480,7 +480,7 @@ AtapiFindIsaBusController(PVOID DeviceExtension,
|
||||||
BOOLEAN ChannelFound = FALSE;
|
BOOLEAN ChannelFound = FALSE;
|
||||||
BOOLEAN DeviceFound = FALSE;
|
BOOLEAN DeviceFound = FALSE;
|
||||||
|
|
||||||
DPRINT1("AtapiFindIsaBusController() called!\n");
|
DPRINT("AtapiFindIsaBusController() called!\n");
|
||||||
|
|
||||||
*Again = FALSE;
|
*Again = FALSE;
|
||||||
|
|
||||||
|
@ -538,7 +538,7 @@ AtapiFindIsaBusController(PVOID DeviceExtension,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("AtapiFindIsaBusController() both channels claimed. Returns: SP_RETURN_NOT_FOUND\n");
|
DPRINT("AtapiFindIsaBusController() both channels claimed. Returns: SP_RETURN_NOT_FOUND\n");
|
||||||
*Again = FALSE;
|
*Again = FALSE;
|
||||||
return(SP_RETURN_NOT_FOUND);
|
return(SP_RETURN_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
@ -550,7 +550,7 @@ AtapiFindIsaBusController(PVOID DeviceExtension,
|
||||||
ConfigInfo);
|
ConfigInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("AtapiFindIsaBusController() returns: SP_RETURN_FOUND\n");
|
DPRINT("AtapiFindIsaBusController() returns: SP_RETURN_FOUND\n");
|
||||||
return(SP_RETURN_FOUND);
|
return(SP_RETURN_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -655,11 +655,11 @@ AtapiInterrupt(IN PVOID DeviceExtension)
|
||||||
|
|
||||||
UCHAR DeviceStatus;
|
UCHAR DeviceStatus;
|
||||||
BOOLEAN IsLastBlock;
|
BOOLEAN IsLastBlock;
|
||||||
|
BOOLEAN IsAtapi;
|
||||||
ULONG Retries;
|
ULONG Retries;
|
||||||
NTSTATUS ErrorStatus;
|
|
||||||
ULONG ErrorInformation;
|
|
||||||
PUCHAR TargetAddress;
|
PUCHAR TargetAddress;
|
||||||
ULONG SectorSize;
|
ULONG SectorSize;
|
||||||
|
ULONG TransferSize;
|
||||||
|
|
||||||
|
|
||||||
DPRINT("AtapiInterrupt() called!\n");
|
DPRINT("AtapiInterrupt() called!\n");
|
||||||
|
@ -667,21 +667,21 @@ AtapiInterrupt(IN PVOID DeviceExtension)
|
||||||
DevExt = (PATAPI_MINIPORT_EXTENSION)DeviceExtension;
|
DevExt = (PATAPI_MINIPORT_EXTENSION)DeviceExtension;
|
||||||
if (DevExt->ExpectingInterrupt == FALSE)
|
if (DevExt->ExpectingInterrupt == FALSE)
|
||||||
{
|
{
|
||||||
|
DPRINT1("AtapiInterrupt(): Unexpected interrupt\n");
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
Srb = DevExt->CurrentSrb;
|
Srb = DevExt->CurrentSrb;
|
||||||
|
|
||||||
DPRINT("Srb: %p\n", Srb);
|
DPRINT("Srb: %p\n", Srb);
|
||||||
|
|
||||||
CommandPortBase = DevExt->CommandPortBase;
|
CommandPortBase = DevExt->CommandPortBase;
|
||||||
ControlPortBase = DevExt->ControlPortBase;
|
ControlPortBase = DevExt->ControlPortBase;
|
||||||
|
|
||||||
DPRINT("CommandPortBase: %lx ControlPortBase: %lx\n", CommandPortBase, ControlPortBase);
|
DPRINT("CommandPortBase: %lx ControlPortBase: %lx\n", CommandPortBase, ControlPortBase);
|
||||||
|
|
||||||
|
IsAtapi = DevExt->DeviceAtapi[Srb->TargetId];
|
||||||
|
DPRINT("IsAtapi == %s\n", (IsAtapi) ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
IsLastBlock = FALSE;
|
IsLastBlock = FALSE;
|
||||||
ErrorStatus = STATUS_SUCCESS;
|
|
||||||
ErrorInformation = 0;
|
|
||||||
|
|
||||||
DeviceStatus = IDEReadStatus(CommandPortBase);
|
DeviceStatus = IDEReadStatus(CommandPortBase);
|
||||||
|
|
||||||
|
@ -699,114 +699,131 @@ AtapiInterrupt(IN PVOID DeviceExtension)
|
||||||
SectorCount = IDEReadSectorCount(CommandPortBase);
|
SectorCount = IDEReadSectorCount(CommandPortBase);
|
||||||
SectorNum = IDEReadSectorNum(CommandPortBase);
|
SectorNum = IDEReadSectorNum(CommandPortBase);
|
||||||
|
|
||||||
/* FIXME: should use the NT error logging facility */
|
DPRINT1("ATAPI Error: STAT:%02x ERR:%02x CYLLO:%02x CYLHI:%02x SCNT:%02x SNUM:%02x\n",
|
||||||
DbgPrint("ATAPI Error: OP:%02x STAT:%02x ERR:%02x CYLLO:%02x CYLHI:%02x SCNT:%02x SNUM:%02x\n",
|
DeviceStatus,
|
||||||
0, //DeviceExtension->Operation,
|
ErrorReg,
|
||||||
DeviceStatus,
|
CylinderLow,
|
||||||
ErrorReg,
|
CylinderHigh,
|
||||||
CylinderLow,
|
SectorCount,
|
||||||
CylinderHigh,
|
SectorNum);
|
||||||
SectorCount,
|
|
||||||
SectorNum);
|
|
||||||
|
|
||||||
/* FIXME: should retry the command and perhaps recalibrate the drive */
|
/* FIXME: set a useful status code */
|
||||||
|
Srb->SrbStatus = SRB_STATUS_ERROR;
|
||||||
// Set error status information
|
IsLastBlock = TRUE;
|
||||||
ErrorStatus = STATUS_DISK_OPERATION_FAILED;
|
|
||||||
#if 0
|
|
||||||
ErrorInformation =
|
|
||||||
(((((((CylinderHigh << 8) + CylinderLow) *
|
|
||||||
DeviceExtension->LogicalHeads) +
|
|
||||||
(DriveHead % DeviceExtension->LogicalHeads)) *
|
|
||||||
DeviceExtension->SectorsPerLogTrk) + SectorNum - 1) -
|
|
||||||
DeviceExtension->StartingSector) * DeviceExtension->BytesPerSector;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (Srb->Cdb[0])
|
if (Srb->SrbFlags & SRB_FLAGS_DATA_IN)
|
||||||
{
|
{
|
||||||
case SCSIOP_READ:
|
DPRINT("Read data\n");
|
||||||
DPRINT("SCSIOP_READ\n");
|
|
||||||
|
|
||||||
/* Update controller/device state variables */
|
/* Update controller/device state variables */
|
||||||
SectorSize = DevExt->DeviceParams[Srb->TargetId].BytesPerSector;
|
TargetAddress = Srb->DataBuffer;
|
||||||
TargetAddress = Srb->DataBuffer;
|
|
||||||
Srb->DataBuffer += SectorSize;
|
|
||||||
Srb->DataTransferLength -= SectorSize;
|
|
||||||
|
|
||||||
/* Remember whether DRQ should be low at end (last block read) */
|
if (IsAtapi)
|
||||||
IsLastBlock = (Srb->DataTransferLength == 0);
|
{
|
||||||
DPRINT("IsLastBlock == %s\n", (IsLastBlock)?"TRUE":"FALSE");
|
TransferSize = IDEReadCylinderLow(CommandPortBase);
|
||||||
|
TransferSize += IDEReadCylinderHigh(CommandPortBase) << 8;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TransferSize = DevExt->DeviceParams[Srb->TargetId].BytesPerSector;
|
||||||
|
}
|
||||||
|
|
||||||
/* Wait for DRQ assertion */
|
DPRINT("TransferLength: %lu\n", Srb->DataTransferLength);
|
||||||
for (Retries = 0; Retries < IDE_MAX_DRQ_RETRIES &&
|
DPRINT("TransferSize: %lu\n", TransferSize);
|
||||||
!(IDEReadStatus(CommandPortBase) & IDE_SR_DRQ);
|
|
||||||
Retries++)
|
if (Srb->DataTransferLength <= TransferSize)
|
||||||
{
|
{
|
||||||
|
Srb->DataTransferLength = 0;
|
||||||
|
IsLastBlock = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Srb->DataTransferLength -= TransferSize;
|
||||||
|
IsLastBlock = FALSE;
|
||||||
|
}
|
||||||
|
Srb->DataBuffer += TransferSize;
|
||||||
|
DPRINT("IsLastBlock == %s\n", (IsLastBlock) ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
|
/* Wait for DRQ assertion */
|
||||||
|
for (Retries = 0; Retries < IDE_MAX_DRQ_RETRIES &&
|
||||||
|
!(IDEReadStatus(CommandPortBase) & IDE_SR_DRQ);
|
||||||
|
Retries++)
|
||||||
|
{
|
||||||
KeStallExecutionProcessor(10);
|
KeStallExecutionProcessor(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy the block of data */
|
/* Copy the block of data */
|
||||||
IDEReadBlock(CommandPortBase,
|
IDEReadBlock(CommandPortBase,
|
||||||
TargetAddress,
|
TargetAddress,
|
||||||
SectorSize);
|
TransferSize);
|
||||||
|
|
||||||
/* check DRQ */
|
/* check DRQ */
|
||||||
if (IsLastBlock)
|
if (IsLastBlock)
|
||||||
{
|
{
|
||||||
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES &&
|
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES &&
|
||||||
(IDEReadStatus(CommandPortBase) & IDE_SR_BUSY);
|
(IDEReadStatus(CommandPortBase) & IDE_SR_BUSY);
|
||||||
Retries++)
|
Retries++)
|
||||||
{
|
{
|
||||||
KeStallExecutionProcessor(10);
|
KeStallExecutionProcessor(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for data overrun */
|
/* Check for data overrun */
|
||||||
if (IDEReadStatus(CommandPortBase) & IDE_SR_DRQ)
|
if (IDEReadStatus(CommandPortBase) & IDE_SR_DRQ)
|
||||||
{
|
{
|
||||||
/* FIXME: Handle error! */
|
/* FIXME: Handle error! */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_WRITE:
|
Srb->SrbStatus = SRB_STATUS_SUCCESS;
|
||||||
DPRINT("SCSIOP_WRITE\n");
|
}
|
||||||
if (Srb->DataTransferLength == 0)
|
else if (Srb->SrbFlags & SRB_FLAGS_DATA_OUT)
|
||||||
{
|
{
|
||||||
|
DPRINT("Write data\n");
|
||||||
|
|
||||||
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES &&
|
if (Srb->DataTransferLength == 0)
|
||||||
(IDEReadStatus(CommandPortBase) & IDE_SR_BUSY);
|
{
|
||||||
Retries++)
|
|
||||||
{
|
|
||||||
KeStallExecutionProcessor(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for data overrun */
|
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES &&
|
||||||
if (IDEReadStatus(CommandPortBase) & IDE_SR_DRQ)
|
(IDEReadStatus(CommandPortBase) & IDE_SR_BUSY);
|
||||||
{
|
Retries++)
|
||||||
/* FIXME: Handle error! */
|
{
|
||||||
}
|
KeStallExecutionProcessor(10);
|
||||||
|
}
|
||||||
|
|
||||||
DevExt->ExpectingInterrupt = FALSE;
|
/* Check for data overrun */
|
||||||
IsLastBlock = TRUE;
|
if (IDEReadStatus(CommandPortBase) & IDE_SR_DRQ)
|
||||||
}
|
{
|
||||||
else
|
/* FIXME: Handle error! */
|
||||||
{
|
}
|
||||||
/* Update SRB data */
|
|
||||||
SectorSize = DevExt->DeviceParams[Srb->TargetId].BytesPerSector;
|
|
||||||
|
|
||||||
TargetAddress = Srb->DataBuffer;
|
DevExt->ExpectingInterrupt = FALSE;
|
||||||
Srb->DataBuffer += SectorSize;
|
IsLastBlock = TRUE;
|
||||||
Srb->DataTransferLength -= SectorSize;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Update SRB data */
|
||||||
|
SectorSize = DevExt->DeviceParams[Srb->TargetId].BytesPerSector;
|
||||||
|
|
||||||
/* Write the sector */
|
TargetAddress = Srb->DataBuffer;
|
||||||
IDEWriteBlock(CommandPortBase,
|
Srb->DataBuffer += SectorSize;
|
||||||
TargetAddress,
|
Srb->DataTransferLength -= SectorSize;
|
||||||
SectorSize);
|
|
||||||
}
|
/* Write the sector */
|
||||||
break;
|
IDEWriteBlock(CommandPortBase,
|
||||||
}
|
TargetAddress,
|
||||||
|
SectorSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
Srb->SrbStatus = SRB_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DPRINT1("Unspecified transfer direction!\n");
|
||||||
|
Srb->SrbStatus = SRB_STATUS_ERROR;
|
||||||
|
IsLastBlock = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* complete this packet */
|
/* complete this packet */
|
||||||
|
@ -1311,20 +1328,12 @@ static ULONG
|
||||||
AtapiSendAtapiCommand(IN PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
AtapiSendAtapiCommand(IN PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
IN PSCSI_REQUEST_BLOCK Srb)
|
IN PSCSI_REQUEST_BLOCK Srb)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
// PIDE_DRIVE_IDENTIFY DeviceParams;
|
|
||||||
|
|
||||||
// ULONG StartingSector,i;
|
|
||||||
// ULONG SectorCount;
|
|
||||||
UCHAR ByteCountHigh;
|
UCHAR ByteCountHigh;
|
||||||
UCHAR ByteCountLow;
|
UCHAR ByteCountLow;
|
||||||
// UCHAR DrvHead;
|
|
||||||
// UCHAR SectorNumber;
|
|
||||||
// UCHAR Command;
|
|
||||||
ULONG Retries;
|
ULONG Retries;
|
||||||
UCHAR Status;
|
UCHAR Status;
|
||||||
|
|
||||||
DPRINT1("AtapiSendAtapiCommand() called!\n");
|
DPRINT("AtapiSendAtapiCommand() called!\n");
|
||||||
|
|
||||||
if ((Srb->PathId != 0) ||
|
if ((Srb->PathId != 0) ||
|
||||||
(Srb->TargetId > 1) ||
|
(Srb->TargetId > 1) ||
|
||||||
|
@ -1334,16 +1343,16 @@ AtapiSendAtapiCommand(IN PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
return(SRB_STATUS_SELECTION_TIMEOUT);
|
return(SRB_STATUS_SELECTION_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("AtapiSendAtapiCommand(): TargetId: %lu\n",
|
DPRINT("AtapiSendAtapiCommand(): TargetId: %lu\n",
|
||||||
Srb->TargetId);
|
Srb->TargetId);
|
||||||
|
|
||||||
|
if (Srb->Cdb[0] == SCSIOP_INQUIRY)
|
||||||
|
return(AtapiInquiry(DeviceExtension,
|
||||||
|
Srb));
|
||||||
|
|
||||||
/* Set pointer to data buffer. */
|
/* Set pointer to data buffer. */
|
||||||
DeviceExtension->DataBuffer = (PUSHORT)Srb->DataBuffer;
|
DeviceExtension->DataBuffer = (PUSHORT)Srb->DataBuffer;
|
||||||
|
|
||||||
DeviceExtension->CurrentSrb = Srb;
|
DeviceExtension->CurrentSrb = Srb;
|
||||||
DeviceExtension->ExpectingInterrupt = TRUE;
|
|
||||||
|
|
||||||
|
|
||||||
/* wait for BUSY to clear */
|
/* wait for BUSY to clear */
|
||||||
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES; Retries++)
|
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES; Retries++)
|
||||||
|
@ -1359,7 +1368,7 @@ AtapiSendAtapiCommand(IN PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
DPRINT("waited %ld usecs for busy to clear\n", Retries * 10);
|
DPRINT("waited %ld usecs for busy to clear\n", Retries * 10);
|
||||||
if (Retries >= IDE_MAX_BUSY_RETRIES)
|
if (Retries >= IDE_MAX_BUSY_RETRIES)
|
||||||
{
|
{
|
||||||
DPRINT ("Drive is BUSY for too long\n");
|
DPRINT("Drive is BUSY for too long\n");
|
||||||
return(SRB_STATUS_BUSY);
|
return(SRB_STATUS_BUSY);
|
||||||
#if 0
|
#if 0
|
||||||
if (++ControllerExtension->Retries > IDE_MAX_CMD_RETRIES)
|
if (++ControllerExtension->Retries > IDE_MAX_CMD_RETRIES)
|
||||||
|
@ -1420,18 +1429,18 @@ AtapiSendAtapiCommand(IN PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteCountLow = (UCHAR)(Srb->DataTransferLength & 0xFF);
|
ByteCountLow = 12;
|
||||||
ByteCountHigh = (UCHAR)(Srb->DataTransferLength >> 8);
|
ByteCountHigh = 0;
|
||||||
|
|
||||||
|
/* Set command packet length */
|
||||||
IDEWriteCylinderHigh(DeviceExtension->CommandPortBase, ByteCountHigh);
|
IDEWriteCylinderHigh(DeviceExtension->CommandPortBase, ByteCountHigh);
|
||||||
IDEWriteCylinderLow(DeviceExtension->CommandPortBase, ByteCountLow);
|
IDEWriteCylinderLow(DeviceExtension->CommandPortBase, ByteCountLow);
|
||||||
// IDEWriteDriveHead(DeviceExtension->CommandPortBase, IDE_DH_FIXED | DrvHead);
|
|
||||||
|
|
||||||
/* Issue command to drive */
|
/* Issue command to drive */
|
||||||
IDEWriteCommand(DeviceExtension->CommandPortBase, 0xA0); /* Packet command */
|
IDEWriteCommand(DeviceExtension->CommandPortBase, 0xA0); /* Packet command */
|
||||||
|
|
||||||
|
|
||||||
/* wait for DRQ to assert */
|
/* Wait for DRQ to assert */
|
||||||
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES; Retries++)
|
for (Retries = 0; Retries < IDE_MAX_BUSY_RETRIES; Retries++)
|
||||||
{
|
{
|
||||||
Status = IDEReadStatus(DeviceExtension->CommandPortBase);
|
Status = IDEReadStatus(DeviceExtension->CommandPortBase);
|
||||||
|
@ -1442,73 +1451,16 @@ AtapiSendAtapiCommand(IN PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
ScsiPortStallExecution(10);
|
ScsiPortStallExecution(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Write command packet */
|
||||||
IDEWriteBlock(DeviceExtension->CommandPortBase,
|
IDEWriteBlock(DeviceExtension->CommandPortBase,
|
||||||
(PUSHORT)Srb->Cdb,
|
(PUSHORT)Srb->Cdb,
|
||||||
12);
|
12);
|
||||||
|
|
||||||
|
DeviceExtension->ExpectingInterrupt = TRUE;
|
||||||
|
|
||||||
|
DPRINT("AtapiSendAtapiCommand() done\n");
|
||||||
|
|
||||||
DPRINT1("AtapiSendAtapiCommand() done\n");
|
|
||||||
return(SRB_STATUS_PENDING);
|
return(SRB_STATUS_PENDING);
|
||||||
#endif
|
|
||||||
|
|
||||||
//#if 0
|
|
||||||
ULONG SrbStatus = SRB_STATUS_SELECTION_TIMEOUT;
|
|
||||||
|
|
||||||
DPRINT("AtapiSendAtapiCommand() called!\n");
|
|
||||||
|
|
||||||
switch (Srb->Cdb[0])
|
|
||||||
{
|
|
||||||
case SCSIOP_INQUIRY:
|
|
||||||
DPRINT(" SCSIOP_INQUIRY\n");
|
|
||||||
SrbStatus = AtapiInquiry(DeviceExtension,
|
|
||||||
Srb);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_READ_CAPACITY:
|
|
||||||
DPRINT1(" SCSIOP_READ_CAPACITY\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_READ:
|
|
||||||
DPRINT1(" SCSIOP_READ\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_WRITE:
|
|
||||||
DPRINT1(" SCSIOP_WRITE\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_MODE_SENSE:
|
|
||||||
DPRINT1(" SCSIOP_MODE_SENSE\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_TEST_UNIT_READY:
|
|
||||||
DPRINT1(" SCSIOP_TEST_UNIT_READY\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_VERIFY:
|
|
||||||
DPRINT1(" SCSIOP_VERIFY\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_START_STOP_UNIT:
|
|
||||||
DPRINT1(" SCSIOP_START_STOP_UNIT\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SCSIOP_REQUEST_SENSE:
|
|
||||||
DPRINT1(" SCSIOP_REQUEST_SENSE\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
DbgPrint("AtapiSendIdeCommand():unknown command %x\n",
|
|
||||||
Srb->Cdb[0]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SrbStatus == SRB_STATUS_SELECTION_TIMEOUT)
|
|
||||||
{
|
|
||||||
DPRINT1("Not implemented yet!\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return(SrbStatus);
|
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1571,7 +1523,8 @@ AtapiInquiry(PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
PINQUIRYDATA InquiryData;
|
PINQUIRYDATA InquiryData;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
DPRINT("SCSIOP_INQUIRY: TargetId: %lu\n", Srb->TargetId);
|
DPRINT1("SCSIOP_INQUIRY: DeviceExtension %p TargetId: %lu\n",
|
||||||
|
DeviceExtension, Srb->TargetId);
|
||||||
|
|
||||||
if ((Srb->PathId != 0) ||
|
if ((Srb->PathId != 0) ||
|
||||||
(Srb->TargetId > 1) ||
|
(Srb->TargetId > 1) ||
|
||||||
|
@ -1631,6 +1584,8 @@ AtapiInquiry(PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
((PUCHAR)DeviceParams->FirmwareRev)[i+1];
|
((PUCHAR)DeviceParams->FirmwareRev)[i+1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DPRINT1("VendorId: '%.20s'\n", InquiryData->VendorId);
|
||||||
|
|
||||||
return(SRB_STATUS_SUCCESS);
|
return(SRB_STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1871,14 +1826,6 @@ AtapiReadWrite(PATAPI_MINIPORT_EXTENSION DeviceExtension,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (Command == IDE_CMD_WRITE)
|
|
||||||
{
|
|
||||||
DPRINT1("Write not implemented yet!\n");
|
|
||||||
return(SRB_STATUS_SUCCESS);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Indicate expecting an interrupt. */
|
/* Indicate expecting an interrupt. */
|
||||||
DeviceExtension->ExpectingInterrupt = TRUE;
|
DeviceExtension->ExpectingInterrupt = TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue