Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
9dd3a13b
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看板
提交
9dd3a13b
编写于
9月 13, 2012
作者:
B
Ben Hutchings
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sfc: Move details of a Falcon bug workaround out of ethtool.c
Signed-off-by:
N
Ben Hutchings
<
bhutchings@solarflare.com
>
上级
e847b53e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
31 addition
and
23 deletion
+31
-23
drivers/net/ethernet/sfc/ethtool.c
drivers/net/ethernet/sfc/ethtool.c
+4
-19
drivers/net/ethernet/sfc/falcon.c
drivers/net/ethernet/sfc/falcon.c
+25
-1
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/net_driver.h
+2
-0
drivers/net/ethernet/sfc/nic.h
drivers/net/ethernet/sfc/nic.h
+0
-1
drivers/net/ethernet/sfc/workarounds.h
drivers/net/ethernet/sfc/workarounds.h
+0
-2
未找到文件。
drivers/net/ethernet/sfc/ethtool.c
浏览文件 @
9dd3a13b
...
...
@@ -709,7 +709,6 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
struct
efx_nic
*
efx
=
netdev_priv
(
net_dev
);
u8
wanted_fc
,
old_fc
;
u32
old_adv
;
bool
reset
;
int
rc
=
0
;
mutex_lock
(
&
efx
->
mac_lock
);
...
...
@@ -732,24 +731,10 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
goto
out
;
}
/* TX flow control may automatically turn itself off if the
* link partner (intermittently) stops responding to pause
* frames. There isn't any indication that this has happened,
* so the best we do is leave it up to the user to spot this
* and fix it be cycling transmit flow control on this end. */
reset
=
(
wanted_fc
&
EFX_FC_TX
)
&&
!
(
efx
->
wanted_fc
&
EFX_FC_TX
);
if
(
EFX_WORKAROUND_11482
(
efx
)
&&
reset
)
{
if
(
efx_nic_rev
(
efx
)
==
EFX_REV_FALCON_B0
)
{
/* Recover by resetting the EM block */
falcon_stop_nic_stats
(
efx
);
falcon_drain_tx_fifo
(
efx
);
falcon_reconfigure_xmac
(
efx
);
falcon_start_nic_stats
(
efx
);
}
else
{
/* Schedule a reset to recover */
efx_schedule_reset
(
efx
,
RESET_TYPE_INVISIBLE
);
}
}
/* Hook for Falcon bug 11482 workaround */
if
(
efx
->
type
->
prepare_enable_fc_tx
&&
(
wanted_fc
&
EFX_FC_TX
)
&&
!
(
efx
->
wanted_fc
&
EFX_FC_TX
))
efx
->
type
->
prepare_enable_fc_tx
(
efx
);
old_adv
=
efx
->
link_advertising
;
old_fc
=
efx
->
wanted_fc
;
...
...
drivers/net/ethernet/sfc/falcon.c
浏览文件 @
9dd3a13b
...
...
@@ -497,7 +497,7 @@ static void falcon_reset_macs(struct efx_nic *efx)
falcon_setup_xaui
(
efx
);
}
void
falcon_drain_tx_fifo
(
struct
efx_nic
*
efx
)
static
void
falcon_drain_tx_fifo
(
struct
efx_nic
*
efx
)
{
efx_oword_t
reg
;
...
...
@@ -678,6 +678,28 @@ static int falcon_reconfigure_port(struct efx_nic *efx)
return
0
;
}
/* TX flow control may automatically turn itself off if the link
* partner (intermittently) stops responding to pause frames. There
* isn't any indication that this has happened, so the best we do is
* leave it up to the user to spot this and fix it by cycling transmit
* flow control on this end.
*/
static
void
falcon_a1_prepare_enable_fc_tx
(
struct
efx_nic
*
efx
)
{
/* Schedule a reset to recover */
efx_schedule_reset
(
efx
,
RESET_TYPE_INVISIBLE
);
}
static
void
falcon_b0_prepare_enable_fc_tx
(
struct
efx_nic
*
efx
)
{
/* Recover by resetting the EM block */
falcon_stop_nic_stats
(
efx
);
falcon_drain_tx_fifo
(
efx
);
falcon_reconfigure_xmac
(
efx
);
falcon_start_nic_stats
(
efx
);
}
/**************************************************************************
*
* PHY access via GMII
...
...
@@ -1798,6 +1820,7 @@ const struct efx_nic_type falcon_a1_nic_type = {
.
set_id_led
=
falcon_set_id_led
,
.
push_irq_moderation
=
falcon_push_irq_moderation
,
.
reconfigure_port
=
falcon_reconfigure_port
,
.
prepare_enable_fc_tx
=
falcon_a1_prepare_enable_fc_tx
,
.
reconfigure_mac
=
falcon_reconfigure_xmac
,
.
check_mac_fault
=
falcon_xmac_check_fault
,
.
get_wol
=
falcon_get_wol
,
...
...
@@ -1842,6 +1865,7 @@ const struct efx_nic_type falcon_b0_nic_type = {
.
set_id_led
=
falcon_set_id_led
,
.
push_irq_moderation
=
falcon_push_irq_moderation
,
.
reconfigure_port
=
falcon_reconfigure_port
,
.
prepare_enable_fc_tx
=
falcon_b0_prepare_enable_fc_tx
,
.
reconfigure_mac
=
falcon_reconfigure_xmac
,
.
check_mac_fault
=
falcon_xmac_check_fault
,
.
get_wol
=
falcon_get_wol
,
...
...
drivers/net/ethernet/sfc/net_driver.h
浏览文件 @
9dd3a13b
...
...
@@ -946,6 +946,7 @@ static inline unsigned int efx_port_num(struct efx_nic *efx)
* @set_id_led: Set state of identifying LED or revert to automatic function
* @push_irq_moderation: Apply interrupt moderation value
* @reconfigure_port: Push loopback/power/txdis changes to the MAC and PHY
* @prepare_enable_fc_tx: Prepare MAC to enable pause frame TX (may be %NULL)
* @reconfigure_mac: Push MAC address, MTU, flow control and filter settings
* to the hardware. Serialised by the mac_lock.
* @check_mac_fault: Check MAC fault state. True if fault present.
...
...
@@ -995,6 +996,7 @@ struct efx_nic_type {
void
(
*
set_id_led
)(
struct
efx_nic
*
efx
,
enum
efx_led_mode
mode
);
void
(
*
push_irq_moderation
)(
struct
efx_channel
*
channel
);
int
(
*
reconfigure_port
)(
struct
efx_nic
*
efx
);
void
(
*
prepare_enable_fc_tx
)(
struct
efx_nic
*
efx
);
int
(
*
reconfigure_mac
)(
struct
efx_nic
*
efx
);
bool
(
*
check_mac_fault
)(
struct
efx_nic
*
efx
);
void
(
*
get_wol
)(
struct
efx_nic
*
efx
,
struct
ethtool_wolinfo
*
wol
);
...
...
drivers/net/ethernet/sfc/nic.h
浏览文件 @
9dd3a13b
...
...
@@ -298,7 +298,6 @@ extern void efx_nic_eventq_read_ack(struct efx_channel *channel);
extern
bool
efx_nic_event_present
(
struct
efx_channel
*
channel
);
/* MAC/PHY */
extern
void
falcon_drain_tx_fifo
(
struct
efx_nic
*
efx
);
extern
void
falcon_reconfigure_mac_wrapper
(
struct
efx_nic
*
efx
);
extern
bool
falcon_xmac_check_fault
(
struct
efx_nic
*
efx
);
extern
int
falcon_reconfigure_xmac
(
struct
efx_nic
*
efx
);
...
...
drivers/net/ethernet/sfc/workarounds.h
浏览文件 @
9dd3a13b
...
...
@@ -30,8 +30,6 @@
/* TX_EV_PKT_ERR can be caused by a dangling TX descriptor
* or a PCIe error (bug 11028) */
#define EFX_WORKAROUND_10727 EFX_WORKAROUND_ALWAYS
/* Transmit flow control may get disabled */
#define EFX_WORKAROUND_11482 EFX_WORKAROUND_FALCON_AB
/* Truncated IPv4 packets can confuse the TX packet parser */
#define EFX_WORKAROUND_15592 EFX_WORKAROUND_FALCON_AB
/* Legacy ISR read can return zero once */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录