i40e: Never let speed get set to 0 in get_settings
authorCatherine Sullivan <catherine.sullivan@intel.com>
Wed, 26 Aug 2015 19:14:16 +0000 (15:14 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 7 Oct 2015 21:08:30 +0000 (14:08 -0700)
commit0002e1189b594d462c7a93417f5ac8bbc22bd768
tree572506715ae324e8d9cd92b9410a03052ac3711d
parentfba52e21e5cad1347255d0d3600f7e4df6e69435
i40e: Never let speed get set to 0 in get_settings

In ethtool, there is a possibility of speed getting set to 0
if advertise is set to 0 (which it is when autoneg is disabled).
We never want this to happen as the firmware will actually attempt
to set the speed to 0 sending link down, so add an extra check
to make sure this doesn't happen.

Change-ID: I62e0eeee2cbf043d8e6f5c9c9f0b92794e877f01
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c