diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-02-17 23:27:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-17 23:27:02 -0500 |
commit | 39754f441055c861da403d4e9a67ed80f242a4b4 (patch) | |
tree | 158b1056cb5cdef68d7ec0dfb3ee175eb9acb5bd /drivers | |
parent | d8313ce0f148e648d4e515db5d2c65bbd44fe29e (diff) |
netxen: ratelimit error prints
If for some reason, read from card memory fails the console
get flooded with failure prints. This patch confines print
under printk_ratelimit().
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 81f55e1a34d9..b2f67b98c934 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -1579,8 +1579,9 @@ netxen_nic_pci_mem_write_128M(struct netxen_adapter *adapter, | |||
1579 | } | 1579 | } |
1580 | 1580 | ||
1581 | if (j >= MAX_CTL_CHECK) { | 1581 | if (j >= MAX_CTL_CHECK) { |
1582 | printk("%s: %s Fail to write through agent\n", | 1582 | if (printk_ratelimit()) |
1583 | __func__, netxen_nic_driver_name); | 1583 | dev_err(&adapter->pdev->dev, |
1584 | "failed to write through agent\n"); | ||
1584 | ret = -1; | 1585 | ret = -1; |
1585 | break; | 1586 | break; |
1586 | } | 1587 | } |
@@ -1637,8 +1638,9 @@ netxen_nic_pci_mem_read_128M(struct netxen_adapter *adapter, | |||
1637 | } | 1638 | } |
1638 | 1639 | ||
1639 | if (j >= MAX_CTL_CHECK) { | 1640 | if (j >= MAX_CTL_CHECK) { |
1640 | printk(KERN_ERR "%s: %s Fail to read through agent\n", | 1641 | if (printk_ratelimit()) |
1641 | __func__, netxen_nic_driver_name); | 1642 | dev_err(&adapter->pdev->dev, |
1643 | "failed to read through agent\n"); | ||
1642 | break; | 1644 | break; |
1643 | } | 1645 | } |
1644 | 1646 | ||
@@ -1773,8 +1775,9 @@ netxen_nic_pci_mem_write_2M(struct netxen_adapter *adapter, | |||
1773 | } | 1775 | } |
1774 | 1776 | ||
1775 | if (j >= MAX_CTL_CHECK) { | 1777 | if (j >= MAX_CTL_CHECK) { |
1776 | printk(KERN_ERR "%s: Fail to write through agent\n", | 1778 | if (printk_ratelimit()) |
1777 | netxen_nic_driver_name); | 1779 | dev_err(&adapter->pdev->dev, |
1780 | "failed to write through agent\n"); | ||
1778 | ret = -1; | 1781 | ret = -1; |
1779 | break; | 1782 | break; |
1780 | } | 1783 | } |
@@ -1843,8 +1846,9 @@ netxen_nic_pci_mem_read_2M(struct netxen_adapter *adapter, | |||
1843 | } | 1846 | } |
1844 | 1847 | ||
1845 | if (j >= MAX_CTL_CHECK) { | 1848 | if (j >= MAX_CTL_CHECK) { |
1846 | printk(KERN_ERR "%s: Fail to read through agent\n", | 1849 | if (printk_ratelimit()) |
1847 | netxen_nic_driver_name); | 1850 | dev_err(&adapter->pdev->dev, |
1851 | "failed to read through agent\n"); | ||
1848 | break; | 1852 | break; |
1849 | } | 1853 | } |
1850 | 1854 | ||