aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2012-02-18 16:03:14 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2012-02-22 16:36:00 -0500
commit26b4950de174bc96c27b77546370dec84fb75ae7 (patch)
treea48479a6f1f4675d900b621d6ddfde92aadb0e33 /drivers/firewire
parent8408dc1c14c113face77f6f967af98f76999989f (diff)
firewire: core: prefix log messages with card name
Associate all log messages from firewire-core with the respective card because some people have more than one card. E.g. firewire_ohci 0000:04:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0 firewire_ohci 0000:05:00.0: added OHCI v1.10 device as card 1, 8 IR + 8 IT contexts, quirks 0x0 firewire_core: created device fw0: GUID 0814438400000389, S800 firewire_core: phy config: new root=ffc1, gap_count=5 firewire_core: created device fw1: GUID 0814438400000388, S800 firewire_core: created device fw2: GUID 0001d202e06800d1, S800 turns into firewire_ohci 0000:04:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0 firewire_ohci 0000:05:00.0: added OHCI v1.10 device as card 1, 8 IR + 8 IT contexts, quirks 0x0 firewire_core 0000:04:00.0: created device fw0: GUID 0814438400000389, S800 firewire_core 0000:04:00.0: phy config: new root=ffc1, gap_count=5 firewire_core 0000:05:00.0: created device fw1: GUID 0814438400000388, S800 firewire_core 0000:04:00.0: created device fw2: GUID 0001d202e06800d1, S800 This increases the module size slightly; to keep this in check, turn the former printk wrapper macros into functions. Their implementation is largely copied from driver core's dev_printk counterparts. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/core-card.c28
-rw-r--r--drivers/firewire/core-cdev.c10
-rw-r--r--drivers/firewire/core-device.c60
-rw-r--r--drivers/firewire/core-topology.c18
-rw-r--r--drivers/firewire/core-transaction.c4
-rw-r--r--drivers/firewire/core.h6
6 files changed, 72 insertions, 54 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
index 85661b060ed7..b19db0f6a254 100644
--- a/drivers/firewire/core-card.c
+++ b/drivers/firewire/core-card.c
@@ -37,6 +37,22 @@
37 37
38#include "core.h" 38#include "core.h"
39 39
40#define define_fw_printk_level(func, kern_level) \
41void func(const struct fw_card *card, const char *fmt, ...) \
42{ \
43 struct va_format vaf; \
44 va_list args; \
45 \
46 va_start(args, fmt); \
47 vaf.fmt = fmt; \
48 vaf.va = &args; \
49 printk(kern_level KBUILD_MODNAME " %s: %pV", \
50 dev_name(card->device), &vaf); \
51 va_end(args); \
52}
53define_fw_printk_level(fw_err, KERN_ERR);
54define_fw_printk_level(fw_notice, KERN_NOTICE);
55
40int fw_compute_block_crc(__be32 *block) 56int fw_compute_block_crc(__be32 *block)
41{ 57{
42 int length; 58 int length;
@@ -260,7 +276,7 @@ static void allocate_broadcast_channel(struct fw_card *card, int generation)
260 fw_iso_resource_manage(card, generation, 1ULL << 31, 276 fw_iso_resource_manage(card, generation, 1ULL << 31,
261 &channel, &bandwidth, true); 277 &channel, &bandwidth, true);
262 if (channel != 31) { 278 if (channel != 31) {
263 fw_notify("failed to allocate broadcast channel\n"); 279 fw_notice(card, "failed to allocate broadcast channel\n");
264 return; 280 return;
265 } 281 }
266 card->broadcast_channel_allocated = true; 282 card->broadcast_channel_allocated = true;
@@ -343,14 +359,14 @@ static void bm_work(struct work_struct *work)
343 359
344 if (!card->irm_node->link_on) { 360 if (!card->irm_node->link_on) {
345 new_root_id = local_id; 361 new_root_id = local_id;
346 fw_notify("%s, making local node (%02x) root.\n", 362 fw_notice(card, "%s, making local node (%02x) root\n",
347 "IRM has link off", new_root_id); 363 "IRM has link off", new_root_id);
348 goto pick_me; 364 goto pick_me;
349 } 365 }
350 366
351 if (irm_is_1394_1995_only && !keep_this_irm) { 367 if (irm_is_1394_1995_only && !keep_this_irm) {
352 new_root_id = local_id; 368 new_root_id = local_id;
353 fw_notify("%s, making local node (%02x) root.\n", 369 fw_notice(card, "%s, making local node (%02x) root\n",
354 "IRM is not 1394a compliant", new_root_id); 370 "IRM is not 1394a compliant", new_root_id);
355 goto pick_me; 371 goto pick_me;
356 } 372 }
@@ -405,7 +421,7 @@ static void bm_work(struct work_struct *work)
405 * root, and thus, IRM. 421 * root, and thus, IRM.
406 */ 422 */
407 new_root_id = local_id; 423 new_root_id = local_id;
408 fw_notify("%s, making local node (%02x) root.\n", 424 fw_notice(card, "%s, making local node (%02x) root\n",
409 "BM lock failed", new_root_id); 425 "BM lock failed", new_root_id);
410 goto pick_me; 426 goto pick_me;
411 } 427 }
@@ -478,8 +494,8 @@ static void bm_work(struct work_struct *work)
478 spin_unlock_irq(&card->lock); 494 spin_unlock_irq(&card->lock);
479 495
480 if (do_reset) { 496 if (do_reset) {
481 fw_notify("phy config: card %d, new root=%x, gap_count=%d\n", 497 fw_notice(card, "phy config: new root=%x, gap_count=%d\n",
482 card->index, new_root_id, gap_count); 498 new_root_id, gap_count);
483 fw_send_phy_config(card, new_root_id, generation, gap_count); 499 fw_send_phy_config(card, new_root_id, generation, gap_count);
484 reset_bus(card, true); 500 reset_bus(card, true);
485 /* Will allocate broadcast channel after the reset. */ 501 /* Will allocate broadcast channel after the reset. */
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index 4799393247c8..f5f5a9706fcc 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -389,7 +389,7 @@ static void queue_bus_reset_event(struct client *client)
389 389
390 e = kzalloc(sizeof(*e), GFP_KERNEL); 390 e = kzalloc(sizeof(*e), GFP_KERNEL);
391 if (e == NULL) { 391 if (e == NULL) {
392 fw_notify("Out of memory when allocating event\n"); 392 fw_notice(client->device->card, "out of memory when allocating event\n");
393 return; 393 return;
394 } 394 }
395 395
@@ -691,7 +691,7 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
691 r = kmalloc(sizeof(*r), GFP_ATOMIC); 691 r = kmalloc(sizeof(*r), GFP_ATOMIC);
692 e = kmalloc(sizeof(*e), GFP_ATOMIC); 692 e = kmalloc(sizeof(*e), GFP_ATOMIC);
693 if (r == NULL || e == NULL) { 693 if (r == NULL || e == NULL) {
694 fw_notify("Out of memory when allocating event\n"); 694 fw_notice(card, "out of memory when allocating event\n");
695 goto failed; 695 goto failed;
696 } 696 }
697 r->card = card; 697 r->card = card;
@@ -928,7 +928,7 @@ static void iso_callback(struct fw_iso_context *context, u32 cycle,
928 928
929 e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC); 929 e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC);
930 if (e == NULL) { 930 if (e == NULL) {
931 fw_notify("Out of memory when allocating event\n"); 931 fw_notice(context->card, "out of memory when allocating event\n");
932 return; 932 return;
933 } 933 }
934 e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT; 934 e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT;
@@ -948,7 +948,7 @@ static void iso_mc_callback(struct fw_iso_context *context,
948 948
949 e = kmalloc(sizeof(*e), GFP_ATOMIC); 949 e = kmalloc(sizeof(*e), GFP_ATOMIC);
950 if (e == NULL) { 950 if (e == NULL) {
951 fw_notify("Out of memory when allocating event\n"); 951 fw_notice(context->card, "out of memory when allocating event\n");
952 return; 952 return;
953 } 953 }
954 e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL; 954 e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL;
@@ -1548,7 +1548,7 @@ void fw_cdev_handle_phy_packet(struct fw_card *card, struct fw_packet *p)
1548 list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) { 1548 list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) {
1549 e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC); 1549 e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC);
1550 if (e == NULL) { 1550 if (e == NULL) {
1551 fw_notify("Out of memory when allocating event\n"); 1551 fw_notice(card, "out of memory when allocating event\n");
1552 break; 1552 break;
1553 } 1553 }
1554 e->phy_packet.closure = client->phy_receiver_closure; 1554 e->phy_packet.closure = client->phy_receiver_closure;
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 4c6c7d8cdaf1..afa7c83bd114 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -485,6 +485,7 @@ static int read_rom(struct fw_device *device,
485 */ 485 */
486static int read_config_rom(struct fw_device *device, int generation) 486static int read_config_rom(struct fw_device *device, int generation)
487{ 487{
488 struct fw_card *card = device->card;
488 const u32 *old_rom, *new_rom; 489 const u32 *old_rom, *new_rom;
489 u32 *rom, *stack; 490 u32 *rom, *stack;
490 u32 sp, key; 491 u32 sp, key;
@@ -529,12 +530,12 @@ static int read_config_rom(struct fw_device *device, int generation)
529 */ 530 */
530 if ((rom[2] & 0x7) < device->max_speed || 531 if ((rom[2] & 0x7) < device->max_speed ||
531 device->max_speed == SCODE_BETA || 532 device->max_speed == SCODE_BETA ||
532 device->card->beta_repeaters_present) { 533 card->beta_repeaters_present) {
533 u32 dummy; 534 u32 dummy;
534 535
535 /* for S1600 and S3200 */ 536 /* for S1600 and S3200 */
536 if (device->max_speed == SCODE_BETA) 537 if (device->max_speed == SCODE_BETA)
537 device->max_speed = device->card->link_speed; 538 device->max_speed = card->link_speed;
538 539
539 while (device->max_speed > SCODE_100) { 540 while (device->max_speed > SCODE_100) {
540 if (read_rom(device, generation, 0, &dummy) == 541 if (read_rom(device, generation, 0, &dummy) ==
@@ -576,9 +577,9 @@ static int read_config_rom(struct fw_device *device, int generation)
576 * a firmware bug. Ignore this whole block, i.e. 577 * a firmware bug. Ignore this whole block, i.e.
577 * simply set a fake block length of 0. 578 * simply set a fake block length of 0.
578 */ 579 */
579 fw_error("skipped invalid ROM block %x at %llx\n", 580 fw_err(card, "skipped invalid ROM block %x at %llx\n",
580 rom[i], 581 rom[i],
581 i * 4 | CSR_REGISTER_BASE | CSR_CONFIG_ROM); 582 i * 4 | CSR_REGISTER_BASE | CSR_CONFIG_ROM);
582 rom[i] = 0; 583 rom[i] = 0;
583 end = i; 584 end = i;
584 } 585 }
@@ -604,9 +605,10 @@ static int read_config_rom(struct fw_device *device, int generation)
604 * the ROM don't have to check offsets all the time. 605 * the ROM don't have to check offsets all the time.
605 */ 606 */
606 if (i + (rom[i] & 0xffffff) >= MAX_CONFIG_ROM_SIZE) { 607 if (i + (rom[i] & 0xffffff) >= MAX_CONFIG_ROM_SIZE) {
607 fw_error("skipped unsupported ROM entry %x at %llx\n", 608 fw_err(card,
608 rom[i], 609 "skipped unsupported ROM entry %x at %llx\n",
609 i * 4 | CSR_REGISTER_BASE | CSR_CONFIG_ROM); 610 rom[i],
611 i * 4 | CSR_REGISTER_BASE | CSR_CONFIG_ROM);
610 rom[i] = 0; 612 rom[i] = 0;
611 continue; 613 continue;
612 } 614 }
@@ -673,7 +675,7 @@ static void create_units(struct fw_device *device)
673 */ 675 */
674 unit = kzalloc(sizeof(*unit), GFP_KERNEL); 676 unit = kzalloc(sizeof(*unit), GFP_KERNEL);
675 if (unit == NULL) { 677 if (unit == NULL) {
676 fw_error("failed to allocate memory for unit\n"); 678 fw_err(device->card, "out of memory for unit\n");
677 continue; 679 continue;
678 } 680 }
679 681
@@ -875,7 +877,7 @@ static int lookup_existing_device(struct device *dev, void *data)
875 smp_wmb(); /* update node_id before generation */ 877 smp_wmb(); /* update node_id before generation */
876 old->generation = card->generation; 878 old->generation = card->generation;
877 old->config_rom_retries = 0; 879 old->config_rom_retries = 0;
878 fw_notify("rediscovered device %s\n", dev_name(dev)); 880 fw_notice(card, "rediscovered device %s\n", dev_name(dev));
879 881
880 PREPARE_DELAYED_WORK(&old->work, fw_device_update); 882 PREPARE_DELAYED_WORK(&old->work, fw_device_update);
881 fw_schedule_device_work(old, 0); 883 fw_schedule_device_work(old, 0);
@@ -956,6 +958,7 @@ static void fw_device_init(struct work_struct *work)
956{ 958{
957 struct fw_device *device = 959 struct fw_device *device =
958 container_of(work, struct fw_device, work.work); 960 container_of(work, struct fw_device, work.work);
961 struct fw_card *card = device->card;
959 struct device *revived_dev; 962 struct device *revived_dev;
960 int minor, ret; 963 int minor, ret;
961 964
@@ -972,16 +975,16 @@ static void fw_device_init(struct work_struct *work)
972 fw_schedule_device_work(device, RETRY_DELAY); 975 fw_schedule_device_work(device, RETRY_DELAY);
973 } else { 976 } else {
974 if (device->node->link_on) 977 if (device->node->link_on)
975 fw_notify("giving up on config rom for node id %x\n", 978 fw_notice(card, "giving up on Config ROM for node id %x\n",
976 device->node_id); 979 device->node_id);
977 if (device->node == device->card->root_node) 980 if (device->node == card->root_node)
978 fw_schedule_bm_work(device->card, 0); 981 fw_schedule_bm_work(card, 0);
979 fw_device_release(&device->device); 982 fw_device_release(&device->device);
980 } 983 }
981 return; 984 return;
982 } 985 }
983 986
984 revived_dev = device_find_child(device->card->device, 987 revived_dev = device_find_child(card->device,
985 device, lookup_existing_device); 988 device, lookup_existing_device);
986 if (revived_dev) { 989 if (revived_dev) {
987 put_device(revived_dev); 990 put_device(revived_dev);
@@ -1004,7 +1007,7 @@ static void fw_device_init(struct work_struct *work)
1004 1007
1005 device->device.bus = &fw_bus_type; 1008 device->device.bus = &fw_bus_type;
1006 device->device.type = &fw_device_type; 1009 device->device.type = &fw_device_type;
1007 device->device.parent = device->card->device; 1010 device->device.parent = card->device;
1008 device->device.devt = MKDEV(fw_cdev_major, minor); 1011 device->device.devt = MKDEV(fw_cdev_major, minor);
1009 dev_set_name(&device->device, "fw%d", minor); 1012 dev_set_name(&device->device, "fw%d", minor);
1010 1013
@@ -1016,7 +1019,7 @@ static void fw_device_init(struct work_struct *work)
1016 &device->attribute_group); 1019 &device->attribute_group);
1017 1020
1018 if (device_add(&device->device)) { 1021 if (device_add(&device->device)) {
1019 fw_error("Failed to add device.\n"); 1022 fw_err(card, "failed to add device\n");
1020 goto error_with_cdev; 1023 goto error_with_cdev;
1021 } 1024 }
1022 1025
@@ -1037,18 +1040,10 @@ static void fw_device_init(struct work_struct *work)
1037 PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown); 1040 PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown);
1038 fw_schedule_device_work(device, SHUTDOWN_DELAY); 1041 fw_schedule_device_work(device, SHUTDOWN_DELAY);
1039 } else { 1042 } else {
1040 if (device->config_rom_retries) 1043 fw_notice(card, "created device %s: GUID %08x%08x, S%d00\n",
1041 fw_notify("created device %s: GUID %08x%08x, S%d00, " 1044 dev_name(&device->device),
1042 "%d config ROM retries\n", 1045 device->config_rom[3], device->config_rom[4],
1043 dev_name(&device->device), 1046 1 << device->max_speed);
1044 device->config_rom[3], device->config_rom[4],
1045 1 << device->max_speed,
1046 device->config_rom_retries);
1047 else
1048 fw_notify("created device %s: GUID %08x%08x, S%d00\n",
1049 dev_name(&device->device),
1050 device->config_rom[3], device->config_rom[4],
1051 1 << device->max_speed);
1052 device->config_rom_retries = 0; 1047 device->config_rom_retries = 0;
1053 1048
1054 set_broadcast_channel(device, device->generation); 1049 set_broadcast_channel(device, device->generation);
@@ -1060,8 +1055,8 @@ static void fw_device_init(struct work_struct *work)
1060 * just end up running the IRM work a couple of extra times - 1055 * just end up running the IRM work a couple of extra times -
1061 * pretty harmless. 1056 * pretty harmless.
1062 */ 1057 */
1063 if (device->node == device->card->root_node) 1058 if (device->node == card->root_node)
1064 fw_schedule_bm_work(device->card, 0); 1059 fw_schedule_bm_work(card, 0);
1065 1060
1066 return; 1061 return;
1067 1062
@@ -1165,12 +1160,13 @@ static void fw_device_refresh(struct work_struct *work)
1165 FW_DEVICE_RUNNING) == FW_DEVICE_GONE) 1160 FW_DEVICE_RUNNING) == FW_DEVICE_GONE)
1166 goto gone; 1161 goto gone;
1167 1162
1168 fw_notify("refreshed device %s\n", dev_name(&device->device)); 1163 fw_notice(card, "refreshed device %s\n", dev_name(&device->device));
1169 device->config_rom_retries = 0; 1164 device->config_rom_retries = 0;
1170 goto out; 1165 goto out;
1171 1166
1172 give_up: 1167 give_up:
1173 fw_notify("giving up on refresh of device %s\n", dev_name(&device->device)); 1168 fw_notice(card, "giving up on refresh of device %s\n",
1169 dev_name(&device->device));
1174 gone: 1170 gone:
1175 atomic_set(&device->state, FW_DEVICE_GONE); 1171 atomic_set(&device->state, FW_DEVICE_GONE);
1176 PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown); 1172 PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown);
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c
index 94d3b494ddfb..75a6b0df670a 100644
--- a/drivers/firewire/core-topology.c
+++ b/drivers/firewire/core-topology.c
@@ -205,19 +205,19 @@ static struct fw_node *build_tree(struct fw_card *card,
205 next_sid = count_ports(sid, &port_count, &child_port_count); 205 next_sid = count_ports(sid, &port_count, &child_port_count);
206 206
207 if (next_sid == NULL) { 207 if (next_sid == NULL) {
208 fw_error("Inconsistent extended self IDs.\n"); 208 fw_err(card, "inconsistent extended self IDs\n");
209 return NULL; 209 return NULL;
210 } 210 }
211 211
212 q = *sid; 212 q = *sid;
213 if (phy_id != SELF_ID_PHY_ID(q)) { 213 if (phy_id != SELF_ID_PHY_ID(q)) {
214 fw_error("PHY ID mismatch in self ID: %d != %d.\n", 214 fw_err(card, "PHY ID mismatch in self ID: %d != %d\n",
215 phy_id, SELF_ID_PHY_ID(q)); 215 phy_id, SELF_ID_PHY_ID(q));
216 return NULL; 216 return NULL;
217 } 217 }
218 218
219 if (child_port_count > stack_depth) { 219 if (child_port_count > stack_depth) {
220 fw_error("Topology stack underflow\n"); 220 fw_err(card, "topology stack underflow\n");
221 return NULL; 221 return NULL;
222 } 222 }
223 223
@@ -235,7 +235,7 @@ static struct fw_node *build_tree(struct fw_card *card,
235 235
236 node = fw_node_create(q, port_count, card->color); 236 node = fw_node_create(q, port_count, card->color);
237 if (node == NULL) { 237 if (node == NULL) {
238 fw_error("Out of memory while building topology.\n"); 238 fw_err(card, "out of memory while building topology\n");
239 return NULL; 239 return NULL;
240 } 240 }
241 241
@@ -284,8 +284,8 @@ static struct fw_node *build_tree(struct fw_card *card,
284 */ 284 */
285 if ((next_sid == end && parent_count != 0) || 285 if ((next_sid == end && parent_count != 0) ||
286 (next_sid < end && parent_count != 1)) { 286 (next_sid < end && parent_count != 1)) {
287 fw_error("Parent port inconsistency for node %d: " 287 fw_err(card, "parent port inconsistency for node %d: "
288 "parent_count=%d\n", phy_id, parent_count); 288 "parent_count=%d\n", phy_id, parent_count);
289 return NULL; 289 return NULL;
290 } 290 }
291 291
@@ -530,7 +530,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
530 */ 530 */
531 if (!is_next_generation(generation, card->generation) && 531 if (!is_next_generation(generation, card->generation) &&
532 card->local_node != NULL) { 532 card->local_node != NULL) {
533 fw_notify("skipped bus generations, destroying all nodes\n"); 533 fw_notice(card, "skipped bus generations, destroying all nodes\n");
534 fw_destroy_nodes(card); 534 fw_destroy_nodes(card);
535 card->bm_retries = 0; 535 card->bm_retries = 0;
536 } 536 }
@@ -557,7 +557,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
557 card->color++; 557 card->color++;
558 558
559 if (local_node == NULL) { 559 if (local_node == NULL) {
560 fw_error("topology build failed\n"); 560 fw_err(card, "topology build failed\n");
561 /* FIXME: We need to issue a bus reset in this case. */ 561 /* FIXME: We need to issue a bus reset in this case. */
562 } else if (card->local_node == NULL) { 562 } else if (card->local_node == NULL) {
563 card->local_node = local_node; 563 card->local_node = local_node;
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 855ab3f5936f..426886a91bd1 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -770,7 +770,7 @@ static struct fw_request *allocate_request(struct fw_card *card,
770 break; 770 break;
771 771
772 default: 772 default:
773 fw_error("ERROR - corrupt request received - %08x %08x %08x\n", 773 fw_notice(card, "ERROR - corrupt request received - %08x %08x %08x\n",
774 p->header[0], p->header[1], p->header[2]); 774 p->header[0], p->header[1], p->header[2]);
775 return NULL; 775 return NULL;
776 } 776 }
@@ -960,7 +960,7 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
960 960
961 if (&t->link == &card->transaction_list) { 961 if (&t->link == &card->transaction_list) {
962 timed_out: 962 timed_out:
963 fw_notify("Unsolicited response (source %x, tlabel %x)\n", 963 fw_notice(card, "unsolicited response (source %x, tlabel %x)\n",
964 source, tlabel); 964 source, tlabel);
965 return; 965 return;
966 } 966 }
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
index b5b34952cf16..62f57a4331e3 100644
--- a/drivers/firewire/core.h
+++ b/drivers/firewire/core.h
@@ -1,6 +1,7 @@
1#ifndef _FIREWIRE_CORE_H 1#ifndef _FIREWIRE_CORE_H
2#define _FIREWIRE_CORE_H 2#define _FIREWIRE_CORE_H
3 3
4#include <linux/compiler.h>
4#include <linux/device.h> 5#include <linux/device.h>
5#include <linux/fs.h> 6#include <linux/fs.h>
6#include <linux/list.h> 7#include <linux/list.h>
@@ -24,6 +25,11 @@ struct fw_packet;
24 25
25/* -card */ 26/* -card */
26 27
28extern __printf(2, 3)
29void fw_err(const struct fw_card *card, const char *fmt, ...);
30extern __printf(2, 3)
31void fw_notice(const struct fw_card *card, const char *fmt, ...);
32
27/* bitfields within the PHY registers */ 33/* bitfields within the PHY registers */
28#define PHY_LINK_ACTIVE 0x80 34#define PHY_LINK_ACTIVE 0x80
29#define PHY_CONTENDER 0x40 35#define PHY_CONTENDER 0x40