diff --git a/Driver/baxnet/README.enc b/Driver/baxnet/README.enc index ad44808..e67cacf 100644 --- a/Driver/baxnet/README.enc +++ b/Driver/baxnet/README.enc @@ -66,6 +66,12 @@ PRIORITY=PRI/K/N,BPS/K/N,MTU/K/N,FULLDUPLEX/S,FLOWCONTROL/S,TIMER/K/N,MULTICAST/ Changelog: ---------- +2.4 - added second semaphore, specifically for the write list + - recompiled using GCC 2.95 for slightly smaller binary + - avoid full ethernet chip reset on startup when the + registers seem to be in a sane state (faster init, especially + with DHCP) + 2.3 - implemented fine grained multicast filter hashes 2.2 - some more tuning to RX/TX scheduling diff --git a/Driver/baxnet/bin/enc624j6net.device b/Driver/baxnet/bin/enc624j6net.device index 3dbd74d..1fd98c2 100755 Binary files a/Driver/baxnet/bin/enc624j6net.device and b/Driver/baxnet/bin/enc624j6net.device differ diff --git a/Driver/baxnet/bin/enc624j6net.device_68000 b/Driver/baxnet/bin/enc624j6net.device_68000 index 17f462e..bc2a881 100755 Binary files a/Driver/baxnet/bin/enc624j6net.device_68000 and b/Driver/baxnet/bin/enc624j6net.device_68000 differ diff --git a/Driver/baxnet/source/Common.mk b/Driver/baxnet/source/Common.mk index 8ef324d..77cdedb 100644 --- a/Driver/baxnet/source/Common.mk +++ b/Driver/baxnet/source/Common.mk @@ -27,8 +27,8 @@ compiler_vcc = 0 # prefix for system includes (ASM) # native AmigaOS compilation: set PREFX=GG: or PREFX=ADE:, depending on toolchain ############################################################################### -PREFX = /opt/amigaos-68k/ -#PREFX = gg: +#PREFX = /opt/amigaos-68k/ +PREFX = gg: SYSINC = $(PREFX)os-include ############################################################################### @@ -54,8 +54,9 @@ else CCX = m68k-amigaos-gcc LINK = $(CCX) -nostartfiles -s LINKEXE = $(CCX) -s -noixemul -CFLAGS = -O3 -s -m$(CPU) -Wall -noixemul -mregparm=4 -fomit-frame-pointer -msoft-float -noixemul -CFLAGS2 = -O3 -s -m$(CPU2) -Wall -noixemul -mregparm=4 -fomit-frame-pointer -msoft-float -noixemul +#$(CPU) +CFLAGS = -Os -s -m$(CPU) -Wall -noixemul -mregparm=4 -fomit-frame-pointer -msoft-float -noixemul +CFLAGS2 = -Os -s -m$(CPU2) -Wall -noixemul -mregparm=4 -fomit-frame-pointer -msoft-float -noixemul VASMFORMAT = -m$(CPU) -Faout -nowarn=2064 -quiet -I$(SYSINC) VASMFORMAT2 = -m$(CPU2) -Faout -nowarn=2064 -quiet -I$(SYSINC) diff --git a/Driver/baxnet/source/Makefile.enc b/Driver/baxnet/source/Makefile.enc index 5fd867a..d560df1 100644 --- a/Driver/baxnet/source/Makefile.enc +++ b/Driver/baxnet/source/Makefile.enc @@ -33,7 +33,7 @@ ASMOBJECTS = $(SUBDIR)/enc624j6l.o $(SUBDIR)/intervaltimer.o kprintf.o DEVICEID=enc624j6net.device DEFINES = -DHW_DMA_TX # -DPROTO_V2EXPNET ASMDEFS = -DHW_DMA_TX # -DPROTO_V2EXPNET -CPU = 68020 +CPU = 68060 DEVICEID2=enc624j6net.device_68000 DEFINES2 = # -DPROTO_V2EXPNET diff --git a/Driver/baxnet/source/device.c b/Driver/baxnet/source/device.c index 708066f..2e06fae 100644 --- a/Driver/baxnet/source/device.c +++ b/Driver/baxnet/source/device.c @@ -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 } } } diff --git a/Driver/baxnet/source/device.h b/Driver/baxnet/source/device.h index eb948b3..3474a54 100644 --- a/Driver/baxnet/source/device.h +++ b/Driver/baxnet/source/device.h @@ -74,6 +74,7 @@ struct DevUnit { volatile struct List du_EventQueue; /* Event queue */ struct SignalSemaphore du_Sem; /* list locking (global per unit) */ + struct SignalSemaphore du_WrSem; /* experimental: separate Sempaphore for write list */ ULONG du_OpenCount; /* unit openers */ ULONG du_Flags; /* unit flags */ diff --git a/Driver/baxnet/source/device.i b/Driver/baxnet/source/device.i index 57d4076..5433985 100644 --- a/Driver/baxnet/source/device.i +++ b/Driver/baxnet/source/device.i @@ -73,6 +73,7 @@ DUF_PROMISC EQU (1<timervalue < 1000 ) + flag = -1; if( flag > 0 ) StartIntervalTimer( &hwd->ivtimer, hwd->timervalue ); diff --git a/Driver/baxnet/source/server.c b/Driver/baxnet/source/server.c index 124a08e..25162e4 100644 --- a/Driver/baxnet/source/server.c +++ b/Driver/baxnet/source/server.c @@ -94,11 +94,12 @@ static void server_Offline_CancelRequests( DEVBASEP , ULONG unit ) type = GetSucc( type ); } - server_AbortList( db, (struct List*)&db->db_Units[unit].du_WriteQueue ); server_AbortList( db, (struct List*)&db->db_Units[unit].du_EventQueue ); server_AbortList( db, (struct List*)&db->db_Units[unit].du_ReadOrphans ); - ReleaseSemaphore( &db->db_Units[unit].du_Sem ); + ObtainSemaphore( &db->db_Units[unit].du_WrSem ); + server_AbortList( db, (struct List*)&db->db_Units[unit].du_WriteQueue ); + ReleaseSemaphore( &db->db_Units[unit].du_WrSem ); /* clear Multicast list, TODO: subroutine */ { @@ -722,7 +723,8 @@ LONG server_writeerror( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, LONG cod HW_DMA_TX is defined by the Makefile. One of the chunks is the constant-size header (14 Bytes) and the other is the payload. */ -static LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq ) +//static +LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq ) { LONG ret;/* = SERR_OK;*/ UBYTE *copy_ptr,*frame; @@ -816,7 +818,7 @@ static LONG server_writequeue( DEVBASEP, ULONG unit ) #endif struct IOSana2Req *ioreq,*nextio; - ObtainSemaphore( &db->db_Units[unit].du_Sem ); + ObtainSemaphore( &db->db_Units[unit].du_WrSem ); #if 1 /* whole queue per call */ @@ -871,7 +873,7 @@ static LONG server_writequeue( DEVBASEP, ULONG unit ) #endif } - ReleaseSemaphore( &db->db_Units[unit].du_Sem ); + ReleaseSemaphore( &db->db_Units[unit].du_WrSem ); return SERR_OK; } @@ -977,7 +979,7 @@ static LONG server_readqueue( DEVBASEP, ULONG unit ) /* desired type not found, get orphan list */ db->db_Units[unit].du_DevStats.UnknownTypesReceived++; -orphan: +/*orphan:*/ ioreq = (struct IOSana2Req *)GetHead( (struct List*)&db->db_Units[unit].du_ReadOrphans ); if( ioreq ) { @@ -1023,7 +1025,7 @@ havetype: db->db_Units[unit].du_DevStats.Overruns++; type->srt_Sana2PacketTypeStats.PacketsDropped++; D4(("No Reader for frame\n")); - goto orphan; /* does it help if we give the frame to the orphan list? */ + /* goto orphan; */ /* does it help if we give the frame to the orphan list? */ } nextframe: ReleaseSemaphore( &db->db_Units[unit].du_Sem ); diff --git a/Driver/baxnet/source/server.h b/Driver/baxnet/source/server.h index 2f6f7a8..371a61e 100644 --- a/Driver/baxnet/source/server.h +++ b/Driver/baxnet/source/server.h @@ -39,7 +39,8 @@ LONG server_writeerror( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, LONG cod #ifdef EXTERNAL_WRITE_FRAME LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq ); #else -static LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq ); +//static +LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq ); #endif static LONG server_writequeue( DEVBASETYPE*, ULONG );