Fixed the reinitialisation if the miniport driver returns SRB_STATUS_BUSY.

svn path=/trunk/; revision=18104
This commit is contained in:
Hartmut Birr 2005-09-26 20:00:48 +00:00
parent f9ac23ee7b
commit 406b5036aa

View file

@ -2888,8 +2888,15 @@ SpiProcessRequests(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
if (Srb->SrbStatus == SRB_STATUS_BUSY) if (Srb->SrbStatus == SRB_STATUS_BUSY)
{ {
CompleteThisRequest = FALSE;
Irp->Tail.Overlay.DriverContext[3] = Srb;
SpiRemoveActiveIrp(DeviceExtension, Irp, PrevIrp); SpiRemoveActiveIrp(DeviceExtension, Irp, PrevIrp);
SpiFreeSrbExtension(DeviceExtension, OriginalSrb); SpiFreeSrbExtension(DeviceExtension, OriginalSrb);
Srb->OriginalRequest = LunExtension;
Irp->Tail.Overlay.DriverContext[2] = 0;
InsertHeadList(&DeviceExtension->PendingIrpListHead, (PLIST_ENTRY)&Irp->Tail.Overlay.DriverContext[0]); InsertHeadList(&DeviceExtension->PendingIrpListHead, (PLIST_ENTRY)&Irp->Tail.Overlay.DriverContext[0]);
DeviceExtension->PendingIrpCount++; DeviceExtension->PendingIrpCount++;
LunExtension->PendingIrpCount++; LunExtension->PendingIrpCount++;
@ -2915,6 +2922,7 @@ SpiProcessRequests(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
SenseInfoBuffer, SenseInfoBuffer,
sizeof(SENSE_DATA)); sizeof(SENSE_DATA));
OriginalSrb->SrbStatus |= SRB_STATUS_AUTOSENSE_VALID; OriginalSrb->SrbStatus |= SRB_STATUS_AUTOSENSE_VALID;
OriginalSrb->SrbExtension = Srb->SrbExtension;
ExFreePool(Srb); ExFreePool(Srb);
CompleteThisRequest = TRUE; CompleteThisRequest = TRUE;
} }
@ -2933,7 +2941,7 @@ SpiProcessRequests(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
CompleteThisRequest = FALSE; CompleteThisRequest = FALSE;
Irp->Tail.Overlay.DriverContext[3] = Srb; Irp->Tail.Overlay.DriverContext[3] = Srb;
SpiRemoveActiveIrp(DeviceExtension, Irp, PrevIrp); SpiRemoveActiveIrp(DeviceExtension, Irp, PrevIrp);
SpiFreeSrbExtension(DeviceExtension, Srb); SpiFreeSrbExtension(DeviceExtension, OriginalSrb);
Srb->OriginalRequest = LunExtension; Srb->OriginalRequest = LunExtension;
Irp->Tail.Overlay.DriverContext[2] = 0; Irp->Tail.Overlay.DriverContext[2] = 0;