From patchwork Tue Feb 7 19:23:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veaceslav Falico X-Patchwork-Id: 139997 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 77D57B6FA1 for ; Wed, 8 Feb 2012 06:24:07 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756613Ab2BGTYF (ORCPT ); Tue, 7 Feb 2012 14:24:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:19362 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752447Ab2BGTYD (ORCPT ); Tue, 7 Feb 2012 14:24:03 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q17JNxtW022563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Feb 2012 14:23:59 -0500 Received: from darkmag.usersys.redhat.com (dhcp-26-113.brq.redhat.com [10.34.26.113]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q17JNsMg012586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 7 Feb 2012 14:23:57 -0500 Date: Tue, 7 Feb 2012 20:23:54 +0100 From: Veaceslav Falico To: netdev@vger.kernel.org Cc: Toshiharu Okada , Paul Gortmaker , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , "David S. Miller" Subject: pch_gbe: set dma mask to only 32 bit Message-ID: <20120207192354.GA7770@darkmag.usersys.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Because pch_gbe_rx_desc->buffer_addr is u32, we cannot set dma mask to 64 bit or otherwise we could end up loosing the higher 32 bit from the return of dma_map_single(). Removing DMA_BIT_MASK(64) setting will solve it. Signed-off-by: Veaceslav Falico --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 3ead111..6c6713b 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -2397,17 +2397,13 @@ static int pch_gbe_probe(struct pci_dev *pdev, if (ret) return ret; - if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) - || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { + ret = pci_set_consistent_dma_mask(pdev, + DMA_BIT_MASK(32)); if (ret) { - ret = pci_set_consistent_dma_mask(pdev, - DMA_BIT_MASK(32)); - if (ret) { - dev_err(&pdev->dev, "ERR: No usable DMA " - "configuration, aborting\n"); - goto err_disable_device; - } + dev_err(&pdev->dev, "ERR: No usable DMA " + "configuration, aborting\n"); + goto err_disable_device; } }