mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
i40evf: get rid of pci_using_dac
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>
This commit is contained in:
parent
dbb01c8aa0
commit
dbbd81119b
@ -2034,8 +2034,8 @@ static void i40evf_init_task(struct work_struct *work)
|
|||||||
netdev->netdev_ops = &i40evf_netdev_ops;
|
netdev->netdev_ops = &i40evf_netdev_ops;
|
||||||
i40evf_set_ethtool_ops(netdev);
|
i40evf_set_ethtool_ops(netdev);
|
||||||
netdev->watchdog_timeo = 5 * HZ;
|
netdev->watchdog_timeo = 5 * HZ;
|
||||||
|
netdev->features |= NETIF_F_HIGHDMA |
|
||||||
netdev->features |= NETIF_F_SG |
|
NETIF_F_SG |
|
||||||
NETIF_F_IP_CSUM |
|
NETIF_F_IP_CSUM |
|
||||||
NETIF_F_SCTP_CSUM |
|
NETIF_F_SCTP_CSUM |
|
||||||
NETIF_F_IPV6_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 net_device *netdev;
|
||||||
struct i40evf_adapter *adapter = NULL;
|
struct i40evf_adapter *adapter = NULL;
|
||||||
struct i40e_hw *hw = NULL;
|
struct i40e_hw *hw = NULL;
|
||||||
int err, pci_using_dac;
|
int err;
|
||||||
|
|
||||||
err = pci_enable_device(pdev);
|
err = pci_enable_device(pdev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
|
if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
|
||||||
pci_using_dac = true;
|
|
||||||
/* coherent mask for the same size will always succeed if
|
/* coherent mask for the same size will always succeed if
|
||||||
* dma_set_mask does
|
* dma_set_mask does
|
||||||
*/
|
*/
|
||||||
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
|
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
|
||||||
} else if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
|
} 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));
|
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||||
} else {
|
} else {
|
||||||
dev_err(&pdev->dev, "%s: DMA configuration failed: %d\n",
|
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);
|
pci_set_drvdata(pdev, netdev);
|
||||||
adapter = netdev_priv(netdev);
|
adapter = netdev_priv(netdev);
|
||||||
if (pci_using_dac)
|
|
||||||
netdev->features |= NETIF_F_HIGHDMA;
|
|
||||||
|
|
||||||
adapter->netdev = netdev;
|
adapter->netdev = netdev;
|
||||||
adapter->pdev = pdev;
|
adapter->pdev = pdev;
|
||||||
|
Loading…
Reference in New Issue
Block a user