From: John Hodge Date: Sun, 12 May 2013 11:06:02 +0000 (+0800) Subject: Modules/E1000 - Fixed corruption/crash X-Git-Tag: rel0.15~501 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=41d3727d7ede47845cde383826fa319f0e78f11e;p=tpg%2Facess2.git Modules/E1000 - Fixed corruption/crash --- diff --git a/KernelLand/Modules/Network/E1000/e1000.c b/KernelLand/Modules/Network/E1000/e1000.c index 66c1c863..fc657a1e 100644 --- a/KernelLand/Modules/Network/E1000/e1000.c +++ b/KernelLand/Modules/Network/E1000/e1000.c @@ -118,8 +118,11 @@ void E1000_int_ReleaseRXD(void *Arg, size_t HeadLen, size_t FootLen, const void { tCard **cardptr = Arg; tCard *Card = *cardptr; - int rxd = (Arg - (void*)Card->RXDescs) / sizeof(tRXDesc); - + int rxd = (Arg - (void*)Card->RXBackHandles) / sizeof(void*); + + LOG("RXD %p %i being released", Card, rxd); + ASSERT(rxd >= 0 && rxd < NUM_RX_DESC); + Card->RXDescs[rxd].Status = 0; Mutex_Acquire(&Card->lRXDescs); if( rxd == REG32(Card, REG_RDT) ) {