102c102
< DmaPort::DmaPort(DmaDevice *dev, System *s)
---
> DmaPort::DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff)
105c105,106
< backoffTime(0), inRetry(false), backoffEvent(this)
---
> backoffTime(0), minBackoffDelay(min_backoff),
> maxBackoffDelay(max_backoff), inRetry(false), backoffEvent(this)
115,117c116,118
< if (backoffTime < device->minBackoffDelay)
< backoffTime = device->minBackoffDelay;
< else if (backoffTime < device->maxBackoffDelay)
---
> if (backoffTime < minBackoffDelay)
> backoffTime = minBackoffDelay;
> else if (backoffTime < maxBackoffDelay)
141,144c142,147
< if (state->delay)
< schedule(state->completionEvent, curTick + state->delay);
< else
< state->completionEvent->process();
---
> if (state->completionEvent) {
> if (state->delay)
> schedule(state->completionEvent, curTick + state->delay);
> else
> state->completionEvent->process();
> }
162,163c165
< : PioDevice(p), dmaPort(NULL), minBackoffDelay(p->min_backoff_delay),
< maxBackoffDelay(p->max_backoff_delay)
---
> : PioDevice(p), dmaPort(NULL)
224,225d225
< assert(event);
<
316c316,317
< state->totBytes, state->completionEvent->scheduled());
---
> state->totBytes,
> state->completionEvent ? state->completionEvent->scheduled() : 0 );
319,320c320,323
< assert(!state->completionEvent->scheduled());
< schedule(state->completionEvent, curTick + lat + state->delay);
---
> if (state->completionEvent) {
> assert(!state->completionEvent->scheduled());
> schedule(state->completionEvent, curTick + lat + state->delay);
> }