My system has 2 infiniband devices, one of which has both the ports up.
$> ibstatus
Infiniband device 'mlx4_0' port 1 status:
default gid: fe80:0000:0000:0000:0002:c903:000f:0a9f
base lid: 0x22
sm lid: 0x1
state: 4: ACTIVE
phys state: 5: LinkUp
rate: 20 Gb/sec (4X DDR)
link_layer: IB
Infiniband device 'mlx4_0' port 2 status:
default gid: fe80:0000:0000:0000:0002:c903:000f:0aa0
base lid: 0x23
sm lid: 0x1
state: 4: ACTIVE
phys state: 5: LinkUp
rate: 20 Gb/sec (4X DDR)
link_layer: IB
Infiniband device 'mlx4_1' port 1 status:
default gid: fe80:0000:0000:0000:0002:c903:000f:0a6b
base lid: 0x0
sm lid: 0x0
state: 1: DOWN
phys state: 2: Polling
rate: 10 Gb/sec (4X)
link_layer: IB
Infiniband device 'mlx4_1' port 2 status:
default gid: fe80:0000:0000:0000:0002:c903:000f:0a6c
base lid: 0xd
sm lid: 0x2
state: 4: ACTIVE
phys state: 5: LinkUp
rate: 10 Gb/sec (4X)
link_layer: IB
Now, when I check the ib port state by lid,
$> ibportstate -L 10x22 enable
ibwarn: [14836] mad_rpc_open_port: can't open UMAD port ((null):0)
ibportstate: iberror: failed: Failed to open '(null)' port '0'
I am not sure about the reason for this error message. Am I missing something?