/***************************************************************************** * * GoOffline * *****************************************************************************/ VOID GoOffline (struct DevUnit *unit, struct MyBase *base) { // volatile UBYTE *io_base; // io_base = unit->io_base; unit->flags &= ~UNITF_ONLINE; // if((unit->flags&UNITF_HAVEADAPTER)!=0) if (1) { /* Stop interrupts */ /* Stop transmission and reception */ ppPoke (PP_LineCTL, ppPeek (PP_LineCTL) & ~(PP_LineCTL_Rx | PP_LineCTL_Tx)); /* Turn off media functions */ } /* Flush pending read and write requests */ FlushUnit (unit, WRITE_QUEUE, S2ERR_OUTOFSERVICE, base); /* Report Offline event and return */ ReportEvents (unit, S2EVENT_OFFLINE, base); return; }
static BOOL CmdFlush(LIBBASETYPEPTR LIBBASE, struct IORequest *request) { FlushUnit(LIBBASE, (APTR)request->io_Unit, EVENT_QUEUE, IOERR_ABORTED); return TRUE; }
static BOOL CmdFlush(struct IORequest *request, struct DevBase *base) { FlushUnit((APTR)request->io_Unit, EVENT_QUEUE, IOERR_ABORTED, base); return TRUE; }