From e5f49c3b837ff90c8aec2c6c66c4966080aced06 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Fri, 26 Jan 2007 00:38:34 -0500 Subject: firewire: Sanitize send error codes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the negative errnos and use RCODEs for all error codes in the complete transaction callback. Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-transaction.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/firewire/fw-transaction.c') diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 780ed2b44983..8387c8ea6735 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c @@ -93,15 +93,15 @@ transmit_complete_callback(struct fw_packet *packet, close_transaction(t, card, RCODE_BUSY, NULL, 0); break; case ACK_DATA_ERROR: + close_transaction(t, card, RCODE_DATA_ERROR, NULL, 0); + break; case ACK_TYPE_ERROR: - close_transaction(t, card, RCODE_SEND_ERROR, NULL, 0); + close_transaction(t, card, RCODE_TYPE_ERROR, NULL, 0); break; default: - /* FIXME: In this case, status is a negative errno, - * corresponding to an OHCI specific transmit error - * code. We should map that to an RCODE instead of - * just the generic RCODE_SEND_ERROR. */ - close_transaction(t, card, RCODE_SEND_ERROR, NULL, 0); + /* In this case the ack is really a juju specific + * rcode, so just forward that to the callback. */ + close_transaction(t, card, status, NULL, 0); break; } } -- cgit