summaryrefslogtreecommitdiff
path: root/drivers/firewire/fw-transaction.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-02-06 14:49:32 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 22:02:51 +0100
commit730c32f58ba81b3a4fe6d19c7d9e9829dd96d363 (patch)
tree79149d002b095ca27582d4d7ef00c8eefec67170 /drivers/firewire/fw-transaction.h
parent72e318e07e1fa9840bfdd5788421fc6dc51a93de (diff)
firewire: Implement proper transaction cancelation.
Drivers such as fw-sbp2 had no way to properly cancel in-progress transactions, which could leave a pending transaction or an unset packet in the low-level queues after kfree'ing the containing structure. fw_cancel_transaction() lets drivers cancel a submitted transaction. 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-transaction.h')
-rw-r--r--drivers/firewire/fw-transaction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h
index 50ec2c683a31..8f0283cf1a7a 100644
--- a/drivers/firewire/fw-transaction.h
+++ b/drivers/firewire/fw-transaction.h
@@ -391,6 +391,8 @@ struct fw_card_driver {
void (*send_request) (struct fw_card *card, struct fw_packet *packet);
void (*send_response) (struct fw_card *card, struct fw_packet *packet);
+ /* Calling cancel is valid once a packet has been submitted. */
+ int (*cancel_packet) (struct fw_card *card, struct fw_packet *packet);
/* Allow the specified node ID to do direct DMA out and in of
* host memory. The card will disable this for all node when
@@ -421,6 +423,9 @@ fw_send_request(struct fw_card *card, struct fw_transaction *t,
void *data, size_t length,
fw_transaction_callback_t callback, void *callback_data);
+int fw_cancel_transaction(struct fw_card *card,
+ struct fw_transaction *transaction);
+
void fw_flush_transactions(struct fw_card *card);
void fw_send_phy_config(struct fw_card *card,