Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3527348pxf; Mon, 15 Mar 2021 11:32:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr70eiGLatQ7yNxCiRg29nSQsk9HqYssUvoiNXYHQKl8T3WUn5aqj9+FLnA9GEgldTVXvY X-Received: by 2002:a17:906:1a4b:: with SMTP id j11mr25299680ejf.55.1615833154123; Mon, 15 Mar 2021 11:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833154; cv=none; d=google.com; s=arc-20160816; b=DZ2eq7g7V6FrYa9OIcNaR1F6RmkULofuK6ndSLWI+pSkYejsOG9nAS0DOChhW8Ugw+ 1CEtmrvlB5fYaJWRcCnU8xLx0EBWpUCkVhwzqB26by/AeZBpi20nGQ2Z9kObbNp+saSV MUttl53UAYt7uOytZC5kSVb7cD7Zp2Or8ISe06c/4CVRqWaoEXjn7wqexVja1iV3F2pg CT+aJhIEYU24MamC7Ne8740+5bj2ObNJkJaA2+SPDblRuR4yB/orQwWB4xNzbwG7tfmZ u4AhfQGHTJQT0Mx5kfKaKDjGLldCEfT4/LRb1HZr36FVpA5MMooULUFopCEjKZ6VKLB7 JxlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7QGGJSvk5iZNa3Z9nPf2UYTSfvsw9uaoQ9LuYHOWvrQ=; b=SGJ5rQn5S580aGi4wzDAZ2J4nOW8XhAh57QUO6StsoNIR2njSoFJYZLRIUIW7tUx/K auLc+KhwUz79JUGZqE8f9Yc2su9a8cTS5PU3JTKUdDmOCwZogonNLam7t+yKkhMYVN/0 7NMukBoAmhMSX2kA+deYZiUyyW6p0GW8zyDpfWIN8bjHkG8yk5Nv2XdfPIgz3IjooqIo BNX6L9lgrYNcBE/mLwBTs3lxS1N33WBSCyAlA257Im2uf+qgYN4+RYZ3u2l7FiQCEWRL f4xpvon3LTc6ZCyek3eDnj+RGbXd/VXV/RxrL5pPvXttClE2qSgxLHxRsm0vxt4xTEA/ R07Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1FDt35jm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si10189464edb.10.2021.03.15.11.32.11; Mon, 15 Mar 2021 11:32:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1FDt35jm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238028AbhCOOmO (ORCPT + 99 others); Mon, 15 Mar 2021 10:42:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:49420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234126AbhCOOC6 (ORCPT ); Mon, 15 Mar 2021 10:02:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D0A7464EED; Mon, 15 Mar 2021 14:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816978; bh=kcnnK6WDFQU8lLJFM3dyQCYTMLsnTb223hTde03XaC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1FDt35jmrvu4tYt7MM22ATHQhjB0mAHkm9ROsDhfDa8T+0WkI6VLl4bptzori0mwf /VmpHDGEeUo4IEIY9ZO8aaLojJLyAngy58WRk8WRA9C/GcHC1uCDPNcOMux3KENaWd WwA2qE4BCsr+ERXhqioSD44Lu7meIZSjeLrUhbLc= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Atish Patra , Nicolas Ferre , "David S. Miller" , Sasha Levin Subject: [PATCH 5.11 241/306] net: macb: Add default usrio config to default gem config Date: Mon, 15 Mar 2021 14:55:04 +0100 Message-Id: <20210315135515.793306491@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Atish Patra [ Upstream commit b12422362ce947098ac420ac3c975fc006af4c02 ] There is no usrio config defined for default gem config leading to a kernel panic devices that don't define a data. This issue can be reprdouced with microchip polar fire soc where compatible string is defined as "cdns,macb". Fixes: edac63861db7 ("add userio bits as platform configuration") Signed-off-by: Atish Patra Acked-by: Nicolas Ferre Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/cadence/macb_main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 814a5b10141d..07cdb38e7d11 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -3950,6 +3950,13 @@ static int macb_init(struct platform_device *pdev) return 0; } +static const struct macb_usrio_config macb_default_usrio = { + .mii = MACB_BIT(MII), + .rmii = MACB_BIT(RMII), + .rgmii = GEM_BIT(RGMII), + .refclk = MACB_BIT(CLKEN), +}; + #if defined(CONFIG_OF) /* 1518 rounded up */ #define AT91ETHER_MAX_RBUFF_SZ 0x600 @@ -4435,13 +4442,6 @@ static int fu540_c000_init(struct platform_device *pdev) return macb_init(pdev); } -static const struct macb_usrio_config macb_default_usrio = { - .mii = MACB_BIT(MII), - .rmii = MACB_BIT(RMII), - .rgmii = GEM_BIT(RGMII), - .refclk = MACB_BIT(CLKEN), -}; - static const struct macb_usrio_config sama7g5_usrio = { .mii = 0, .rmii = 1, @@ -4590,6 +4590,7 @@ static const struct macb_config default_gem_config = { .dma_burst_length = 16, .clk_init = macb_clk_init, .init = macb_init, + .usrio = &macb_default_usrio, .jumbo_max_len = 10240, }; -- 2.30.1