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)
*/
int Ne2k_IOCtl(tVFS_Node *Node, int ID, void *Data)
{
- int tmp;
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
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