From: Wei Dai Date: Wed, 10 May 2017 07:00:02 +0000 (+0800) Subject: net/ixgbe: fix calling null function of VF X-Git-Tag: spdx-start~3234 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0fcd5ef9ebf0257360189d22c24cd5e30c47b06a;p=dpdk.git net/ixgbe: fix calling null function of VF hw->mac.ops.get_media-type() of ixgbe VF is NULL and should not be called directly. It had better be replaced by calling ixgbe_get_media_type( ) to avoid crash. Fixes: c12d22f65b13 ("net/ixgbe: ensure link status is updated") Signed-off-by: Wei Dai Acked-by: Laurent Hardy --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ec667d826c..ed2baec1c4 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3799,7 +3799,7 @@ ixgbe_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) hw->mac.get_link_status = true; if ((intr->flags & IXGBE_FLAG_NEED_LINK_CONFIG) && - hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) { + ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) { speed = hw->phy.autoneg_advertised; if (!speed) ixgbe_get_link_capabilities(hw, &speed, &autoneg);