From 26b4950de174bc96c27b77546370dec84fb75ae7 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Sat, 18 Feb 2012 22:03:14 +0100 Subject: 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 --- drivers/firewire/core-topology.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers/firewire/core-topology.c') diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c index 94d3b494ddf..75a6b0df670 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, next_sid = count_ports(sid, &port_count, &child_port_count); if (next_sid == NULL) { - fw_error("Inconsistent extended self IDs.\n"); + fw_err(card, "inconsistent extended self IDs\n"); return NULL; } q = *sid; if (phy_id != SELF_ID_PHY_ID(q)) { - fw_error("PHY ID mismatch in self ID: %d != %d.\n", - phy_id, SELF_ID_PHY_ID(q)); + fw_err(card, "PHY ID mismatch in self ID: %d != %d\n", + phy_id, SELF_ID_PHY_ID(q)); return NULL; } if (child_port_count > stack_depth) { - fw_error("Topology stack underflow\n"); + fw_err(card, "topology stack underflow\n"); return NULL; } @@ -235,7 +235,7 @@ static struct fw_node *build_tree(struct fw_card *card, node = fw_node_create(q, port_count, card->color); if (node == NULL) { - fw_error("Out of memory while building topology.\n"); + fw_err(card, "out of memory while building topology\n"); return NULL; } @@ -284,8 +284,8 @@ static struct fw_node *build_tree(struct fw_card *card, */ if ((next_sid == end && parent_count != 0) || (next_sid < end && parent_count != 1)) { - fw_error("Parent port inconsistency for node %d: " - "parent_count=%d\n", phy_id, parent_count); + fw_err(card, "parent port inconsistency for node %d: " + "parent_count=%d\n", phy_id, parent_count); return NULL; } @@ -530,7 +530,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, */ if (!is_next_generation(generation, card->generation) && card->local_node != NULL) { - fw_notify("skipped bus generations, destroying all nodes\n"); + fw_notice(card, "skipped bus generations, destroying all nodes\n"); fw_destroy_nodes(card); card->bm_retries = 0; } @@ -557,7 +557,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, card->color++; if (local_node == NULL) { - fw_error("topology build failed\n"); + fw_err(card, "topology build failed\n"); /* FIXME: We need to issue a bus reset in this case. */ } else if (card->local_node == NULL) { card->local_node = local_node; -- cgit v1.2.3-70-g09d2 From 98466cc4502b3171f1bdc146db0d2106fcbc3f4f Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Sun, 4 Mar 2012 14:24:31 +0100 Subject: firewire: tone down some diagnostic log messages The "skipped bus generations" message was added together with the respective fw_device retaining/ reviving code in order to see how it all works out. It did well, so don't spam the log anymore. The "register access failure" situation still needs an actual handler. But at this point it makes less sense to ask folks to send mails about it. We now have a pretty good picture of what controllers emit this and when: Texas Instruments PCIxx21 FireWire + CardBus + flash memory card controller: https://bugzilla.redhat.com/show_bug.cgi?id=608544 O2 Micro FireWire + flash memory card controller: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/801719 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/881688 http://marc.info/?l=linux1394-devel&m=132309283531423 http://marc.info/?l=linux1394-devel&m=132368567907469 http://marc.info/?l=linux1394-devel&m=132516165727468 http://marc.info/?l=linux1394-devel&m=133006486927699 Pinnacle Movieboard: commit 7f7e37115a8b6724f26d0637a04e1d35e3c59717 http://marc.info/?l=linux1394-devel&m=130714243325962 Signed-off-by: Stefan Richter --- drivers/firewire/core-topology.c | 1 - drivers/firewire/ohci.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/firewire/core-topology.c') diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c index 75a6b0df670..255646ffc35 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c @@ -530,7 +530,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, */ if (!is_next_generation(generation, card->generation) && card->local_node != NULL) { - fw_notice(card, "skipped bus generations, destroying all nodes\n"); fw_destroy_nodes(card); card->bm_retries = 0; } diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 68b3c1b635f..ee235b53777 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -2076,8 +2076,7 @@ static irqreturn_t irq_handler(int irq, void *data) } if (unlikely(event & OHCI1394_regAccessFail)) - dev_err(ohci->card.device, - "register access failure - please notify linux1394-devel@lists.sf.net\n"); + dev_err(ohci->card.device, "register access failure\n"); if (unlikely(event & OHCI1394_postedWriteErr)) { reg_read(ohci, OHCI1394_PostedWriteAddressHi); -- cgit v1.2.3-70-g09d2