Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
fe7d189d
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fe7d189d
编写于
9月 20, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'davem.r8169.fixes' of
git://violet.fr.zoreil.com/romieu/linux
上级
eebb6fb4
2544bfc0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
27 addition
and
5 deletion
+27
-5
drivers/net/r8169.c
drivers/net/r8169.c
+27
-5
未找到文件。
drivers/net/r8169.c
浏览文件 @
fe7d189d
...
...
@@ -407,6 +407,7 @@ enum rtl_register_content {
RxOK
=
0x0001
,
/* RxStatusDesc */
RxBOVF
=
(
1
<<
24
),
RxFOVF
=
(
1
<<
23
),
RxRWT
=
(
1
<<
22
),
RxRES
=
(
1
<<
21
),
...
...
@@ -682,6 +683,7 @@ struct rtl8169_private {
struct
mii_if_info
mii
;
struct
rtl8169_counters
counters
;
u32
saved_wolopts
;
u32
opts1_mask
;
struct
rtl_fw
{
const
struct
firmware
*
fw
;
...
...
@@ -710,6 +712,7 @@ MODULE_FIRMWARE(FIRMWARE_8168D_1);
MODULE_FIRMWARE
(
FIRMWARE_8168D_2
);
MODULE_FIRMWARE
(
FIRMWARE_8168E_1
);
MODULE_FIRMWARE
(
FIRMWARE_8168E_2
);
MODULE_FIRMWARE
(
FIRMWARE_8168E_3
);
MODULE_FIRMWARE
(
FIRMWARE_8105E_1
);
static
int
rtl8169_open
(
struct
net_device
*
dev
);
...
...
@@ -3077,6 +3080,14 @@ static void rtl8169_phy_reset(struct net_device *dev,
netif_err
(
tp
,
link
,
dev
,
"PHY reset failed
\n
"
);
}
static
bool
rtl_tbi_enabled
(
struct
rtl8169_private
*
tp
)
{
void
__iomem
*
ioaddr
=
tp
->
mmio_addr
;
return
(
tp
->
mac_version
==
RTL_GIGA_MAC_VER_01
)
&&
(
RTL_R8
(
PHYstatus
)
&
TBI_Enable
);
}
static
void
rtl8169_init_phy
(
struct
net_device
*
dev
,
struct
rtl8169_private
*
tp
)
{
void
__iomem
*
ioaddr
=
tp
->
mmio_addr
;
...
...
@@ -3109,7 +3120,7 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
ADVERTISED_1000baseT_Half
|
ADVERTISED_1000baseT_Full
:
0
));
if
(
RTL_R8
(
PHYstatus
)
&
TBI_Enable
)
if
(
rtl_tbi_enabled
(
tp
)
)
netif_info
(
tp
,
link
,
dev
,
"TBI auto-negotiating
\n
"
);
}
...
...
@@ -3319,9 +3330,16 @@ static void r810x_phy_power_up(struct rtl8169_private *tp)
static
void
r810x_pll_power_down
(
struct
rtl8169_private
*
tp
)
{
void
__iomem
*
ioaddr
=
tp
->
mmio_addr
;
if
(
__rtl8169_get_wol
(
tp
)
&
WAKE_ANY
)
{
rtl_writephy
(
tp
,
0x1f
,
0x0000
);
rtl_writephy
(
tp
,
MII_BMCR
,
0x0000
);
if
(
tp
->
mac_version
==
RTL_GIGA_MAC_VER_29
||
tp
->
mac_version
==
RTL_GIGA_MAC_VER_30
)
RTL_W32
(
RxConfig
,
RTL_R32
(
RxConfig
)
|
AcceptBroadcast
|
AcceptMulticast
|
AcceptMyPhys
);
return
;
}
...
...
@@ -3417,7 +3435,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
rtl_writephy
(
tp
,
MII_BMCR
,
0x0000
);
if
(
tp
->
mac_version
==
RTL_GIGA_MAC_VER_32
||
tp
->
mac_version
==
RTL_GIGA_MAC_VER_33
)
tp
->
mac_version
==
RTL_GIGA_MAC_VER_33
||
tp
->
mac_version
==
RTL_GIGA_MAC_VER_34
)
RTL_W32
(
RxConfig
,
RTL_R32
(
RxConfig
)
|
AcceptBroadcast
|
AcceptMulticast
|
AcceptMyPhys
);
return
;
...
...
@@ -3727,8 +3746,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp
->
features
|=
rtl_try_msi
(
pdev
,
ioaddr
,
cfg
);
RTL_W8
(
Cfg9346
,
Cfg9346_Lock
);
if
((
tp
->
mac_version
<=
RTL_GIGA_MAC_VER_06
)
&&
(
RTL_R8
(
PHYstatus
)
&
TBI_Enable
))
{
if
(
rtl_tbi_enabled
(
tp
))
{
tp
->
set_speed
=
rtl8169_set_speed_tbi
;
tp
->
get_settings
=
rtl8169_gset_tbi
;
tp
->
phy_reset_enable
=
rtl8169_tbi_reset_enable
;
...
...
@@ -3777,6 +3795,9 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp
->
intr_event
=
cfg
->
intr_event
;
tp
->
napi_event
=
cfg
->
napi_event
;
tp
->
opts1_mask
=
(
tp
->
mac_version
!=
RTL_GIGA_MAC_VER_01
)
?
~
(
RxBOVF
|
RxFOVF
)
:
~
0
;
init_timer
(
&
tp
->
timer
);
tp
->
timer
.
data
=
(
unsigned
long
)
dev
;
tp
->
timer
.
function
=
rtl8169_phy_timer
;
...
...
@@ -3988,6 +4009,7 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp)
while
(
RTL_R8
(
TxPoll
)
&
NPQ
)
udelay
(
20
);
}
else
if
(
tp
->
mac_version
==
RTL_GIGA_MAC_VER_34
)
{
RTL_W8
(
ChipCmd
,
RTL_R8
(
ChipCmd
)
|
StopReq
);
while
(
!
(
RTL_R32
(
TxConfig
)
&
TXCFG_EMPTY
))
udelay
(
100
);
}
else
{
...
...
@@ -5314,7 +5336,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
u32
status
;
rmb
();
status
=
le32_to_cpu
(
desc
->
opts1
);
status
=
le32_to_cpu
(
desc
->
opts1
)
&
tp
->
opts1_mask
;
if
(
status
&
DescOwn
)
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录