]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: fix missing DA cable check
authorSerey Kong <serey.kong@intel.com>
Mon, 16 May 2016 17:26:39 +0000 (10:26 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:30:30 +0000 (19:30 -0500)
Orabug: 24568124

When a Direct Attach (DA) cable is used, if the i40e_set_settings
function is called it would return an error. Add the DA type so
the function won't fail.

Change-ID: I2b802f27a5d91cfefa72fd1f852acb4d74647a8e
Signed-off-by: Serey Kong <serey.kong@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 6536227d1dd60dcd4a4a4a32825842c1456fa78c)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index bb1b0b81008dbd895ee868551e26d2a75cc4cb54..a55ab2e7b84e532479f5cd140c8133df0f8f7b64 100644 (file)
@@ -663,6 +663,7 @@ static int i40e_set_settings(struct net_device *netdev,
        if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET &&
            hw->phy.media_type != I40E_MEDIA_TYPE_FIBER &&
            hw->phy.media_type != I40E_MEDIA_TYPE_BACKPLANE &&
+           hw->phy.media_type != I40E_MEDIA_TYPE_DA &&
            hw->phy.link_info.link_info & I40E_AQ_LINK_UP)
                return -EOPNOTSUPP;