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>
This commit is contained in:

committed by
Stefan Richter

parent
72e318e07e
commit
730c32f58b
@@ -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,
|
||||
|
Reference in New Issue
Block a user