Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
b3b7d6be
Commit
b3b7d6be
authored
May 05, 2005
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TG3]: Elide tg3_stop_block messages when such events are normal.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
60d53065
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
drivers/net/tg3.c
drivers/net/tg3.c
+36
-36
No files found.
drivers/net/tg3.c
View file @
b3b7d6be
...
@@ -3020,7 +3020,7 @@ static irqreturn_t tg3_test_isr(int irq, void *dev_id,
...
@@ -3020,7 +3020,7 @@ static irqreturn_t tg3_test_isr(int irq, void *dev_id,
}
}
static
int
tg3_init_hw
(
struct
tg3
*
);
static
int
tg3_init_hw
(
struct
tg3
*
);
static
int
tg3_halt
(
struct
tg3
*
);
static
int
tg3_halt
(
struct
tg3
*
,
int
);
#ifdef CONFIG_NET_POLL_CONTROLLER
#ifdef CONFIG_NET_POLL_CONTROLLER
static
void
tg3_poll_controller
(
struct
net_device
*
dev
)
static
void
tg3_poll_controller
(
struct
net_device
*
dev
)
...
@@ -3044,7 +3044,7 @@ static void tg3_reset_task(void *_data)
...
@@ -3044,7 +3044,7 @@ static void tg3_reset_task(void *_data)
restart_timer
=
tp
->
tg3_flags2
&
TG3_FLG2_RESTART_TIMER
;
restart_timer
=
tp
->
tg3_flags2
&
TG3_FLG2_RESTART_TIMER
;
tp
->
tg3_flags2
&=
~
TG3_FLG2_RESTART_TIMER
;
tp
->
tg3_flags2
&=
~
TG3_FLG2_RESTART_TIMER
;
tg3_halt
(
tp
);
tg3_halt
(
tp
,
0
);
tg3_init_hw
(
tp
);
tg3_init_hw
(
tp
);
tg3_netif_start
(
tp
);
tg3_netif_start
(
tp
);
...
@@ -3390,7 +3390,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
...
@@ -3390,7 +3390,7 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
spin_lock_irq
(
&
tp
->
lock
);
spin_lock_irq
(
&
tp
->
lock
);
spin_lock
(
&
tp
->
tx_lock
);
spin_lock
(
&
tp
->
tx_lock
);
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
tg3_set_mtu
(
dev
,
tp
,
new_mtu
);
tg3_set_mtu
(
dev
,
tp
,
new_mtu
);
...
@@ -3657,7 +3657,7 @@ err_out:
...
@@ -3657,7 +3657,7 @@ err_out:
/* To stop a block, clear the enable bit and poll till it
/* To stop a block, clear the enable bit and poll till it
* clears. tp->lock is held.
* clears. tp->lock is held.
*/
*/
static
int
tg3_stop_block
(
struct
tg3
*
tp
,
unsigned
long
ofs
,
u32
enable_bit
)
static
int
tg3_stop_block
(
struct
tg3
*
tp
,
unsigned
long
ofs
,
u32
enable_bit
,
int
silent
)
{
{
unsigned
int
i
;
unsigned
int
i
;
u32
val
;
u32
val
;
...
@@ -3690,7 +3690,7 @@ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit)
...
@@ -3690,7 +3690,7 @@ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit)
break
;
break
;
}
}
if
(
i
==
MAX_WAIT_CNT
)
{
if
(
i
==
MAX_WAIT_CNT
&&
!
silent
)
{
printk
(
KERN_ERR
PFX
"tg3_stop_block timed out, "
printk
(
KERN_ERR
PFX
"tg3_stop_block timed out, "
"ofs=%lx enable_bit=%x
\n
"
,
"ofs=%lx enable_bit=%x
\n
"
,
ofs
,
enable_bit
);
ofs
,
enable_bit
);
...
@@ -3701,7 +3701,7 @@ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit)
...
@@ -3701,7 +3701,7 @@ static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit)
}
}
/* tp->lock is held. */
/* tp->lock is held. */
static
int
tg3_abort_hw
(
struct
tg3
*
tp
)
static
int
tg3_abort_hw
(
struct
tg3
*
tp
,
int
silent
)
{
{
int
i
,
err
;
int
i
,
err
;
...
@@ -3711,20 +3711,20 @@ static int tg3_abort_hw(struct tg3 *tp)
...
@@ -3711,20 +3711,20 @@ static int tg3_abort_hw(struct tg3 *tp)
tw32_f
(
MAC_RX_MODE
,
tp
->
rx_mode
);
tw32_f
(
MAC_RX_MODE
,
tp
->
rx_mode
);
udelay
(
10
);
udelay
(
10
);
err
=
tg3_stop_block
(
tp
,
RCVBDI_MODE
,
RCVBDI_MODE_ENABLE
);
err
=
tg3_stop_block
(
tp
,
RCVBDI_MODE
,
RCVBDI_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
RCVLPC_MODE
,
RCVLPC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
RCVLPC_MODE
,
RCVLPC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
RCVLSC_MODE
,
RCVLSC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
RCVLSC_MODE
,
RCVLSC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
RCVDBDI_MODE
,
RCVDBDI_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
RCVDBDI_MODE
,
RCVDBDI_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
RCVDCC_MODE
,
RCVDCC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
RCVDCC_MODE
,
RCVDCC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
RCVCC_MODE
,
RCVCC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
RCVCC_MODE
,
RCVCC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
SNDBDS_MODE
,
SNDBDS_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
SNDBDS_MODE
,
SNDBDS_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
SNDBDI_MODE
,
SNDBDI_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
SNDBDI_MODE
,
SNDBDI_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
SNDDATAI_MODE
,
SNDDATAI_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
SNDDATAI_MODE
,
SNDDATAI_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
RDMAC_MODE
,
RDMAC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
RDMAC_MODE
,
RDMAC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
SNDDATAC_MODE
,
SNDDATAC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
SNDDATAC_MODE
,
SNDDATAC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
DMAC_MODE
,
DMAC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
DMAC_MODE
,
DMAC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
SNDBDC_MODE
,
SNDBDC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
SNDBDC_MODE
,
SNDBDC_MODE_ENABLE
,
silent
);
if
(
err
)
if
(
err
)
goto
out
;
goto
out
;
...
@@ -3747,15 +3747,15 @@ static int tg3_abort_hw(struct tg3 *tp)
...
@@ -3747,15 +3747,15 @@ static int tg3_abort_hw(struct tg3 *tp)
return
-
ENODEV
;
return
-
ENODEV
;
}
}
err
=
tg3_stop_block
(
tp
,
HOSTCC_MODE
,
HOSTCC_MODE_ENABLE
);
err
=
tg3_stop_block
(
tp
,
HOSTCC_MODE
,
HOSTCC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
WDMAC_MODE
,
WDMAC_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
WDMAC_MODE
,
WDMAC_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
MBFREE_MODE
,
MBFREE_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
MBFREE_MODE
,
MBFREE_MODE_ENABLE
,
silent
);
tw32
(
FTQ_RESET
,
0xffffffff
);
tw32
(
FTQ_RESET
,
0xffffffff
);
tw32
(
FTQ_RESET
,
0x00000000
);
tw32
(
FTQ_RESET
,
0x00000000
);
err
|=
tg3_stop_block
(
tp
,
BUFMGR_MODE
,
BUFMGR_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
BUFMGR_MODE
,
BUFMGR_MODE_ENABLE
,
silent
);
err
|=
tg3_stop_block
(
tp
,
MEMARB_MODE
,
MEMARB_MODE_ENABLE
);
err
|=
tg3_stop_block
(
tp
,
MEMARB_MODE
,
MEMARB_MODE_ENABLE
,
silent
);
if
(
err
)
if
(
err
)
goto
out
;
goto
out
;
...
@@ -4086,7 +4086,7 @@ static void tg3_stop_fw(struct tg3 *tp)
...
@@ -4086,7 +4086,7 @@ static void tg3_stop_fw(struct tg3 *tp)
}
}
/* tp->lock is held. */
/* tp->lock is held. */
static
int
tg3_halt
(
struct
tg3
*
tp
)
static
int
tg3_halt
(
struct
tg3
*
tp
,
int
silent
)
{
{
int
err
;
int
err
;
...
@@ -4094,7 +4094,7 @@ static int tg3_halt(struct tg3 *tp)
...
@@ -4094,7 +4094,7 @@ static int tg3_halt(struct tg3 *tp)
tg3_write_sig_pre_reset
(
tp
,
RESET_KIND_SHUTDOWN
);
tg3_write_sig_pre_reset
(
tp
,
RESET_KIND_SHUTDOWN
);
tg3_abort_hw
(
tp
);
tg3_abort_hw
(
tp
,
silent
);
err
=
tg3_chip_reset
(
tp
);
err
=
tg3_chip_reset
(
tp
);
tg3_write_sig_legacy
(
tp
,
RESET_KIND_SHUTDOWN
);
tg3_write_sig_legacy
(
tp
,
RESET_KIND_SHUTDOWN
);
...
@@ -5063,7 +5063,7 @@ static int tg3_reset_hw(struct tg3 *tp)
...
@@ -5063,7 +5063,7 @@ static int tg3_reset_hw(struct tg3 *tp)
tg3_write_sig_pre_reset
(
tp
,
RESET_KIND_INIT
);
tg3_write_sig_pre_reset
(
tp
,
RESET_KIND_INIT
);
if
(
tp
->
tg3_flags
&
TG3_FLAG_INIT_COMPLETE
)
{
if
(
tp
->
tg3_flags
&
TG3_FLAG_INIT_COMPLETE
)
{
err
=
tg3_abort_hw
(
tp
);
err
=
tg3_abort_hw
(
tp
,
1
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
}
}
...
@@ -5919,7 +5919,7 @@ static int tg3_test_msi(struct tg3 *tp)
...
@@ -5919,7 +5919,7 @@ static int tg3_test_msi(struct tg3 *tp)
spin_lock_irq
(
&
tp
->
lock
);
spin_lock_irq
(
&
tp
->
lock
);
spin_lock
(
&
tp
->
tx_lock
);
spin_lock
(
&
tp
->
tx_lock
);
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
err
=
tg3_init_hw
(
tp
);
err
=
tg3_init_hw
(
tp
);
spin_unlock
(
&
tp
->
tx_lock
);
spin_unlock
(
&
tp
->
tx_lock
);
...
@@ -5984,7 +5984,7 @@ static int tg3_open(struct net_device *dev)
...
@@ -5984,7 +5984,7 @@ static int tg3_open(struct net_device *dev)
err
=
tg3_init_hw
(
tp
);
err
=
tg3_init_hw
(
tp
);
if
(
err
)
{
if
(
err
)
{
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
tg3_free_rings
(
tp
);
tg3_free_rings
(
tp
);
}
else
{
}
else
{
tp
->
timer_offset
=
HZ
/
10
;
tp
->
timer_offset
=
HZ
/
10
;
...
@@ -6020,7 +6020,7 @@ static int tg3_open(struct net_device *dev)
...
@@ -6020,7 +6020,7 @@ static int tg3_open(struct net_device *dev)
pci_disable_msi
(
tp
->
pdev
);
pci_disable_msi
(
tp
->
pdev
);
tp
->
tg3_flags2
&=
~
TG3_FLG2_USING_MSI
;
tp
->
tg3_flags2
&=
~
TG3_FLG2_USING_MSI
;
}
}
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
tg3_free_rings
(
tp
);
tg3_free_rings
(
tp
);
tg3_free_consistent
(
tp
);
tg3_free_consistent
(
tp
);
...
@@ -6293,7 +6293,7 @@ static int tg3_close(struct net_device *dev)
...
@@ -6293,7 +6293,7 @@ static int tg3_close(struct net_device *dev)
tg3_disable_ints
(
tp
);
tg3_disable_ints
(
tp
);
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
tg3_free_rings
(
tp
);
tg3_free_rings
(
tp
);
tp
->
tg3_flags
&=
tp
->
tg3_flags
&=
~
(
TG3_FLAG_INIT_COMPLETE
|
~
(
TG3_FLAG_INIT_COMPLETE
|
...
@@ -7013,7 +7013,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e
...
@@ -7013,7 +7013,7 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e
tp
->
tx_pending
=
ering
->
tx_pending
;
tp
->
tx_pending
=
ering
->
tx_pending
;
if
(
netif_running
(
dev
))
{
if
(
netif_running
(
dev
))
{
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
tg3_init_hw
(
tp
);
tg3_init_hw
(
tp
);
tg3_netif_start
(
tp
);
tg3_netif_start
(
tp
);
}
}
...
@@ -7056,7 +7056,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
...
@@ -7056,7 +7056,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
tp
->
tg3_flags
&=
~
TG3_FLAG_TX_PAUSE
;
tp
->
tg3_flags
&=
~
TG3_FLAG_TX_PAUSE
;
if
(
netif_running
(
dev
))
{
if
(
netif_running
(
dev
))
{
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
tg3_init_hw
(
tp
);
tg3_init_hw
(
tp
);
tg3_netif_start
(
tp
);
tg3_netif_start
(
tp
);
}
}
...
@@ -9239,7 +9239,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
...
@@ -9239,7 +9239,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
(
tr32
(
WDMAC_MODE
)
&
WDMAC_MODE_ENABLE
))
{
(
tr32
(
WDMAC_MODE
)
&
WDMAC_MODE_ENABLE
))
{
pci_save_state
(
tp
->
pdev
);
pci_save_state
(
tp
->
pdev
);
tw32
(
MEMARB_MODE
,
MEMARB_MODE_ENABLE
);
tw32
(
MEMARB_MODE
,
MEMARB_MODE_ENABLE
);
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
}
}
err
=
tg3_test_dma
(
tp
);
err
=
tg3_test_dma
(
tp
);
...
@@ -9362,7 +9362,7 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state)
...
@@ -9362,7 +9362,7 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state)
spin_lock_irq
(
&
tp
->
lock
);
spin_lock_irq
(
&
tp
->
lock
);
spin_lock
(
&
tp
->
tx_lock
);
spin_lock
(
&
tp
->
tx_lock
);
tg3_halt
(
tp
);
tg3_halt
(
tp
,
1
);
spin_unlock
(
&
tp
->
tx_lock
);
spin_unlock
(
&
tp
->
tx_lock
);
spin_unlock_irq
(
&
tp
->
lock
);
spin_unlock_irq
(
&
tp
->
lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment