From daa5140f7e71f513606c2e4f394b9e8b8d679661 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 1 Oct 2018 12:31:19 +0300 Subject: thunderbolt: Make the driver less verbose Currently the driver logs quite a lot to the system message buffer even when doing normal operations. This information is not useful for ordinary users and might even annoy some. For this reason convert most of the logs at info level to happen at debug level instead. The nice output formatting is untouched. Logging can be easily re-enabled by passing "thunderbolt.dyndbg" in the kernel command line (or using the corresponding control file runtime). Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Greg Kroah-Hartman --- drivers/thunderbolt/nhi.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'drivers/thunderbolt/nhi.c') diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 88cff05a1808..02379aa27120 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -95,9 +95,9 @@ static void ring_interrupt_active(struct tb_ring *ring, bool active) else new = old & ~mask; - dev_info(&ring->nhi->pdev->dev, - "%s interrupt at register %#x bit %d (%#x -> %#x)\n", - active ? "enabling" : "disabling", reg, bit, old, new); + dev_dbg(&ring->nhi->pdev->dev, + "%s interrupt at register %#x bit %d (%#x -> %#x)\n", + active ? "enabling" : "disabling", reg, bit, old, new); if (new == old) dev_WARN(&ring->nhi->pdev->dev, @@ -476,8 +476,9 @@ static struct tb_ring *tb_ring_alloc(struct tb_nhi *nhi, u32 hop, int size, void *poll_data) { struct tb_ring *ring = NULL; - dev_info(&nhi->pdev->dev, "allocating %s ring %d of size %d\n", - transmit ? "TX" : "RX", hop, size); + + dev_dbg(&nhi->pdev->dev, "allocating %s ring %d of size %d\n", + transmit ? "TX" : "RX", hop, size); /* Tx Ring 2 is reserved for E2E workaround */ if (transmit && hop == RING_E2E_UNUSED_HOPID) @@ -585,8 +586,8 @@ void tb_ring_start(struct tb_ring *ring) dev_WARN(&ring->nhi->pdev->dev, "ring already started\n"); goto err; } - dev_info(&ring->nhi->pdev->dev, "starting %s %d\n", - RING_TYPE(ring), ring->hop); + dev_dbg(&ring->nhi->pdev->dev, "starting %s %d\n", + RING_TYPE(ring), ring->hop); if (ring->flags & RING_FLAG_FRAME) { /* Means 4096 */ @@ -647,8 +648,8 @@ void tb_ring_stop(struct tb_ring *ring) { spin_lock_irq(&ring->nhi->lock); spin_lock(&ring->lock); - dev_info(&ring->nhi->pdev->dev, "stopping %s %d\n", - RING_TYPE(ring), ring->hop); + dev_dbg(&ring->nhi->pdev->dev, "stopping %s %d\n", + RING_TYPE(ring), ring->hop); if (ring->nhi->going_away) goto err; if (!ring->running) { @@ -716,10 +717,8 @@ void tb_ring_free(struct tb_ring *ring) ring->descriptors_dma = 0; - dev_info(&ring->nhi->pdev->dev, - "freeing %s %d\n", - RING_TYPE(ring), - ring->hop); + dev_dbg(&ring->nhi->pdev->dev, "freeing %s %d\n", RING_TYPE(ring), + ring->hop); /** * ring->work can no longer be scheduled (it is scheduled only @@ -931,7 +930,8 @@ static int nhi_runtime_resume(struct device *dev) static void nhi_shutdown(struct tb_nhi *nhi) { int i; - dev_info(&nhi->pdev->dev, "shutdown\n"); + + dev_dbg(&nhi->pdev->dev, "shutdown\n"); for (i = 0; i < nhi->hop_count; i++) { if (nhi->tx_rings[i]) @@ -1059,7 +1059,7 @@ static int nhi_probe(struct pci_dev *pdev, const struct pci_device_id *id) return -ENODEV; } - dev_info(&nhi->pdev->dev, "NHI initialized, starting thunderbolt\n"); + dev_dbg(&nhi->pdev->dev, "NHI initialized, starting thunderbolt\n"); res = tb_domain_add(tb); if (res) { -- cgit v1.2.1