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
a4358d3a
Commit
a4358d3a
authored
Apr 03, 2002
by
Christopher Goldfarb
Committed by
Jeff Garzik
Apr 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e1000 net drvr update 13/13:
Whitespace cleanup
parent
b7e240b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
43 deletions
+8
-43
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_ethtool.c
+1
-7
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+0
-29
drivers/net/e1000/e1000_param.c
drivers/net/e1000/e1000_param.c
+7
-7
No files found.
drivers/net/e1000/e1000_ethtool.c
View file @
a4358d3a
...
@@ -128,7 +128,6 @@ e1000_ethtool_gset(struct e1000_adapter *adapter, struct ethtool_cmd *ecmd)
...
@@ -128,7 +128,6 @@ e1000_ethtool_gset(struct e1000_adapter *adapter, struct ethtool_cmd *ecmd)
SUPPORTED_Autoneg
);
SUPPORTED_Autoneg
);
ecmd
->
port
=
PORT_FIBRE
;
ecmd
->
port
=
PORT_FIBRE
;
ecmd
->
transceiver
=
XCVR_EXTERNAL
;
ecmd
->
transceiver
=
XCVR_EXTERNAL
;
}
}
...
@@ -151,8 +150,6 @@ e1000_ethtool_gset(struct e1000_adapter *adapter, struct ethtool_cmd *ecmd)
...
@@ -151,8 +150,6 @@ e1000_ethtool_gset(struct e1000_adapter *adapter, struct ethtool_cmd *ecmd)
}
}
ecmd
->
autoneg
=
(
hw
->
autoneg
?
AUTONEG_ENABLE
:
AUTONEG_DISABLE
);
ecmd
->
autoneg
=
(
hw
->
autoneg
?
AUTONEG_ENABLE
:
AUTONEG_DISABLE
);
return
;
}
}
static
int
static
int
...
@@ -215,7 +212,6 @@ e1000_ethtool_gdrvinfo(struct e1000_adapter *adapter,
...
@@ -215,7 +212,6 @@ e1000_ethtool_gdrvinfo(struct e1000_adapter *adapter,
strncpy
(
drvinfo
->
fw_version
,
""
,
32
);
strncpy
(
drvinfo
->
fw_version
,
""
,
32
);
strncpy
(
drvinfo
->
bus_info
,
adapter
->
pdev
->
slot_name
,
32
);
strncpy
(
drvinfo
->
bus_info
,
adapter
->
pdev
->
slot_name
,
32
);
drvinfo
->
eedump_len
=
e1000_eeprom_size
(
&
adapter
->
hw
);
drvinfo
->
eedump_len
=
e1000_eeprom_size
(
&
adapter
->
hw
);
return
;
}
}
static
void
static
void
...
@@ -261,8 +257,6 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
...
@@ -261,8 +257,6 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
wol
->
wolopts
|=
WAKE_BCAST
;
wol
->
wolopts
|=
WAKE_BCAST
;
if
(
adapter
->
wol
&
E1000_WUFC_MAG
)
if
(
adapter
->
wol
&
E1000_WUFC_MAG
)
wol
->
wolopts
|=
WAKE_MAGIC
;
wol
->
wolopts
|=
WAKE_MAGIC
;
return
;
}
}
static
int
static
int
...
@@ -271,7 +265,7 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
...
@@ -271,7 +265,7 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
struct
e1000_hw
*
hw
=
&
adapter
->
hw
;
struct
e1000_hw
*
hw
=
&
adapter
->
hw
;
if
(
hw
->
mac_type
<
e1000_82544
)
if
(
hw
->
mac_type
<
e1000_82544
)
return
wol
->
wolopts
==
0
?
0
:
-
EOPNOTSUPP
;
return
wol
->
wolopts
?
-
EOPNOTSUPP
:
0
;
adapter
->
wol
=
0
;
adapter
->
wol
=
0
;
...
...
drivers/net/e1000/e1000_main.c
View file @
a4358d3a
...
@@ -229,8 +229,6 @@ static void __exit
...
@@ -229,8 +229,6 @@ static void __exit
e1000_exit_module
(
void
)
e1000_exit_module
(
void
)
{
{
pci_unregister_driver
(
&
e1000_driver
);
pci_unregister_driver
(
&
e1000_driver
);
return
;
}
}
module_exit
(
e1000_exit_module
);
module_exit
(
e1000_exit_module
);
...
@@ -490,7 +488,6 @@ e1000_remove(struct pci_dev *pdev)
...
@@ -490,7 +488,6 @@ e1000_remove(struct pci_dev *pdev)
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
kfree
(
netdev
);
kfree
(
netdev
);
return
;
}
}
/**
/**
...
@@ -771,8 +768,6 @@ e1000_configure_tx(struct e1000_adapter *adapter)
...
@@ -771,8 +768,6 @@ e1000_configure_tx(struct e1000_adapter *adapter)
adapter
->
txd_cmd
|=
E1000_TXD_CMD_RS
;
adapter
->
txd_cmd
|=
E1000_TXD_CMD_RS
;
else
else
adapter
->
txd_cmd
|=
E1000_TXD_CMD_RPS
;
adapter
->
txd_cmd
|=
E1000_TXD_CMD_RPS
;
return
;
}
}
/**
/**
...
@@ -917,8 +912,6 @@ e1000_configure_rx(struct e1000_adapter *adapter)
...
@@ -917,8 +912,6 @@ e1000_configure_rx(struct e1000_adapter *adapter)
/* Enable Receives */
/* Enable Receives */
E1000_WRITE_REG
(
&
adapter
->
hw
,
RCTL
,
rctl
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
RCTL
,
rctl
);
return
;
}
}
/**
/**
...
@@ -942,8 +935,6 @@ e1000_free_tx_resources(struct e1000_adapter *adapter)
...
@@ -942,8 +935,6 @@ e1000_free_tx_resources(struct e1000_adapter *adapter)
adapter
->
tx_ring
.
desc
,
adapter
->
tx_ring
.
dma
);
adapter
->
tx_ring
.
desc
,
adapter
->
tx_ring
.
dma
);
adapter
->
tx_ring
.
desc
=
NULL
;
adapter
->
tx_ring
.
desc
=
NULL
;
return
;
}
}
/**
/**
...
@@ -986,8 +977,6 @@ e1000_clean_tx_ring(struct e1000_adapter *adapter)
...
@@ -986,8 +977,6 @@ e1000_clean_tx_ring(struct e1000_adapter *adapter)
E1000_WRITE_REG
(
&
adapter
->
hw
,
TDH
,
0
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
TDH
,
0
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
TDT
,
0
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
TDT
,
0
);
return
;
}
}
/**
/**
...
@@ -1011,8 +1000,6 @@ e1000_free_rx_resources(struct e1000_adapter *adapter)
...
@@ -1011,8 +1000,6 @@ e1000_free_rx_resources(struct e1000_adapter *adapter)
adapter
->
rx_ring
.
desc
,
adapter
->
rx_ring
.
dma
);
adapter
->
rx_ring
.
desc
,
adapter
->
rx_ring
.
dma
);
adapter
->
rx_ring
.
desc
=
NULL
;
adapter
->
rx_ring
.
desc
=
NULL
;
return
;
}
}
/**
/**
...
@@ -1055,8 +1042,6 @@ e1000_clean_rx_ring(struct e1000_adapter *adapter)
...
@@ -1055,8 +1042,6 @@ e1000_clean_rx_ring(struct e1000_adapter *adapter)
E1000_WRITE_REG
(
&
adapter
->
hw
,
RDH
,
0
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
RDH
,
0
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
RDT
,
0
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
RDT
,
0
);
return
;
}
}
/* The 82542 2.0 (revision 2) needs to have the receive unit in reset
/* The 82542 2.0 (revision 2) needs to have the receive unit in reset
...
@@ -1082,7 +1067,6 @@ e1000_enter_82542_rst(struct e1000_adapter *adapter)
...
@@ -1082,7 +1067,6 @@ e1000_enter_82542_rst(struct e1000_adapter *adapter)
if
(
netif_running
(
netdev
))
if
(
netif_running
(
netdev
))
e1000_clean_rx_ring
(
adapter
);
e1000_clean_rx_ring
(
adapter
);
return
;
}
}
static
void
static
void
...
@@ -1105,7 +1089,6 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
...
@@ -1105,7 +1089,6 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
e1000_configure_rx
(
adapter
);
e1000_configure_rx
(
adapter
);
e1000_alloc_rx_buffers
(
adapter
);
e1000_alloc_rx_buffers
(
adapter
);
}
}
return
;
}
}
/**
/**
...
@@ -1208,7 +1191,6 @@ e1000_set_multi(struct net_device *netdev)
...
@@ -1208,7 +1191,6 @@ e1000_set_multi(struct net_device *netdev)
if
(
hw
->
mac_type
==
e1000_82542_rev2_0
)
if
(
hw
->
mac_type
==
e1000_82542_rev2_0
)
e1000_leave_82542_rst
(
adapter
);
e1000_leave_82542_rst
(
adapter
);
return
;
}
}
...
@@ -1219,7 +1201,6 @@ e1000_update_phy_info(unsigned long data)
...
@@ -1219,7 +1201,6 @@ e1000_update_phy_info(unsigned long data)
{
{
struct
e1000_adapter
*
adapter
=
(
struct
e1000_adapter
*
)
data
;
struct
e1000_adapter
*
adapter
=
(
struct
e1000_adapter
*
)
data
;
e1000_phy_get_info
(
&
adapter
->
hw
,
&
adapter
->
phy_info
);
e1000_phy_get_info
(
&
adapter
->
hw
,
&
adapter
->
phy_info
);
return
;
}
}
/**
/**
...
@@ -1684,7 +1665,6 @@ e1000_irq_disable(struct e1000_adapter *adapter)
...
@@ -1684,7 +1665,6 @@ e1000_irq_disable(struct e1000_adapter *adapter)
atomic_inc
(
&
adapter
->
irq_sem
);
atomic_inc
(
&
adapter
->
irq_sem
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
IMC
,
~
0
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
IMC
,
~
0
);
synchronize_irq
();
synchronize_irq
();
return
;
}
}
/**
/**
...
@@ -1697,7 +1677,6 @@ e1000_irq_enable(struct e1000_adapter *adapter)
...
@@ -1697,7 +1677,6 @@ e1000_irq_enable(struct e1000_adapter *adapter)
{
{
if
(
atomic_dec_and_test
(
&
adapter
->
irq_sem
))
if
(
atomic_dec_and_test
(
&
adapter
->
irq_sem
))
E1000_WRITE_REG
(
&
adapter
->
hw
,
IMS
,
IMS_ENABLE_MASK
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
IMS
,
IMS_ENABLE_MASK
);
return
;
}
}
/**
/**
...
@@ -1786,7 +1765,6 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter)
...
@@ -1786,7 +1765,6 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter)
netif_wake_queue
(
netdev
);
netif_wake_queue
(
netdev
);
}
}
return
;
}
}
/**
/**
...
@@ -1898,8 +1876,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter)
...
@@ -1898,8 +1876,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter)
rx_ring
->
next_to_clean
=
i
;
rx_ring
->
next_to_clean
=
i
;
e1000_alloc_rx_buffers
(
adapter
);
e1000_alloc_rx_buffers
(
adapter
);
return
;
}
}
/**
/**
...
@@ -1961,7 +1937,6 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter)
...
@@ -1961,7 +1937,6 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter)
}
}
rx_ring
->
next_to_use
=
i
;
rx_ring
->
next_to_use
=
i
;
return
;
}
}
/**
/**
...
@@ -2015,10 +1990,8 @@ e1000_rx_checksum(struct e1000_adapter *adapter,
...
@@ -2015,10 +1990,8 @@ e1000_rx_checksum(struct e1000_adapter *adapter,
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
adapter
->
hw_csum_good
++
;
adapter
->
hw_csum_good
++
;
}
}
return
;
}
}
/**
/**
* e1000_enable_WOL - Wake On Lan Support (Magic Pkt)
* e1000_enable_WOL - Wake On Lan Support (Magic Pkt)
* @adapter: Adapter structure
* @adapter: Adapter structure
...
@@ -2040,8 +2013,6 @@ e1000_enable_WOL(struct e1000_adapter *adapter)
...
@@ -2040,8 +2013,6 @@ e1000_enable_WOL(struct e1000_adapter *adapter)
E1000_WRITE_REG
(
&
adapter
->
hw
,
WUFC
,
adapter
->
wol
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
WUFC
,
adapter
->
wol
);
}
}
return
;
}
}
void
void
...
...
drivers/net/e1000/e1000_param.c
View file @
a4358d3a
...
@@ -516,7 +516,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -516,7 +516,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
adapter
->
hw
.
autoneg_advertised
=
AUTONEG_ADV_DEFAULT
;
adapter
->
hw
.
autoneg_advertised
=
AUTONEG_ADV_DEFAULT
;
}
else
{
/* Autoneg */
}
else
{
/* Autoneg */
struct
e1000_opt_list
an_list
[]
=
struct
e1000_opt_list
an_list
[]
=
#define AA "Auto
n
eg advertising "
#define AA "Auto
N
eg advertising "
{{
0x01
,
AA
"10/HD"
},
{{
0x01
,
AA
"10/HD"
},
{
0x02
,
AA
"10/FD"
},
{
0x02
,
AA
"10/FD"
},
{
0x03
,
AA
"10/FD, 10/HD"
},
{
0x03
,
AA
"10/FD, 10/HD"
},
...
@@ -551,7 +551,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -551,7 +551,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
type:
list_option
,
type:
list_option
,
name:
"Auto
n
eg"
,
name:
"Auto
N
eg"
,
err:
"parameter ignored"
,
err:
"parameter ignored"
,
def:
AUTONEG_ADV_DEFAULT
,
def:
AUTONEG_ADV_DEFAULT
,
arg:
{
l
:
{
nr
:
ARRAY_SIZE
(
an_list
),
p
:
an_list
}}
arg:
{
l
:
{
nr
:
ARRAY_SIZE
(
an_list
),
p
:
an_list
}}
...
@@ -574,22 +574,22 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -574,22 +574,22 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
printk
(
KERN_INFO
"Using Autonegotiation at Half Duplex only
\n
"
);
printk
(
KERN_INFO
"Using Autonegotiation at Half Duplex only
\n
"
);
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_HALF
|
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_HALF
|
ADVERTISE_100_HALF
;
ADVERTISE_100_HALF
;
break
;
break
;
case
FULL_DUPLEX
:
case
FULL_DUPLEX
:
printk
(
KERN_INFO
"Full Duplex specified without Speed
\n
"
);
printk
(
KERN_INFO
"Full Duplex specified without Speed
\n
"
);
printk
(
KERN_INFO
"Using Autonegotiation at Full Duplex only
\n
"
);
printk
(
KERN_INFO
"Using Autonegotiation at Full Duplex only
\n
"
);
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_FULL
|
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_FULL
|
ADVERTISE_100_FULL
|
ADVERTISE_100_FULL
|
ADVERTISE_1000_FULL
;
ADVERTISE_1000_FULL
;
break
;
break
;
case
SPEED_10
:
case
SPEED_10
:
printk
(
KERN_INFO
"10 Mbps Speed specified without Duplex
\n
"
);
printk
(
KERN_INFO
"10 Mbps Speed specified without Duplex
\n
"
);
printk
(
KERN_INFO
"Using Autonegotiation at 10 Mbps only
\n
"
);
printk
(
KERN_INFO
"Using Autonegotiation at 10 Mbps only
\n
"
);
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_HALF
|
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_10_HALF
|
ADVERTISE_10_FULL
;
ADVERTISE_10_FULL
;
break
;
break
;
case
SPEED_10
+
HALF_DUPLEX
:
case
SPEED_10
+
HALF_DUPLEX
:
printk
(
KERN_INFO
"Forcing to 10 Mbps Half Duplex
\n
"
);
printk
(
KERN_INFO
"Forcing to 10 Mbps Half Duplex
\n
"
);
...
@@ -608,7 +608,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -608,7 +608,7 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
printk
(
KERN_INFO
"Using Autonegotiation at 100 Mbps only
\n
"
);
printk
(
KERN_INFO
"Using Autonegotiation at 100 Mbps only
\n
"
);
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg
=
1
;
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_100_HALF
|
adapter
->
hw
.
autoneg_advertised
=
ADVERTISE_100_HALF
|
ADVERTISE_100_FULL
;
ADVERTISE_100_FULL
;
break
;
break
;
case
SPEED_100
+
HALF_DUPLEX
:
case
SPEED_100
+
HALF_DUPLEX
:
printk
(
KERN_INFO
"Forcing to 100 Mbps Half Duplex
\n
"
);
printk
(
KERN_INFO
"Forcing to 100 Mbps Half Duplex
\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