Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d87f4fe2
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d87f4fe2
编写于
3月 15, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6
上级
918690f9
7ef5ed1c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
2 deletion
+48
-2
drivers/net/igb/e1000_defines.h
drivers/net/igb/e1000_defines.h
+5
-0
drivers/net/igb/e1000_regs.h
drivers/net/igb/e1000_regs.h
+3
-0
drivers/net/igb/igb_main.c
drivers/net/igb/igb_main.c
+40
-2
未找到文件。
drivers/net/igb/e1000_defines.h
浏览文件 @
d87f4fe2
...
...
@@ -51,6 +51,7 @@
#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES 0x00C00000
#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX 0x00400000
#define E1000_CTRL_EXT_LINK_MODE_SGMII 0x00800000
#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
#define E1000_CTRL_EXT_EIAME 0x01000000
#define E1000_CTRL_EXT_IRCA 0x00000001
/* Interrupt delay cancellation */
...
...
@@ -788,6 +789,10 @@
#define E1000_MDIC_ERROR 0x40000000
#define E1000_MDIC_DEST 0x80000000
/* Thermal Sensor */
#define E1000_THSTAT_PWR_DOWN 0x00000001
/* Power Down Event */
#define E1000_THSTAT_LINK_THROTTLE 0x00000002
/* Link Speed Throttle Event */
/* Energy Efficient Ethernet */
#define E1000_IPCNFG_EEE_1G_AN 0x00000008
/* EEE Enable 1G AN */
#define E1000_IPCNFG_EEE_100M_AN 0x00000004
/* EEE Enable 100M AN */
...
...
drivers/net/igb/e1000_regs.h
浏览文件 @
d87f4fe2
...
...
@@ -342,6 +342,9 @@
#define E1000_IPCNFG 0x0E38
/* Internal PHY Configuration */
#define E1000_EEER 0x0E30
/* Energy Efficient Ethernet */
/* Thermal Sensor Register */
#define E1000_THSTAT 0x08110
/* Thermal Sensor Status */
/* OS2BMC Registers */
#define E1000_B2OSPC 0x08FE0
/* BMC2OS packets sent by BMC */
#define E1000_B2OGPRC 0x04158
/* BMC2OS packets received by host */
...
...
drivers/net/igb/igb_main.c
浏览文件 @
d87f4fe2
...
...
@@ -106,6 +106,7 @@ static void igb_free_all_rx_resources(struct igb_adapter *);
static
void
igb_setup_mrqc
(
struct
igb_adapter
*
);
static
int
igb_probe
(
struct
pci_dev
*
,
const
struct
pci_device_id
*
);
static
void
__devexit
igb_remove
(
struct
pci_dev
*
pdev
);
static
void
igb_init_hw_timer
(
struct
igb_adapter
*
adapter
);
static
int
igb_sw_init
(
struct
igb_adapter
*
);
static
int
igb_open
(
struct
net_device
*
);
static
int
igb_close
(
struct
net_device
*
);
...
...
@@ -2048,6 +2049,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
}
#endif
/* do hw tstamp init after resetting */
igb_init_hw_timer
(
adapter
);
dev_info
(
&
pdev
->
dev
,
"Intel(R) Gigabit Ethernet Network Connection
\n
"
);
/* print bus type/speed/width info */
dev_info
(
&
pdev
->
dev
,
"%s: (PCIe:%s:%s) %pM
\n
"
,
...
...
@@ -2384,7 +2388,6 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
return
-
ENOMEM
;
}
igb_init_hw_timer
(
adapter
);
igb_probe_vfs
(
adapter
);
/* Explicitly disable IRQ since the NIC can be in any state. */
...
...
@@ -3547,7 +3550,7 @@ static void igb_watchdog_task(struct work_struct *work)
watchdog_task
);
struct
e1000_hw
*
hw
=
&
adapter
->
hw
;
struct
net_device
*
netdev
=
adapter
->
netdev
;
u32
link
;
u32
link
,
ctrl_ext
,
thstat
;
int
i
;
link
=
igb_has_link
(
adapter
);
...
...
@@ -3571,6 +3574,25 @@ static void igb_watchdog_task(struct work_struct *work)
((
ctrl
&
E1000_CTRL_RFCE
)
?
"RX"
:
((
ctrl
&
E1000_CTRL_TFCE
)
?
"TX"
:
"None"
)));
/* check for thermal sensor event on i350,
* copper only */
if
(
hw
->
mac
.
type
==
e1000_i350
)
{
thstat
=
rd32
(
E1000_THSTAT
);
ctrl_ext
=
rd32
(
E1000_CTRL_EXT
);
if
((
hw
->
phy
.
media_type
==
e1000_media_type_copper
)
&&
!
(
ctrl_ext
&
E1000_CTRL_EXT_LINK_MODE_SGMII
))
{
if
(
thstat
&
E1000_THSTAT_LINK_THROTTLE
)
{
printk
(
KERN_INFO
"igb: %s The "
"network adapter link "
"speed was downshifted "
"because it "
"overheated.
\n
"
,
netdev
->
name
);
}
}
}
/* adjust timeout factor according to speed/duplex */
adapter
->
tx_timeout_factor
=
1
;
switch
(
adapter
->
link_speed
)
{
...
...
@@ -3596,6 +3618,22 @@ static void igb_watchdog_task(struct work_struct *work)
if
(
netif_carrier_ok
(
netdev
))
{
adapter
->
link_speed
=
0
;
adapter
->
link_duplex
=
0
;
/* check for thermal sensor event on i350
* copper only*/
if
(
hw
->
mac
.
type
==
e1000_i350
)
{
thstat
=
rd32
(
E1000_THSTAT
);
ctrl_ext
=
rd32
(
E1000_CTRL_EXT
);
if
((
hw
->
phy
.
media_type
==
e1000_media_type_copper
)
&&
!
(
ctrl_ext
&
E1000_CTRL_EXT_LINK_MODE_SGMII
))
{
if
(
thstat
&
E1000_THSTAT_PWR_DOWN
)
{
printk
(
KERN_ERR
"igb: %s The "
"network adapter was stopped "
"because it overheated.
\n
"
,
netdev
->
name
);
}
}
}
/* Links status message must follow this format */
printk
(
KERN_INFO
"igb: %s NIC Link is Down
\n
"
,
netdev
->
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录