Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
fa88c854
Commit
fa88c854
authored
Jul 29, 2004
by
Ganesh Venkatesan
Committed by
Jeff Garzik
Jul 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] e1000 - white space and related cleanup
parent
88966993
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
131 deletions
+97
-131
drivers/net/e1000/e1000.h
drivers/net/e1000/e1000.h
+7
-9
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_hw.c
+1
-1
drivers/net/e1000/e1000_hw.h
drivers/net/e1000/e1000_hw.h
+0
-1
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+65
-98
drivers/net/e1000/e1000_param.c
drivers/net/e1000/e1000_param.c
+24
-22
No files found.
drivers/net/e1000/e1000.h
View file @
fa88c854
...
...
@@ -102,11 +102,12 @@ struct e1000_adapter;
#define E1000_MAX_INTR 10
/*
How many descriptors for TX and RX ?
*/
/*
TX/RX descriptor defines
*/
#define E1000_DEFAULT_TXD 256
#define E1000_MAX_TXD 256
#define E1000_MIN_TXD 80
#define E1000_MAX_82544_TXD 4096
#define E1000_DEFAULT_RXD 256
#define E1000_MAX_RXD 256
#define E1000_MIN_RXD 80
...
...
@@ -127,14 +128,11 @@ struct e1000_adapter;
#define E1000_TX_HEAD_ADDR_SHIFT 7
#define E1000_PBA_TX_MASK 0xFFFF0000
/* Flow Control High-Watermark: 5688 bytes below Rx FIFO size */
#define E1000_FC_HIGH_DIFF 0x1638
/* Flow Control Low-Watermark: 5696 bytes below Rx FIFO size */
#define E1000_FC_LOW_DIFF 0x1640
/* Flow Control Watermarks */
#define E1000_FC_HIGH_DIFF 0x1638
/* High: 5688 bytes below Rx FIFO size */
#define E1000_FC_LOW_DIFF 0x1640
/* Low: 5696 bytes below Rx FIFO size */
/* Flow Control Pause Time: 858 usec */
#define E1000_FC_PAUSE_TIME 0x0680
#define E1000_FC_PAUSE_TIME 0x0680
/* 858 usec */
/* How many Tx Descriptors do we need to call netif_wake_queue ? */
#define E1000_TX_QUEUE_WAKE 16
...
...
@@ -206,7 +204,7 @@ struct e1000_adapter {
spinlock_t
stats_lock
;
atomic_t
irq_sem
;
struct
work_struct
tx_timeout_task
;
uint8_t
fc_autoneg
;
uint8_t
fc_autoneg
;
struct
timer_list
blink_timer
;
unsigned
long
led_status
;
...
...
drivers/net/e1000/e1000_hw.c
View file @
fa88c854
...
...
@@ -3445,7 +3445,6 @@ e1000_read_eeprom(struct e1000_hw *hw,
uint32_t
i
=
0
;
DEBUGFUNC
(
"e1000_read_eeprom"
);
/* A check for invalid values: offset too large, too many words, and not
* enough words.
*/
...
...
@@ -5216,3 +5215,4 @@ e1000_enable_mng_pass_thru(struct e1000_hw *hw)
}
return
FALSE
;
}
drivers/net/e1000/e1000_hw.h
View file @
fa88c854
...
...
@@ -1043,7 +1043,6 @@ struct e1000_hw {
#define E1000_EEPROM_SWDPIN0 0x0001
/* SWDPIN 0 EEPROM Value */
#define E1000_EEPROM_LED_LOGIC 0x0020
/* Led Logic Word */
/* Register Bit Masks */
/* Device Control */
#define E1000_CTRL_FD 0x00000001
/* Full duplex.0=half; 1=full */
...
...
drivers/net/e1000/e1000_main.c
View file @
fa88c854
This diff is collapsed.
Click to expand it.
drivers/net/e1000/e1000_param.c
View file @
fa88c854
...
...
@@ -235,7 +235,7 @@ struct e1000_option {
static
int
__devinit
e1000_validate_option
(
int
*
value
,
struct
e1000_option
*
opt
,
struct
e1000_adapter
*
adapter
)
struct
e1000_adapter
*
adapter
)
{
if
(
*
value
==
OPTION_UNSET
)
{
*
value
=
opt
->
def
;
...
...
@@ -256,7 +256,7 @@ e1000_validate_option(int *value, struct e1000_option *opt,
case
range_option
:
if
(
*
value
>=
opt
->
arg
.
r
.
min
&&
*
value
<=
opt
->
arg
.
r
.
max
)
{
DPRINTK
(
PROBE
,
INFO
,
"%s set to %i
\n
"
,
opt
->
name
,
*
value
);
"%s set to %i
\n
"
,
opt
->
name
,
*
value
);
return
0
;
}
break
;
...
...
@@ -449,8 +449,7 @@ e1000_check_options(struct e1000_adapter *adapter)
DPRINTK
(
PROBE
,
INFO
,
"%s turned off
\n
"
,
opt
.
name
);
break
;
case
1
:
DPRINTK
(
PROBE
,
INFO
,
"%s set to dynamic mode
\n
"
,
opt
.
name
);
DPRINTK
(
PROBE
,
INFO
,
"%s set to dynamic mode
\n
"
,
opt
.
name
);
break
;
default:
e1000_validate_option
(
&
adapter
->
itr
,
&
opt
,
adapter
);
...
...
@@ -493,8 +492,9 @@ e1000_check_fiber_options(struct e1000_adapter *adapter)
"parameter ignored
\n
"
);
}
if
((
AutoNeg
[
bd
]
!=
OPTION_UNSET
)
&&
(
AutoNeg
[
bd
]
!=
0x20
))
{
DPRINTK
(
PROBE
,
INFO
,
"AutoNeg other than Full/1000 is "
"not valid for fiber adapters, parameter ignored
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"AutoNeg other than 1000/Full is "
"not valid for fiber adapters, "
"parameter ignored
\n
"
);
}
}
...
...
@@ -611,24 +611,24 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
break
;
case
HALF_DUPLEX
:
DPRINTK
(
PROBE
,
INFO
,
"Half Duplex specified without Speed
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"
Using Autonegotiation at
Half Duplex only
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"Using Autonegotiation at "
"Half Duplex only
\n
"
);
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_HALF
|
ADVERTISE_100_HALF
;
break
;
case
FULL_DUPLEX
:
DPRINTK
(
PROBE
,
INFO
,
"Full Duplex specified without Speed
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"
Using Autonegotiation at
Full Duplex only
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"Using Autonegotiation at "
"Full Duplex only
\n
"
);
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_FULL
|
ADVERTISE_100_FULL
|
ADVERTISE_1000_FULL
;
break
;
case
SPEED_10
:
DPRINTK
(
PROBE
,
INFO
,
"
10 Mbps Speed specified
without Duplex
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"10 Mbps Speed specified "
"without Duplex
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"Using Autonegotiation at 10 Mbps only
\n
"
);
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_HALF
|
...
...
@@ -647,10 +647,10 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
adapter
->
hw
.
autoneg_advertised
=
0
;
break
;
case
SPEED_100
:
DPRINTK
(
PROBE
,
INFO
,
"
100 Mbps Speed specified
without Duplex
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"
Using Autonegotiation at
100 Mbps only
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"100 Mbps Speed specified "
"without Duplex
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"Using Autonegotiation at "
"100 Mbps only
\n
"
);
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_100_HALF
|
ADVERTISE_100_FULL
;
...
...
@@ -668,10 +668,11 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
adapter
->
hw
.
autoneg_advertised
=
0
;
break
;
case
SPEED_1000
:
DPRINTK
(
PROBE
,
INFO
,
"1000 Mbps Speed specified without "
"Duplex
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"1000 Mbps Speed specified without Duplex
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"Using Autonegotiation at 1000 Mbps Full Duplex only
\n
"
);
"Using Autonegotiation at 1000 Mbps "
"Full Duplex only
\n
"
);
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_1000_FULL
;
break
;
...
...
@@ -679,7 +680,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
DPRINTK
(
PROBE
,
INFO
,
"Half Duplex is not supported at 1000 Mbps
\n
"
);
DPRINTK
(
PROBE
,
INFO
,
"Using Autonegotiation at 1000 Mbps Full Duplex only
\n
"
);
"Using Autonegotiation at 1000 Mbps "
"Full Duplex only
\n
"
);
adapter
->
hw
.
autoneg
=
adapter
->
fc_autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_1000_FULL
;
break
;
...
...
@@ -696,8 +698,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
/* Speed, AutoNeg and MDI/MDI-X must all play nice */
if
(
e1000_validate_mdi_setting
(
&
(
adapter
->
hw
))
<
0
)
{
DPRINTK
(
PROBE
,
INFO
,
"Speed, AutoNeg and MDI-X specifications are "
"incompatible. Setting MDI-X to a compatible value.
\n
"
);
"Speed, AutoNeg and MDI-X specifications are "
"incompatible. Setting MDI-X to a compatible value.
\n
"
);
}
}
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