Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3927087imm; Mon, 8 Oct 2018 11:49:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV62v3Jzndcoap19vlGiFze1Vb2i9+7ZaBXI5EpcRKtZi+bLUZ4fpm/OC+oH7Rckhlei3zIdc X-Received: by 2002:a63:d70c:: with SMTP id d12-v6mr22176376pgg.110.1539024555262; Mon, 08 Oct 2018 11:49:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024555; cv=none; d=google.com; s=arc-20160816; b=uXGA3qCJSG0xRFNUMduULvmfq5+XeQQ0g+QQ9rEWWPuoOZjj8sBONhUZ5gEgrX+yOx 19WtAZ0lVA45UZR+sHnHDMjxGdQ15Yu9cwuxKDeBV/HxHTHxjNUPmDbqeMzyvF+pnSTY rAo72DHP+KICrtLAOxFrIK5Wv2Ku9pdbC48ZM4nVGLRrYinKSju6iegwFuymKanqiTcs zLcbCY/V2H0XMK+j9QE8nxosU9UoFc4e0gWJPAVFI92tRg1tMCs4C/NdFANZM4MziXlJ AYoIlrAoYQsxOTa64BBUB3nYxZn3ky+dNmG5JmoOsSsmSmEwFhDf2hlxKPmm4hrS+SFB yRHA== 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=RqC2QZhYCTd3r0kU43gcmNDmq0cTLU63ErfmICONi5U=; b=DiE47OW6io3YIfl0KyupvDeM2ixO0fRpN8/th2xJINSb2OF7wk8ap4MG+0c0D7lJay BkGOmjphDuK+Etg/y+D48YHnhjiU75Hss5g6bxoZmKf6jS00yLQOa54/VEa8YUFtHKWO mcTI/55maP6+NaNAGwHWPpjpHVKRPl9t7ZdPquUlNOcm3qhJ76foVxrVBd0iP47TKZ1X ouBJGoP76LPOqDTgfP/H/4299fSu3pwzwBc1EPy8uX+p09sh+g91ISGJmRgAbOeNeh8D AHiPnrQILez6hs6MYI5WzK7J4r2YK8pNg2z0QeMmdRIKaaVgGYV5qpg6KXUJBsmphU/m 4UCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=n57Xh2ri; 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 b13-v6si18038435pgg.89.2018.10.08.11.49.00; Mon, 08 Oct 2018 11:49:15 -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=n57Xh2ri; 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 S1731442AbeJICAf (ORCPT + 99 others); Mon, 8 Oct 2018 22:00:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:49318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730798AbeJICAe (ORCPT ); Mon, 8 Oct 2018 22:00:34 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (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 5FE19214C2; Mon, 8 Oct 2018 18:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024447; bh=NdPdHCOvjTY3TIcTOjpdRikiJCMGaNG8oHyByuum97A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n57Xh2rimiRhxYGWtekeVZ8O4yfO6Qk5JKcbKZ83miTYLXEtm/Iifv1XeAgoCLlVW dYViqW1y7BPkShmU17dur46jNcZGgutrWQHy9fzR/rxkUaB6DhCE0wtOEnKuphOUm4 F/910hfSIWS9Tixpui1l6HluwKvvI8/Wo6XCW2/E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Lunn , Baruch Siach , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 035/168] net: mvpp2: initialize port of_node pointer Date: Mon, 8 Oct 2018 20:30:15 +0200 Message-Id: <20181008175621.383132467@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@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. ------------------ From: Baruch Siach [ Upstream commit c4053ef322081554765e1b708d6cdd8855e1d72d ] Without a valid of_node in struct device we can't find the mvpp2 port device by its DT node. Specifically, this breaks of_find_net_device_by_node(). For example, the Armada 8040 based Clearfog GT-8K uses Marvell 88E6141 switch connected to the &cp1_eth2 port: &cp1_mdio { ... switch0: switch0@4 { compatible = "marvell,mv88e6085"; ... ports { ... port@5 { reg = <5>; label = "cpu"; ethernet = <&cp1_eth2>; }; }; }; }; Without this patch, dsa_register_switch() returns -EPROBE_DEFER because of_find_net_device_by_node() can't find the device_node of the &cp1_eth2 device. Reviewed-by: Andrew Lunn Signed-off-by: Baruch Siach Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4685,6 +4685,7 @@ static int mvpp2_port_probe(struct platf dev->min_mtu = ETH_MIN_MTU; /* 9704 == 9728 - 20 and rounding to 8 */ dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE; + dev->dev.of_node = port_node; /* Phylink isn't used w/ ACPI as of now */ if (port_node) {