summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-ohci.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-01-26 00:38:34 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 22:02:47 +0100
commite5f49c3b837ff90c8aec2c6c66c4966080aced06 (patch)
tree16f6cb30602b9e63b9dc3a0a4ef8b56dcaf10346 /drivers/firewire/fw-ohci.c
parent93c4cceb963ebb133531e5e3f4f6e2da0d222656 (diff)
downloadblackbird-op-linux-e5f49c3b837ff90c8aec2c6c66c4966080aced06.tar.gz
blackbird-op-linux-e5f49c3b837ff90c8aec2c6c66c4966080aced06.zip
firewire: Sanitize send error codes.
Drop the negative errnos and use RCODEs for all error codes in the complete transaction callback. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-ohci.c')
-rw-r--r--drivers/firewire/fw-ohci.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index ac6c018de0dc..58bc85dd7917 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -376,7 +376,7 @@ at_context_setup_packet(struct at_context *ctx, struct list_head *list)
packet->payload_length,
DMA_TO_DEVICE);
if (packet->payload_bus == 0) {
- complete_transmission(packet, -ENOMEM, list);
+ complete_transmission(packet, RCODE_SEND_ERROR, list);
return;
}
@@ -438,7 +438,7 @@ at_context_setup_packet(struct at_context *ctx, struct list_head *list)
/* We dont return error codes from this function; all
* transmission errors are reported through the
* callback. */
- complete_transmission(packet, -ESTALE, list);
+ complete_transmission(packet, RCODE_GENERATION, list);
}
}
@@ -484,26 +484,26 @@ static void at_context_tasklet(unsigned long data)
switch (evt) {
case OHCI1394_evt_timeout:
/* Async response transmit timed out. */
- complete_transmission(packet, -ETIMEDOUT, &list);
+ complete_transmission(packet, RCODE_CANCELLED, &list);
break;
case OHCI1394_evt_flushed:
/* The packet was flushed should give same
* error as when we try to use a stale
* generation count. */
- complete_transmission(packet, -ESTALE, &list);
+ complete_transmission(packet,
+ RCODE_GENERATION, &list);
break;
case OHCI1394_evt_missing_ack:
- /* This would be a higher level software
- * error, it is using a valid (current)
- * generation count, but the node is not on
- * the bus. */
- complete_transmission(packet, -ENODEV, &list);
+ /* Using a valid (current) generation count,
+ * but the node is not on the bus or not
+ * sending acks. */
+ complete_transmission(packet, RCODE_NO_ACK, &list);
break;
default:
- complete_transmission(packet, -EIO, &list);
+ complete_transmission(packet, RCODE_SEND_ERROR, &list);
break;
}
} else
OpenPOWER on IntegriCloud