io_device.cc (2663:c82193ae8467) io_device.cc (2664:d341e9b3506a)
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;

--- 129 unchanged lines hidden (view full) ---

138DmaDevice::DmaDevice(Params *p)
139 : PioDevice(p), dmaPort(NULL)
140{ }
141
142void
143DmaPort::recvRetry()
144{
145 Packet* pkt = transmitList.front();
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;

--- 129 unchanged lines hidden (view full) ---

138DmaDevice::DmaDevice(Params *p)
139 : PioDevice(p), dmaPort(NULL)
140{ }
141
142void
143DmaPort::recvRetry()
144{
145 Packet* pkt = transmitList.front();
146 DPRINTF(DMA, "Retry on Packet %#x with senderState: %#x\n",
147 pkt, pkt->senderState);
148 if (sendTiming(pkt)) {
149 DPRINTF(DMA, "-- Done\n");
150 transmitList.pop_front();
151 pendingCount--;
152 assert(pendingCount >= 0);
153 } else {
154 DPRINTF(DMA, "-- Failed, queued\n");
146 bool result = true;
147 while (result && transmitList.size()) {
148 DPRINTF(DMA, "Retry on Packet %#x with senderState: %#x\n",
149 pkt, pkt->senderState);
150 result = sendTiming(pkt);
151 if (result) {
152 DPRINTF(DMA, "-- Done\n");
153 transmitList.pop_front();
154 pendingCount--;
155 assert(pendingCount >= 0);
156 } else {
157 DPRINTF(DMA, "-- Failed, queued\n");
158 }
155 }
156}
157
158
159void
160DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
161 uint8_t *data)
162{

--- 30 unchanged lines hidden (view full) ---

193 // some kind of selction between access methods
194 // more work is going to have to be done to make
195 // switching actually work
196 /* MemState state = device->platform->system->memState;
197
198 if (state == Timing) { */
199 DPRINTF(DMA, "Attempting to send Packet %#x with senderState: %#x\n",
200 pkt, pkt->senderState);
159 }
160}
161
162
163void
164DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
165 uint8_t *data)
166{

--- 30 unchanged lines hidden (view full) ---

197 // some kind of selction between access methods
198 // more work is going to have to be done to make
199 // switching actually work
200 /* MemState state = device->platform->system->memState;
201
202 if (state == Timing) { */
203 DPRINTF(DMA, "Attempting to send Packet %#x with senderState: %#x\n",
204 pkt, pkt->senderState);
201 if (!sendTiming(pkt)) {
205 if (transmitList.size() || !sendTiming(pkt)) {
202 transmitList.push_back(pkt);
203 DPRINTF(DMA, "-- Failed: queued\n");
204 } else {
205 DPRINTF(DMA, "-- Done\n");
206 pendingCount--;
207 assert(pendingCount >= 0);
208 }
209 /* } else if (state == Atomic) {

--- 28 unchanged lines hidden ---
206 transmitList.push_back(pkt);
207 DPRINTF(DMA, "-- Failed: queued\n");
208 } else {
209 DPRINTF(DMA, "-- Done\n");
210 pendingCount--;
211 assert(pendingCount >= 0);
212 }
213 /* } else if (state == Atomic) {

--- 28 unchanged lines hidden ---