From 9eca8860eab1a6f707c2f3fa6bd8386f0039e33f Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 13 Nov 2008 22:10:51 +0000 Subject: Make a message about the host cacheline size being unsupported a debug only message. The voicebus interface still works whether the cacheline size is supported or not, but the message is confusing to users. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5303 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/voicebus.c | 11 +++++++---- drivers/dahdi/voicebus.h | 1 + drivers/dahdi/wctdm24xxp/base.c | 2 +- drivers/dahdi/wcte12xp/base.c | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) (limited to 'drivers/dahdi') diff --git a/drivers/dahdi/voicebus.c b/drivers/dahdi/voicebus.c index e16cd65..85ba799 100644 --- a/drivers/dahdi/voicebus.c +++ b/drivers/dahdi/voicebus.c @@ -599,10 +599,11 @@ vb_reset_interface(struct voicebus *vb) pci_access = DEFAULT_PCI_ACCESS | (0x3 << 14); break; default: - VB_PRINTK(vb, WARNING, "Host system set a cache size "\ - "of %d which is not supported. " \ - "Disabling memory write line and memory read line.", - vb->cache_line_size); + if (atomic_read(&vb->debuglevel)) + VB_PRINTK(vb, WARNING, "Host system set a cache size "\ + "of %d which is not supported. " \ + "Disabling memory write line and memory read line.\n", + vb->cache_line_size); pci_access = 0xfe584202; break; } @@ -1316,6 +1317,7 @@ voicebus_init(struct pci_dev *pdev, u32 framesize, void (*handle_receive)(void *vbb, void *context), void (*handle_transmit)(void *vbb, void *context), void *context, + u32 debuglevel, struct voicebus **vbp ) { @@ -1340,6 +1342,7 @@ voicebus_init(struct pci_dev *pdev, u32 framesize, goto cleanup; } memset(vb,0,sizeof(*vb)); + voicebus_setdebuglevel(vb, debuglevel); /* \todo make sure there is a note that the caller needs to make sure * board_name stays in memory until voicebus_release is called. */ diff --git a/drivers/dahdi/voicebus.h b/drivers/dahdi/voicebus.h index 9eb9d22..f3be573 100644 --- a/drivers/dahdi/voicebus.h +++ b/drivers/dahdi/voicebus.h @@ -41,6 +41,7 @@ int voicebus_init(struct pci_dev* pdev, u32 framesize, void (*handle_receive)(void *buffer, void *context), void (*handle_transmit)(void *buffer, void *context), void *context, + u32 debuglevel, struct voicebus **vb_p); void voicebus_release(struct voicebus *vb); int voicebus_start(struct voicebus *vb); diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index f157af2..8811673 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -3879,7 +3879,7 @@ retry: snprintf(wc->board_name, sizeof(wc->board_name)-1, "%s%d", wctdm_driver.name, i); ret = voicebus_init(pdev, SFRAME_SIZE, wc->board_name, - handle_receive, handle_transmit, wc, &wc->vb); + handle_receive, handle_transmit, wc, debug, &wc->vb); if (ret) { kfree(wc); return ret; diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index e68bbf8..49d3708 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -1609,7 +1609,8 @@ retry: init_waitqueue_head(&wc->regq); snprintf(wc->name, sizeof(wc->name)-1, "wcte12xp%d", index); if ((res = voicebus_init(pdev, SFRAME_SIZE, wc->name, - t1_handle_receive, t1_handle_transmit, wc, &wc->vb))) { + t1_handle_receive, t1_handle_transmit, wc, + debug, &wc->vb))) { WARN_ON(1); kfree(wc); ifaces[index] = NULL; -- cgit v1.2.3