mlx4_core: Allow protocol drivers to find corresponding interfaces
authorEli Cohen <eli@dev.mellanox.co.il>
Thu, 26 Aug 2010 14:18:43 +0000 (14:18 +0000)
committerRoland Dreier <rolandd@cisco.com>
Mon, 25 Oct 2010 17:20:39 +0000 (10:20 -0700)
commit33c87f0af60146b375220809c1cb745ac1a86edf
treef22e0a1f8fbe6b05f2f15c517d3b8e9b77581662
parent2420b60b1dc4ed98cb1788e928bc57ff2efa1a8d
mlx4_core: Allow protocol drivers to find corresponding interfaces

Add a mechanism for mlx4 protocol drivers to get a pointer to other
drivers's device objects.  For this, an exported function,
mlx4_get_protocol_dev() is added, which allows a driver to get some
other driver's device based on the protocol that the driver
implements.  Two protocols are added: MLX4_PROTOCOL_IB and
MLX4_PROTOCOL_EN.

This will be used in mlx4 IBoE support so that mlx4_ib can find the
corresponding mlx4_en netdev.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
[ Clean up and rename a few things.  - Roland ]

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/net/mlx4/en_main.c
drivers/net/mlx4/intf.c
include/linux/mlx4/driver.h