Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
56c5333c
Commit
56c5333c
authored
Jul 16, 2014
by
Roland Dreier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'cxgb4' and 'mlx5' into for-next
parents
46c1376d
652c1a05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
drivers/infiniband/hw/mlx5/qp.c
drivers/infiniband/hw/mlx5/qp.c
+1
-1
drivers/net/ethernet/mellanox/mlx5/core/mr.c
drivers/net/ethernet/mellanox/mlx5/core/mr.c
+15
-4
No files found.
drivers/infiniband/hw/mlx5/qp.c
View file @
56c5333c
...
...
@@ -675,7 +675,7 @@ static int create_kernel_qp(struct mlx5_ib_dev *dev,
int
err
;
uuari
=
&
dev
->
mdev
.
priv
.
uuari
;
if
(
init_attr
->
create_flags
&
~
IB_QP_CREATE_SIGNATURE_EN
)
if
(
init_attr
->
create_flags
&
~
(
IB_QP_CREATE_SIGNATURE_EN
|
IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK
)
)
return
-
EINVAL
;
if
(
init_attr
->
qp_type
==
MLX5_IB_QPT_REG_UMR
)
...
...
drivers/net/ethernet/mellanox/mlx5/core/mr.c
View file @
56c5333c
...
...
@@ -94,6 +94,11 @@ int mlx5_core_create_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr,
write_lock_irq
(
&
table
->
lock
);
err
=
radix_tree_insert
(
&
table
->
tree
,
mlx5_base_mkey
(
mr
->
key
),
mr
);
write_unlock_irq
(
&
table
->
lock
);
if
(
err
)
{
mlx5_core_warn
(
dev
,
"failed radix tree insert of mr 0x%x, %d
\n
"
,
mlx5_base_mkey
(
mr
->
key
),
err
);
mlx5_core_destroy_mkey
(
dev
,
mr
);
}
return
err
;
}
...
...
@@ -104,12 +109,22 @@ int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr)
struct
mlx5_mr_table
*
table
=
&
dev
->
priv
.
mr_table
;
struct
mlx5_destroy_mkey_mbox_in
in
;
struct
mlx5_destroy_mkey_mbox_out
out
;
struct
mlx5_core_mr
*
deleted_mr
;
unsigned
long
flags
;
int
err
;
memset
(
&
in
,
0
,
sizeof
(
in
));
memset
(
&
out
,
0
,
sizeof
(
out
));
write_lock_irqsave
(
&
table
->
lock
,
flags
);
deleted_mr
=
radix_tree_delete
(
&
table
->
tree
,
mlx5_base_mkey
(
mr
->
key
));
write_unlock_irqrestore
(
&
table
->
lock
,
flags
);
if
(
!
deleted_mr
)
{
mlx5_core_warn
(
dev
,
"failed radix tree delete of mr 0x%x
\n
"
,
mlx5_base_mkey
(
mr
->
key
));
return
-
ENOENT
;
}
in
.
hdr
.
opcode
=
cpu_to_be16
(
MLX5_CMD_OP_DESTROY_MKEY
);
in
.
mkey
=
cpu_to_be32
(
mlx5_mkey_to_idx
(
mr
->
key
));
err
=
mlx5_cmd_exec
(
dev
,
&
in
,
sizeof
(
in
),
&
out
,
sizeof
(
out
));
...
...
@@ -119,10 +134,6 @@ int mlx5_core_destroy_mkey(struct mlx5_core_dev *dev, struct mlx5_core_mr *mr)
if
(
out
.
hdr
.
status
)
return
mlx5_cmd_status_to_err
(
&
out
.
hdr
);
write_lock_irqsave
(
&
table
->
lock
,
flags
);
radix_tree_delete
(
&
table
->
tree
,
mlx5_base_mkey
(
mr
->
key
));
write_unlock_irqrestore
(
&
table
->
lock
,
flags
);
return
err
;
}
EXPORT_SYMBOL
(
mlx5_core_destroy_mkey
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment