Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56734
b: refs/heads/master
c: 1af4c43
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier committed May 19, 2007
1 parent fcada61 commit 32483da
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 5eb620c81ce35aa0c533131bf4d06c4c8c2bfadf
refs/heads/master: 1af4c435f3ab9cdf72ce86c35a455c8bef1d6536
10 changes: 2 additions & 8 deletions trunk/drivers/infiniband/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,10 +569,7 @@ int ib_query_port(struct ib_device *device,
u8 port_num,
struct ib_port_attr *port_attr)
{
if (device->node_type == RDMA_NODE_IB_SWITCH) {
if (port_num)
return -EINVAL;
} else if (port_num < 1 || port_num > device->phys_port_cnt)
if (port_num < start_port(device) || port_num > end_port(device))
return -EINVAL;

return device->query_port(device, port_num, port_attr);
Expand Down Expand Up @@ -644,10 +641,7 @@ int ib_modify_port(struct ib_device *device,
u8 port_num, int port_modify_mask,
struct ib_port_modify *port_modify)
{
if (device->node_type == RDMA_NODE_IB_SWITCH) {
if (port_num)
return -EINVAL;
} else if (port_num < 1 || port_num > device->phys_port_cnt)
if (port_num < start_port(device) || port_num > end_port(device))
return -EINVAL;

return device->modify_port(device, port_num, port_modify_mask,
Expand Down

0 comments on commit 32483da

Please sign in to comment.