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; --- 122 unchanged lines hidden (view full) --- 131 DPRINTF(DMA, "Received nacked %s addr %#x\n", 132 pkt->cmdString(), pkt->getAddr()); 133 134 if (backoffTime < minBackoffDelay) 135 backoffTime = minBackoffDelay; 136 else if (backoffTime < maxBackoffDelay) 137 backoffTime <<= 1; 138 |
139 device->reschedule(backoffEvent, curTick() + backoffTime, true); |
140 141 DPRINTF(DMA, "Backoff time set to %d ticks\n", backoffTime); 142 143 pkt->reinitNacked(); 144 queueDma(pkt, true); 145 } else if (pkt->isRequest() && recvSnoops) { 146 return true; 147 } else if (pkt->senderState) { --- 11 unchanged lines hidden (view full) --- 159 // We shouldn't ever get a block in ownership state 160 assert(!(pkt->memInhibitAsserted() && !pkt->sharedAsserted())); 161 162 state->numBytes += pkt->req->getSize(); 163 assert(state->totBytes >= state->numBytes); 164 if (state->totBytes == state->numBytes) { 165 if (state->completionEvent) { 166 if (state->delay) |
167 device->schedule(state->completionEvent, 168 curTick() + state->delay); |
169 else 170 state->completionEvent->process(); 171 } 172 delete state; 173 } 174 delete pkt->req; 175 delete pkt; 176 --- 53 unchanged lines hidden (view full) --- 230 inRetry = true; 231 DPRINTF(DMA, "-- Failed, queued\n"); 232 } 233 } while (!backoffTime && result && transmitList.size()); 234 235 if (transmitList.size() && backoffTime && !inRetry) { 236 DPRINTF(DMA, "Scheduling backoff for %d\n", curTick()+backoffTime); 237 if (!backoffEvent.scheduled()) |
238 device->schedule(backoffEvent, backoffTime + curTick()); |
239 } 240 DPRINTF(DMA, "TransmitList: %d, backoffTime: %d inRetry: %d es: %d\n", 241 transmitList.size(), backoffTime, inRetry, 242 backoffEvent.scheduled()); 243} 244 245 246void --- 69 unchanged lines hidden (view full) --- 316 DPRINTF(DMA, "-- Failed: queued\n"); 317 } 318 } while (result && !backoffTime && transmitList.size()); 319 320 if (transmitList.size() && backoffTime && !inRetry && 321 !backoffEvent.scheduled()) { 322 DPRINTF(DMA, "-- Scheduling backoff timer for %d\n", 323 backoffTime+curTick()); |
324 device->schedule(backoffEvent, backoffTime + curTick()); |
325 } 326 } else if (state == Enums::atomic) { 327 transmitList.pop_front(); 328 329 Tick lat; 330 DPRINTF(DMA, "--Sending DMA for addr: %#x size: %d\n", 331 pkt->req->getPaddr(), pkt->req->getSize()); 332 lat = sendAtomic(pkt); --- 5 unchanged lines hidden (view full) --- 338 DPRINTF(DMA, "--Received response for DMA for addr: %#x size: %d nb: %d, tot: %d sched %d\n", 339 pkt->req->getPaddr(), pkt->req->getSize(), state->numBytes, 340 state->totBytes, 341 state->completionEvent ? state->completionEvent->scheduled() : 0 ); 342 343 if (state->totBytes == state->numBytes) { 344 if (state->completionEvent) { 345 assert(!state->completionEvent->scheduled()); |
346 device->schedule(state->completionEvent, 347 curTick() + lat + state->delay); |
348 } 349 delete state; 350 delete pkt->req; 351 } 352 pendingCount--; 353 assert(pendingCount >= 0); 354 delete pkt; 355 --- 30 unchanged lines hidden --- |