Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
cfc88b07
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
7
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看板
提交
cfc88b07
编写于
1月 27, 2006
作者:
J
Jeff Garzik
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-fixes'
上级
cca4aa83
6651a5c3
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
49 addition
and
63 deletion
+49
-63
arch/ppc/syslib/mv64x60.c
arch/ppc/syslib/mv64x60.c
+2
-2
drivers/net/mv643xx_eth.c
drivers/net/mv643xx_eth.c
+47
-61
未找到文件。
arch/ppc/syslib/mv64x60.c
浏览文件 @
cfc88b07
...
...
@@ -313,7 +313,7 @@ static struct platform_device mpsc1_device = {
};
#endif
#if
def CONFIG_MV643XX_ETH
#if
defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
static
struct
resource
mv64x60_eth_shared_resources
[]
=
{
[
0
]
=
{
.
name
=
"ethernet shared base"
,
...
...
@@ -456,7 +456,7 @@ static struct platform_device *mv64x60_pd_devs[] __initdata = {
&
mpsc0_device
,
&
mpsc1_device
,
#endif
#if
def CONFIG_MV643XX_ETH
#if
defined(CONFIG_MV643XX_ETH) || defined(CONFIG_MV643XX_ETH_MODULE)
&
mv64x60_eth_shared_device
,
#endif
#ifdef CONFIG_MV643XX_ETH_0
...
...
drivers/net/mv643xx_eth.c
浏览文件 @
cfc88b07
...
...
@@ -444,6 +444,7 @@ static int mv643xx_eth_receive_queue(struct net_device *dev)
netif_rx
(
skb
);
#endif
}
dev
->
last_rx
=
jiffies
;
}
return
received_packets
;
...
...
@@ -1054,7 +1055,6 @@ static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb)
fragp
=
&
skb_shinfo
(
skb
)
->
frags
[
frag
];
if
(
fragp
->
size
<=
8
&&
fragp
->
page_offset
&
0x7
)
return
1
;
}
return
0
;
}
...
...
@@ -2617,7 +2617,6 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
struct
eth_tx_desc
*
current_descriptor
;
struct
eth_tx_desc
*
first_descriptor
;
u32
command
;
unsigned
long
flags
;
/* Do not process Tx ring in case of Tx ring resource error */
if
(
mp
->
tx_resource_err
)
...
...
@@ -2634,8 +2633,6 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
return
ETH_ERROR
;
}
spin_lock_irqsave
(
&
mp
->
lock
,
flags
);
mp
->
tx_ring_skbs
++
;
BUG_ON
(
mp
->
tx_ring_skbs
>
mp
->
tx_ring_size
);
...
...
@@ -2685,15 +2682,11 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
mp
->
tx_resource_err
=
1
;
mp
->
tx_curr_desc_q
=
tx_first_desc
;
spin_unlock_irqrestore
(
&
mp
->
lock
,
flags
);
return
ETH_QUEUE_LAST_RESOURCE
;
}
mp
->
tx_curr_desc_q
=
tx_next_desc
;
spin_unlock_irqrestore
(
&
mp
->
lock
,
flags
);
return
ETH_OK
;
}
#else
...
...
@@ -2704,14 +2697,11 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
int
tx_desc_used
;
struct
eth_tx_desc
*
current_descriptor
;
unsigned
int
command_status
;
unsigned
long
flags
;
/* Do not process Tx ring in case of Tx ring resource error */
if
(
mp
->
tx_resource_err
)
return
ETH_QUEUE_FULL
;
spin_lock_irqsave
(
&
mp
->
lock
,
flags
);
mp
->
tx_ring_skbs
++
;
BUG_ON
(
mp
->
tx_ring_skbs
>
mp
->
tx_ring_size
);
...
...
@@ -2742,12 +2732,9 @@ static ETH_FUNC_RET_STATUS eth_port_send(struct mv643xx_private *mp,
/* Check for ring index overlap in the Tx desc ring */
if
(
tx_desc_curr
==
tx_desc_used
)
{
mp
->
tx_resource_err
=
1
;
spin_unlock_irqrestore
(
&
mp
->
lock
,
flags
);
return
ETH_QUEUE_LAST_RESOURCE
;
}
spin_unlock_irqrestore
(
&
mp
->
lock
,
flags
);
return
ETH_OK
;
}
#endif
...
...
@@ -2898,8 +2885,10 @@ static ETH_FUNC_RET_STATUS eth_port_receive(struct mv643xx_private *mp,
p_pkt_info
->
return_info
=
mp
->
rx_skb
[
rx_curr_desc
];
p_pkt_info
->
l4i_chk
=
p_rx_desc
->
buf_size
;
/* Clean the return info field to indicate that the packet has been */
/* moved to the upper layers */
/*
* Clean the return info field to indicate that the
* packet has been moved to the upper layers
*/
mp
->
rx_skb
[
rx_curr_desc
]
=
NULL
;
/* Update current index in data structure */
...
...
@@ -3131,8 +3120,7 @@ mv643xx_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
return
0
;
}
static
void
mv643xx_get_drvinfo
(
struct
net_device
*
netdev
,
static
void
mv643xx_get_drvinfo
(
struct
net_device
*
netdev
,
struct
ethtool_drvinfo
*
drvinfo
)
{
strncpy
(
drvinfo
->
driver
,
mv643xx_driver_name
,
32
);
...
...
@@ -3142,14 +3130,12 @@ mv643xx_get_drvinfo(struct net_device *netdev,
drvinfo
->
n_stats
=
MV643XX_STATS_LEN
;
}
static
int
mv643xx_get_stats_count
(
struct
net_device
*
netdev
)
static
int
mv643xx_get_stats_count
(
struct
net_device
*
netdev
)
{
return
MV643XX_STATS_LEN
;
}
static
void
mv643xx_get_ethtool_stats
(
struct
net_device
*
netdev
,
static
void
mv643xx_get_ethtool_stats
(
struct
net_device
*
netdev
,
struct
ethtool_stats
*
stats
,
uint64_t
*
data
)
{
struct
mv643xx_private
*
mp
=
netdev
->
priv
;
...
...
@@ -3157,15 +3143,15 @@ mv643xx_get_ethtool_stats(struct net_device *netdev,
eth_update_mib_counters
(
mp
);
for
(
i
=
0
;
i
<
MV643XX_STATS_LEN
;
i
++
)
{
for
(
i
=
0
;
i
<
MV643XX_STATS_LEN
;
i
++
)
{
char
*
p
=
(
char
*
)
mp
+
mv643xx_gstrings_stats
[
i
].
stat_offset
;
data
[
i
]
=
(
mv643xx_gstrings_stats
[
i
].
sizeof_stat
==
sizeof
(
uint64_t
))
?
*
(
uint64_t
*
)
p
:
*
(
uint32_t
*
)
p
;
}
}
static
void
mv643xx_get_strings
(
struct
net_device
*
netdev
,
uint32_t
stringset
,
uint8_t
*
data
)
static
void
mv643xx_get_strings
(
struct
net_device
*
netdev
,
uint32_t
stringset
,
uint8_t
*
data
)
{
int
i
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录