/* ib_query_port() returns the attributes of a port through the @port_attr pointer.  */
int ib_query_port(struct ib_device *device, u8 port_num, struct ib_port_attr *port_attr)
/* ib_query_port() returns the attributes of a port through the @port_attr pointer.  */
int ib_query_port(struct ib_device *device, u8 port_num, struct ib_port_attr *port_attr)
{
	if (port_num < start_port(device) || port_num > end_port(device))
		return -EINVAL;
	return device->query_port(device, port_num, port_attr);
}