From: John Hodge Date: Fri, 20 Dec 2013 10:41:34 +0000 (+0800) Subject: Modules/RTL8169 - Replace some magic with enum X-Git-Tag: rel0.15~58 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=e1a8ed89c2fc4889170d4f7e2c7b6b7a494dd2e7;p=tpg%2Facess2.git Modules/RTL8169 - Replace some magic with enum --- diff --git a/KernelLand/Modules/Network/RTL8169/rtl8169.c b/KernelLand/Modules/Network/RTL8169/rtl8169.c old mode 100644 new mode 100755 index 6cb9db33..c7f9825e --- a/KernelLand/Modules/Network/RTL8169/rtl8169.c +++ b/KernelLand/Modules/Network/RTL8169/rtl8169.c @@ -127,8 +127,8 @@ void RTL8169_int_SetupCard(tCard *Card) // Initialise // _WriteB(Card, 0x50, 0xC0); - _WriteD(Card, 0x40, 0x03000700); // TX Config - _WriteD(Card, 0x44, 0x0000E70F); // RX Config + _WriteD(Card, REG_TXC, 0x03000700); // TX Config + _WriteD(Card, REG_RXC, 0x0000E70F); // RX Config _WriteW(Card, 0xDA, RX_BUF_SIZE-1); // Max RX Size _WriteW(Card, 0xEC, 2048/32); // Max TX size (in units of 32/128 bytes) @@ -136,7 +136,7 @@ void RTL8169_int_SetupCard(tCard *Card) // _WriteQ(Card, 0x28, MM_GetPhysAddr( (tVAddr)Card->TXHighDescs )); _WriteQ(Card, 0xE4, MM_GetPhysAddr( (tVAddr)Card->RXDescs )); - _WriteW(Card, 0x3C, INT_LINKCHANGE|INT_TXOK|INT_RXOK); // Set interrupt mask + _WriteW(Card, REG_INTMASK, INT_LINKCHANGE|INT_TXOK|INT_RXOK); // Set interrupt mask _WriteB(card, 0x37, 0x0C); // Enable }