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
nexedi
linux
Commits
8bf752eb
Commit
8bf752eb
authored
Mar 20, 2003
by
Jeb J. Cramer
Committed by
Jeff Garzik
Mar 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[E1000] Whitespace changes
* Miscellaneous whitespace changes
parent
85beee79
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
115 deletions
+124
-115
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_ethtool.c
+3
-3
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_hw.c
+64
-63
drivers/net/e1000/e1000_hw.h
drivers/net/e1000/e1000_hw.h
+22
-20
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+9
-6
drivers/net/e1000/e1000_param.c
drivers/net/e1000/e1000_param.c
+26
-23
No files found.
drivers/net/e1000/e1000_ethtool.c
View file @
8bf752eb
...
@@ -308,8 +308,8 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
...
@@ -308,8 +308,8 @@ e1000_ethtool_gwol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
/* Fall Through */
/* Fall Through */
default:
default:
wol
->
supported
=
WAKE_UCAST
|
WAKE_MCAST
wol
->
supported
=
WAKE_UCAST
|
WAKE_MCAST
|
|
WAKE_BCAST
|
WAKE_MAGIC
;
WAKE_BCAST
|
WAKE_MAGIC
;
wol
->
wolopts
=
0
;
wol
->
wolopts
=
0
;
if
(
adapter
->
wol
&
E1000_WUFC_EX
)
if
(
adapter
->
wol
&
E1000_WUFC_EX
)
...
@@ -343,7 +343,7 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
...
@@ -343,7 +343,7 @@ e1000_ethtool_swol(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol)
/* Fall Through */
/* Fall Through */
default:
default:
if
(
wol
->
wolopts
&
(
WAKE_
ARP
|
WAKE_MAGICSECURE
|
WAKE_PHY
))
if
(
wol
->
wolopts
&
(
WAKE_
PHY
|
WAKE_ARP
|
WAKE_MAGICSECURE
))
return
-
EOPNOTSUPP
;
return
-
EOPNOTSUPP
;
adapter
->
wol
=
0
;
adapter
->
wol
=
0
;
...
...
drivers/net/e1000/e1000_hw.c
View file @
8bf752eb
This diff is collapsed.
Click to expand it.
drivers/net/e1000/e1000_hw.h
View file @
8bf752eb
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#ifndef _E1000_HW_H_
#ifndef _E1000_HW_H_
#define _E1000_HW_H_
#define _E1000_HW_H_
#include "e1000_osdep.h"
#include "e1000_osdep.h"
/* Forward declarations of structures used by the shared code */
/* Forward declarations of structures used by the shared code */
...
@@ -290,6 +291,7 @@ uint32_t e1000_io_read(struct e1000_hw *hw, uint32_t port);
...
@@ -290,6 +291,7 @@ uint32_t e1000_io_read(struct e1000_hw *hw, uint32_t port);
uint32_t
e1000_read_reg_io
(
struct
e1000_hw
*
hw
,
uint32_t
offset
);
uint32_t
e1000_read_reg_io
(
struct
e1000_hw
*
hw
,
uint32_t
offset
);
void
e1000_io_write
(
struct
e1000_hw
*
hw
,
uint32_t
port
,
uint32_t
value
);
void
e1000_io_write
(
struct
e1000_hw
*
hw
,
uint32_t
port
,
uint32_t
value
);
void
e1000_write_reg_io
(
struct
e1000_hw
*
hw
,
uint32_t
offset
,
uint32_t
value
);
void
e1000_write_reg_io
(
struct
e1000_hw
*
hw
,
uint32_t
offset
,
uint32_t
value
);
#define E1000_READ_REG_IO(a, reg) \
#define E1000_READ_REG_IO(a, reg) \
e1000_read_reg_io((a), E1000_##reg)
e1000_read_reg_io((a), E1000_##reg)
#define E1000_WRITE_REG_IO(a, reg, val) \
#define E1000_WRITE_REG_IO(a, reg, val) \
...
@@ -360,7 +362,7 @@ void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value);
...
@@ -360,7 +362,7 @@ void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value);
/* This defines the bits that are set in the Interrupt Mask
/* This defines the bits that are set in the Interrupt Mask
* Set/Read Register. Each bit is documented below:
* Set/Read Register. Each bit is documented below:
* o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0)
* o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0)
* o RXSEQ = Receive Sequence Error
* o RXSEQ = Receive Sequence Error
*/
*/
#define POLL_IMS_ENABLE_MASK ( \
#define POLL_IMS_ENABLE_MASK ( \
E1000_IMS_RXDMT0 | \
E1000_IMS_RXDMT0 | \
...
@@ -585,7 +587,7 @@ struct e1000_ffvt_entry {
...
@@ -585,7 +587,7 @@ struct e1000_ffvt_entry {
/* Register Set. (82543, 82544)
/* Register Set. (82543, 82544)
*
*
* Registers are defined to be 32 bits and should be accessed as 32 bit values.
* Registers are defined to be 32 bits and should be accessed as 32 bit values.
* These registers are physically located on the NIC, but are mapped into the
* These registers are physically located on the NIC, but are mapped into the
* host memory address space.
* host memory address space.
*
*
* RW - register is both readable and writable
* RW - register is both readable and writable
...
@@ -1374,7 +1376,7 @@ struct e1000_hw {
...
@@ -1374,7 +1376,7 @@ struct e1000_hw {
#define E1000_MANC_IPV6_EN 0x00000800
/* Enable IPv6 */
#define E1000_MANC_IPV6_EN 0x00000800
/* Enable IPv6 */
#define E1000_MANC_SNAP_EN 0x00001000
/* Accept LLC/SNAP */
#define E1000_MANC_SNAP_EN 0x00001000
/* Accept LLC/SNAP */
#define E1000_MANC_ARP_EN 0x00002000
/* Enable ARP Request Filtering */
#define E1000_MANC_ARP_EN 0x00002000
/* Enable ARP Request Filtering */
#define E1000_MANC_NEIGHBOR_EN 0x00004000
/* Enable Neighbor Discovery
#define E1000_MANC_NEIGHBOR_EN 0x00004000
/* Enable Neighbor Discovery
* Filtering */
* Filtering */
#define E1000_MANC_TCO_RESET 0x00010000
/* TCO Reset Occurred */
#define E1000_MANC_TCO_RESET 0x00010000
/* TCO Reset Occurred */
#define E1000_MANC_RCV_TCO_EN 0x00020000
/* Receive TCO Packets Enabled */
#define E1000_MANC_RCV_TCO_EN 0x00020000
/* Receive TCO Packets Enabled */
...
@@ -1555,26 +1557,26 @@ struct e1000_hw {
...
@@ -1555,26 +1557,26 @@ struct e1000_hw {
/* The number of bits that we need to shift right to move the "pause"
/* The number of bits that we need to shift right to move the "pause"
* bits from the EEPROM (bits 13:12) to the "pause" (bits 8:7) field
* bits from the EEPROM (bits 13:12) to the "pause" (bits 8:7) field
* in the TXCW register
* in the TXCW register
*/
*/
#define PAUSE_SHIFT 5
#define PAUSE_SHIFT 5
/* The number of bits that we need to shift left to move the "SWDPIO"
/* The number of bits that we need to shift left to move the "SWDPIO"
* bits from the EEPROM (bits 8:5) to the "SWDPIO" (bits 25:22) field
* bits from the EEPROM (bits 8:5) to the "SWDPIO" (bits 25:22) field
* in the CTRL register
* in the CTRL register
*/
*/
#define SWDPIO_SHIFT 17
#define SWDPIO_SHIFT 17
/* The number of bits that we need to shift left to move the "SWDPIO_EXT"
/* The number of bits that we need to shift left to move the "SWDPIO_EXT"
* bits from the EEPROM word F (bits 7:4) to the bits 11:8 of The
* bits from the EEPROM word F (bits 7:4) to the bits 11:8 of The
* Extended CTRL register.
* Extended CTRL register.
* in the CTRL register
* in the CTRL register
*/
*/
#define SWDPIO__EXT_SHIFT 4
#define SWDPIO__EXT_SHIFT 4
/* The number of bits that we need to shift left to move the "ILOS"
/* The number of bits that we need to shift left to move the "ILOS"
* bit from the EEPROM (bit 4) to the "ILOS" (bit 7) field
* bit from the EEPROM (bit 4) to the "ILOS" (bit 7) field
* in the CTRL register
* in the CTRL register
*/
*/
#define ILOS_SHIFT 3
#define ILOS_SHIFT 3
...
@@ -1592,7 +1594,7 @@ struct e1000_hw {
...
@@ -1592,7 +1594,7 @@ struct e1000_hw {
/* TBI_ACCEPT macro definition:
/* TBI_ACCEPT macro definition:
*
*
* This macro requires:
* This macro requires:
* adapter = a pointer to struct e1000_hw
* adapter = a pointer to struct e1000_hw
* status = the 8 bit status field of the RX descriptor with EOP set
* status = the 8 bit status field of the RX descriptor with EOP set
* error = the 8 bit error field of the RX descriptor with EOP set
* error = the 8 bit error field of the RX descriptor with EOP set
* length = the sum of all the length fields of the RX descriptors that
* length = the sum of all the length fields of the RX descriptors that
...
@@ -1601,7 +1603,7 @@ struct e1000_hw {
...
@@ -1601,7 +1603,7 @@ struct e1000_hw {
* max_frame_length = the maximum frame length we want to accept.
* max_frame_length = the maximum frame length we want to accept.
* min_frame_length = the minimum frame length we want to accept.
* min_frame_length = the minimum frame length we want to accept.
*
*
* This macro is a conditional that should be used in the interrupt
* This macro is a conditional that should be used in the interrupt
* handler's Rx processing routine when RxErrors have been detected.
* handler's Rx processing routine when RxErrors have been detected.
*
*
* Typical use:
* Typical use:
...
@@ -1748,7 +1750,7 @@ struct e1000_hw {
...
@@ -1748,7 +1750,7 @@ struct e1000_hw {
#define NWAY_ER_PAGE_RXD 0x0002
/* LP is 10T Half Duplex Capable */
#define NWAY_ER_PAGE_RXD 0x0002
/* LP is 10T Half Duplex Capable */
#define NWAY_ER_NEXT_PAGE_CAPS 0x0004
/* LP is 10T Full Duplex Capable */
#define NWAY_ER_NEXT_PAGE_CAPS 0x0004
/* LP is 10T Full Duplex Capable */
#define NWAY_ER_LP_NEXT_PAGE_CAPS 0x0008
/* LP is 100TX Half Duplex Capable */
#define NWAY_ER_LP_NEXT_PAGE_CAPS 0x0008
/* LP is 100TX Half Duplex Capable */
#define NWAY_ER_PAR_DETECT_FAULT 0x0
10
0
/* LP is 100TX Full Duplex Capable */
#define NWAY_ER_PAR_DETECT_FAULT 0x0
01
0
/* LP is 100TX Full Duplex Capable */
/* Next Page TX Register */
/* Next Page TX Register */
#define NPTX_MSG_CODE_FIELD 0x0001
/* NP msg code or unformatted data */
#define NPTX_MSG_CODE_FIELD 0x0001
/* NP msg code or unformatted data */
...
@@ -1759,7 +1761,7 @@ struct e1000_hw {
...
@@ -1759,7 +1761,7 @@ struct e1000_hw {
* 0 = cannot comply with msg
* 0 = cannot comply with msg
*/
*/
#define NPTX_MSG_PAGE 0x2000
/* formatted(1)/unformatted(0) pg */
#define NPTX_MSG_PAGE 0x2000
/* formatted(1)/unformatted(0) pg */
#define NPTX_NEXT_PAGE 0x8000
/* 1 = addition NP will follow
#define NPTX_NEXT_PAGE 0x8000
/* 1 = addition NP will follow
* 0 = sending last NP
* 0 = sending last NP
*/
*/
...
@@ -1768,13 +1770,13 @@ struct e1000_hw {
...
@@ -1768,13 +1770,13 @@ struct e1000_hw {
#define LP_RNPR_TOGGLE 0x0800
/* Toggles between exchanges
#define LP_RNPR_TOGGLE 0x0800
/* Toggles between exchanges
* of different NP
* of different NP
*/
*/
#define LP_RNPR_ACKNOWLDGE2 0x1000
/* 1 = will comply with msg
#define LP_RNPR_ACKNOWLDGE2 0x1000
/* 1 = will comply with msg
* 0 = cannot comply with msg
* 0 = cannot comply with msg
*/
*/
#define LP_RNPR_MSG_PAGE 0x2000
/* formatted(1)/unformatted(0) pg */
#define LP_RNPR_MSG_PAGE 0x2000
/* formatted(1)/unformatted(0) pg */
#define LP_RNPR_ACKNOWLDGE 0x4000
/* 1 = ACK / 0 = NO ACK */
#define LP_RNPR_ACKNOWLDGE 0x4000
/* 1 = ACK / 0 = NO ACK */
#define LP_RNPR_NEXT_PAGE 0x8000
/* 1 = addition NP will follow
#define LP_RNPR_NEXT_PAGE 0x8000
/* 1 = addition NP will follow
* 0 = sending last NP
* 0 = sending last NP
*/
*/
/* 1000BASE-T Control Register */
/* 1000BASE-T Control Register */
...
@@ -1821,20 +1823,20 @@ struct e1000_hw {
...
@@ -1821,20 +1823,20 @@ struct e1000_hw {
#define M88E1000_PSCR_JABBER_DISABLE 0x0001
/* 1=Jabber Function disabled */
#define M88E1000_PSCR_JABBER_DISABLE 0x0001
/* 1=Jabber Function disabled */
#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002
/* 1=Polarity Reversal enabled */
#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002
/* 1=Polarity Reversal enabled */
#define M88E1000_PSCR_SQE_TEST 0x0004
/* 1=SQE Test enabled */
#define M88E1000_PSCR_SQE_TEST 0x0004
/* 1=SQE Test enabled */
#define M88E1000_PSCR_CLK125_DISABLE 0x0010
/* 1=CLK125 low,
#define M88E1000_PSCR_CLK125_DISABLE 0x0010
/* 1=CLK125 low,
* 0=CLK125 toggling
* 0=CLK125 toggling
*/
*/
#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000
/* MDI Crossover Mode bits 6:5 */
#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000
/* MDI Crossover Mode bits 6:5 */
/* Manual MDI configuration */
/* Manual MDI configuration */
#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020
/* Manual MDIX configuration */
#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020
/* Manual MDIX configuration */
#define M88E1000_PSCR_AUTO_X_1000T 0x0040
/* 1000BASE-T: Auto crossover,
#define M88E1000_PSCR_AUTO_X_1000T 0x0040
/* 1000BASE-T: Auto crossover,
* 100BASE-TX/10BASE-T:
* 100BASE-TX/10BASE-T:
* MDI Mode
* MDI Mode
*/
*/
#define M88E1000_PSCR_AUTO_X_MODE 0x0060
/* Auto crossover enabled
#define M88E1000_PSCR_AUTO_X_MODE 0x0060
/* Auto crossover enabled
* all speeds.
* all speeds.
*/
*/
#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE 0x0080
#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE 0x0080
/* 1=Enable Extended 10BASE-T distance
/* 1=Enable Extended 10BASE-T distance
* (Lower 10BASE-T RX Threshold)
* (Lower 10BASE-T RX Threshold)
* 0=Normal 10BASE-T RX Threshold */
* 0=Normal 10BASE-T RX Threshold */
...
@@ -1875,12 +1877,12 @@ struct e1000_hw {
...
@@ -1875,12 +1877,12 @@ struct e1000_hw {
#define M88E1000_EPSCR_DOWN_NO_IDLE 0x8000
/* 1=Lost lock detect enabled.
#define M88E1000_EPSCR_DOWN_NO_IDLE 0x8000
/* 1=Lost lock detect enabled.
* Will assert lost lock and bring
* Will assert lost lock and bring
* link down if idle not seen
* link down if idle not seen
* within 1ms in 1000BASE-T
* within 1ms in 1000BASE-T
*/
*/
/* Number of times we will attempt to autonegotiate before downshifting if we
/* Number of times we will attempt to autonegotiate before downshifting if we
* are the master */
* are the master */
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_2X 0x0400
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_2X 0x0400
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_3X 0x0800
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_3X 0x0800
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_4X 0x0C00
#define M88E1000_EPSCR_MASTER_DOWNSHIFT_4X 0x0C00
...
...
drivers/net/e1000/e1000_main.c
View file @
8bf752eb
...
@@ -189,6 +189,7 @@ struct notifier_block e1000_notifier_reboot = {
...
@@ -189,6 +189,7 @@ struct notifier_block e1000_notifier_reboot = {
.
priority
=
0
.
priority
=
0
};
};
/* Exported from other modules */
/* Exported from other modules */
extern
void
e1000_check_options
(
struct
e1000_adapter
*
adapter
);
extern
void
e1000_check_options
(
struct
e1000_adapter
*
adapter
);
...
@@ -554,6 +555,7 @@ e1000_remove(struct pci_dev *pdev)
...
@@ -554,6 +555,7 @@ e1000_remove(struct pci_dev *pdev)
e1000_phy_hw_reset
(
&
adapter
->
hw
);
e1000_phy_hw_reset
(
&
adapter
->
hw
);
iounmap
(
adapter
->
hw
.
hw_addr
);
iounmap
(
adapter
->
hw
.
hw_addr
);
pci_release_regions
(
pdev
);
pci_release_regions
(
pdev
);
...
@@ -589,7 +591,7 @@ e1000_sw_init(struct e1000_adapter *adapter)
...
@@ -589,7 +591,7 @@ e1000_sw_init(struct e1000_adapter *adapter)
adapter
->
rx_buffer_len
=
E1000_RXBUFFER_2048
;
adapter
->
rx_buffer_len
=
E1000_RXBUFFER_2048
;
hw
->
max_frame_size
=
netdev
->
mtu
+
hw
->
max_frame_size
=
netdev
->
mtu
+
ENET_HEADER_SIZE
+
ETHERNET_FCS_SIZE
;
ENET_HEADER_SIZE
+
ETHERNET_FCS_SIZE
;
hw
->
min_frame_size
=
MINIMUM_ETHERNET_FRAME_SIZE
;
hw
->
min_frame_size
=
MINIMUM_ETHERNET_FRAME_SIZE
;
/* identify the MAC */
/* identify the MAC */
...
@@ -810,7 +812,7 @@ e1000_configure_tx(struct e1000_adapter *adapter)
...
@@ -810,7 +812,7 @@ e1000_configure_tx(struct e1000_adapter *adapter)
tctl
&=
~
E1000_TCTL_CT
;
tctl
&=
~
E1000_TCTL_CT
;
tctl
|=
E1000_TCTL_EN
|
E1000_TCTL_PSP
|
tctl
|=
E1000_TCTL_EN
|
E1000_TCTL_PSP
|
(
E1000_COLLISION_THRESHOLD
<<
E1000_CT_SHIFT
);
(
E1000_COLLISION_THRESHOLD
<<
E1000_CT_SHIFT
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
TCTL
,
tctl
);
E1000_WRITE_REG
(
&
adapter
->
hw
,
TCTL
,
tctl
);
...
@@ -880,8 +882,8 @@ e1000_setup_rctl(struct e1000_adapter *adapter)
...
@@ -880,8 +882,8 @@ e1000_setup_rctl(struct e1000_adapter *adapter)
rctl
&=
~
(
3
<<
E1000_RCTL_MO_SHIFT
);
rctl
&=
~
(
3
<<
E1000_RCTL_MO_SHIFT
);
rctl
|=
E1000_RCTL_EN
|
E1000_RCTL_BAM
|
rctl
|=
E1000_RCTL_EN
|
E1000_RCTL_BAM
|
E1000_RCTL_LBM_NO
|
E1000_RCTL_RDMTS_HALF
|
E1000_RCTL_LBM_NO
|
E1000_RCTL_RDMTS_HALF
|
(
adapter
->
hw
.
mc_filter_type
<<
E1000_RCTL_MO_SHIFT
);
(
adapter
->
hw
.
mc_filter_type
<<
E1000_RCTL_MO_SHIFT
);
if
(
adapter
->
hw
.
tbi_compatibility_on
==
1
)
if
(
adapter
->
hw
.
tbi_compatibility_on
==
1
)
rctl
|=
E1000_RCTL_SBP
;
rctl
|=
E1000_RCTL_SBP
;
...
@@ -1374,7 +1376,7 @@ e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags)
...
@@ -1374,7 +1376,7 @@ e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags)
int
i
;
int
i
;
uint8_t
ipcss
,
ipcso
,
tucss
,
tucso
,
hdr_len
;
uint8_t
ipcss
,
ipcso
,
tucss
,
tucso
,
hdr_len
;
uint16_t
ipcse
,
tucse
,
mss
;
uint16_t
ipcse
,
tucse
,
mss
;
if
(
skb_shinfo
(
skb
)
->
tso_size
)
{
if
(
skb_shinfo
(
skb
)
->
tso_size
)
{
hdr_len
=
((
skb
->
h
.
raw
-
skb
->
data
)
+
(
skb
->
h
.
th
->
doff
<<
2
));
hdr_len
=
((
skb
->
h
.
raw
-
skb
->
data
)
+
(
skb
->
h
.
th
->
doff
<<
2
));
mss
=
skb_shinfo
(
skb
)
->
tso_size
;
mss
=
skb_shinfo
(
skb
)
->
tso_size
;
...
@@ -1394,7 +1396,7 @@ e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags)
...
@@ -1394,7 +1396,7 @@ e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags)
i
=
adapter
->
tx_ring
.
next_to_use
;
i
=
adapter
->
tx_ring
.
next_to_use
;
context_desc
=
E1000_CONTEXT_DESC
(
adapter
->
tx_ring
,
i
);
context_desc
=
E1000_CONTEXT_DESC
(
adapter
->
tx_ring
,
i
);
context_desc
->
lower_setup
.
ip_fields
.
ipcss
=
ipcss
;
context_desc
->
lower_setup
.
ip_fields
.
ipcss
=
ipcss
;
context_desc
->
lower_setup
.
ip_fields
.
ipcso
=
ipcso
;
context_desc
->
lower_setup
.
ip_fields
.
ipcso
=
ipcso
;
context_desc
->
lower_setup
.
ip_fields
.
ipcse
=
cpu_to_le16
(
ipcse
);
context_desc
->
lower_setup
.
ip_fields
.
ipcse
=
cpu_to_le16
(
ipcse
);
...
@@ -2535,6 +2537,7 @@ e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
...
@@ -2535,6 +2537,7 @@ e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
return
NOTIFY_DONE
;
return
NOTIFY_DONE
;
}
}
static
int
static
int
e1000_suspend
(
struct
pci_dev
*
pdev
,
uint32_t
state
)
e1000_suspend
(
struct
pci_dev
*
pdev
,
uint32_t
state
)
{
{
...
...
drivers/net/e1000/e1000_param.c
View file @
8bf752eb
...
@@ -169,7 +169,7 @@ E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay");
...
@@ -169,7 +169,7 @@ E1000_PARAM(TxAbsIntDelay, "Transmit Absolute Interrupt Delay");
*
*
* Valid Range: 0-65535
* Valid Range: 0-65535
*
*
* Default Value: 0
/128
* Default Value: 0
*/
*/
E1000_PARAM
(
RxIntDelay
,
"Receive Interrupt Delay"
);
E1000_PARAM
(
RxIntDelay
,
"Receive Interrupt Delay"
);
...
@@ -309,7 +309,7 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -309,7 +309,7 @@ e1000_check_options(struct e1000_adapter *adapter)
.
name
=
"Transmit Descriptors"
,
.
name
=
"Transmit Descriptors"
,
.
err
=
"using default of "
__MODULE_STRING
(
DEFAULT_TXD
),
.
err
=
"using default of "
__MODULE_STRING
(
DEFAULT_TXD
),
.
def
=
DEFAULT_TXD
,
.
def
=
DEFAULT_TXD
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_TXD
}}
.
arg
=
{
.
r
{
.
min
=
MIN_TXD
}}
};
};
struct
e1000_desc_ring
*
tx_ring
=
&
adapter
->
tx_ring
;
struct
e1000_desc_ring
*
tx_ring
=
&
adapter
->
tx_ring
;
e1000_mac_type
mac_type
=
adapter
->
hw
.
mac_type
;
e1000_mac_type
mac_type
=
adapter
->
hw
.
mac_type
;
...
@@ -362,7 +362,8 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -362,7 +362,8 @@ e1000_check_options(struct e1000_adapter *adapter)
.
name
=
"Flow Control"
,
.
name
=
"Flow Control"
,
.
err
=
"reading default settings from EEPROM"
,
.
err
=
"reading default settings from EEPROM"
,
.
def
=
e1000_fc_default
,
.
def
=
e1000_fc_default
,
.
arg
=
{
.
l
=
{
.
nr
=
ARRAY_SIZE
(
fc_list
),
.
p
=
fc_list
}}
.
arg
=
{
.
l
=
{
.
nr
=
ARRAY_SIZE
(
fc_list
),
.
p
=
fc_list
}}
};
};
int
fc
=
FlowControl
[
bd
];
int
fc
=
FlowControl
[
bd
];
...
@@ -370,58 +371,57 @@ e1000_check_options(struct e1000_adapter *adapter)
...
@@ -370,58 +371,57 @@ e1000_check_options(struct e1000_adapter *adapter)
adapter
->
hw
.
fc
=
adapter
->
hw
.
original_fc
=
fc
;
adapter
->
hw
.
fc
=
adapter
->
hw
.
original_fc
=
fc
;
}
}
{
/* Transmit Interrupt Delay */
{
/* Transmit Interrupt Delay */
char
*
tidv
=
"using default of "
__MODULE_STRING
(
DEFAULT_TIDV
);
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
.
type
=
range_option
,
.
type
=
range_option
,
.
name
=
"Transmit Interrupt Delay"
,
.
name
=
"Transmit Interrupt Delay"
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_TXDELAY
,
.
max
=
MAX_TXDELAY
}}
.
err
=
"using default of "
__MODULE_STRING
(
DEFAULT_TIDV
),
.
def
=
DEFAULT_TIDV
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_TXDELAY
,
.
max
=
MAX_TXDELAY
}}
};
};
opt
.
def
=
DEFAULT_TIDV
;
opt
.
err
=
tidv
;
adapter
->
tx_int_delay
=
TxIntDelay
[
bd
];
adapter
->
tx_int_delay
=
TxIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
tx_int_delay
,
&
opt
);
e1000_validate_option
(
&
adapter
->
tx_int_delay
,
&
opt
);
}
}
{
/* Transmit Absolute Interrupt Delay */
{
/* Transmit Absolute Interrupt Delay */
char
*
tadv
=
"using default of "
__MODULE_STRING
(
DEFAULT_TADV
);
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
.
type
=
range_option
,
.
type
=
range_option
,
.
name
=
"Transmit Absolute Interrupt Delay"
,
.
name
=
"Transmit Absolute Interrupt Delay"
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_TXABSDELAY
,
.
max
=
MAX_TXABSDELAY
}}
.
err
=
"using default of "
__MODULE_STRING
(
DEFAULT_TADV
),
.
def
=
DEFAULT_TADV
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_TXABSDELAY
,
.
max
=
MAX_TXABSDELAY
}}
};
};
opt
.
def
=
DEFAULT_TADV
;
opt
.
err
=
tadv
;
adapter
->
tx_abs_int_delay
=
TxAbsIntDelay
[
bd
];
adapter
->
tx_abs_int_delay
=
TxAbsIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
tx_abs_int_delay
,
&
opt
);
e1000_validate_option
(
&
adapter
->
tx_abs_int_delay
,
&
opt
);
}
}
{
/* Receive Interrupt Delay */
{
/* Receive Interrupt Delay */
char
*
rdtr
=
"using default of "
__MODULE_STRING
(
DEFAULT_RDTR
);
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
.
type
=
range_option
,
.
type
=
range_option
,
.
name
=
"Receive Interrupt Delay"
,
.
name
=
"Receive Interrupt Delay"
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_RXDELAY
,
.
max
=
MAX_RXDELAY
}}
.
err
=
"using default of "
__MODULE_STRING
(
DEFAULT_RDTR
),
.
def
=
DEFAULT_RDTR
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_RXDELAY
,
.
max
=
MAX_RXDELAY
}}
};
};
opt
.
def
=
DEFAULT_RDTR
;
opt
.
err
=
rdtr
;
adapter
->
rx_int_delay
=
RxIntDelay
[
bd
];
adapter
->
rx_int_delay
=
RxIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
rx_int_delay
,
&
opt
);
e1000_validate_option
(
&
adapter
->
rx_int_delay
,
&
opt
);
}
}
{
/* Receive Absolute Interrupt Delay */
{
/* Receive Absolute Interrupt Delay */
char
*
radv
=
"using default of "
__MODULE_STRING
(
DEFAULT_RADV
);
struct
e1000_option
opt
=
{
struct
e1000_option
opt
=
{
.
type
=
range_option
,
.
type
=
range_option
,
.
name
=
"Receive Absolute Interrupt Delay"
,
.
name
=
"Receive Absolute Interrupt Delay"
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_RXABSDELAY
,
.
max
=
MAX_RXABSDELAY
}}
.
err
=
"using default of "
__MODULE_STRING
(
DEFAULT_RADV
),
.
def
=
DEFAULT_RADV
,
.
arg
=
{
.
r
=
{
.
min
=
MIN_RXABSDELAY
,
.
max
=
MAX_RXABSDELAY
}}
};
};
opt
.
def
=
DEFAULT_RADV
;
opt
.
err
=
radv
;
adapter
->
rx_abs_int_delay
=
RxAbsIntDelay
[
bd
];
adapter
->
rx_abs_int_delay
=
RxAbsIntDelay
[
bd
];
e1000_validate_option
(
&
adapter
->
rx_abs_int_delay
,
&
opt
);
e1000_validate_option
(
&
adapter
->
rx_abs_int_delay
,
&
opt
);
}
}
switch
(
adapter
->
hw
.
media_type
)
{
switch
(
adapter
->
hw
.
media_type
)
{
case
e1000_media_type_fiber
:
case
e1000_media_type_fiber
:
e1000_check_fiber_options
(
adapter
);
e1000_check_fiber_options
(
adapter
);
...
@@ -486,7 +486,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -486,7 +486,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.
name
=
"Speed"
,
.
name
=
"Speed"
,
.
err
=
"parameter ignored"
,
.
err
=
"parameter ignored"
,
.
def
=
0
,
.
def
=
0
,
.
arg
=
{
.
l
=
{
.
nr
=
ARRAY_SIZE
(
speed_list
),
.
p
=
speed_list
}}
.
arg
=
{
.
l
=
{
.
nr
=
ARRAY_SIZE
(
speed_list
),
.
p
=
speed_list
}}
};
};
speed
=
Speed
[
bd
];
speed
=
Speed
[
bd
];
...
@@ -502,7 +503,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -502,7 +503,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.
name
=
"Duplex"
,
.
name
=
"Duplex"
,
.
err
=
"parameter ignored"
,
.
err
=
"parameter ignored"
,
.
def
=
0
,
.
def
=
0
,
.
arg
=
{
.
l
=
{
.
nr
=
ARRAY_SIZE
(
dplx_list
),
.
p
=
dplx_list
}}
.
arg
=
{
.
l
=
{
.
nr
=
ARRAY_SIZE
(
dplx_list
),
.
p
=
dplx_list
}}
};
};
dplx
=
Duplex
[
bd
];
dplx
=
Duplex
[
bd
];
...
@@ -554,7 +556,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
...
@@ -554,7 +556,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
.
name
=
"AutoNeg"
,
.
name
=
"AutoNeg"
,
.
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
}}
};
};
int
an
=
AutoNeg
[
bd
];
int
an
=
AutoNeg
[
bd
];
...
...
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