1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
--- 2276 unchanged lines hidden (view full) ---
2285
2286 // If the packet is done check for interrupts/descriptors/etc
2287 if (rxDescCache.packetDone()) {
2288 rxDmaPacket = false;
2289 DPRINTF(EthernetSM, "RXS: Packet completed DMA to memory\n");
2290 int descLeft = rxDescCache.descLeft();
2291 DPRINTF(EthernetSM, "RXS: descLeft: %d rdmts: %d rdlen: %d\n",
2292 descLeft, regs.rctl.rdmts(), regs.rdlen());
2293
2294 // rdmts 2->1/8, 1->1/4, 0->1/2
2295 int ratio = (1ULL << (regs.rctl.rdmts() + 1));
2296 if (descLeft * ratio <= regs.rdlen()) {
2297 DPRINTF(Ethernet, "RXS: Interrupting (RXDMT) "
2298 "because of descriptors left\n");
2299 postInterrupt(IT_RXDMT);
2300 }
2301
2302 if (rxFifo.empty())
2303 rxDescCache.writeback(0);
2304
2305 if (descLeft == 0) {
2306 anBegin("RXS", "Writeback Descriptors");
2307 rxDescCache.writeback(0);
--- 277 unchanged lines hidden ---
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
--- 2276 unchanged lines hidden (view full) ---
2285
2286 // If the packet is done check for interrupts/descriptors/etc
2287 if (rxDescCache.packetDone()) {
2288 rxDmaPacket = false;
2289 DPRINTF(EthernetSM, "RXS: Packet completed DMA to memory\n");
2290 int descLeft = rxDescCache.descLeft();
2291 DPRINTF(EthernetSM, "RXS: descLeft: %d rdmts: %d rdlen: %d\n",
2292 descLeft, regs.rctl.rdmts(), regs.rdlen());
2293
2294 // rdmts 2->1/8, 1->1/4, 0->1/2
2295 int ratio = (1ULL << (regs.rctl.rdmts() + 1));
2296 if (descLeft * ratio <= regs.rdlen()) {
2297 DPRINTF(Ethernet, "RXS: Interrupting (RXDMT) "
2298 "because of descriptors left\n");
2299 postInterrupt(IT_RXDMT);
2300 }
2301
2302 if (rxFifo.empty())
2303 rxDescCache.writeback(0);
2304
2305 if (descLeft == 0) {
2306 anBegin("RXS", "Writeback Descriptors");
2307 rxDescCache.writeback(0);
--- 277 unchanged lines hidden ---