Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
b0f43dcc
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b0f43dcc
编写于
12月 01, 2008
作者:
R
Roland Dreier
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'ehca' and 'mlx4' into for-linus
上级
7ec4f463
42ab01c3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
53 addition
and
1 deletion
+53
-1
drivers/infiniband/hw/mlx4/cq.c
drivers/infiniband/hw/mlx4/cq.c
+5
-0
drivers/net/mlx4/main.c
drivers/net/mlx4/main.c
+8
-0
drivers/net/mlx4/mlx4.h
drivers/net/mlx4/mlx4.h
+1
-0
drivers/net/mlx4/port.c
drivers/net/mlx4/port.c
+38
-1
include/linux/mlx4/device.h
include/linux/mlx4/device.h
+1
-0
未找到文件。
drivers/infiniband/hw/mlx4/cq.c
浏览文件 @
b0f43dcc
...
@@ -343,6 +343,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
...
@@ -343,6 +343,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
{
{
struct
mlx4_ib_dev
*
dev
=
to_mdev
(
ibcq
->
device
);
struct
mlx4_ib_dev
*
dev
=
to_mdev
(
ibcq
->
device
);
struct
mlx4_ib_cq
*
cq
=
to_mcq
(
ibcq
);
struct
mlx4_ib_cq
*
cq
=
to_mcq
(
ibcq
);
struct
mlx4_mtt
mtt
;
int
outst_cqe
;
int
outst_cqe
;
int
err
;
int
err
;
...
@@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
...
@@ -376,10 +377,13 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
goto
out
;
goto
out
;
}
}
mtt
=
cq
->
buf
.
mtt
;
err
=
mlx4_cq_resize
(
dev
->
dev
,
&
cq
->
mcq
,
entries
,
&
cq
->
resize_buf
->
buf
.
mtt
);
err
=
mlx4_cq_resize
(
dev
->
dev
,
&
cq
->
mcq
,
entries
,
&
cq
->
resize_buf
->
buf
.
mtt
);
if
(
err
)
if
(
err
)
goto
err_buf
;
goto
err_buf
;
mlx4_mtt_cleanup
(
dev
->
dev
,
&
mtt
);
if
(
ibcq
->
uobject
)
{
if
(
ibcq
->
uobject
)
{
cq
->
buf
=
cq
->
resize_buf
->
buf
;
cq
->
buf
=
cq
->
resize_buf
->
buf
;
cq
->
ibcq
.
cqe
=
cq
->
resize_buf
->
cqe
;
cq
->
ibcq
.
cqe
=
cq
->
resize_buf
->
cqe
;
...
@@ -406,6 +410,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
...
@@ -406,6 +410,7 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
goto
out
;
goto
out
;
err_buf:
err_buf:
mlx4_mtt_cleanup
(
dev
->
dev
,
&
cq
->
resize_buf
->
buf
.
mtt
);
if
(
!
ibcq
->
uobject
)
if
(
!
ibcq
->
uobject
)
mlx4_ib_free_cq_buf
(
dev
,
&
cq
->
resize_buf
->
buf
,
mlx4_ib_free_cq_buf
(
dev
,
&
cq
->
resize_buf
->
buf
,
cq
->
resize_buf
->
cqe
);
cq
->
resize_buf
->
cqe
);
...
...
drivers/net/mlx4/main.c
浏览文件 @
b0f43dcc
...
@@ -753,6 +753,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
...
@@ -753,6 +753,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
struct
mlx4_priv
*
priv
=
mlx4_priv
(
dev
);
struct
mlx4_priv
*
priv
=
mlx4_priv
(
dev
);
int
err
;
int
err
;
int
port
;
int
port
;
__be32
ib_port_default_caps
;
err
=
mlx4_init_uar_table
(
dev
);
err
=
mlx4_init_uar_table
(
dev
);
if
(
err
)
{
if
(
err
)
{
...
@@ -852,6 +853,13 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
...
@@ -852,6 +853,13 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
}
}
for
(
port
=
1
;
port
<=
dev
->
caps
.
num_ports
;
port
++
)
{
for
(
port
=
1
;
port
<=
dev
->
caps
.
num_ports
;
port
++
)
{
ib_port_default_caps
=
0
;
err
=
mlx4_get_port_ib_caps
(
dev
,
port
,
&
ib_port_default_caps
);
if
(
err
)
mlx4_warn
(
dev
,
"failed to get port %d default "
"ib capabilities (%d). Continuing with "
"caps = 0
\n
"
,
port
,
err
);
dev
->
caps
.
ib_port_def_cap
[
port
]
=
ib_port_default_caps
;
err
=
mlx4_SET_PORT
(
dev
,
port
);
err
=
mlx4_SET_PORT
(
dev
,
port
);
if
(
err
)
{
if
(
err
)
{
mlx4_err
(
dev
,
"Failed to set port %d, aborting
\n
"
,
mlx4_err
(
dev
,
"Failed to set port %d, aborting
\n
"
,
...
...
drivers/net/mlx4/mlx4.h
浏览文件 @
b0f43dcc
...
@@ -385,5 +385,6 @@ void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table);
...
@@ -385,5 +385,6 @@ void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table);
void
mlx4_init_vlan_table
(
struct
mlx4_dev
*
dev
,
struct
mlx4_vlan_table
*
table
);
void
mlx4_init_vlan_table
(
struct
mlx4_dev
*
dev
,
struct
mlx4_vlan_table
*
table
);
int
mlx4_SET_PORT
(
struct
mlx4_dev
*
dev
,
u8
port
);
int
mlx4_SET_PORT
(
struct
mlx4_dev
*
dev
,
u8
port
);
int
mlx4_get_port_ib_caps
(
struct
mlx4_dev
*
dev
,
u8
port
,
__be32
*
caps
);
#endif
/* MLX4_H */
#endif
/* MLX4_H */
drivers/net/mlx4/port.c
浏览文件 @
b0f43dcc
...
@@ -258,6 +258,42 @@ void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index)
...
@@ -258,6 +258,42 @@ void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index)
}
}
EXPORT_SYMBOL_GPL
(
mlx4_unregister_vlan
);
EXPORT_SYMBOL_GPL
(
mlx4_unregister_vlan
);
int
mlx4_get_port_ib_caps
(
struct
mlx4_dev
*
dev
,
u8
port
,
__be32
*
caps
)
{
struct
mlx4_cmd_mailbox
*
inmailbox
,
*
outmailbox
;
u8
*
inbuf
,
*
outbuf
;
int
err
;
inmailbox
=
mlx4_alloc_cmd_mailbox
(
dev
);
if
(
IS_ERR
(
inmailbox
))
return
PTR_ERR
(
inmailbox
);
outmailbox
=
mlx4_alloc_cmd_mailbox
(
dev
);
if
(
IS_ERR
(
outmailbox
))
{
mlx4_free_cmd_mailbox
(
dev
,
inmailbox
);
return
PTR_ERR
(
outmailbox
);
}
inbuf
=
inmailbox
->
buf
;
outbuf
=
outmailbox
->
buf
;
memset
(
inbuf
,
0
,
256
);
memset
(
outbuf
,
0
,
256
);
inbuf
[
0
]
=
1
;
inbuf
[
1
]
=
1
;
inbuf
[
2
]
=
1
;
inbuf
[
3
]
=
1
;
*
(
__be16
*
)
(
&
inbuf
[
16
])
=
cpu_to_be16
(
0x0015
);
*
(
__be32
*
)
(
&
inbuf
[
20
])
=
cpu_to_be32
(
port
);
err
=
mlx4_cmd_box
(
dev
,
inmailbox
->
dma
,
outmailbox
->
dma
,
port
,
3
,
MLX4_CMD_MAD_IFC
,
MLX4_CMD_TIME_CLASS_C
);
if
(
!
err
)
*
caps
=
*
(
__be32
*
)
(
outbuf
+
84
);
mlx4_free_cmd_mailbox
(
dev
,
inmailbox
);
mlx4_free_cmd_mailbox
(
dev
,
outmailbox
);
return
err
;
}
int
mlx4_SET_PORT
(
struct
mlx4_dev
*
dev
,
u8
port
)
int
mlx4_SET_PORT
(
struct
mlx4_dev
*
dev
,
u8
port
)
{
{
struct
mlx4_cmd_mailbox
*
mailbox
;
struct
mlx4_cmd_mailbox
*
mailbox
;
...
@@ -273,7 +309,8 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
...
@@ -273,7 +309,8 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
((
u8
*
)
mailbox
->
buf
)[
3
]
=
6
;
((
u8
*
)
mailbox
->
buf
)[
3
]
=
6
;
((
__be16
*
)
mailbox
->
buf
)[
4
]
=
cpu_to_be16
(
1
<<
15
);
((
__be16
*
)
mailbox
->
buf
)[
4
]
=
cpu_to_be16
(
1
<<
15
);
((
__be16
*
)
mailbox
->
buf
)[
6
]
=
cpu_to_be16
(
1
<<
15
);
((
__be16
*
)
mailbox
->
buf
)[
6
]
=
cpu_to_be16
(
1
<<
15
);
}
}
else
((
__be32
*
)
mailbox
->
buf
)[
1
]
=
dev
->
caps
.
ib_port_def_cap
[
port
];
err
=
mlx4_cmd
(
dev
,
mailbox
->
dma
,
port
,
is_eth
,
MLX4_CMD_SET_PORT
,
err
=
mlx4_cmd
(
dev
,
mailbox
->
dma
,
port
,
is_eth
,
MLX4_CMD_SET_PORT
,
MLX4_CMD_TIME_CLASS_B
);
MLX4_CMD_TIME_CLASS_B
);
...
...
include/linux/mlx4/device.h
浏览文件 @
b0f43dcc
...
@@ -179,6 +179,7 @@ struct mlx4_caps {
...
@@ -179,6 +179,7 @@ struct mlx4_caps {
int
num_ports
;
int
num_ports
;
int
vl_cap
[
MLX4_MAX_PORTS
+
1
];
int
vl_cap
[
MLX4_MAX_PORTS
+
1
];
int
ib_mtu_cap
[
MLX4_MAX_PORTS
+
1
];
int
ib_mtu_cap
[
MLX4_MAX_PORTS
+
1
];
__be32
ib_port_def_cap
[
MLX4_MAX_PORTS
+
1
];
u64
def_mac
[
MLX4_MAX_PORTS
+
1
];
u64
def_mac
[
MLX4_MAX_PORTS
+
1
];
int
eth_mtu_cap
[
MLX4_MAX_PORTS
+
1
];
int
eth_mtu_cap
[
MLX4_MAX_PORTS
+
1
];
int
gid_table_len
[
MLX4_MAX_PORTS
+
1
];
int
gid_table_len
[
MLX4_MAX_PORTS
+
1
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录