Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
2eab17ab
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
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看板
提交
2eab17ab
编写于
11月 23, 2007
作者:
J
Jeff Garzik
提交者:
David S. Miller
1月 28, 2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drivers/net/cxgb3: trim trailing whitespace
Signed-off-by:
N
Jeff Garzik
<
jgarzik@redhat.com
>
上级
afefce66
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
31 addition
and
31 deletion
+31
-31
drivers/net/cxgb3/cxgb3_main.c
drivers/net/cxgb3/cxgb3_main.c
+8
-8
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/cxgb3/cxgb3_offload.c
+1
-1
drivers/net/cxgb3/firmware_exports.h
drivers/net/cxgb3/firmware_exports.h
+10
-10
drivers/net/cxgb3/t3_hw.c
drivers/net/cxgb3/t3_hw.c
+7
-7
drivers/net/cxgb3/xgmac.c
drivers/net/cxgb3/xgmac.c
+5
-5
未找到文件。
drivers/net/cxgb3/cxgb3_main.c
浏览文件 @
2eab17ab
...
@@ -719,7 +719,7 @@ static int upgrade_fw(struct adapter *adap)
...
@@ -719,7 +719,7 @@ static int upgrade_fw(struct adapter *adap)
else
else
dev_err
(
dev
,
"failed to upgrade to firmware %d.%d.%d
\n
"
,
dev_err
(
dev
,
"failed to upgrade to firmware %d.%d.%d
\n
"
,
FW_VERSION_MAJOR
,
FW_VERSION_MINOR
,
FW_VERSION_MICRO
);
FW_VERSION_MAJOR
,
FW_VERSION_MINOR
,
FW_VERSION_MICRO
);
return
ret
;
return
ret
;
}
}
...
@@ -746,7 +746,7 @@ static int update_tpsram(struct adapter *adap)
...
@@ -746,7 +746,7 @@ static int update_tpsram(struct adapter *adap)
struct
device
*
dev
=
&
adap
->
pdev
->
dev
;
struct
device
*
dev
=
&
adap
->
pdev
->
dev
;
int
ret
;
int
ret
;
char
rev
;
char
rev
;
rev
=
t3rev2char
(
adap
);
rev
=
t3rev2char
(
adap
);
if
(
!
rev
)
if
(
!
rev
)
return
0
;
return
0
;
...
@@ -760,10 +760,10 @@ static int update_tpsram(struct adapter *adap)
...
@@ -760,10 +760,10 @@ static int update_tpsram(struct adapter *adap)
buf
);
buf
);
return
ret
;
return
ret
;
}
}
ret
=
t3_check_tpsram
(
adap
,
tpsram
->
data
,
tpsram
->
size
);
ret
=
t3_check_tpsram
(
adap
,
tpsram
->
data
,
tpsram
->
size
);
if
(
ret
)
if
(
ret
)
goto
release_tpsram
;
goto
release_tpsram
;
ret
=
t3_set_proto_sram
(
adap
,
tpsram
->
data
);
ret
=
t3_set_proto_sram
(
adap
,
tpsram
->
data
);
if
(
ret
==
0
)
if
(
ret
==
0
)
...
@@ -779,7 +779,7 @@ static int update_tpsram(struct adapter *adap)
...
@@ -779,7 +779,7 @@ static int update_tpsram(struct adapter *adap)
release_tpsram:
release_tpsram:
release_firmware
(
tpsram
);
release_firmware
(
tpsram
);
return
ret
;
return
ret
;
}
}
...
@@ -2144,7 +2144,7 @@ static void cxgb_netpoll(struct net_device *dev)
...
@@ -2144,7 +2144,7 @@ static void cxgb_netpoll(struct net_device *dev)
for
(
qidx
=
pi
->
first_qset
;
qidx
<
pi
->
first_qset
+
pi
->
nqsets
;
qidx
++
)
{
for
(
qidx
=
pi
->
first_qset
;
qidx
<
pi
->
first_qset
+
pi
->
nqsets
;
qidx
++
)
{
struct
sge_qset
*
qs
=
&
adapter
->
sge
.
qs
[
qidx
];
struct
sge_qset
*
qs
=
&
adapter
->
sge
.
qs
[
qidx
];
void
*
source
;
void
*
source
;
if
(
adapter
->
flags
&
USING_MSIX
)
if
(
adapter
->
flags
&
USING_MSIX
)
source
=
qs
;
source
=
qs
;
else
else
...
@@ -2339,7 +2339,7 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
...
@@ -2339,7 +2339,7 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
cxgb_close
(
netdev
);
cxgb_close
(
netdev
);
}
}
if
(
is_offload
(
adapter
)
&&
if
(
is_offload
(
adapter
)
&&
test_bit
(
OFFLOAD_DEVMAP_BIT
,
&
adapter
->
open_device_map
))
test_bit
(
OFFLOAD_DEVMAP_BIT
,
&
adapter
->
open_device_map
))
offload_close
(
&
adapter
->
tdev
);
offload_close
(
&
adapter
->
tdev
);
...
@@ -2613,7 +2613,7 @@ static int __devinit init_one(struct pci_dev *pdev,
...
@@ -2613,7 +2613,7 @@ static int __devinit init_one(struct pci_dev *pdev,
err
=
-
ENODEV
;
err
=
-
ENODEV
;
goto
out_free_dev
;
goto
out_free_dev
;
}
}
/*
/*
* The card is now ready to go. If any errors occur during device
* The card is now ready to go. If any errors occur during device
* registration we do not fail the whole card but rather proceed only
* registration we do not fail the whole card but rather proceed only
...
...
drivers/net/cxgb3/cxgb3_offload.c
浏览文件 @
2eab17ab
...
@@ -488,7 +488,7 @@ static void t3_process_tid_release_list(struct work_struct *work)
...
@@ -488,7 +488,7 @@ static void t3_process_tid_release_list(struct work_struct *work)
tid_release_task
);
tid_release_task
);
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
struct
t3cdev
*
tdev
=
td
->
dev
;
struct
t3cdev
*
tdev
=
td
->
dev
;
spin_lock_bh
(
&
td
->
tid_release_lock
);
spin_lock_bh
(
&
td
->
tid_release_lock
);
while
(
td
->
tid_release_list
)
{
while
(
td
->
tid_release_list
)
{
...
...
drivers/net/cxgb3/firmware_exports.h
浏览文件 @
2eab17ab
...
@@ -76,14 +76,14 @@
...
@@ -76,14 +76,14 @@
#define FW_WROPCODE_MNGT 0x1D
#define FW_WROPCODE_MNGT 0x1D
#define FW_MNGTOPCODE_PKTSCHED_SET 0x00
#define FW_MNGTOPCODE_PKTSCHED_SET 0x00
/* Maximum size of a WR sent from the host, limited by the SGE.
/* Maximum size of a WR sent from the host, limited by the SGE.
*
*
* Note: WR coming from ULP or TP are only limited by CIM.
* Note: WR coming from ULP or TP are only limited by CIM.
*/
*/
#define FW_WR_SIZE 128
#define FW_WR_SIZE 128
/* Maximum number of outstanding WRs sent from the host. Value must be
/* Maximum number of outstanding WRs sent from the host. Value must be
* programmed in the CTRL/TUNNEL/QP SGE Egress Context and used by
* programmed in the CTRL/TUNNEL/QP SGE Egress Context and used by
* offload modules to limit the number of WRs per connection.
* offload modules to limit the number of WRs per connection.
*/
*/
#define FW_T3_WR_NUM 16
#define FW_T3_WR_NUM 16
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
* queues must start at SGE Egress Context FW_TUNNEL_SGEEC_START and must
* queues must start at SGE Egress Context FW_TUNNEL_SGEEC_START and must
* start at 'TID' (or 'uP Token') FW_TUNNEL_TID_START.
* start at 'TID' (or 'uP Token') FW_TUNNEL_TID_START.
*
*
* Ingress Traffic (e.g. DMA completion credit) for TUNNEL Queue[i] is sent
* Ingress Traffic (e.g. DMA completion credit) for TUNNEL Queue[i] is sent
* to RESP Queue[i].
* to RESP Queue[i].
*/
*/
#define FW_TUNNEL_NUM 8
#define FW_TUNNEL_NUM 8
...
@@ -116,10 +116,10 @@
...
@@ -116,10 +116,10 @@
#define FW_CTRL_SGEEC_START 65528
#define FW_CTRL_SGEEC_START 65528
#define FW_CTRL_TID_START 65536
#define FW_CTRL_TID_START 65536
/* FW_OFLD_NUM corresponds to the number of supported OFFLOAD Queues. These
/* FW_OFLD_NUM corresponds to the number of supported OFFLOAD Queues. These
* queues must start at SGE Egress Context FW_OFLD_SGEEC_START.
* queues must start at SGE Egress Context FW_OFLD_SGEEC_START.
*
*
* Note: the 'uP Token' in the SGE Egress Context fields is irrelevant for
* Note: the 'uP Token' in the SGE Egress Context fields is irrelevant for
* OFFLOAD Queues, as the host is responsible for providing the correct TID in
* OFFLOAD Queues, as the host is responsible for providing the correct TID in
* every WR.
* every WR.
*
*
...
@@ -129,14 +129,14 @@
...
@@ -129,14 +129,14 @@
#define FW_OFLD_SGEEC_START 0
#define FW_OFLD_SGEEC_START 0
/*
/*
*
*
*/
*/
#define FW_RI_NUM 1
#define FW_RI_NUM 1
#define FW_RI_SGEEC_START 65527
#define FW_RI_SGEEC_START 65527
#define FW_RI_TID_START 65552
#define FW_RI_TID_START 65552
/*
/*
* The RX_PKT_TID
* The RX_PKT_TID
*/
*/
#define FW_RX_PKT_NUM 1
#define FW_RX_PKT_NUM 1
#define FW_RX_PKT_TID_START 65553
#define FW_RX_PKT_TID_START 65553
...
...
drivers/net/cxgb3/t3_hw.c
浏览文件 @
2eab17ab
...
@@ -865,7 +865,7 @@ int t3_get_tp_version(struct adapter *adapter, u32 *vers)
...
@@ -865,7 +865,7 @@ int t3_get_tp_version(struct adapter *adapter, u32 *vers)
1
,
1
,
5
,
1
);
1
,
1
,
5
,
1
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
*
vers
=
t3_read_reg
(
adapter
,
A_TP_EMBED_OP_FIELD1
);
*
vers
=
t3_read_reg
(
adapter
,
A_TP_EMBED_OP_FIELD1
);
return
0
;
return
0
;
...
@@ -896,7 +896,7 @@ int t3_check_tpsram_version(struct adapter *adapter, int *must_load)
...
@@ -896,7 +896,7 @@ int t3_check_tpsram_version(struct adapter *adapter, int *must_load)
major
=
G_TP_VERSION_MAJOR
(
vers
);
major
=
G_TP_VERSION_MAJOR
(
vers
);
minor
=
G_TP_VERSION_MINOR
(
vers
);
minor
=
G_TP_VERSION_MINOR
(
vers
);
if
(
major
==
TP_VERSION_MAJOR
&&
minor
==
TP_VERSION_MINOR
)
if
(
major
==
TP_VERSION_MAJOR
&&
minor
==
TP_VERSION_MINOR
)
return
0
;
return
0
;
if
(
major
!=
TP_VERSION_MAJOR
)
if
(
major
!=
TP_VERSION_MAJOR
)
...
@@ -913,7 +913,7 @@ int t3_check_tpsram_version(struct adapter *adapter, int *must_load)
...
@@ -913,7 +913,7 @@ int t3_check_tpsram_version(struct adapter *adapter, int *must_load)
}
}
/**
/**
* t3_check_tpsram - check if provided protocol SRAM
* t3_check_tpsram - check if provided protocol SRAM
* is compatible with this driver
* is compatible with this driver
* @adapter: the adapter
* @adapter: the adapter
* @tp_sram: the firmware image to write
* @tp_sram: the firmware image to write
...
@@ -2508,7 +2508,7 @@ static void tp_config(struct adapter *adap, const struct tp_params *p)
...
@@ -2508,7 +2508,7 @@ static void tp_config(struct adapter *adap, const struct tp_params *p)
t3_set_reg_field
(
adap
,
A_TP_PC_CONFIG2
,
F_CHDRAFULL
,
0
);
t3_set_reg_field
(
adap
,
A_TP_PC_CONFIG2
,
F_CHDRAFULL
,
0
);
t3_write_reg
(
adap
,
A_TP_PROXY_FLOW_CNTL
,
1080
);
t3_write_reg
(
adap
,
A_TP_PROXY_FLOW_CNTL
,
1080
);
t3_write_reg
(
adap
,
A_TP_PROXY_FLOW_CNTL
,
1000
);
t3_write_reg
(
adap
,
A_TP_PROXY_FLOW_CNTL
,
1000
);
if
(
adap
->
params
.
rev
>
0
)
{
if
(
adap
->
params
.
rev
>
0
)
{
tp_wr_indirect
(
adap
,
A_TP_EGRESS_CONFIG
,
F_REWRITEFORCETOSIZE
);
tp_wr_indirect
(
adap
,
A_TP_EGRESS_CONFIG
,
F_REWRITEFORCETOSIZE
);
t3_set_reg_field
(
adap
,
A_TP_PARA_REG3
,
F_TXPACEAUTO
,
t3_set_reg_field
(
adap
,
A_TP_PARA_REG3
,
F_TXPACEAUTO
,
...
@@ -2835,7 +2835,7 @@ int t3_set_proto_sram(struct adapter *adap, u8 *data)
...
@@ -2835,7 +2835,7 @@ int t3_set_proto_sram(struct adapter *adap, u8 *data)
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD3
,
cpu_to_be32
(
*
buf
++
));
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD3
,
cpu_to_be32
(
*
buf
++
));
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD2
,
cpu_to_be32
(
*
buf
++
));
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD2
,
cpu_to_be32
(
*
buf
++
));
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD1
,
cpu_to_be32
(
*
buf
++
));
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD1
,
cpu_to_be32
(
*
buf
++
));
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD0
,
i
<<
1
|
1
<<
31
);
t3_write_reg
(
adap
,
A_TP_EMBED_OP_FIELD0
,
i
<<
1
|
1
<<
31
);
if
(
t3_wait_op_done
(
adap
,
A_TP_EMBED_OP_FIELD0
,
1
,
1
,
5
,
1
))
if
(
t3_wait_op_done
(
adap
,
A_TP_EMBED_OP_FIELD0
,
1
,
1
,
5
,
1
))
return
-
EIO
;
return
-
EIO
;
...
@@ -3425,13 +3425,13 @@ void early_hw_init(struct adapter *adapter, const struct adapter_info *ai)
...
@@ -3425,13 +3425,13 @@ void early_hw_init(struct adapter *adapter, const struct adapter_info *ai)
}
}
/*
/*
* Reset the adapter.
* Reset the adapter.
* Older PCIe cards lose their config space during reset, PCI-X
* Older PCIe cards lose their config space during reset, PCI-X
* ones don't.
* ones don't.
*/
*/
static
int
t3_reset_adapter
(
struct
adapter
*
adapter
)
static
int
t3_reset_adapter
(
struct
adapter
*
adapter
)
{
{
int
i
,
save_and_restore_pcie
=
int
i
,
save_and_restore_pcie
=
adapter
->
params
.
rev
<
T3_REV_B2
&&
is_pcie
(
adapter
);
adapter
->
params
.
rev
<
T3_REV_B2
&&
is_pcie
(
adapter
);
uint16_t
devid
=
0
;
uint16_t
devid
=
0
;
...
...
drivers/net/cxgb3/xgmac.c
浏览文件 @
2eab17ab
...
@@ -153,7 +153,7 @@ static int t3b2_mac_reset(struct cmac *mac)
...
@@ -153,7 +153,7 @@ static int t3b2_mac_reset(struct cmac *mac)
unsigned
int
oft
=
mac
->
offset
;
unsigned
int
oft
=
mac
->
offset
;
u32
val
;
u32
val
;
if
(
!
macidx
(
mac
))
if
(
!
macidx
(
mac
))
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
F_PORT0ACTIVE
,
0
);
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
F_PORT0ACTIVE
,
0
);
else
else
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
F_PORT1ACTIVE
,
0
);
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
F_PORT1ACTIVE
,
0
);
...
@@ -187,11 +187,11 @@ static int t3b2_mac_reset(struct cmac *mac)
...
@@ -187,11 +187,11 @@ static int t3b2_mac_reset(struct cmac *mac)
msleep
(
1
);
msleep
(
1
);
t3b_pcs_reset
(
mac
);
t3b_pcs_reset
(
mac
);
}
}
t3_write_reg
(
adap
,
A_XGM_RX_CFG
+
oft
,
t3_write_reg
(
adap
,
A_XGM_RX_CFG
+
oft
,
F_DISPAUSEFRAMES
|
F_EN1536BFRAMES
|
F_DISPAUSEFRAMES
|
F_EN1536BFRAMES
|
F_RMFCS
|
F_ENJUMBO
|
F_ENHASHMCAST
);
F_RMFCS
|
F_ENJUMBO
|
F_ENHASHMCAST
);
if
(
!
macidx
(
mac
))
if
(
!
macidx
(
mac
))
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
0
,
F_PORT0ACTIVE
);
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
0
,
F_PORT0ACTIVE
);
else
else
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
0
,
F_PORT1ACTIVE
);
t3_set_reg_field
(
adap
,
A_MPS_CFG
,
0
,
F_PORT1ACTIVE
);
...
@@ -336,7 +336,7 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
...
@@ -336,7 +336,7 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
* Adjust the PAUSE frame watermarks. We always set the LWM, and the
* Adjust the PAUSE frame watermarks. We always set the LWM, and the
* HWM only if flow-control is enabled.
* HWM only if flow-control is enabled.
*/
*/
hwm
=
max_t
(
unsigned
int
,
MAC_RXFIFO_SIZE
-
3
*
mtu
,
hwm
=
max_t
(
unsigned
int
,
MAC_RXFIFO_SIZE
-
3
*
mtu
,
MAC_RXFIFO_SIZE
*
38
/
100
);
MAC_RXFIFO_SIZE
*
38
/
100
);
hwm
=
min
(
hwm
,
MAC_RXFIFO_SIZE
-
8192
);
hwm
=
min
(
hwm
,
MAC_RXFIFO_SIZE
-
8192
);
lwm
=
min
(
3
*
(
int
)
mtu
,
MAC_RXFIFO_SIZE
/
4
);
lwm
=
min
(
3
*
(
int
)
mtu
,
MAC_RXFIFO_SIZE
/
4
);
...
@@ -449,7 +449,7 @@ int t3_mac_enable(struct cmac *mac, int which)
...
@@ -449,7 +449,7 @@ int t3_mac_enable(struct cmac *mac, int which)
struct
adapter
*
adap
=
mac
->
adapter
;
struct
adapter
*
adap
=
mac
->
adapter
;
unsigned
int
oft
=
mac
->
offset
;
unsigned
int
oft
=
mac
->
offset
;
struct
mac_stats
*
s
=
&
mac
->
stats
;
struct
mac_stats
*
s
=
&
mac
->
stats
;
if
(
which
&
MAC_DIRECTION_TX
)
{
if
(
which
&
MAC_DIRECTION_TX
)
{
t3_write_reg
(
adap
,
A_TP_PIO_ADDR
,
A_TP_TX_DROP_CFG_CH0
+
idx
);
t3_write_reg
(
adap
,
A_TP_PIO_ADDR
,
A_TP_TX_DROP_CFG_CH0
+
idx
);
t3_write_reg
(
adap
,
A_TP_PIO_DATA
,
0xc0ede401
);
t3_write_reg
(
adap
,
A_TP_PIO_DATA
,
0xc0ede401
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录