ib_agent_port_open
extern int ib_agent_port_open(struct ib_device *device, int port_num);
if (ib_agent_port_open(device, i)) {