aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2005-05-05 17:40:20 -0400
committerDavid S. Miller <davem@davemloft.net>2005-05-05 17:40:20 -0400
commitb3b7d6be54f919556148946adb4ece91820ad210 (patch)
treeedda774e0a8e6fb1192910e28a58ee384e17c57e /drivers
parent60d530655334369b62f260296a5ed1646a9529f0 (diff)
[TG3]: Elide tg3_stop_block messages when such events are normal.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/tg3.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 058c70c6f1a..e9e0c6e3de5 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3020,7 +3020,7 @@ static irqreturn_t tg3_test_isr(int irq, void *dev_id,
3020} 3020}
3021 3021
3022static int tg3_init_hw(struct tg3 *); 3022static int tg3_init_hw(struct tg3 *);
3023static int tg3_halt(struct tg3 *); 3023static int tg3_halt(struct tg3 *, int);
3024 3024
3025#ifdef CONFIG_NET_POLL_CONTROLLER 3025#ifdef CONFIG_NET_POLL_CONTROLLER
3026static void tg3_poll_controller(struct net_device *dev) 3026static void tg3_poll_controller(struct net_device *dev)
@@ -3044,7 +3044,7 @@ static void tg3_reset_task(void *_data)
3044 restart_timer = tp->tg3_flags2 & TG3_FLG2_RESTART_TIMER; 3044 restart_timer = tp->tg3_flags2 & TG3_FLG2_RESTART_TIMER;
3045 tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER; 3045 tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER;
3046 3046
3047 tg3_halt(tp); 3047 tg3_halt(tp, 0);
3048 tg3_init_hw(tp); 3048 tg3_init_hw(tp);
3049 3049
3050 tg3_netif_start(tp); 3050 tg3_netif_start(tp);
@@ -3390,7 +3390,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
3390 spin_lock_irq(&tp->lock); 3390 spin_lock_irq(&tp->lock);
3391 spin_lock(&tp->tx_lock); 3391 spin_lock(&tp->tx_lock);
3392 3392
3393 tg3_halt(tp); 3393 tg3_halt(tp, 1);
3394 3394
3395 tg3_set_mtu(dev, tp, new_mtu); 3395 tg3_set_mtu(dev, tp, new_mtu);
3396 3396
@@ -3657,7 +3657,7 @@ err_out:
3657/* To stop a block, clear the enable bit and poll till it 3657/* To stop a block, clear the enable bit and poll till it
3658 * clears. tp->lock is held. 3658 * clears. tp->lock is held.
3659 */ 3659 */
3660static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit) 3660static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit, int silent)
3661{ 3661{
3662 unsigned int i; 3662 unsigned int i;
3663 u32 val; 3663 u32 val;
@@ -3690,7 +3690,7 @@ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit)
3690 break; 3690 break;
3691 } 3691 }
3692 3692
3693 if (i == MAX_WAIT_CNT) { 3693 if (i == MAX_WAIT_CNT && !silent) {
3694 printk(KERN_ERR PFX "tg3_stop_block timed out, " 3694 printk(KERN_ERR PFX "tg3_stop_block timed out, "
3695 "ofs=%lx enable_bit=%x\n", 3695 "ofs=%lx enable_bit=%x\n",
3696 ofs, enable_bit); 3696 ofs, enable_bit);
@@ -3701,7 +3701,7 @@ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit)
3701} 3701}
3702 3702
3703/* tp->lock is held. */ 3703/* tp->lock is held. */
3704static int tg3_abort_hw(struct tg3 *tp) 3704static int tg3_abort_hw(struct tg3 *tp, int silent)
3705{ 3705{
3706 int i, err; 3706 int i, err;
3707 3707
@@ -3711,20 +3711,20 @@ static int tg3_abort_hw(struct tg3 *tp)
3711 tw32_f(MAC_RX_MODE, tp->rx_mode); 3711 tw32_f(MAC_RX_MODE, tp->rx_mode);
3712 udelay(10); 3712 udelay(10);
3713 3713
3714 err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE); 3714 err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE, silent);
3715 err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE); 3715 err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE, silent);
3716 err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE); 3716 err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE, silent);
3717 err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE); 3717 err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE, silent);
3718 err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE); 3718 err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE, silent);
3719 err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE); 3719 err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE, silent);
3720 3720
3721 err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE); 3721 err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE, silent);
3722 err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE); 3722 err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE, silent);
3723 err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE); 3723 err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE, silent);
3724 err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE); 3724 err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE, silent);
3725 err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE); 3725 err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE, silent);
3726 err |= tg3_stop_block(tp, DMAC_MODE, DMAC_MODE_ENABLE); 3726 err |= tg3_stop_block(tp, DMAC_MODE, DMAC_MODE_ENABLE, silent);
3727 err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE); 3727 err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE, silent);
3728 if (err) 3728 if (err)
3729 goto out; 3729 goto out;
3730 3730
@@ -3747,15 +3747,15 @@ static int tg3_abort_hw(struct tg3 *tp)
3747 return -ENODEV; 3747 return -ENODEV;
3748 } 3748 }
3749 3749
3750 err = tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE); 3750 err = tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE, silent);
3751 err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE); 3751 err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE, silent);
3752 err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE); 3752 err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE, silent);
3753 3753
3754 tw32(FTQ_RESET, 0xffffffff); 3754 tw32(FTQ_RESET, 0xffffffff);
3755 tw32(FTQ_RESET, 0x00000000); 3755 tw32(FTQ_RESET, 0x00000000);
3756 3756
3757 err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE); 3757 err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE, silent);
3758 err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE); 3758 err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE, silent);
3759 if (err) 3759 if (err)
3760 goto out; 3760 goto out;
3761 3761
@@ -4086,7 +4086,7 @@ static void tg3_stop_fw(struct tg3 *tp)
4086} 4086}
4087 4087
4088/* tp->lock is held. */ 4088/* tp->lock is held. */
4089static int tg3_halt(struct tg3 *tp) 4089static int tg3_halt(struct tg3 *tp, int silent)
4090{ 4090{
4091 int err; 4091 int err;
4092 4092
@@ -4094,7 +4094,7 @@ static int tg3_halt(struct tg3 *tp)
4094 4094
4095 tg3_write_sig_pre_reset(tp, RESET_KIND_SHUTDOWN); 4095 tg3_write_sig_pre_reset(tp, RESET_KIND_SHUTDOWN);
4096 4096
4097 tg3_abort_hw(tp); 4097 tg3_abort_hw(tp, silent);
4098 err = tg3_chip_reset(tp); 4098 err = tg3_chip_reset(tp);
4099 4099
4100 tg3_write_sig_legacy(tp, RESET_KIND_SHUTDOWN); 4100 tg3_write_sig_legacy(tp, RESET_KIND_SHUTDOWN);
@@ -5063,7 +5063,7 @@ static int tg3_reset_hw(struct tg3 *tp)
5063 tg3_write_sig_pre_reset(tp, RESET_KIND_INIT); 5063 tg3_write_sig_pre_reset(tp, RESET_KIND_INIT);
5064 5064
5065 if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) { 5065 if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) {
5066 err = tg3_abort_hw(tp); 5066 err = tg3_abort_hw(tp, 1);
5067 if (err) 5067 if (err)
5068 return err; 5068 return err;
5069 } 5069 }
@@ -5919,7 +5919,7 @@ static int tg3_test_msi(struct tg3 *tp)
5919 spin_lock_irq(&tp->lock); 5919 spin_lock_irq(&tp->lock);
5920 spin_lock(&tp->tx_lock); 5920 spin_lock(&tp->tx_lock);
5921 5921
5922 tg3_halt(tp); 5922 tg3_halt(tp, 1);
5923 err = tg3_init_hw(tp); 5923 err = tg3_init_hw(tp);
5924 5924
5925 spin_unlock(&tp->tx_lock); 5925 spin_unlock(&tp->tx_lock);
@@ -5984,7 +5984,7 @@ static int tg3_open(struct net_device *dev)
5984 5984
5985 err = tg3_init_hw(tp); 5985 err = tg3_init_hw(tp);
5986 if (err) { 5986 if (err) {
5987 tg3_halt(tp); 5987 tg3_halt(tp, 1);
5988 tg3_free_rings(tp); 5988 tg3_free_rings(tp);
5989 } else { 5989 } else {
5990 tp->timer_offset = HZ / 10; 5990 tp->timer_offset = HZ / 10;
@@ -6020,7 +6020,7 @@ static int tg3_open(struct net_device *dev)
6020 pci_disable_msi(tp->pdev); 6020 pci_disable_msi(tp->pdev);
6021 tp->tg3_flags2 &= ~TG3_FLG2_USING_MSI; 6021 tp->tg3_flags2 &= ~TG3_FLG2_USING_MSI;
6022 } 6022 }
6023 tg3_halt(tp); 6023 tg3_halt(tp, 1);
6024 tg3_free_rings(tp); 6024 tg3_free_rings(tp);
6025 tg3_free_consistent(tp); 6025 tg3_free_consistent(tp);
6026 6026
@@ -6293,7 +6293,7 @@ static int tg3_close(struct net_device *dev)
6293 6293
6294 tg3_disable_ints(tp); 6294 tg3_disable_ints(tp);
6295 6295
6296 tg3_halt(tp); 6296 tg3_halt(tp, 1);
6297 tg3_free_rings(tp); 6297 tg3_free_rings(tp);
6298 tp->tg3_flags &= 6298 tp->tg3_flags &=
6299 ~(TG3_FLAG_INIT_COMPLETE | 6299 ~(TG3_FLAG_INIT_COMPLETE |
@@ -7013,7 +7013,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e
7013 tp->tx_pending = ering->tx_pending; 7013 tp->tx_pending = ering->tx_pending;
7014 7014
7015 if (netif_running(dev)) { 7015 if (netif_running(dev)) {
7016 tg3_halt(tp); 7016 tg3_halt(tp, 1);
7017 tg3_init_hw(tp); 7017 tg3_init_hw(tp);
7018 tg3_netif_start(tp); 7018 tg3_netif_start(tp);
7019 } 7019 }
@@ -7056,7 +7056,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
7056 tp->tg3_flags &= ~TG3_FLAG_TX_PAUSE; 7056 tp->tg3_flags &= ~TG3_FLAG_TX_PAUSE;
7057 7057
7058 if (netif_running(dev)) { 7058 if (netif_running(dev)) {
7059 tg3_halt(tp); 7059 tg3_halt(tp, 1);
7060 tg3_init_hw(tp); 7060 tg3_init_hw(tp);
7061 tg3_netif_start(tp); 7061 tg3_netif_start(tp);
7062 } 7062 }
@@ -9239,7 +9239,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
9239 (tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) { 9239 (tr32(WDMAC_MODE) & WDMAC_MODE_ENABLE)) {
9240 pci_save_state(tp->pdev); 9240 pci_save_state(tp->pdev);
9241 tw32(MEMARB_MODE, MEMARB_MODE_ENABLE); 9241 tw32(MEMARB_MODE, MEMARB_MODE_ENABLE);
9242 tg3_halt(tp); 9242 tg3_halt(tp, 1);
9243 } 9243 }
9244 9244
9245 err = tg3_test_dma(tp); 9245 err = tg3_test_dma(tp);
@@ -9362,7 +9362,7 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state)
9362 9362
9363 spin_lock_irq(&tp->lock); 9363 spin_lock_irq(&tp->lock);
9364 spin_lock(&tp->tx_lock); 9364 spin_lock(&tp->tx_lock);
9365 tg3_halt(tp); 9365 tg3_halt(tp, 1);
9366 spin_unlock(&tp->tx_lock); 9366 spin_unlock(&tp->tx_lock);
9367 spin_unlock_irq(&tp->lock); 9367 spin_unlock_irq(&tp->lock);
9368 9368