]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: use link instead of I2C combined abstraction
authorEmil Tantilov <emil.s.tantilov@intel.com>
Mon, 10 Oct 2016 21:54:03 +0000 (14:54 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 25 Feb 2017 05:48:12 +0000 (21:48 -0800)
commite38dfb8b8128b04c804026bd3044e091295bdc32
tree9b24fcffdedc187b5003617f42088cfe1a5f9a56
parent7288c329eb71a8e3df45a29b933d40b1d9b7b55b
ixgbe: use link instead of I2C combined abstraction

Orabug: 24568240

Introduce ixgbe_link_operations struct with the following changes:

read_i2c_combined => read_link
read_i2c_combined_unlocked => read_link_unlocked
write_i2c_combined => write_link
write_i2c_combined_unlocked => write_link_unlocked

This will allow X550EM_a to override these methods for MDIO access
while X550EM_x provides methods to use I2C combined access. This
also adds a new structure, ixgbe_link_info, to hold information
about the link. Initially this is just method pointers and a bus
address.

The functions involved in combined I2C accesses were moved from
ixgbe_phy.c to ixgbe_x550.c. The underlying functions that carry
out the combined I2C accesses were left in ixgbe_phy.c because
they share some functions with other I2C methods.

v2 - set hw->link.ops in probe.
v3 - check ii->link_ops before setting it since we don't have it
for all devices.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit b71f6c40bb36f9691420f66283f3c3acca11016b)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c