Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
0f7ca591
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看板
提交
0f7ca591
编写于
5月 03, 2010
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
上级
a2f3be17
d0507009
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
133 addition
and
13 deletion
+133
-13
drivers/net/phy/Kconfig
drivers/net/phy/Kconfig
+5
-0
drivers/net/phy/Makefile
drivers/net/phy/Makefile
+1
-0
drivers/net/phy/micrel.c
drivers/net/phy/micrel.c
+104
-0
drivers/net/ppp_generic.c
drivers/net/ppp_generic.c
+22
-12
drivers/net/usb/dm9601.c
drivers/net/usb/dm9601.c
+1
-1
未找到文件。
drivers/net/phy/Kconfig
浏览文件 @
0f7ca591
...
...
@@ -88,6 +88,11 @@ config LSI_ET1011C_PHY
---help---
Supports the LSI ET1011C PHY.
config MICREL_PHY
tristate "Driver for Micrel PHYs"
---help---
Supports the KSZ9021, VSC8201, KS8001 PHYs.
config FIXED_PHY
bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
depends on PHYLIB=y
...
...
drivers/net/phy/Makefile
浏览文件 @
0f7ca591
...
...
@@ -20,4 +20,5 @@ obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
obj-$(CONFIG_MDIO_GPIO)
+=
mdio-gpio.o
obj-$(CONFIG_NATIONAL_PHY)
+=
national.o
obj-$(CONFIG_STE10XP)
+=
ste10Xp.o
obj-$(CONFIG_MICREL_PHY)
+=
micrel.o
obj-$(CONFIG_MDIO_OCTEON)
+=
mdio-octeon.o
drivers/net/phy/micrel.c
0 → 100644
浏览文件 @
0f7ca591
/*
* drivers/net/phy/micrel.c
*
* Driver for Micrel PHYs
*
* Author: David J. Choi
*
* Copyright (c) 2010 Micrel, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* Support : ksz9021 , vsc8201, ks8001
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/phy.h>
#define PHY_ID_KSZ9021 0x00221611
#define PHY_ID_VSC8201 0x000FC413
#define PHY_ID_KS8001 0x0022161A
static
int
kszphy_config_init
(
struct
phy_device
*
phydev
)
{
return
0
;
}
static
struct
phy_driver
ks8001_driver
=
{
.
phy_id
=
PHY_ID_KS8001
,
.
phy_id_mask
=
0x00fffff0
,
.
features
=
PHY_BASIC_FEATURES
,
.
flags
=
PHY_POLL
,
.
config_init
=
kszphy_config_init
,
.
config_aneg
=
genphy_config_aneg
,
.
read_status
=
genphy_read_status
,
.
driver
=
{
.
owner
=
THIS_MODULE
,},
};
static
struct
phy_driver
vsc8201_driver
=
{
.
phy_id
=
PHY_ID_VSC8201
,
.
name
=
"Micrel VSC8201"
,
.
phy_id_mask
=
0x00fffff0
,
.
features
=
PHY_BASIC_FEATURES
,
.
flags
=
PHY_POLL
,
.
config_init
=
kszphy_config_init
,
.
config_aneg
=
genphy_config_aneg
,
.
read_status
=
genphy_read_status
,
.
driver
=
{
.
owner
=
THIS_MODULE
,},
};
static
struct
phy_driver
ksz9021_driver
=
{
.
phy_id
=
PHY_ID_KSZ9021
,
.
phy_id_mask
=
0x000fff10
,
.
name
=
"Micrel KSZ9021 Gigabit PHY"
,
.
features
=
PHY_GBIT_FEATURES
|
SUPPORTED_Pause
,
.
flags
=
PHY_POLL
,
.
config_init
=
kszphy_config_init
,
.
config_aneg
=
genphy_config_aneg
,
.
read_status
=
genphy_read_status
,
.
driver
=
{
.
owner
=
THIS_MODULE
,
},
};
static
int
__init
ksphy_init
(
void
)
{
int
ret
;
ret
=
phy_driver_register
(
&
ks8001_driver
);
if
(
ret
)
goto
err1
;
ret
=
phy_driver_register
(
&
vsc8201_driver
);
if
(
ret
)
goto
err2
;
ret
=
phy_driver_register
(
&
ksz9021_driver
);
if
(
ret
)
goto
err3
;
return
0
;
err3:
phy_driver_unregister
(
&
vsc8201_driver
);
err2:
phy_driver_unregister
(
&
ks8001_driver
);
err1:
return
ret
;
}
static
void
__exit
ksphy_exit
(
void
)
{
phy_driver_unregister
(
&
ks8001_driver
);
phy_driver_unregister
(
&
vsc8201_driver
);
phy_driver_unregister
(
&
ksz9021_driver
);
}
module_init
(
ksphy_init
);
module_exit
(
ksphy_exit
);
MODULE_DESCRIPTION
(
"Micrel PHY driver"
);
MODULE_AUTHOR
(
"David J. Choi"
);
MODULE_LICENSE
(
"GPL"
);
drivers/net/ppp_generic.c
浏览文件 @
0f7ca591
...
...
@@ -405,6 +405,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
DECLARE_WAITQUEUE
(
wait
,
current
);
ssize_t
ret
;
struct
sk_buff
*
skb
=
NULL
;
struct
iovec
iov
;
ret
=
count
;
...
...
@@ -448,7 +449,9 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
if
(
skb
->
len
>
count
)
goto
outf
;
ret
=
-
EFAULT
;
if
(
copy_to_user
(
buf
,
skb
->
data
,
skb
->
len
))
iov
.
iov_base
=
buf
;
iov
.
iov_len
=
count
;
if
(
skb_copy_datagram_iovec
(
skb
,
0
,
&
iov
,
skb
->
len
))
goto
outf
;
ret
=
skb
->
len
;
...
...
@@ -1567,13 +1570,22 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb)
struct
channel
*
pch
=
chan
->
ppp
;
int
proto
;
if
(
!
pch
||
skb
->
len
==
0
)
{
if
(
!
pch
)
{
kfree_skb
(
skb
);
return
;
}
proto
=
PPP_PROTO
(
skb
);
read_lock_bh
(
&
pch
->
upl
);
if
(
!
pskb_may_pull
(
skb
,
2
))
{
kfree_skb
(
skb
);
if
(
pch
->
ppp
)
{
++
pch
->
ppp
->
dev
->
stats
.
rx_length_errors
;
ppp_receive_error
(
pch
->
ppp
);
}
goto
done
;
}
proto
=
PPP_PROTO
(
skb
);
if
(
!
pch
->
ppp
||
proto
>=
0xc000
||
proto
==
PPP_CCPFRAG
)
{
/* put it on the channel queue */
skb_queue_tail
(
&
pch
->
file
.
rq
,
skb
);
...
...
@@ -1585,6 +1597,8 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb)
}
else
{
ppp_do_recv
(
pch
->
ppp
,
skb
,
pch
);
}
done:
read_unlock_bh
(
&
pch
->
upl
);
}
...
...
@@ -1617,7 +1631,8 @@ ppp_input_error(struct ppp_channel *chan, int code)
static
void
ppp_receive_frame
(
struct
ppp
*
ppp
,
struct
sk_buff
*
skb
,
struct
channel
*
pch
)
{
if
(
pskb_may_pull
(
skb
,
2
))
{
/* note: a 0-length skb is used as an error indication */
if
(
skb
->
len
>
0
)
{
#ifdef CONFIG_PPP_MULTILINK
/* XXX do channel-level decompression here */
if
(
PPP_PROTO
(
skb
)
==
PPP_MP
)
...
...
@@ -1625,15 +1640,10 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
else
#endif
/* CONFIG_PPP_MULTILINK */
ppp_receive_nonmp_frame
(
ppp
,
skb
);
return
;
}
else
{
kfree_skb
(
skb
);
ppp_receive_error
(
ppp
);
}
if
(
skb
->
len
>
0
)
/* note: a 0-length skb is used as an error indication */
++
ppp
->
dev
->
stats
.
rx_length_errors
;
kfree_skb
(
skb
);
ppp_receive_error
(
ppp
);
}
static
void
...
...
drivers/net/usb/dm9601.c
浏览文件 @
0f7ca591
...
...
@@ -240,7 +240,7 @@ static int dm_write_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 valu
goto
out
;
dm_write_reg
(
dev
,
DM_SHARED_ADDR
,
phy
?
(
reg
|
0x40
)
:
reg
);
dm_write_reg
(
dev
,
DM_SHARED_CTRL
,
phy
?
0x1
c
:
0x14
);
dm_write_reg
(
dev
,
DM_SHARED_CTRL
,
phy
?
0x1
a
:
0x12
);
for
(
i
=
0
;
i
<
DM_TIMEOUT
;
i
++
)
{
u8
tmp
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录