aboutsummaryrefslogtreecommitdiffstats
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 16:02:51 -0500
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 {
391 391
392 void (*send_request) (struct fw_card *card, struct fw_packet *packet); 392 void (*send_request) (struct fw_card *card, struct fw_packet *packet);
393 void (*send_response) (struct fw_card *card, struct fw_packet *packet); 393 void (*send_response) (struct fw_card *card, struct fw_packet *packet);
394 /* Calling cancel is valid once a packet has been submitted. */
395 int (*cancel_packet) (struct fw_card *card, struct fw_packet *packet);
394 396
395 /* Allow the specified node ID to do direct DMA out and in of 397 /* Allow the specified node ID to do direct DMA out and in of
396 * host memory. The card will disable this for all node when 398 * 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,
421 void *data, size_t length, 423 void *data, size_t length,
422 fw_transaction_callback_t callback, void *callback_data); 424 fw_transaction_callback_t callback, void *callback_data);
423 425
426int fw_cancel_transaction(struct fw_card *card,
427 struct fw_transaction *transaction);
428
424void fw_flush_transactions(struct fw_card *card); 429void fw_flush_transactions(struct fw_card *card);
425 430
426void fw_send_phy_config(struct fw_card *card, 431void fw_send_phy_config(struct fw_card *card,