| From foo@baz Sun Jun 17 12:07:34 CEST 2018 |
| From: Emil Tantilov <emil.s.tantilov@intel.com> |
| Date: Thu, 19 Apr 2018 17:06:57 -0700 |
| Subject: ixgbe: return error on unsupported SFP module when resetting |
| |
| From: Emil Tantilov <emil.s.tantilov@intel.com> |
| |
| [ Upstream commit bbb2707623f3ccc48695da2433f06d7c38193451 ] |
| |
| Add check for unsupported module and return the error code. |
| This fixes a Coverity hit due to unused return status from setup_sfp. |
| |
| Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> |
| Tested-by: Andrew Bowers <andrewx.bowers@intel.com> |
| Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
| Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| --- |
| drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 +++ |
| 1 file changed, 3 insertions(+) |
| |
| --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |
| +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |
| @@ -3427,6 +3427,9 @@ static s32 ixgbe_reset_hw_X550em(struct |
| hw->phy.sfp_setup_needed = false; |
| } |
| |
| + if (status == IXGBE_ERR_SFP_NOT_SUPPORTED) |
| + return status; |
| + |
| /* Reset PHY */ |
| if (!hw->phy.reset_disable && hw->phy.ops.reset) |
| hw->phy.ops.reset(hw); |