diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-10 16:02:21 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-24 15:56:50 -0400 |
commit | 18e9b10fcdc090d3a38606958167d5923c7099b7 (patch) | |
tree | fd83055d908e8786afc9b3fbc791b57b2ba10c33 /drivers/firewire/fw-transaction.h | |
parent | 664d8010b170ae8b3ce9268b4f4da934d27b0491 (diff) |
firewire: cdev: add closure to async stream ioctl
This changes the as yet unreleased FW_CDEV_IOC_SEND_STREAM_PACKET ioctl
to generate an fw_cdev_event_response event just like the other two
ioctls for asynchronous request transmission do. This way, clients get
feedback on successful or unsuccessful transmission.
This also adds input validation for length, tag, channel, sy, speed.
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.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index f90f09c05833..d4f42cecbdfa 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -412,10 +412,6 @@ void fw_send_request(struct fw_card *card, struct fw_transaction *t, | |||
412 | int tcode, int destination_id, int generation, int speed, | 412 | int tcode, int destination_id, int generation, int speed, |
413 | unsigned long long offset, void *payload, size_t length, | 413 | unsigned long long offset, void *payload, size_t length, |
414 | fw_transaction_callback_t callback, void *callback_data); | 414 | fw_transaction_callback_t callback, void *callback_data); |
415 | void fw_send_stream_packet(struct fw_card *card, struct fw_packet *p, | ||
416 | int generation, int speed, int channel, int sy, int tag, | ||
417 | void *payload, size_t length, fw_packet_callback_t callback); | ||
418 | |||
419 | int fw_cancel_transaction(struct fw_card *card, | 415 | int fw_cancel_transaction(struct fw_card *card, |
420 | struct fw_transaction *transaction); | 416 | struct fw_transaction *transaction); |
421 | void fw_flush_transactions(struct fw_card *card); | 417 | void fw_flush_transactions(struct fw_card *card); |
@@ -425,6 +421,11 @@ int fw_run_transaction(struct fw_card *card, int tcode, int destination_id, | |||
425 | void fw_send_phy_config(struct fw_card *card, | 421 | void fw_send_phy_config(struct fw_card *card, |
426 | int node_id, int generation, int gap_count); | 422 | int node_id, int generation, int gap_count); |
427 | 423 | ||
424 | static inline int fw_stream_packet_destination_id(int tag, int channel, int sy) | ||
425 | { | ||
426 | return tag << 14 | channel << 8 | sy; | ||
427 | } | ||
428 | |||
428 | /* | 429 | /* |
429 | * Called by the topology code to inform the device code of node | 430 | * Called by the topology code to inform the device code of node |
430 | * activity; found, lost, or updated nodes. | 431 | * activity; found, lost, or updated nodes. |