From patchwork Fri Feb 14 22:57:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Brown, Aaron F" X-Patchwork-Id: 320574 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E57A52C00A0 for ; Sat, 15 Feb 2014 10:01:29 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753193AbaBNXBW (ORCPT ); Fri, 14 Feb 2014 18:01:22 -0500 Received: from mga11.intel.com ([192.55.52.93]:33318 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753166AbaBNXBU (ORCPT ); Fri, 14 Feb 2014 18:01:20 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 14 Feb 2014 15:01:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,847,1384329600"; d="scan'208";a="481883108" Received: from s252.jf.intel.com ([10.23.155.219]) by fmsmga002.fm.intel.com with ESMTP; 14 Feb 2014 15:00:32 -0800 From: Aaron Brown To: davem@davemloft.net Cc: Mitch Williams , netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com, Jesse Brandeburg , Aaron Brown Subject: [net-next 04/14] i40evf: get rid of pci_using_dac Date: Fri, 14 Feb 2014 14:57:58 -0800 Message-Id: <1392418688-23895-5-git-send-email-aaron.f.brown@intel.com> X-Mailer: git-send-email 1.8.5.GIT In-Reply-To: <1392418688-23895-1-git-send-email-aaron.f.brown@intel.com> References: <1392418688-23895-1-git-send-email-aaron.f.brown@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mitch Williams 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 Signed-off-by: Jesse Brandeburg Tested-by: Sibai Li Signed-off-by: Aaron Brown --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index e0eb27d..e9da5d5 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c @@ -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;