diff options
Diffstat (limited to 'drivers/firewire/core-card.c')
-rw-r--r-- | drivers/firewire/core-card.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index 5045156c531..9dcb30466ec 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
33 | #include <linux/timer.h> | ||
34 | #include <linux/workqueue.h> | 33 | #include <linux/workqueue.h> |
35 | 34 | ||
36 | #include <asm/atomic.h> | 35 | #include <asm/atomic.h> |
@@ -63,7 +62,7 @@ static size_t config_rom_length = 1 + 4 + 1 + 1; | |||
63 | #define BIB_CRC(v) ((v) << 0) | 62 | #define BIB_CRC(v) ((v) << 0) |
64 | #define BIB_CRC_LENGTH(v) ((v) << 16) | 63 | #define BIB_CRC_LENGTH(v) ((v) << 16) |
65 | #define BIB_INFO_LENGTH(v) ((v) << 24) | 64 | #define BIB_INFO_LENGTH(v) ((v) << 24) |
66 | 65 | #define BIB_BUS_NAME 0x31333934 /* "1394" */ | |
67 | #define BIB_LINK_SPEED(v) ((v) << 0) | 66 | #define BIB_LINK_SPEED(v) ((v) << 0) |
68 | #define BIB_GENERATION(v) ((v) << 4) | 67 | #define BIB_GENERATION(v) ((v) << 4) |
69 | #define BIB_MAX_ROM(v) ((v) << 8) | 68 | #define BIB_MAX_ROM(v) ((v) << 8) |
@@ -73,7 +72,8 @@ static size_t config_rom_length = 1 + 4 + 1 + 1; | |||
73 | #define BIB_BMC ((1) << 28) | 72 | #define BIB_BMC ((1) << 28) |
74 | #define BIB_ISC ((1) << 29) | 73 | #define BIB_ISC ((1) << 29) |
75 | #define BIB_CMC ((1) << 30) | 74 | #define BIB_CMC ((1) << 30) |
76 | #define BIB_IMC ((1) << 31) | 75 | #define BIB_IRMC ((1) << 31) |
76 | #define NODE_CAPABILITIES 0x0c0083c0 /* per IEEE 1394 clause 8.3.2.6.5.2 */ | ||
77 | 77 | ||
78 | static void generate_config_rom(struct fw_card *card, __be32 *config_rom) | 78 | static void generate_config_rom(struct fw_card *card, __be32 *config_rom) |
79 | { | 79 | { |
@@ -91,18 +91,18 @@ static void generate_config_rom(struct fw_card *card, __be32 *config_rom) | |||
91 | 91 | ||
92 | config_rom[0] = cpu_to_be32( | 92 | config_rom[0] = cpu_to_be32( |
93 | BIB_CRC_LENGTH(4) | BIB_INFO_LENGTH(4) | BIB_CRC(0)); | 93 | BIB_CRC_LENGTH(4) | BIB_INFO_LENGTH(4) | BIB_CRC(0)); |
94 | config_rom[1] = cpu_to_be32(0x31333934); | 94 | config_rom[1] = cpu_to_be32(BIB_BUS_NAME); |
95 | config_rom[2] = cpu_to_be32( | 95 | config_rom[2] = cpu_to_be32( |
96 | BIB_LINK_SPEED(card->link_speed) | | 96 | BIB_LINK_SPEED(card->link_speed) | |
97 | BIB_GENERATION(card->config_rom_generation++ % 14 + 2) | | 97 | BIB_GENERATION(card->config_rom_generation++ % 14 + 2) | |
98 | BIB_MAX_ROM(2) | | 98 | BIB_MAX_ROM(2) | |
99 | BIB_MAX_RECEIVE(card->max_receive) | | 99 | BIB_MAX_RECEIVE(card->max_receive) | |
100 | BIB_BMC | BIB_ISC | BIB_CMC | BIB_IMC); | 100 | BIB_BMC | BIB_ISC | BIB_CMC | BIB_IRMC); |
101 | config_rom[3] = cpu_to_be32(card->guid >> 32); | 101 | config_rom[3] = cpu_to_be32(card->guid >> 32); |
102 | config_rom[4] = cpu_to_be32(card->guid); | 102 | config_rom[4] = cpu_to_be32(card->guid); |
103 | 103 | ||
104 | /* Generate root directory. */ | 104 | /* Generate root directory. */ |
105 | config_rom[6] = cpu_to_be32(0x0c0083c0); /* node capabilities */ | 105 | config_rom[6] = cpu_to_be32(NODE_CAPABILITIES); |
106 | i = 7; | 106 | i = 7; |
107 | j = 7 + descriptor_count; | 107 | j = 7 + descriptor_count; |
108 | 108 | ||
@@ -407,13 +407,6 @@ static void fw_card_bm_work(struct work_struct *work) | |||
407 | fw_card_put(card); | 407 | fw_card_put(card); |
408 | } | 408 | } |
409 | 409 | ||
410 | static void flush_timer_callback(unsigned long data) | ||
411 | { | ||
412 | struct fw_card *card = (struct fw_card *)data; | ||
413 | |||
414 | fw_flush_transactions(card); | ||
415 | } | ||
416 | |||
417 | void fw_card_initialize(struct fw_card *card, | 410 | void fw_card_initialize(struct fw_card *card, |
418 | const struct fw_card_driver *driver, | 411 | const struct fw_card_driver *driver, |
419 | struct device *device) | 412 | struct device *device) |
@@ -432,8 +425,6 @@ void fw_card_initialize(struct fw_card *card, | |||
432 | init_completion(&card->done); | 425 | init_completion(&card->done); |
433 | INIT_LIST_HEAD(&card->transaction_list); | 426 | INIT_LIST_HEAD(&card->transaction_list); |
434 | spin_lock_init(&card->lock); | 427 | spin_lock_init(&card->lock); |
435 | setup_timer(&card->flush_timer, | ||
436 | flush_timer_callback, (unsigned long)card); | ||
437 | 428 | ||
438 | card->local_node = NULL; | 429 | card->local_node = NULL; |
439 | 430 | ||
@@ -558,7 +549,6 @@ void fw_core_remove_card(struct fw_card *card) | |||
558 | wait_for_completion(&card->done); | 549 | wait_for_completion(&card->done); |
559 | 550 | ||
560 | WARN_ON(!list_empty(&card->transaction_list)); | 551 | WARN_ON(!list_empty(&card->transaction_list)); |
561 | del_timer_sync(&card->flush_timer); | ||
562 | } | 552 | } |
563 | EXPORT_SYMBOL(fw_core_remove_card); | 553 | EXPORT_SYMBOL(fw_core_remove_card); |
564 | 554 | ||