Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherlabmaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICS Control System Infrastructure
etherlabmaster
Commits
ec246a90
Commit
ec246a90
authored
19 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
Überflüssige Debug-Messages im Treiber-Code entfernt.
parent
9c317024
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/drv_8139too.c
+36
-29
36 additions, 29 deletions
drivers/drv_8139too.c
with
36 additions
and
29 deletions
drivers/drv_8139too.c
+
36
−
29
View file @
ec246a90
...
...
@@ -775,7 +775,9 @@ static void __rtl8139_cleanup_dev (struct net_device *dev)
static
void
rtl8139_chip_reset
(
void
*
ioaddr
)
{
int
i
;
int
succ
=
0
;
#ifdef ECAT_DEBUG
int
succ
=
0
;
#endif
/* Soft reset the chip. */
RTL_W8
(
ChipCmd
,
CmdReset
);
...
...
@@ -783,17 +785,20 @@ static void rtl8139_chip_reset (void *ioaddr)
for
(
i
=
1000
;
i
>
0
;
i
--
)
{
barrier
();
if
((
RTL_R8
(
ChipCmd
)
&
CmdReset
)
==
0
)
{
#ifdef ECAT_DEBUG
succ
=
1
;
#endif
break
;
}
udelay
(
10
);
}
#ifdef ECAT_DEBUG
EC_DBG
(
"rtl8139 chipreset"
);
if
(
succ
==
0
)
EC_DBG
(
"failed"
);
else
EC_DBG
(
"success at count %d"
,
i
);
#endif
}
...
...
@@ -1379,10 +1384,12 @@ static int rtl8139_open (struct net_device *dev)
void
*
ioaddr
=
tp
->
mmio_addr
;
#endif
EC_DBG
(
KERN_DEBUG
"%s: open
\n
"
,
dev
->
name
);
/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
#ifdef ECAT_DEBUG
EC_DBG
(
KERN_DEBUG
"%s: open
\n
"
,
dev
->
name
);
#endif
if
(
dev
!=
rtl_ecat_dev
.
dev
)
{
retval
=
request_irq
(
dev
->
irq
,
rtl8139_interrupt
,
SA_SHIRQ
,
dev
->
name
,
dev
);
...
...
@@ -1444,9 +1451,11 @@ static int rtl8139_open (struct net_device *dev)
dev
->
name
);
}
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
#ifdef ECAT_DEBUG
EC_DBG
(
KERN_DEBUG
"%s: open finished.
\n
"
,
dev
->
name
);
#endif
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
return
0
;
}
...
...
@@ -1471,7 +1480,14 @@ static void rtl_check_media (struct net_device *dev)
(
mii_lpa
&
0x0180
)
?
"100mbps "
:
"10mbps "
,
tp
->
mii
.
full_duplex
?
"full"
:
"half"
,
mii_lpa
);
}
/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
#ifdef ECAT_DEBUG
EC_DBG
(
KERN_DEBUG
"rtl_check_media done.
\n
"
);
#endif
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
}
/* Start the hardware at open or resume. */
...
...
@@ -1482,7 +1498,13 @@ static void rtl8139_hw_start (struct net_device *dev)
u32
i
;
u8
tmp
;
/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
#ifdef ECAT_DEBUG
EC_DBG
(
KERN_DEBUG
"%s: rtl8139_hw_start
\n
"
,
dev
->
name
);
#endif
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
/* Bring old chips out of low-power mode. */
if
(
rtl_chip_info
[
tp
->
chipset
].
flags
&
HasHltClk
)
...
...
@@ -1553,9 +1575,11 @@ static void rtl8139_hw_start (struct net_device *dev)
RTL_W16
(
IntrMask
,
0x0000
);
}
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
#ifdef ECAT_DEBUG
EC_DBG
(
KERN_DEBUG
"%s: rtl8139_hw_start finished.
\n
"
,
dev
->
name
);
#endif
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
}
...
...
@@ -1721,8 +1745,6 @@ static int rtl8139_thread (void *data)
struct
rtl8139_private
*
tp
=
dev
->
priv
;
unsigned
long
timeout
;
EC_DBG
(
KERN_DEBUG
"%s: thread
\n
"
,
dev
->
name
);
daemonize
();
reparent_to_init
();
spin_lock_irq
(
&
current
->
sigmask_lock
);
...
...
@@ -1733,8 +1755,6 @@ static int rtl8139_thread (void *data)
strncpy
(
current
->
comm
,
dev
->
name
,
sizeof
(
current
->
comm
)
-
1
);
current
->
comm
[
sizeof
(
current
->
comm
)
-
1
]
=
'\0'
;
EC_DBG
(
KERN_DEBUG
"%s: thread entering loop...
\n
"
,
dev
->
name
);
while
(
1
)
{
timeout
=
next_tick
;
do
{
...
...
@@ -1751,17 +1771,11 @@ static int rtl8139_thread (void *data)
break
;
rtnl_lock
();
EC_DBG
(
KERN_DEBUG
"%s: thread iter
\n
"
,
dev
->
name
);
rtl8139_thread_iter
(
dev
,
tp
,
tp
->
mmio_addr
);
EC_DBG
(
KERN_DEBUG
"%s: thread iter finished.
\n
"
,
dev
->
name
);
rtnl_unlock
();
}
EC_DBG
(
KERN_DEBUG
"%s: thread exiting...
\n
"
,
dev
->
name
);
complete_and_exit
(
&
tp
->
thr_exited
,
0
);
EC_DBG
(
KERN_DEBUG
"%s: thread exit.
\n
"
,
dev
->
name
);
}
...
...
@@ -1782,8 +1796,6 @@ static void rtl8139_tx_timeout (struct net_device *dev)
u8
tmp8
;
unsigned
long
flags
;
EC_DBG
(
KERN_DEBUG
"%s: tx_timeout
\n
"
,
dev
->
name
);
DPRINTK
(
"%s: Transmit timeout, status %2.2x %4.4x "
"media %2.2x.
\n
"
,
dev
->
name
,
RTL_R8
(
ChipCmd
),
...
...
@@ -1794,6 +1806,8 @@ static void rtl8139_tx_timeout (struct net_device *dev)
/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
EC_DBG
(
KERN_DEBUG
"%s: tx_timeout
\n
"
,
dev
->
name
);
if
(
dev
==
rtl_ecat_dev
.
dev
)
{
if
(
rtl_ecat_dev
.
state
!=
ECAT_DS_SENT
)
...
...
@@ -1837,9 +1851,9 @@ static void rtl8139_tx_timeout (struct net_device *dev)
if
(
dev
!=
rtl_ecat_dev
.
dev
)
netif_wake_queue
(
dev
);
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
EC_DBG
(
KERN_DEBUG
"%s: tx_timeout finished.
\n
"
,
dev
->
name
);
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
}
static
int
rtl8139_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
...
...
@@ -2470,8 +2484,6 @@ static int rtl8139_close (struct net_device *dev)
if
(
rtl_chip_info
[
tp
->
chipset
].
flags
&
HasHltClk
)
RTL_W8
(
HltClk
,
'H'
);
/* 'R' would leave the clock running. */
EC_DBG
(
"rtl8139: closing done
\n
"
);
return
0
;
}
...
...
@@ -2786,8 +2798,6 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev)
void
*
ioaddr
=
tp
->
mmio_addr
;
unsigned
long
flags
;
EC_DBG
(
"%s: rtl8139 GETSTATS called..."
,
dev
->
name
);
/* EtherCAT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
if
(
dev
==
rtl_ecat_dev
.
dev
||
netif_running
(
dev
))
...
...
@@ -2942,9 +2952,6 @@ static int rtl8139_init_module (void)
EtherCAT_device_init
(
&
rtl_ecat_dev
);
printk
(
KERN_DEBUG
"Driver rtl_ecat_dev has address %X.
\n
"
,
(
unsigned
)
&
rtl_ecat_dev
);
/* EtherCAT <<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
return
pci_module_init
(
&
rtl8139_pci_driver
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment