ice: Fix ethtool port and PFC stats for 4x25G cards
authorUsha Ketineni <usha.k.ketineni@intel.com>
Thu, 25 Jul 2019 09:53:53 +0000 (02:53 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 27 Aug 2019 05:54:12 +0000 (22:54 -0700)
commit9e7a5d1746222238712df19ce9833e574d4cac8e
tree8cb660cedf5b1f31c31c7cd287ceaff215590674
parentd00ee466a07eb9182ad3caf6140c7ebb527b4c64
ice: Fix ethtool port and PFC stats for 4x25G cards

This patch fixes the issue where port and PFC statistics counters are
incrementing at the wrong port with 4x25G cards.
Read the GLPRT port registers using lport parameter instead of pf_id to
update the statistics otherwise the pf_ids are flipped for ports 2 and 3
when read from the HW register PF_FUNC_RID and this is expected as per
hardware specification.

Signed-off-by: Usha Ketineni <usha.k.ketineni@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_dcb_lib.c
drivers/net/ethernet/intel/ice/ice_main.c