aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-transaction.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-05-07 20:33:32 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-05-10 12:24:13 -0400
commitc781c06d119d04601727f2fbc30151e6760d536d (patch)
tree1faf19acc6bc2a2a3b3bdae8368e395e75cd7518 /drivers/firewire/fw-transaction.h
parente175569c4639872b5cf242c9d4a71cc40c5f3c29 (diff)
firewire: Clean up comment style.
Drop filenames from file preamble, drop editor annotations and use standard indent style for block comments. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed typo)
Diffstat (limited to 'drivers/firewire/fw-transaction.h')
-rw-r--r--drivers/firewire/fw-transaction.h58
1 files changed, 35 insertions, 23 deletions
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h
index 63527340152b..1b7e4dc6c2c1 100644
--- a/drivers/firewire/fw-transaction.h
+++ b/drivers/firewire/fw-transaction.h
@@ -1,7 +1,4 @@
1/* -*- c-basic-offset: 8 -*- 1/*
2 *
3 * fw-transaction.h - Header for IEEE1394 transaction logic
4 *
5 * Copyright (C) 2003-2006 Kristian Hoegsberg <krh@bitplanet.net> 2 * Copyright (C) 2003-2006 Kristian Hoegsberg <krh@bitplanet.net>
6 * 3 *
7 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
@@ -209,7 +206,8 @@ struct fw_packet {
209 size_t payload_length; 206 size_t payload_length;
210 u32 timestamp; 207 u32 timestamp;
211 208
212 /* This callback is called when the packet transmission has 209 /*
210 * This callback is called when the packet transmission has
213 * completed; for successful transmission, the status code is 211 * completed; for successful transmission, the status code is
214 * the ack received from the destination, otherwise it's a 212 * the ack received from the destination, otherwise it's a
215 * negative errno: ENOMEM, ESTALE, ETIMEDOUT, ENODEV, EIO. 213 * negative errno: ENOMEM, ESTALE, ETIMEDOUT, ENODEV, EIO.
@@ -230,8 +228,10 @@ struct fw_transaction {
230 228
231 struct fw_packet packet; 229 struct fw_packet packet;
232 230
233 /* The data passed to the callback is valid only during the 231 /*
234 * callback. */ 232 * The data passed to the callback is valid only during the
233 * callback.
234 */
235 fw_transaction_callback_t callback; 235 fw_transaction_callback_t callback;
236 void *callback_data; 236 void *callback_data;
237}; 237};
@@ -291,8 +291,10 @@ struct fw_card {
291 int link_speed; 291 int link_speed;
292 int config_rom_generation; 292 int config_rom_generation;
293 293
294 /* We need to store up to 4 self ID for a maximum of 63 294 /*
295 * devices plus 3 words for the topology map header. */ 295 * We need to store up to 4 self ID for a maximum of 63
296 * devices plus 3 words for the topology map header.
297 */
296 int self_id_count; 298 int self_id_count;
297 u32 topology_map[252 + 3]; 299 u32 topology_map[252 + 3];
298 300
@@ -318,12 +320,14 @@ struct fw_card {
318struct fw_card *fw_card_get(struct fw_card *card); 320struct fw_card *fw_card_get(struct fw_card *card);
319void fw_card_put(struct fw_card *card); 321void fw_card_put(struct fw_card *card);
320 322
321/* The iso packet format allows for an immediate header/payload part 323/*
324 * The iso packet format allows for an immediate header/payload part
322 * stored in 'header' immediately after the packet info plus an 325 * stored in 'header' immediately after the packet info plus an
323 * indirect payload part that is pointer to by the 'payload' field. 326 * indirect payload part that is pointer to by the 'payload' field.
324 * Applications can use one or the other or both to implement simple 327 * Applications can use one or the other or both to implement simple
325 * low-bandwidth streaming (e.g. audio) or more advanced 328 * low-bandwidth streaming (e.g. audio) or more advanced
326 * scatter-gather streaming (e.g. assembling video frame automatically). */ 329 * scatter-gather streaming (e.g. assembling video frame automatically).
330 */
327 331
328struct fw_iso_packet { 332struct fw_iso_packet {
329 u16 payload_length; /* Length of indirect payload. */ 333 u16 payload_length; /* Length of indirect payload. */
@@ -352,11 +356,13 @@ typedef void (*fw_iso_callback_t) (struct fw_iso_context *context,
352 void *header, 356 void *header,
353 void *data); 357 void *data);
354 358
355/* An iso buffer is just a set of pages mapped for DMA in the 359/*
360 * An iso buffer is just a set of pages mapped for DMA in the
356 * specified direction. Since the pages are to be used for DMA, they 361 * specified direction. Since the pages are to be used for DMA, they
357 * are not mapped into the kernel virtual address space. We store the 362 * are not mapped into the kernel virtual address space. We store the
358 * DMA address in the page private. The helper function 363 * DMA address in the page private. The helper function
359 * fw_iso_buffer_map() will map the pages into a given vma. */ 364 * fw_iso_buffer_map() will map the pages into a given vma.
365 */
360 366
361struct fw_iso_buffer { 367struct fw_iso_buffer {
362 enum dma_data_direction direction; 368 enum dma_data_direction direction;
@@ -408,18 +414,22 @@ fw_iso_context_stop(struct fw_iso_context *ctx);
408struct fw_card_driver { 414struct fw_card_driver {
409 const char *name; 415 const char *name;
410 416
411 /* Enable the given card with the given initial config rom. 417 /*
418 * Enable the given card with the given initial config rom.
412 * This function is expected to activate the card, and either 419 * This function is expected to activate the card, and either
413 * enable the PHY or set the link_on bit and initiate a bus 420 * enable the PHY or set the link_on bit and initiate a bus
414 * reset. */ 421 * reset.
422 */
415 int (*enable) (struct fw_card *card, u32 *config_rom, size_t length); 423 int (*enable) (struct fw_card *card, u32 *config_rom, size_t length);
416 424
417 int (*update_phy_reg) (struct fw_card *card, int address, 425 int (*update_phy_reg) (struct fw_card *card, int address,
418 int clear_bits, int set_bits); 426 int clear_bits, int set_bits);
419 427
420 /* Update the config rom for an enabled card. This function 428 /*
429 * Update the config rom for an enabled card. This function
421 * should change the config rom that is presented on the bus 430 * should change the config rom that is presented on the bus
422 * an initiate a bus reset. */ 431 * an initiate a bus reset.
432 */
423 int (*set_config_rom) (struct fw_card *card, 433 int (*set_config_rom) (struct fw_card *card,
424 u32 *config_rom, size_t length); 434 u32 *config_rom, size_t length);
425 435
@@ -428,12 +438,14 @@ struct fw_card_driver {
428 /* Calling cancel is valid once a packet has been submitted. */ 438 /* Calling cancel is valid once a packet has been submitted. */
429 int (*cancel_packet) (struct fw_card *card, struct fw_packet *packet); 439 int (*cancel_packet) (struct fw_card *card, struct fw_packet *packet);
430 440
431 /* Allow the specified node ID to do direct DMA out and in of 441 /*
442 * Allow the specified node ID to do direct DMA out and in of
432 * host memory. The card will disable this for all node when 443 * host memory. The card will disable this for all node when
433 * a bus reset happens, so driver need to reenable this after 444 * a bus reset happens, so driver need to reenable this after
434 * bus reset. Returns 0 on success, -ENODEV if the card 445 * bus reset. Returns 0 on success, -ENODEV if the card
435 * doesn't support this, -ESTALE if the generation doesn't 446 * doesn't support this, -ESTALE if the generation doesn't
436 * match. */ 447 * match.
448 */
437 int (*enable_phys_dma) (struct fw_card *card, 449 int (*enable_phys_dma) (struct fw_card *card,
438 int node_id, int generation); 450 int node_id, int generation);
439 451
@@ -473,15 +485,15 @@ void fw_flush_transactions(struct fw_card *card);
473void fw_send_phy_config(struct fw_card *card, 485void fw_send_phy_config(struct fw_card *card,
474 int node_id, int generation, int gap_count); 486 int node_id, int generation, int gap_count);
475 487
476/* Called by the topology code to inform the device code of node 488/*
477 * activity; found, lost, or updated nodes */ 489 * Called by the topology code to inform the device code of node
490 * activity; found, lost, or updated nodes.
491 */
478void 492void
479fw_node_event(struct fw_card *card, struct fw_node *node, int event); 493fw_node_event(struct fw_card *card, struct fw_node *node, int event);
480 494
481/* API used by card level drivers */ 495/* API used by card level drivers */
482 496
483/* Do we need phy speed here also? If we add more args, maybe we
484 should go back to struct fw_card_info. */
485void 497void
486fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver, 498fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver,
487 struct device *device); 499 struct device *device);