i40evf: get rid of pci_using_dac
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 21 Feb 2014 03:29:08 +0000 (19:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Feb 2014 17:38:25 +0000 (12:38 -0500)
PCI DAC doesn't really mean much on a virtualized PCI Express part, so
get rid of that check and just always set the HIGHDMA flag in the net
device.

Change-ID: I2040272be0e7934323f470c2bc73fbdd4f93e2b6
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index e0eb27dc36de2205b3b513fcecfbc0bbfc67e54f..e9da5d5e5b46b1deda92e735873b95c600a5166c 100644 (file)
@@ -2034,8 +2034,8 @@ static void i40evf_init_task(struct work_struct *work)
        netdev->netdev_ops = &i40evf_netdev_ops;
        i40evf_set_ethtool_ops(netdev);
        netdev->watchdog_timeo = 5 * HZ;
-
-       netdev->features |= NETIF_F_SG |
+       netdev->features |= NETIF_F_HIGHDMA |
+                           NETIF_F_SG |
                            NETIF_F_IP_CSUM |
                            NETIF_F_SCTP_CSUM |
                            NETIF_F_IPV6_CSUM |
@@ -2180,20 +2180,18 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        struct net_device *netdev;
        struct i40evf_adapter *adapter = NULL;
        struct i40e_hw *hw = NULL;
-       int err, pci_using_dac;
+       int err;
 
        err = pci_enable_device(pdev);
        if (err)
                return err;
 
        if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
-               pci_using_dac = true;
                /* coherent mask for the same size will always succeed if
                 * dma_set_mask does
                 */
                dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
        } else if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
-               pci_using_dac = false;
                dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
        } else {
                dev_err(&pdev->dev, "%s: DMA configuration failed: %d\n",
@@ -2224,8 +2222,6 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        pci_set_drvdata(pdev, netdev);
        adapter = netdev_priv(netdev);
-       if (pci_using_dac)
-               netdev->features |= NETIF_F_HIGHDMA;
 
        adapter->netdev = netdev;
        adapter->pdev = pdev;