Beispiel #1
0
/* to take over. */
void E2FilterIORB (PIORB pIORB)
{
 NPRecHeader	pUnitRec;			/* Ptr to unit rec for IORB */
 NPIORBQueue	pQueue;				/* Ptr to queue for IORB */

 if (pIORB->CommandCode==IOCC_CONFIGURATION)	/* For configuration IORBs: */
  pUnitRec= (NPRecHeader) VirtUnits;		/* Assign IORB to the first */
						/* virtual unit. (For queue) */
 else
  pUnitRec= (NPRecHeader) pIORB->UnitHandle;	/* Get pointer to unit */
						/* from the unit handle */
 /* Check to see if pUnitRec is a pointer to a valid unit record. */
 if (!(IS_ELEMENT(pUnitRec,BaseUnits,NumBaseUnits)||
       IS_ELEMENT(pUnitRec,VirtUnits,NumVirtUnits)))
 {
  IORBError (pIORB,IOERR_NO_SUCH_UNIT);		/* Tell them they are crazy! */
  NotifyDone (pIORB);				/* Notify that we are done */
 }
 else
 {
  pQueue= &(pUnitRec->IORBQueue);		/* Get pointer to IORB queue */
  DISABLE					/* Same safety... */
  AddIORBToQueue (pQueue,pIORB);		/* Add IORB to queue */
  ENABLE					/* Re-enable interrupts */
  StartIORBQueue (pQueue);			/* Try to restart the queue */
 }
}
Beispiel #2
0
/* the IORB queue. */
void PartCommandDone (NPVirtUnitRec pUnitRec, PIORB pIORB)
{
 NPIORBQueue	pQueue;				/* Pointer to IORB queue */

 pQueue= &(pUnitRec->Hdr.IORBQueue);		/* Get pointer to queue */
 pQueue->Flags&=~F_REQUEST_BUSY;		/* Indicate queue finished */
 NotifyDone (pIORB);				/* Notify caller */
 StartIORBQueue (pQueue);			/* Try to restart queue */
}
Beispiel #3
0
/* restored before we pass it back to the original caller. */
void FilterNotify (PIORB pIORB)
{
NPBaseUnitRec	pUnitRec;			/* Ptr to unit record */
NPIORBQueue	pQueue;				/* Queue request came from */

   pUnitRec= (NPBaseUnitRec) pIORB->Reserved_1;	/* Get ptr to unit record */

   pIORB->UnitHandle= (USHORT) pUnitRec;		/* Restore old unit handle */
   pIORB->RequestControl= pUnitRec->SaveReqCtrl;	/* Restore rest of IORB */
   pIORB->Reserved_1= pUnitRec->SaveReserved;
   pIORB->NotifyAddress= pUnitRec->SaveNotify;

   pQueue= &(pUnitRec->Hdr.IORBQueue);		/* Get ptr to IORB queue */

   pQueue->Flags&=~F_REQUEST_BUSY;		/* Indicate queue finished */
   NotifyDone (pIORB);				/* Notify caller */
   StartIORBQueue (pQueue);			/* Try to restart queue */
}