Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
9af5324a
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
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看板
提交
9af5324a
编写于
5月 25, 2009
作者:
R
Russell King
提交者:
Russell King
5月 25, 2009
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'ixp4xx' of
git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6
into devel
上级
56a45931
9733bb8e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
23 deletion
+21
-23
arch/arm/mach-ixp4xx/include/mach/qmgr.h
arch/arm/mach-ixp4xx/include/mach/qmgr.h
+11
-11
drivers/net/arm/ixp4xx_eth.c
drivers/net/arm/ixp4xx_eth.c
+6
-7
drivers/net/wan/ixp4xx_hss.c
drivers/net/wan/ixp4xx_hss.c
+4
-5
未找到文件。
arch/arm/mach-ixp4xx/include/mach/qmgr.h
浏览文件 @
9af5324a
...
@@ -138,12 +138,12 @@ static inline int qmgr_stat_empty(unsigned int queue)
...
@@ -138,12 +138,12 @@ static inline int qmgr_stat_empty(unsigned int queue)
}
}
/**
/**
* qmgr_stat_
empty() - checks if a hardware queue is nearly empty
* qmgr_stat_
below_low_watermark() - checks if a queue is below low watermark
* @queue: queue number
* @queue: queue number
*
*
* Returns non-zero value if the queue is
nearly or completely empty
.
* Returns non-zero value if the queue is
below low watermark
.
*/
*/
static
inline
int
qmgr_stat_
nearly_empty
(
unsigned
int
queue
)
static
inline
int
qmgr_stat_
below_low_watermark
(
unsigned
int
queue
)
{
{
extern
struct
qmgr_regs
__iomem
*
qmgr_regs
;
extern
struct
qmgr_regs
__iomem
*
qmgr_regs
;
if
(
queue
>=
HALF_QUEUES
)
if
(
queue
>=
HALF_QUEUES
)
...
@@ -153,19 +153,19 @@ static inline int qmgr_stat_nearly_empty(unsigned int queue)
...
@@ -153,19 +153,19 @@ static inline int qmgr_stat_nearly_empty(unsigned int queue)
}
}
/**
/**
* qmgr_stat_
empty() - checks if a hardware queue is nearly full
* qmgr_stat_
above_high_watermark() - checks if a queue is above high watermark
* @queue: queue number
* @queue: queue number
*
*
* Returns non-zero value if the queue is
nearly or completely full.
* Returns non-zero value if the queue is
above high watermark
*/
*/
static
inline
int
qmgr_stat_
nearly_full
(
unsigned
int
queue
)
static
inline
int
qmgr_stat_
above_high_watermark
(
unsigned
int
queue
)
{
{
BUG_ON
(
queue
>=
HALF_QUEUES
);
BUG_ON
(
queue
>=
HALF_QUEUES
);
return
__qmgr_get_stat1
(
queue
)
&
QUEUE_STAT1_NEARLY_FULL
;
return
__qmgr_get_stat1
(
queue
)
&
QUEUE_STAT1_NEARLY_FULL
;
}
}
/**
/**
* qmgr_stat_
empty
() - checks if a hardware queue is full
* qmgr_stat_
full
() - checks if a hardware queue is full
* @queue: queue number
* @queue: queue number
*
*
* Returns non-zero value if the queue is full.
* Returns non-zero value if the queue is full.
...
@@ -180,10 +180,10 @@ static inline int qmgr_stat_full(unsigned int queue)
...
@@ -180,10 +180,10 @@ static inline int qmgr_stat_full(unsigned int queue)
}
}
/**
/**
* qmgr_stat_
empty
() - checks if a hardware queue experienced underflow
* qmgr_stat_
underflow
() - checks if a hardware queue experienced underflow
* @queue: queue number
* @queue: queue number
*
*
* Returns non-zero value if
empty
.
* Returns non-zero value if
the queue experienced underflow
.
*/
*/
static
inline
int
qmgr_stat_underflow
(
unsigned
int
queue
)
static
inline
int
qmgr_stat_underflow
(
unsigned
int
queue
)
{
{
...
@@ -191,10 +191,10 @@ static inline int qmgr_stat_underflow(unsigned int queue)
...
@@ -191,10 +191,10 @@ static inline int qmgr_stat_underflow(unsigned int queue)
}
}
/**
/**
* qmgr_stat_
empty
() - checks if a hardware queue experienced overflow
* qmgr_stat_
overflow
() - checks if a hardware queue experienced overflow
* @queue: queue number
* @queue: queue number
*
*
* Returns non-zero value if
empty
.
* Returns non-zero value if
the queue experienced overflow
.
*/
*/
static
inline
int
qmgr_stat_overflow
(
unsigned
int
queue
)
static
inline
int
qmgr_stat_overflow
(
unsigned
int
queue
)
{
{
...
...
drivers/net/arm/ixp4xx_eth.c
浏览文件 @
9af5324a
...
@@ -513,8 +513,8 @@ static int eth_poll(struct napi_struct *napi, int budget)
...
@@ -513,8 +513,8 @@ static int eth_poll(struct napi_struct *napi, int budget)
#endif
#endif
napi_complete
(
napi
);
napi_complete
(
napi
);
qmgr_enable_irq
(
rxq
);
qmgr_enable_irq
(
rxq
);
if
(
!
qmgr_stat_
nearly_empty
(
rxq
)
&&
if
(
!
qmgr_stat_
below_low_watermark
(
rxq
)
&&
napi_reschedule
(
napi
))
{
/*
really empty in fact
*/
napi_reschedule
(
napi
))
{
/*
not empty again
*/
#if DEBUG_RX
#if DEBUG_RX
printk
(
KERN_DEBUG
"%s: eth_poll"
printk
(
KERN_DEBUG
"%s: eth_poll"
" napi_reschedule successed
\n
"
,
" napi_reschedule successed
\n
"
,
...
@@ -631,10 +631,9 @@ static void eth_txdone_irq(void *unused)
...
@@ -631,10 +631,9 @@ static void eth_txdone_irq(void *unused)
port
->
tx_buff_tab
[
n_desc
]
=
NULL
;
port
->
tx_buff_tab
[
n_desc
]
=
NULL
;
}
}
/* really empty in fact */
start
=
qmgr_stat_below_low_watermark
(
port
->
plat
->
txreadyq
);
start
=
qmgr_stat_nearly_empty
(
port
->
plat
->
txreadyq
);
queue_put_desc
(
port
->
plat
->
txreadyq
,
phys
,
desc
);
queue_put_desc
(
port
->
plat
->
txreadyq
,
phys
,
desc
);
if
(
start
)
{
if
(
start
)
{
/* TX-ready queue was empty */
#if DEBUG_TX
#if DEBUG_TX
printk
(
KERN_DEBUG
"%s: eth_txdone_irq xmit ready
\n
"
,
printk
(
KERN_DEBUG
"%s: eth_txdone_irq xmit ready
\n
"
,
port
->
netdev
->
name
);
port
->
netdev
->
name
);
...
@@ -710,14 +709,14 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -710,14 +709,14 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev)
queue_put_desc
(
TX_QUEUE
(
port
->
id
),
tx_desc_phys
(
port
,
n
),
desc
);
queue_put_desc
(
TX_QUEUE
(
port
->
id
),
tx_desc_phys
(
port
,
n
),
desc
);
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
if
(
qmgr_stat_
nearly_empty
(
txreadyq
))
{
/* really empty in fact
*/
if
(
qmgr_stat_
below_low_watermark
(
txreadyq
))
{
/* empty
*/
#if DEBUG_TX
#if DEBUG_TX
printk
(
KERN_DEBUG
"%s: eth_xmit queue full
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: eth_xmit queue full
\n
"
,
dev
->
name
);
#endif
#endif
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
/* we could miss TX ready interrupt */
/* we could miss TX ready interrupt */
/* really empty in fact */
/* really empty in fact */
if
(
!
qmgr_stat_
nearly_empty
(
txreadyq
))
{
if
(
!
qmgr_stat_
below_low_watermark
(
txreadyq
))
{
#if DEBUG_TX
#if DEBUG_TX
printk
(
KERN_DEBUG
"%s: eth_xmit ready again
\n
"
,
printk
(
KERN_DEBUG
"%s: eth_xmit ready again
\n
"
,
dev
->
name
);
dev
->
name
);
...
...
drivers/net/wan/ixp4xx_hss.c
浏览文件 @
9af5324a
...
@@ -790,11 +790,10 @@ static void hss_hdlc_txdone_irq(void *pdev)
...
@@ -790,11 +790,10 @@ static void hss_hdlc_txdone_irq(void *pdev)
free_buffer_irq
(
port
->
tx_buff_tab
[
n_desc
]);
free_buffer_irq
(
port
->
tx_buff_tab
[
n_desc
]);
port
->
tx_buff_tab
[
n_desc
]
=
NULL
;
port
->
tx_buff_tab
[
n_desc
]
=
NULL
;
/* really empty in fact */
start
=
qmgr_stat_below_low_watermark
(
port
->
plat
->
txreadyq
);
start
=
qmgr_stat_nearly_empty
(
port
->
plat
->
txreadyq
);
queue_put_desc
(
port
->
plat
->
txreadyq
,
queue_put_desc
(
port
->
plat
->
txreadyq
,
tx_desc_phys
(
port
,
n_desc
),
desc
);
tx_desc_phys
(
port
,
n_desc
),
desc
);
if
(
start
)
{
if
(
start
)
{
/* TX-ready queue was empty */
#if DEBUG_TX
#if DEBUG_TX
printk
(
KERN_DEBUG
"%s: hss_hdlc_txdone_irq xmit"
printk
(
KERN_DEBUG
"%s: hss_hdlc_txdone_irq xmit"
" ready
\n
"
,
dev
->
name
);
" ready
\n
"
,
dev
->
name
);
...
@@ -869,13 +868,13 @@ static int hss_hdlc_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -869,13 +868,13 @@ static int hss_hdlc_xmit(struct sk_buff *skb, struct net_device *dev)
queue_put_desc
(
queue_ids
[
port
->
id
].
tx
,
tx_desc_phys
(
port
,
n
),
desc
);
queue_put_desc
(
queue_ids
[
port
->
id
].
tx
,
tx_desc_phys
(
port
,
n
),
desc
);
dev
->
trans_start
=
jiffies
;
dev
->
trans_start
=
jiffies
;
if
(
qmgr_stat_
nearly_empty
(
txreadyq
))
{
/* really empty in fact
*/
if
(
qmgr_stat_
below_low_watermark
(
txreadyq
))
{
/* empty
*/
#if DEBUG_TX
#if DEBUG_TX
printk
(
KERN_DEBUG
"%s: hss_hdlc_xmit queue full
\n
"
,
dev
->
name
);
printk
(
KERN_DEBUG
"%s: hss_hdlc_xmit queue full
\n
"
,
dev
->
name
);
#endif
#endif
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
/* we could miss TX ready interrupt */
/* we could miss TX ready interrupt */
if
(
!
qmgr_stat_
nearly_empty
(
txreadyq
))
{
if
(
!
qmgr_stat_
below_low_watermark
(
txreadyq
))
{
#if DEBUG_TX
#if DEBUG_TX
printk
(
KERN_DEBUG
"%s: hss_hdlc_xmit ready again
\n
"
,
printk
(
KERN_DEBUG
"%s: hss_hdlc_xmit ready again
\n
"
,
dev
->
name
);
dev
->
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录