updated ENC624j6net driver
- fixes to gcc native and cross compilation settings
- implemented hardware based multicast filtering hashes, resulting
in less unwanted traffic to our Amigas (especially Bonjour, UPNP and such)
- MULTICAST option in envarc:sana2/enc624j6net.config will now
allow all multicast traffic as opposed to the default fine grained
filtering behaviour
This commit is contained in:
@@ -41,6 +41,12 @@ static LONG server_queryext( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq );
|
||||
/* this limits the number of processed read requests per run when enabled */
|
||||
#define ONE_READ_REQ 2
|
||||
|
||||
/* heavy debug on read/write */
|
||||
#define D2(x)
|
||||
#define D4(x)
|
||||
/* #define D2(x) D(x) */
|
||||
/* #define D4(x) D(x) */
|
||||
|
||||
|
||||
|
||||
/* (avoid external link libraries) this call is not time critical */
|
||||
@@ -384,6 +390,15 @@ static LONG server_changeMulticast( DEVBASEP, ULONG unit, struct IOSana2Req *ior
|
||||
COPYMAC( entry->mce_start, ioreq->ios2_SrcAddr );
|
||||
COPYMAC( entry->mce_stop, ioreq->ios2_SrcAddr );
|
||||
|
||||
D(("ADD Multicast MAC %02lx%02lx%02lx%02lx%02lx%02lx - %02lx%02lx%02lx%02lx%02lx%02lx\n",\
|
||||
(ULONG)entry->mce_start[0],(ULONG)entry->mce_start[1],\
|
||||
(ULONG)entry->mce_start[2],(ULONG)entry->mce_start[3],\
|
||||
(ULONG)entry->mce_start[4],(ULONG)entry->mce_start[5],\
|
||||
(ULONG)entry->mce_stop[0],(ULONG)entry->mce_stop[1],\
|
||||
(ULONG)entry->mce_stop[2],(ULONG)entry->mce_stop[3],\
|
||||
(ULONG)entry->mce_stop[4],(ULONG)entry->mce_stop[5] \
|
||||
));
|
||||
|
||||
ADDTAIL( &db->db_svdat.sv_mclist, entry );
|
||||
|
||||
apply:
|
||||
@@ -715,7 +730,7 @@ static LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq )
|
||||
UBYTE *header_ptr;
|
||||
#endif
|
||||
|
||||
D(("write: type %08lx, size %ld\n",ioreq->ios2_PacketType,
|
||||
D2(("write: type %08lx, size %ld\n",ioreq->ios2_PacketType,
|
||||
ioreq->ios2_DataLength));
|
||||
|
||||
frame = db->db_svdat.sv_frame;
|
||||
@@ -765,13 +780,13 @@ static LONG write_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq )
|
||||
if( (*dbm->dbm_CopyFromBuffer32)(copy_ptr,ioreq->ios2_Data, ioreq->ios2_DataLength) )
|
||||
{
|
||||
send:
|
||||
D(("+hw_send\n"));
|
||||
D2(("+hw_send\n"));
|
||||
#ifdef HW_DMA_TX
|
||||
ret = hw_send_frame(db, unit, copy_ptr, framesize, header_ptr ) ? SERR_OK:SERR_ERROR;
|
||||
#else
|
||||
ret = hw_send_frame(db, unit, frame, framesize ) ? SERR_OK : SERR_ERROR;
|
||||
#endif
|
||||
D(("-hw_send\n"));
|
||||
D2(("-hw_send\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -892,14 +907,14 @@ static void server_read_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, U
|
||||
{
|
||||
frame += 14; /* skip DST,SRC,Type */
|
||||
framesize -= 18; /* also remove CRC */
|
||||
D(("plain mode: frame flags %ld\n",bcflag));
|
||||
D4(("plain mode: frame flags %ld\n",bcflag));
|
||||
}
|
||||
ioreq->ios2_Req.io_Flags &= SANA2IOF_RAW; /* ignore all other flags */
|
||||
ioreq->ios2_Req.io_Flags |= bcflag;
|
||||
ioreq->ios2_Req.io_Error = 0;
|
||||
ioreq->ios2_WireError = 0;
|
||||
|
||||
D(("ReadFrm IO %lx, DBM %lx frm %lx frmsz %ld\n",(ULONG)ioreq,(ULONG)dbm,(ULONG)frame,framesize));
|
||||
D4(("ReadFrm IO %lx, DBM %lx frm %lx frmsz %ld\n",(ULONG)ioreq,(ULONG)dbm,(ULONG)frame,framesize));
|
||||
|
||||
if( dbm->dbm_PacketFilter ) /* Filter Packets ? */
|
||||
{
|
||||
@@ -918,7 +933,7 @@ static void server_read_frame( DEVBASEP, ULONG unit, struct IOSana2Req *ioreq, U
|
||||
ioreq->ios2_WireError = S2WERR_BUFF_ERROR;
|
||||
}
|
||||
}
|
||||
D(("Copied io_Error %ld\n",(LONG)ioreq->ios2_Req.io_Error));
|
||||
D4(("Copied io_Error %ld\n",(LONG)ioreq->ios2_Req.io_Error));
|
||||
|
||||
Remove( (struct Node*)ioreq );
|
||||
svTermIO( db, ioreq );
|
||||
@@ -946,7 +961,7 @@ static LONG server_readqueue( DEVBASEP, ULONG unit )
|
||||
/* TODO: devstats */
|
||||
frametype = *( (USHORT*)(frame+12) );
|
||||
|
||||
D(("Have Frame size %ld type %ld\n",framesize,frametype));
|
||||
D4(("Have Frame size %ld type %ld\n",framesize,frametype));
|
||||
|
||||
ObtainSemaphore( &db->db_Units[unit].du_Sem );
|
||||
|
||||
@@ -964,14 +979,14 @@ orphan:
|
||||
ioreq = (struct IOSana2Req *)GetHead( (struct List*)&db->db_Units[unit].du_ReadOrphans );
|
||||
if( ioreq )
|
||||
{
|
||||
D(("Orphaned Frame\n"));
|
||||
D4(("Orphaned Frame\n"));
|
||||
|
||||
ioreq->ios2_PacketType = frametype;
|
||||
server_read_frame( db, unit, ioreq, frame, framesize );
|
||||
}
|
||||
else
|
||||
{
|
||||
D(("No ioreq for orphaned frame\n"));
|
||||
D4(("No ioreq for orphaned frame\n"));
|
||||
}
|
||||
|
||||
goto nextframe;
|
||||
@@ -1005,7 +1020,7 @@ havetype:
|
||||
{
|
||||
db->db_Units[unit].du_DevStats.Overruns++;
|
||||
type->srt_Sana2PacketTypeStats.PacketsDropped++;
|
||||
D(("No Reader for frame\n"));
|
||||
D4(("No Reader for frame\n"));
|
||||
goto orphan; /* does it help if we give the frame to the orphan list? */
|
||||
}
|
||||
nextframe:
|
||||
@@ -1094,9 +1109,9 @@ VOID SAVEDS ServerTask(void)
|
||||
}
|
||||
if( hw_recv_pending(db,i) )
|
||||
{
|
||||
D(("Read on unit %ld start\n",i));
|
||||
D4(("Read on unit %ld start\n",i));
|
||||
server_readqueue( db, i );
|
||||
D(("Read on unit %ld stop\n",i));
|
||||
D4(("Read on unit %ld stop\n",i));
|
||||
action = 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user