X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FNetwork%2FNE2000%2Fne2000.c;h=14314b8347b3aafe8139f6633ab81e9a4b34f8f8;hb=134f1d02a00ac320c3f22354e014917ea552b01f;hp=24d82782fe24649f5ed4017adf114daf9eb0677a;hpb=6bc21db109c4d8d3219ad58fc5cc76ec76e6c6b7;p=tpg%2Facess2.git diff --git a/Modules/Network/NE2000/ne2000.c b/Modules/Network/NE2000/ne2000.c index 24d82782..14314b83 100644 --- a/Modules/Network/NE2000/ne2000.c +++ b/Modules/Network/NE2000/ne2000.c @@ -309,7 +309,7 @@ Uint64 Ne2k_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) // Sanity Check Length if(Length > TX_BUF_SIZE*256) { Warning( - "Ne2k_Write - Attempting to send over TX_BUF_SIZE(%i) bytes (%i)", + "Ne2k_Write - Attempting to send over TX_BUF_SIZE*256 (%i) bytes (%i)", TX_BUF_SIZE*256, Length ); LEAVE('i', 0); @@ -339,8 +339,9 @@ Uint64 Ne2k_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) outb(Card->IOBase + CMD, 0|0x10|0x2); // Page 0, Remote Write, Start // Send Data - for(rem = Length; rem; rem -= 2) + for(rem = Length; rem > 0; rem -= 2) { outw(Card->IOBase + 0x10, *buf++); + } while( inb(Card->IOBase + ISR) == 0 ) // Wait for Remote DMA Complete ; //Proc_Yield();