aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-transaction.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
index 4a9b37461c2..283dac6d327 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
@@ -65,8 +65,7 @@
65#define PHY_IDENTIFIER(id) ((id) << 30) 65#define PHY_IDENTIFIER(id) ((id) << 30)
66 66
67static int close_transaction(struct fw_transaction *transaction, 67static int close_transaction(struct fw_transaction *transaction,
68 struct fw_card *card, int rcode, 68 struct fw_card *card, int rcode)
69 u32 *payload, size_t length)
70{ 69{
71 struct fw_transaction *t; 70 struct fw_transaction *t;
72 unsigned long flags; 71 unsigned long flags;
@@ -82,7 +81,7 @@ static int close_transaction(struct fw_transaction *transaction,
82 spin_unlock_irqrestore(&card->lock, flags); 81 spin_unlock_irqrestore(&card->lock, flags);
83 82
84 if (&t->link != &card->transaction_list) { 83 if (&t->link != &card->transaction_list) {
85 t->callback(card, rcode, payload, length, t->callback_data); 84 t->callback(card, rcode, NULL, 0, t->callback_data);
86 return 0; 85 return 0;
87 } 86 }
88 87
@@ -110,7 +109,7 @@ int fw_cancel_transaction(struct fw_card *card,
110 * if the transaction is still pending and remove it in that case. 109 * if the transaction is still pending and remove it in that case.
111 */ 110 */
112 111
113 return close_transaction(transaction, card, RCODE_CANCELLED, NULL, 0); 112 return close_transaction(transaction, card, RCODE_CANCELLED);
114} 113}
115EXPORT_SYMBOL(fw_cancel_transaction); 114EXPORT_SYMBOL(fw_cancel_transaction);
116 115
@@ -122,7 +121,7 @@ static void transmit_complete_callback(struct fw_packet *packet,
122 121
123 switch (status) { 122 switch (status) {
124 case ACK_COMPLETE: 123 case ACK_COMPLETE:
125 close_transaction(t, card, RCODE_COMPLETE, NULL, 0); 124 close_transaction(t, card, RCODE_COMPLETE);
126 break; 125 break;
127 case ACK_PENDING: 126 case ACK_PENDING:
128 t->timestamp = packet->timestamp; 127 t->timestamp = packet->timestamp;
@@ -130,20 +129,20 @@ static void transmit_complete_callback(struct fw_packet *packet,
130 case ACK_BUSY_X: 129 case ACK_BUSY_X:
131 case ACK_BUSY_A: 130 case ACK_BUSY_A:
132 case ACK_BUSY_B: 131 case ACK_BUSY_B:
133 close_transaction(t, card, RCODE_BUSY, NULL, 0); 132 close_transaction(t, card, RCODE_BUSY);
134 break; 133 break;
135 case ACK_DATA_ERROR: 134 case ACK_DATA_ERROR:
136 close_transaction(t, card, RCODE_DATA_ERROR, NULL, 0); 135 close_transaction(t, card, RCODE_DATA_ERROR);
137 break; 136 break;
138 case ACK_TYPE_ERROR: 137 case ACK_TYPE_ERROR:
139 close_transaction(t, card, RCODE_TYPE_ERROR, NULL, 0); 138 close_transaction(t, card, RCODE_TYPE_ERROR);
140 break; 139 break;
141 default: 140 default:
142 /* 141 /*
143 * In this case the ack is really a juju specific 142 * In this case the ack is really a juju specific
144 * rcode, so just forward that to the callback. 143 * rcode, so just forward that to the callback.
145 */ 144 */
146 close_transaction(t, card, status, NULL, 0); 145 close_transaction(t, card, status);
147 break; 146 break;
148 } 147 }
149} 148}