Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2453591imd; Fri, 2 Nov 2018 11:40:06 -0700 (PDT) X-Google-Smtp-Source: AJdET5d0Pv4oDBdOF3tMzjJSB+CNH2NW45TUjP03CuOpEpB9Z0mvxtSYAu5ZHM7CpAnAb378y2l3 X-Received: by 2002:a17:902:124:: with SMTP id 33-v6mr3240962plb.287.1541184006440; Fri, 02 Nov 2018 11:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184006; cv=none; d=google.com; s=arc-20160816; b=Hw609PzL0sKJTcH46THNcKPRXFKPU57YdXrl/hfXI8CUCIZTvy5nyQe7MRDWcWXUFT nON4f7qX4GwfpraLPZtfHXl2yFViUewqoTL0qDG2Tf1gRi5IcxEd6lUFGaTTvZvipZnC CvI5P7x4QQ3zVHpE0VaA4oOfut8Rk5G4JonNW5aboGj3zkTIHJpkUqPhOjvXGMW4yfaq a/zjE2751mIAEPV+68DW53pczHS9PtAWHyAZUq9U31lNNVz5Bn/TzWrOd5OexsokosjH vMl0ag/0N+WQWCxLtDePsg2k3E1BaVE3JnWWl0bf6YU/LiRCIcPkTwfFKV+QHi2Z4Ewk SrzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aOwUUn9NlROwkUdF3oRJ+q/iE48clBFUApoxK2ym60Q=; b=UdiLMu9NzBbMrhNHv4lfviTOfK7UTepkyWF5d/DUqAM8ai3eCeXIoC1GYQJbUQePog CCn1OctE7Ca4iXcxQl4kry7+ZTxfNMsUEJH4bVJ8VF3mqMPm2xXow+toalTTar82C0Rp XsbUqyGOVb5oK02HtrCQucJaJ27gm9gi55mbW/dJ1Wz7C+p+eOKkuT0YHu8EvTT9W3kT ZyQQA/tQotuWXDZk9ZsLVsXqLrYAGzJVMdG4LkuKDMTbaBqmtT2Cz1kFEHvzk/PI25qb H+tpdlrzCO3h1LPAa0HxYss38vBfdpsYvChkuo1Y2uwSeuKTZ4riWeY4kspl5lzo9Inw ARLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W26pc3z4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b28-v6si28948022pgm.568.2018.11.02.11.39.51; Fri, 02 Nov 2018 11:40:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W26pc3z4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728909AbeKCDqs (ORCPT + 99 others); Fri, 2 Nov 2018 23:46:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:40654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728140AbeKCDqr (ORCPT ); Fri, 2 Nov 2018 23:46:47 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D1D72082D; Fri, 2 Nov 2018 18:38:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541183916; bh=MO9Eya7Hp1KjBrz34XmNIYLRlvzl0HFUIOBMUKGPy08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W26pc3z4iyZ/x7WZF51qXt1l08vm9rUBAsfaWSNSNijG16oUZd+okhpOpdLVfMleW 61sswq0oert6QFE9tbSiPqiedLr8iWQ1HP/6FN2ytBaW1Yo9ZjSdiHBwt9OtfbgqHj d41ZzhrrSkXVke8hqV9mB0md9xjLQ5T0LpbNEZ7s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michal Simek , Nicolas Ferre , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 020/150] net: macb: Clean 64b dma addresses if they are not detected Date: Fri, 2 Nov 2018 19:33:02 +0100 Message-Id: <20181102182904.409383911@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit e1e5d8a9fe737d94ccc0ccbaf0c97f69a8f3e000 ] Clear ADDR64 dma bit in DMACFG register in case that HW_DMA_CAP_64B is not detected on 64bit system. The issue was observed when bootloader(u-boot) does not check macb feature at DCFG6 register (DAW64_OFFSET) and enabling 64bit dma support by default. Then macb driver is reading DMACFG register back and only adding 64bit dma configuration but not cleaning it out. Signed-off-by: Michal Simek Acked-by: Nicolas Ferre Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/cadence/macb_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index dfa045f22ef1..db568232ff3e 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -2089,6 +2089,7 @@ static void macb_configure_dma(struct macb *bp) else dmacfg &= ~GEM_BIT(TXCOEN); + dmacfg &= ~GEM_BIT(ADDR64); #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT if (bp->hw_dma_cap & HW_DMA_CAP_64B) dmacfg |= GEM_BIT(ADDR64); -- 2.17.1