diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-02-06 14:49:32 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-09 16:02:51 -0500 |
commit | 730c32f58ba81b3a4fe6d19c7d9e9829dd96d363 (patch) | |
tree | 79149d002b095ca27582d4d7ef00c8eefec67170 /drivers/firewire/fw-card.c | |
parent | 72e318e07e1fa9840bfdd5788421fc6dc51a93de (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-card.c')
-rw-r--r-- | drivers/firewire/fw-card.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c index 7f5dc43ec131..f785b1005284 100644 --- a/drivers/firewire/fw-card.c +++ b/drivers/firewire/fw-card.c | |||
@@ -475,6 +475,12 @@ dummy_send_response(struct fw_card *card, struct fw_packet *packet) | |||
475 | } | 475 | } |
476 | 476 | ||
477 | static int | 477 | static int |
478 | dummy_cancel_packet(struct fw_card *card, struct fw_packet *packet) | ||
479 | { | ||
480 | return -ENOENT; | ||
481 | } | ||
482 | |||
483 | static int | ||
478 | dummy_enable_phys_dma(struct fw_card *card, | 484 | dummy_enable_phys_dma(struct fw_card *card, |
479 | int node_id, int generation) | 485 | int node_id, int generation) |
480 | { | 486 | { |
@@ -487,6 +493,7 @@ static struct fw_card_driver dummy_driver = { | |||
487 | .update_phy_reg = dummy_update_phy_reg, | 493 | .update_phy_reg = dummy_update_phy_reg, |
488 | .set_config_rom = dummy_set_config_rom, | 494 | .set_config_rom = dummy_set_config_rom, |
489 | .send_request = dummy_send_request, | 495 | .send_request = dummy_send_request, |
496 | .cancel_packet = dummy_cancel_packet, | ||
490 | .send_response = dummy_send_response, | 497 | .send_response = dummy_send_response, |
491 | .enable_phys_dma = dummy_enable_phys_dma, | 498 | .enable_phys_dma = dummy_enable_phys_dma, |
492 | }; | 499 | }; |