X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FNetwork%2FNE2000%2Fne2000.c;h=d5eadb778b7913478011268b5f23735aad5b56e4;hb=4fc7efa62f7a33e0c8a499f5a175419c2d16c273;hp=5cd23d25cbe39df2969ccddc8b3c434f68587782;hpb=6a945643557084578509e149c84cf5dde3c59c3c;p=tpg%2Facess2.git diff --git a/Modules/Network/NE2000/ne2000.c b/Modules/Network/NE2000/ne2000.c index 5cd23d25..d5eadb77 100644 --- a/Modules/Network/NE2000/ne2000.c +++ b/Modules/Network/NE2000/ne2000.c @@ -162,7 +162,7 @@ int Ne2k_Install(char **Options) outb( base + CURR, RX_FIRST ); // Current RX page outb( base + CMD, 0x21 ); // No DMA and Stop outb( base + DCR, 0x49 ); // Set WORD mode - outb( base + IMR, 0x00 ); + outb( base + IMR, 0x00 ); // Interrupt Mask Register outb( base + ISR, 0xFF ); outb( base + RCR, 0x20 ); // Reciever to Monitor outb( base + TCR, 0x02 ); // Transmitter OFF (TCR.LB = 1, Internal Loopback) @@ -256,23 +256,7 @@ int Ne2k_IOCtl(tVFS_Node *Node, int ID, void *Data) ENTER("pNode iID pData", Node, ID, Data); switch( ID ) { - case DRV_IOCTL_TYPE: - LEAVE('i', DRV_TYPE_NETWORK); - return DRV_TYPE_NETWORK; - - case DRV_IOCTL_IDENT: - tmp = ModUtil_SetIdent(Data, "Ne2k"); - LEAVE('i', tmp); - return tmp; - - case DRV_IOCTL_VERSION: - LEAVE('x', VERSION); - return VERSION; - - case DRV_IOCTL_LOOKUP: - tmp = ModUtil_LookupString( (char**)casIOCtls, Data ); - LEAVE('i', tmp); - return tmp; + BASE_IOCTLS(DRV_TYPE_NETWORK, "NE2000", VERSION, casIOCtls); } // If this is the root, return @@ -382,6 +366,7 @@ Uint64 Ne2k_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) ENTER("pNode XOffset XLength pBuffer", Node, Offset, Length, Buffer); + // TODO: Use MutexP/MutexV instead while(Card->NumWaitingPackets == 0) Threads_Yield(); // Make sure that the card is in page 0