Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133636
b: refs/heads/master
c: 793730b
h: refs/heads/master
v: v3
  • Loading branch information
Yevgeny Petrilin authored and Roland Dreier committed Mar 11, 2009
1 parent 4283de9 commit d5df00a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 085343b47592b33276abf58a71c52ea29f0a338b
refs/heads/master: 793730bfb6711d6d14629e63845c25a3c14d205e
13 changes: 5 additions & 8 deletions trunk/drivers/net/mlx4/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,20 +298,17 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
{
struct mlx4_cmd_mailbox *mailbox;
int err;
u8 is_eth = dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH;

mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);

memset(mailbox->buf, 0, 256);
if (is_eth) {
((u8 *) mailbox->buf)[3] = 6;
((__be16 *) mailbox->buf)[4] = 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,
if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
return 0;

((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port];
err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_PORT,
MLX4_CMD_TIME_CLASS_B);

mlx4_free_cmd_mailbox(dev, mailbox);
Expand Down

0 comments on commit d5df00a

Please sign in to comment.