net/mlx4_core: Expose physical port id as PF/VF capability
authorHadar Hen Zion <hadarh@mellanox.com>
Thu, 19 Dec 2013 19:20:12 +0000 (21:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Dec 2013 00:04:43 +0000 (19:04 -0500)
commit8e1a28e8e6797449dfdfa4739002d1e5939355a8
tree10bf6bb908f2a5e7632280eb0f362112c27cfc29
parenteb17711bc1d6611e934af5b6dabc225936084128
net/mlx4_core: Expose physical port id as PF/VF capability

Add the infrastructure needed to support ndo_get_phys_port_id which
allows users to identify to which physical port a net-device is connected
to by reading a unique port id.
This will work for VFs and PFs.
The driver uses a new device capability - phys_port_id, The PF driver
reads the port phys_port_id from Firmware and stores it. The VF driver
reads the port phys_port_id from the PF using QUERY_FUNC_CAP command.

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/fw.h
drivers/net/ethernet/mellanox/mlx4/main.c
include/linux/mlx4/device.h