Hi
the message is intended for Parport Microsoft Developers as long as I don’t know any microsoft address where I couled submit the bug.
At suprise removal of PCMCIA parallel ports a bug check occurs due the followings:
in fdoClos.c in the function PptFdoClose. I’ve marked my comments with [HorG].
NTSTATUS
PptFdoClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{
PFDO_EXTENSION fdx = DeviceObject->DeviceExtension;
NTSTATUS status;
PAGED_CODE();
//
// Verify that our device has not been SUPRISE_REMOVED. Generally
// only parallel ports on hot-plug busses (e.g., PCMCIA) and
// parallel ports in docking stations will be surprise removed.
//
if( fdx->PnpState & PPT_DEVICE_SURPRISE_REMOVED ) {
//
// Our device has been SURPRISE removed, but since this is only
// a CLOSE, SUCCEED anyway.
//
status = P4CompleteRequest( Irp, STATUS_SUCCESS, 0 );
// [HorG] - the below goto generate another Irp completion and
// thus the blue screen. Instead it should be simply a
// return status.
goto target_exit;
}
//
// Try to acquire RemoveLock to prevent the device object from going
// away while we’re using it.
//
status = PptAcquireRemoveLock(&fdx->RemoveLock, Irp);
if( !NT_SUCCESS( status ) ) {
// Our device has been removed, but since this is only a CLOSE, SUCCEED anyway.
status = STATUS_SUCCESS;
goto target_exit;
}
//
// We have the RemoveLock
//
ExAcquireFastMutex(&fdx->OpenCloseMutex);
if( fdx->OpenCloseRefCount > 0 ) {
//
// prevent rollover - strange as it may seem, it is perfectly
// legal for us to receive more closes than creates - this
// info came directly from Mr. PnP himself
//
if( ((LONG)InterlockedDecrement(&fdx->OpenCloseRefCount)) < 0 ) {
// handle underflow
InterlockedIncrement(&fdx->OpenCloseRefCount);
}
}
ExReleaseFastMutex(&fdx->OpenCloseMutex);
target_exit:
DD((PCE)fdx,DDT,“PptFdoClose - OpenCloseRefCount after close = %d\n”,fdx->OpenCloseRefCount);
return P4CompleteRequestReleaseRemLock( Irp, STATUS_SUCCESS, 0, &fdx->RemoveLock );
}
regards
Horatiu Guja
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com