diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-07-18 06:44:01 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-07-23 07:36:27 -0400 |
commit | 18d0cdfd1a4cc9028c0ef80f94538b31541f8fe5 (patch) | |
tree | c28db7537da311e59e871aba7f6f0edaa46535b9 /include/linux/firewire.h | |
parent | 80792d182e43bee89fce509e64fdea27e600530f (diff) |
firewire: normalize status values in packet callbacks
core-transaction.c transmit_complete_callback() and close_transaction()
expect packet callback status to be an ACK or RCODE, and ACKs get
translated to RCODEs for transaction callbacks.
An old comment on the packet callback API (been there from the initial
submission of the stack) and the dummy_driver implementation of
send_request/send_response deviated from this as they also included
-ERRNO in the range of status values.
Let's narrow status values down to ACK and RCODE to prevent surprises.
RCODE_CANCELLED is chosen as the dummy_driver's RCODE as its meaning of
"transaction timed out" comes closest to what happens when a transaction
coincides with card removal.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'include/linux/firewire.h')
-rw-r--r-- | include/linux/firewire.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index adc5b55e6e5f..0c38b8e97722 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -285,10 +285,10 @@ struct fw_packet { | |||
285 | u32 timestamp; | 285 | u32 timestamp; |
286 | 286 | ||
287 | /* | 287 | /* |
288 | * This callback is called when the packet transmission has | 288 | * This callback is called when the packet transmission has completed. |
289 | * completed; for successful transmission, the status code is | 289 | * For successful transmission, the status code is the ack received |
290 | * the ack received from the destination, otherwise it's a | 290 | * from the destination. Otherwise it is one of the juju-specific |
291 | * negative errno: ENOMEM, ESTALE, ETIMEDOUT, ENODEV, EIO. | 291 | * rcodes: RCODE_SEND_ERROR, _CANCELLED, _BUSY, _GENERATION, _NO_ACK. |
292 | * The callback can be called from tasklet context and thus | 292 | * The callback can be called from tasklet context and thus |
293 | * must never block. | 293 | * must never block. |
294 | */ | 294 | */ |