LAN driver update
- separate semaphore for write queue (about 2% more speed) - re-enabled init optimization (avoidance of full chip resets, still experimental)
This commit is contained in:
@@ -120,6 +120,7 @@ ASM SAVEDS struct Device *DevInit( ASMR(d0) DEVBASEP ASMREG(d0)
|
||||
dbNewList( (struct List*)&db->db_Units[i].du_WriteQueue );
|
||||
dbNewList( (struct List*)&db->db_Units[i].du_EventQueue );
|
||||
InitSemaphore( &db->db_Units[i].du_Sem );
|
||||
InitSemaphore( &db->db_Units[i].du_WrSem );
|
||||
db->db_Units[i].du_MTU = DEF_MTU;
|
||||
db->db_Units[i].du_BitPerSec = DEF_BPS;
|
||||
}
|
||||
@@ -484,12 +485,27 @@ ASM SAVEDS VOID DevBeginIO( ASMR(a1) struct IOSana2Req *ioreq ASMREG(a1),
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
LONG code;
|
||||
LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq );
|
||||
|
||||
ObtainSemaphore(&db->db_Units[unit].du_WrSem);
|
||||
code = write_frame( db, unit, ioreq );
|
||||
if( code >= 0 )
|
||||
{
|
||||
db->db_Units[unit].du_DevStats.PacketsSent++;
|
||||
ioreq->ios2_Req.io_Error = S2ERR_NO_ERROR;
|
||||
ioreq->ios2_WireError = S2WERR_GENERIC_ERROR;
|
||||
}
|
||||
ReleaseSemaphore(&db->db_Units[unit].du_WrSem);
|
||||
#else
|
||||
ioreq->ios2_Req.io_Flags &= ~SANA2IOF_QUICK;
|
||||
ObtainSemaphore(&db->db_Units[unit].du_Sem);
|
||||
ObtainSemaphore(&db->db_Units[unit].du_WrSem);
|
||||
ADDTAIL((struct List*)&db->db_Units[unit].du_WriteQueue,(struct Node*)ioreq);
|
||||
ReleaseSemaphore(&db->db_Units[unit].du_Sem);
|
||||
ReleaseSemaphore(&db->db_Units[unit].du_WrSem);
|
||||
Signal( (struct Task*)db->db_ServerProc, SIGBREAKF_CTRL_F );
|
||||
ioreq = (0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user