Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
3b8f5945
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3b8f5945
编写于
1月 14, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-2.6
上级
886d7f44
af667a29
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
147 addition
and
136 deletion
+147
-136
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+9
-1
drivers/net/e1000e/82571.c
drivers/net/e1000e/82571.c
+2
-2
drivers/net/e1000e/Makefile
drivers/net/e1000e/Makefile
+1
-1
drivers/net/e1000e/defines.h
drivers/net/e1000e/defines.h
+1
-1
drivers/net/e1000e/e1000.h
drivers/net/e1000e/e1000.h
+1
-1
drivers/net/e1000e/es2lan.c
drivers/net/e1000e/es2lan.c
+1
-1
drivers/net/e1000e/ethtool.c
drivers/net/e1000e/ethtool.c
+1
-1
drivers/net/e1000e/hw.h
drivers/net/e1000e/hw.h
+2
-2
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/ich8lan.c
+1
-1
drivers/net/e1000e/lib.c
drivers/net/e1000e/lib.c
+10
-10
drivers/net/e1000e/netdev.c
drivers/net/e1000e/netdev.c
+113
-110
drivers/net/e1000e/param.c
drivers/net/e1000e/param.c
+3
-3
drivers/net/e1000e/phy.c
drivers/net/e1000e/phy.c
+2
-2
未找到文件。
drivers/net/e1000/e1000_main.c
浏览文件 @
3b8f5945
...
...
@@ -3478,9 +3478,17 @@ static irqreturn_t e1000_intr(int irq, void *data)
struct
e1000_hw
*
hw
=
&
adapter
->
hw
;
u32
icr
=
er32
(
ICR
);
if
(
unlikely
((
!
icr
)
||
test_bit
(
__E1000_DOWN
,
&
adapter
->
flags
)
))
if
(
unlikely
((
!
icr
)))
return
IRQ_NONE
;
/* Not our interrupt */
/*
* we might have caused the interrupt, but the above
* read cleared it, and just in case the driver is
* down there is nothing to do so return handled
*/
if
(
unlikely
(
test_bit
(
__E1000_DOWN
,
&
adapter
->
flags
)))
return
IRQ_HANDLED
;
if
(
unlikely
(
icr
&
(
E1000_ICR_RXSEQ
|
E1000_ICR_LSC
)))
{
hw
->
get_link_status
=
1
;
/* guard against interrupt when we're going down */
...
...
drivers/net/e1000e/82571.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
@@ -1310,7 +1310,7 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
* apply workaround for hardware errata documented in errata
* docs Fixes issue where some error prone or unreliable PCIe
* completions are occurring, particularly with ASPM enabled.
* Without fix, issue can cause
t
x timeouts.
* Without fix, issue can cause
T
x timeouts.
*/
reg
=
er32
(
GCR2
);
reg
|=
1
;
...
...
drivers/net/e1000e/Makefile
浏览文件 @
3b8f5945
################################################################################
#
# Intel PRO/1000 Linux driver
# Copyright(c) 1999 - 20
08
Intel Corporation.
# Copyright(c) 1999 - 20
11
Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
...
...
drivers/net/e1000e/defines.h
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
drivers/net/e1000e/e1000.h
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
drivers/net/e1000e/es2lan.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
drivers/net/e1000e/ethtool.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
drivers/net/e1000e/hw.h
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
@@ -102,7 +102,7 @@ enum e1e_registers {
E1000_RDTR
=
0x02820
,
/* Rx Delay Timer - RW */
E1000_RXDCTL_BASE
=
0x02828
,
/* Rx Descriptor Control - RW */
#define E1000_RXDCTL(_n) (E1000_RXDCTL_BASE + (_n << 8))
E1000_RADV
=
0x0282C
,
/* R
X
Interrupt Absolute Delay Timer - RW */
E1000_RADV
=
0x0282C
,
/* R
x
Interrupt Absolute Delay Timer - RW */
/* Convenience macros
*
...
...
drivers/net/e1000e/ich8lan.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
drivers/net/e1000e/lib.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
@@ -533,7 +533,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw)
mac
->
autoneg_failed
=
1
;
return
0
;
}
e_dbg
(
"NOT R
X
ing /C/, disable AutoNeg and force link.
\n
"
);
e_dbg
(
"NOT R
x'
ing /C/, disable AutoNeg and force link.
\n
"
);
/* Disable auto-negotiation in the TXCW register */
ew32
(
TXCW
,
(
mac
->
txcw
&
~
E1000_TXCW_ANE
));
...
...
@@ -556,7 +556,7 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw)
* and disable forced link in the Device Control register
* in an attempt to auto-negotiate with our link partner.
*/
e_dbg
(
"R
X
ing /C/, enable AutoNeg and stop forcing link.
\n
"
);
e_dbg
(
"R
x'
ing /C/, enable AutoNeg and stop forcing link.
\n
"
);
ew32
(
TXCW
,
mac
->
txcw
);
ew32
(
CTRL
,
(
ctrl
&
~
E1000_CTRL_SLU
));
...
...
@@ -598,7 +598,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
mac
->
autoneg_failed
=
1
;
return
0
;
}
e_dbg
(
"NOT R
X
ing /C/, disable AutoNeg and force link.
\n
"
);
e_dbg
(
"NOT R
x'
ing /C/, disable AutoNeg and force link.
\n
"
);
/* Disable auto-negotiation in the TXCW register */
ew32
(
TXCW
,
(
mac
->
txcw
&
~
E1000_TXCW_ANE
));
...
...
@@ -621,7 +621,7 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
* and disable forced link in the Device Control register
* in an attempt to auto-negotiate with our link partner.
*/
e_dbg
(
"R
X
ing /C/, enable AutoNeg and stop forcing link.
\n
"
);
e_dbg
(
"R
x'
ing /C/, enable AutoNeg and stop forcing link.
\n
"
);
ew32
(
TXCW
,
mac
->
txcw
);
ew32
(
CTRL
,
(
ctrl
&
~
E1000_CTRL_SLU
));
...
...
@@ -1189,7 +1189,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
}
else
{
hw
->
fc
.
current_mode
=
e1000_fc_rx_pause
;
e_dbg
(
"Flow Control = "
"RX
PAUSE frames only.
\r\n
"
);
"Rx
PAUSE frames only.
\r\n
"
);
}
}
/*
...
...
drivers/net/e1000e/netdev.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
@@ -99,7 +99,7 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = {
/* Interrupt Registers */
{
E1000_ICR
,
"ICR"
},
/* R
X
Registers */
/* R
x
Registers */
{
E1000_RCTL
,
"RCTL"
},
{
E1000_RDLEN
,
"RDLEN"
},
{
E1000_RDH
,
"RDH"
},
...
...
@@ -115,7 +115,7 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = {
{
E1000_RDFTS
,
"RDFTS"
},
{
E1000_RDFPC
,
"RDFPC"
},
/* T
X
Registers */
/* T
x
Registers */
{
E1000_TCTL
,
"TCTL"
},
{
E1000_TDBAL
,
"TDBAL"
},
{
E1000_TDBAH
,
"TDBAH"
},
...
...
@@ -171,9 +171,8 @@ static void e1000_regdump(struct e1000_hw *hw, struct e1000_reg_info *reginfo)
printk
(
KERN_CONT
"
\n
"
);
}
/*
* e1000e_dump - Print registers,
tx-ring and r
x-ring
* e1000e_dump - Print registers,
Tx-ring and R
x-ring
*/
static
void
e1000e_dump
(
struct
e1000_adapter
*
adapter
)
{
...
...
@@ -182,12 +181,20 @@ static void e1000e_dump(struct e1000_adapter *adapter)
struct
e1000_reg_info
*
reginfo
;
struct
e1000_ring
*
tx_ring
=
adapter
->
tx_ring
;
struct
e1000_tx_desc
*
tx_desc
;
struct
my_u0
{
u64
a
;
u64
b
;
}
*
u0
;
struct
my_u0
{
u64
a
;
u64
b
;
}
*
u0
;
struct
e1000_buffer
*
buffer_info
;
struct
e1000_ring
*
rx_ring
=
adapter
->
rx_ring
;
union
e1000_rx_desc_packet_split
*
rx_desc_ps
;
struct
e1000_rx_desc
*
rx_desc
;
struct
my_u1
{
u64
a
;
u64
b
;
u64
c
;
u64
d
;
}
*
u1
;
struct
my_u1
{
u64
a
;
u64
b
;
u64
c
;
u64
d
;
}
*
u1
;
u32
staterr
;
int
i
=
0
;
...
...
@@ -200,9 +207,7 @@ static void e1000e_dump(struct e1000_adapter *adapter)
printk
(
KERN_INFO
"Device Name state "
"trans_start last_rx
\n
"
);
printk
(
KERN_INFO
"%-15s %016lX %016lX %016lX
\n
"
,
netdev
->
name
,
netdev
->
state
,
netdev
->
trans_start
,
netdev
->
name
,
netdev
->
state
,
netdev
->
trans_start
,
netdev
->
last_rx
);
}
...
...
@@ -214,11 +219,11 @@ static void e1000e_dump(struct e1000_adapter *adapter)
e1000_regdump
(
hw
,
reginfo
);
}
/* Print T
X
Ring Summary */
/* Print T
x
Ring Summary */
if
(
!
netdev
||
!
netif_running
(
netdev
))
goto
exit
;
dev_info
(
&
adapter
->
pdev
->
dev
,
"T
X Rings
Summary
\n
"
);
dev_info
(
&
adapter
->
pdev
->
dev
,
"T
x Ring
Summary
\n
"
);
printk
(
KERN_INFO
"Queue [NTU] [NTC] [bi(ntc)->dma ]"
" leng ntw timestamp
\n
"
);
buffer_info
=
&
tx_ring
->
buffer_info
[
tx_ring
->
next_to_clean
];
...
...
@@ -229,11 +234,11 @@ static void e1000e_dump(struct e1000_adapter *adapter)
buffer_info
->
next_to_watch
,
(
unsigned
long
long
)
buffer_info
->
time_stamp
);
/* Print T
X Rings
*/
/* Print T
x Ring
*/
if
(
!
netif_msg_tx_done
(
adapter
))
goto
rx_ring_summary
;
dev_info
(
&
adapter
->
pdev
->
dev
,
"T
X Rings
Dump
\n
"
);
dev_info
(
&
adapter
->
pdev
->
dev
,
"T
x Ring
Dump
\n
"
);
/* Transmit Descriptor Formats - DEXT[29] is 0 (Legacy) or 1 (Extended)
*
...
...
@@ -277,8 +282,8 @@ static void e1000e_dump(struct e1000_adapter *adapter)
u0
=
(
struct
my_u0
*
)
tx_desc
;
printk
(
KERN_INFO
"T%c[0x%03X] %016llX %016llX %016llX "
"%04X %3X %016llX %p"
,
(
!
(
le64_to_cpu
(
u0
->
b
)
&
(
1
<<
29
))
?
'l'
:
((
le64_to_cpu
(
u0
->
b
)
&
(
1
<<
20
))
?
'd'
:
'c'
)),
i
,
(
!
(
le64_to_cpu
(
u0
->
b
)
&
(
1
<<
29
))
?
'l'
:
((
le64_to_cpu
(
u0
->
b
)
&
(
1
<<
20
))
?
'd'
:
'c'
)),
i
,
(
unsigned
long
long
)
le64_to_cpu
(
u0
->
a
),
(
unsigned
long
long
)
le64_to_cpu
(
u0
->
b
),
(
unsigned
long
long
)
buffer_info
->
dma
,
...
...
@@ -300,18 +305,18 @@ static void e1000e_dump(struct e1000_adapter *adapter)
buffer_info
->
length
,
true
);
}
/* Print R
X Rings
Summary */
/* Print R
x Ring
Summary */
rx_ring_summary:
dev_info
(
&
adapter
->
pdev
->
dev
,
"R
X Rings
Summary
\n
"
);
dev_info
(
&
adapter
->
pdev
->
dev
,
"R
x Ring
Summary
\n
"
);
printk
(
KERN_INFO
"Queue [NTU] [NTC]
\n
"
);
printk
(
KERN_INFO
" %5d %5X %5X
\n
"
,
0
,
rx_ring
->
next_to_use
,
rx_ring
->
next_to_clean
);
/* Print R
X Rings
*/
/* Print R
x Ring
*/
if
(
!
netif_msg_rx_status
(
adapter
))
goto
exit
;
dev_info
(
&
adapter
->
pdev
->
dev
,
"R
X Rings
Dump
\n
"
);
dev_info
(
&
adapter
->
pdev
->
dev
,
"R
x Ring
Dump
\n
"
);
switch
(
adapter
->
rx_ps_pages
)
{
case
1
:
case
2
:
...
...
@@ -422,7 +427,8 @@ static void e1000e_dump(struct e1000_adapter *adapter)
if
(
netif_msg_pktdata
(
adapter
))
print_hex_dump
(
KERN_INFO
,
""
,
DUMP_PREFIX_ADDRESS
,
16
,
1
,
phys_to_virt
(
buffer_info
->
dma
),
16
,
1
,
phys_to_virt
(
buffer_info
->
dma
),
adapter
->
rx_buffer_len
,
true
);
}
}
...
...
@@ -450,8 +456,7 @@ static int e1000_desc_unused(struct e1000_ring *ring)
* @skb: pointer to sk_buff to be indicated to stack
**/
static
void
e1000_receive_skb
(
struct
e1000_adapter
*
adapter
,
struct
net_device
*
netdev
,
struct
sk_buff
*
skb
,
struct
net_device
*
netdev
,
struct
sk_buff
*
skb
,
u8
status
,
__le16
vlan
)
{
skb
->
protocol
=
eth_type_trans
(
skb
,
netdev
);
...
...
@@ -464,7 +469,7 @@ static void e1000_receive_skb(struct e1000_adapter *adapter,
}
/**
* e1000_rx_checksum - Receive Checksum Offload
for 82543
* e1000_rx_checksum - Receive Checksum Offload
* @adapter: board private structure
* @status_err: receive descriptor status and error fields
* @csum: receive descriptor csum field
...
...
@@ -548,7 +553,7 @@ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
adapter
->
rx_buffer_len
,
DMA_FROM_DEVICE
);
if
(
dma_mapping_error
(
&
pdev
->
dev
,
buffer_info
->
dma
))
{
dev_err
(
&
pdev
->
dev
,
"R
X
DMA map failed
\n
"
);
dev_err
(
&
pdev
->
dev
,
"R
x
DMA map failed
\n
"
);
adapter
->
rx_dma_failed
++
;
break
;
}
...
...
@@ -601,7 +606,8 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
ps_page
=
&
buffer_info
->
ps_pages
[
j
];
if
(
j
>=
adapter
->
rx_ps_pages
)
{
/* all unused desc entries get hw null ptr */
rx_desc
->
read
.
buffer_addr
[
j
+
1
]
=
~
cpu_to_le64
(
0
);
rx_desc
->
read
.
buffer_addr
[
j
+
1
]
=
~
cpu_to_le64
(
0
);
continue
;
}
if
(
!
ps_page
->
page
)
{
...
...
@@ -617,7 +623,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
if
(
dma_mapping_error
(
&
pdev
->
dev
,
ps_page
->
dma
))
{
dev_err
(
&
adapter
->
pdev
->
dev
,
"RX
DMA page map failed
\n
"
);
"Rx
DMA page map failed
\n
"
);
adapter
->
rx_dma_failed
++
;
goto
no_buffers
;
}
...
...
@@ -627,7 +633,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
* didn't change because each write-back
* erases this info.
*/
rx_desc
->
read
.
buffer_addr
[
j
+
1
]
=
rx_desc
->
read
.
buffer_addr
[
j
+
1
]
=
cpu_to_le64
(
ps_page
->
dma
);
}
...
...
@@ -644,7 +650,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
adapter
->
rx_ps_bsize0
,
DMA_FROM_DEVICE
);
if
(
dma_mapping_error
(
&
pdev
->
dev
,
buffer_info
->
dma
))
{
dev_err
(
&
pdev
->
dev
,
"R
X
DMA map failed
\n
"
);
dev_err
(
&
pdev
->
dev
,
"R
x
DMA map failed
\n
"
);
adapter
->
rx_dma_failed
++
;
/* cleanup skb */
dev_kfree_skb_any
(
skb
);
...
...
@@ -662,7 +668,7 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
* such as IA-64).
*/
wmb
();
writel
(
i
<<
1
,
adapter
->
hw
.
hw_addr
+
rx_ring
->
tail
);
writel
(
i
<<
1
,
adapter
->
hw
.
hw_addr
+
rx_ring
->
tail
);
}
i
++
;
...
...
@@ -1106,11 +1112,10 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
cleaned
=
1
;
cleaned_count
++
;
dma_unmap_single
(
&
pdev
->
dev
,
buffer_info
->
dma
,
adapter
->
rx_ps_bsize0
,
DMA_FROM_DEVICE
);
adapter
->
rx_ps_bsize0
,
DMA_FROM_DEVICE
);
buffer_info
->
dma
=
0
;
/* see !EOP comment in other
r
x routine */
/* see !EOP comment in other
R
x routine */
if
(
!
(
staterr
&
E1000_RXD_STAT_EOP
))
adapter
->
flags2
|=
FLAG2_IS_DISCARDING
;
...
...
@@ -2610,7 +2615,7 @@ static void e1000_init_manageability_pt(struct e1000_adapter *adapter)
}
/**
* e1000_configure_tx - Configure
8254x
Transmit Unit after Reset
* e1000_configure_tx - Configure Transmit Unit after Reset
* @adapter: board private structure
*
* Configure the Tx unit of the MAC after a reset.
...
...
@@ -2663,7 +2668,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
* hthresh = 1 ==> prefetch when one or more available
* pthresh = 0x1f ==> prefetch if internal cache 31 or less
* BEWARE: this seems to work but should be considered first if
* there are
tx hangs or other t
x related bugs
* there are
Tx hangs or other T
x related bugs
*/
txdctl
|=
E1000_TXDCTL_DMA_BURST_ENABLE
;
ew32
(
TXDCTL
(
0
),
txdctl
);
...
...
@@ -2900,7 +2905,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
/*
* set the writeback threshold (only takes effect if the RDTR
* is set). set GRAN=1 and write back up to 0x4 worth, and
* enable prefetching of 0x20
r
x descriptors
* enable prefetching of 0x20
R
x descriptors
* granularity = 01
* wthresh = 04,
* hthresh = 04,
...
...
@@ -2981,11 +2986,9 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
* excessive C-state transition latencies result in
* dropped transactions.
*/
pm_qos_update_request
(
&
adapter
->
netdev
->
pm_qos_req
,
55
);
pm_qos_update_request
(
&
adapter
->
netdev
->
pm_qos_req
,
55
);
}
else
{
pm_qos_update_request
(
&
adapter
->
netdev
->
pm_qos_req
,
pm_qos_update_request
(
&
adapter
->
netdev
->
pm_qos_req
,
PM_QOS_DEFAULT_VALUE
);
}
}
...
...
@@ -3152,7 +3155,7 @@ void e1000e_reset(struct e1000_adapter *adapter)
/* lower 16 bits has Rx packet buffer allocation size in KB */
pba
&=
0xffff
;
/*
* the Tx fifo also stores 16 bytes of information about the
t
x
* the Tx fifo also stores 16 bytes of information about the
T
x
* but don't include ethernet FCS because hardware appends it
*/
min_tx_space
=
(
adapter
->
max_frame_size
+
...
...
@@ -3175,7 +3178,7 @@ void e1000e_reset(struct e1000_adapter *adapter)
pba
-=
min_tx_space
-
tx_space
;
/*
* if short on Rx space, Rx wins and must trump
t
x
* if short on Rx space, Rx wins and must trump
T
x
* adjustment or use Early Receive if available
*/
if
((
pba
<
min_rx_space
)
&&
...
...
@@ -4041,9 +4044,9 @@ static void e1000_print_link_info(struct e1000_adapter *adapter)
(
adapter
->
link_duplex
==
FULL_DUPLEX
)
?
"Full Duplex"
:
"Half Duplex"
,
((
ctrl
&
E1000_CTRL_TFCE
)
&&
(
ctrl
&
E1000_CTRL_RFCE
))
?
"RX/TX
"
:
((
ctrl
&
E1000_CTRL_RFCE
)
?
"R
X
"
:
((
ctrl
&
E1000_CTRL_TFCE
)
?
"TX"
:
"None"
)));
"Rx/Tx
"
:
((
ctrl
&
E1000_CTRL_RFCE
)
?
"R
x
"
:
((
ctrl
&
E1000_CTRL_TFCE
)
?
"Tx"
:
"None"
)));
}
static
bool
e1000e_has_link
(
struct
e1000_adapter
*
adapter
)
...
...
@@ -4338,7 +4341,7 @@ static void e1000_watchdog_task(struct work_struct *work)
/* Force detection of hung controller every watchdog period */
adapter
->
detect_tx_hung
=
1
;
/* flush partial descriptors to memory before detecting
t
x hang */
/* flush partial descriptors to memory before detecting
T
x hang */
if
(
adapter
->
flags2
&
FLAG2_DMA_BURST
)
{
ew32
(
TIDV
,
adapter
->
tx_int_delay
|
E1000_TIDV_FPD
);
ew32
(
RDTR
,
adapter
->
rx_int_delay
|
E1000_RDTR_FPD
);
...
...
@@ -4576,7 +4579,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
}
}
segs
=
skb_shinfo
(
skb
)
->
gso_segs
?:
1
;
segs
=
skb_shinfo
(
skb
)
->
gso_segs
?
:
1
;
/* multiply data chunks by size of headers */
bytecount
=
((
segs
-
1
)
*
skb_headlen
(
skb
))
+
skb
->
len
;
...
...
@@ -4588,13 +4591,13 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
return
count
;
dma_error:
dev_err
(
&
pdev
->
dev
,
"T
X
DMA map failed
\n
"
);
dev_err
(
&
pdev
->
dev
,
"T
x
DMA map failed
\n
"
);
buffer_info
->
dma
=
0
;
if
(
count
)
count
--
;
while
(
count
--
)
{
if
(
i
==
0
)
if
(
i
==
0
)
i
+=
tx_ring
->
count
;
i
--
;
buffer_info
=
&
tx_ring
->
buffer_info
[
i
];
...
...
@@ -6193,7 +6196,7 @@ static int __init e1000_init_module(void)
int
ret
;
pr_info
(
"Intel(R) PRO/1000 Network Driver - %s
\n
"
,
e1000e_driver_version
);
pr_info
(
"Copyright
(c) 1999 - 2010
Intel Corporation.
\n
"
);
pr_info
(
"Copyright
(c) 1999 - 2011
Intel Corporation.
\n
"
);
ret
=
pci_register_driver
(
&
e1000_driver
);
return
ret
;
...
...
drivers/net/e1000e/param.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
@@ -62,10 +62,9 @@ MODULE_PARM_DESC(copybreak,
module_param_array_named(X, X, int, &num_##X, 0); \
MODULE_PARM_DESC(X, desc);
/*
* Transmit Interrupt Delay in units of 1.024 microseconds
* Tx interrupt delay needs to typically be set to something non
zero
* Tx interrupt delay needs to typically be set to something non
-
zero
*
* Valid Range: 0-65535
*/
...
...
@@ -112,6 +111,7 @@ E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
#define DEFAULT_ITR 3
#define MAX_ITR 100000
#define MIN_ITR 100
/* IntMode (Interrupt Mode)
*
* Valid Range: 0 - 2
...
...
drivers/net/e1000e/phy.c
浏览文件 @
3b8f5945
/*******************************************************************************
Intel PRO/1000 Linux driver
Copyright(c) 1999 - 201
0
Intel Corporation.
Copyright(c) 1999 - 201
1
Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
...
...
@@ -640,7 +640,7 @@ s32 e1000_copper_link_setup_82577(struct e1000_hw *hw)
s32
ret_val
;
u16
phy_data
;
/* Enable CRS on T
X
. This must be set for half-duplex operation. */
/* Enable CRS on T
x
. This must be set for half-duplex operation. */
ret_val
=
e1e_rphy
(
hw
,
I82577_CFG_REG
,
&
phy_data
);
if
(
ret_val
)
goto
out
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录