Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3315835yba; Sat, 11 May 2019 08:08:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyc6evpbxfaUgLnDfkNGj6t2kggfXZcwc7Q/Hzpfb+7wyNm8ifkwW7u8D25D2eEd8L36pC X-Received: by 2002:aa7:8f22:: with SMTP id y2mr10499017pfr.22.1557587321710; Sat, 11 May 2019 08:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557587321; cv=none; d=google.com; s=arc-20160816; b=z1IfYVhmw3YQT9zpzSrLarkJvYDUz6hElWk4UG5T14u8eAIyeo4Vu2GidZdENlyhZe Z0wPOwoCZzIeINj9+oC2XJSMID6Hxi7m1KKhesFHS8kbWSvnvbcqIEkEvNSKtNgbmQgQ 86F3vMKxGwmLfGQR2Na0sIzEYoXuKARPmZbVnJbxC1kycySN08YSxEm227UD5PRir5nt SIST7o6m6fCVlATgkL/qexupmq86hKxqWMhAWEYc97fBRf6ZMwwS6Cb6uNWT8VZuY95t 0zTXv+ifUIB6cadT/yvSqxFohKio+esd2qhuJPFMnsYHp3ffvSTnZ7KBMhFTJhi0NRML M7fA== 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:user-agent :references:in-reply-to:message-id:mime-version:date:subject:cc:to :from:dkim-signature; bh=6UiqJ4m3sPzyqJomJHE7ExCLyXzjMLS98K0ef/RXLqM=; b=oT0HMaHhaLjcmjGGLtNMpxGaFV19893ppgOO4l7iUWFoqHi0MSEOomiHx90CVYNvqN W1tKhIJc/ro+80CUfKtAwYa9ATfHgOcTfROsUXYZiwwCqOQEeaxsMUILf2yHjd/q6Bup NrCviObSsNJGwwgcmUJJtoUOrXU8QAIPMrcWQrfT0G+Kc7RJDYxY1ZNaV/wWrIcqHml4 d/CEjzHnebYVbF1Hwx9wqSIUGfC90K7ukyGXNevs1uI1FjL907eSriA/Sa3kHWOxdyUI DRnzczrZNbedEJiZwH4ptexQAiRkLqQbhJOPxJInZjGr/Iv9mECcb1Eyz/uDbqHFtBSM 1L1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A32EvO3v; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k29si6893328pfp.45.2019.05.11.08.08.25; Sat, 11 May 2019 08:08:41 -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=@gmail.com header.s=20161025 header.b=A32EvO3v; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728635AbfEKPGI (ORCPT + 99 others); Sat, 11 May 2019 11:06:08 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39201 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728572AbfEKPGH (ORCPT ); Sat, 11 May 2019 11:06:07 -0400 Received: by mail-wm1-f66.google.com with SMTP id n25so9890247wmk.4; Sat, 11 May 2019 08:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:mime-version:message-id:in-reply-to :references:user-agent:content-transfer-encoding; bh=6UiqJ4m3sPzyqJomJHE7ExCLyXzjMLS98K0ef/RXLqM=; b=A32EvO3vT97nPsb17JblWScq/XGUUQbxZ80CDHR3TB+hUY4N8JC5DCb3ni8k98y6HJ 3e/h6gFm+YEMLzNJb2x3OcWJihyEqa3Atjs5sNv3ctiyVh1Lhq+KmRu6v6wFusYqfk3k 96sZg2ytrT3rQmHOCTzRO49OH8A3TykpzKmz71MEBoQQjAlfT9VJu+aoRnqiijR9bUrY nk19GkM6KTvCBZ7+rcuRNOgadCxTWY4RF7CR+UH+8H770Y06Yofd43F5ZLonQPC/YaeX 0PUId5H8j1712WzcLicZskpCNccZ9egdwu6N+4tVuMeCtx35Bt8yEzq2MwfjiByJfbXu eB8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:mime-version:message-id :in-reply-to:references:user-agent:content-transfer-encoding; bh=6UiqJ4m3sPzyqJomJHE7ExCLyXzjMLS98K0ef/RXLqM=; b=j7CUrEgy+LYUhnngOE4whNWx65xBlUTvGaTgTBtVKUq1ExtiTKSs8pYi92FpThjM0j ypADsRI5clhJ0udGVCxx+hrQ4BlzgaL8QppXapb2wMy/IzeMXysakgStvlag6tRqTMY3 rE/oYd4xfZkdUy/gtkWJdz7lGZ2B1EUZFbLD6UvezRQcTyT6ARbTyJnuG754TZf5igKt XvSZTHsfCCdYcBcb6EW3LFF+biNHPkr8UeJ0X9k7GUtHfh7sjo6LOms0QHdUxncgLd6e tPqQk/0GeSxmaNcT1Y9LU5WJQjiscyseo/TfRX1PZnBFLFWIg3n7FAMJZdJjXnGHTJw/ b0RA== X-Gm-Message-State: APjAAAVUbxee5Uj9uimzYt26P53Cn7u4gGAj1qUf7Ny2+0xWa/f1HtZv obIik519cadXvckCvoV8uIE= X-Received: by 2002:a1c:9eca:: with SMTP id h193mr1650053wme.125.1557587166149; Sat, 11 May 2019 08:06:06 -0700 (PDT) Received: from localhost ([92.59.185.54]) by smtp.gmail.com with ESMTPSA id v5sm18209728wra.83.2019.05.11.08.06.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 11 May 2019 08:06:05 -0700 (PDT) From: Vicente Bergas To: Heiner Kallweit Cc: Serge Semin , Russell King , Andrew Lunn , Florian Fainelli , , Subject: Re: net: phy: realtek: regression, kernel null pointer dereference Date: Sat, 11 May 2019 17:06:04 +0200 MIME-Version: 1.0 Message-ID: <0f16b2c5-ef2a-42a1-acdc-08fa9971b347@gmail.com> In-Reply-To: <61831f43-3b24-47d9-ec6f-15be6a4568c5@gmail.com> References: <16f75ff4-e3e3-4d96-b084-e772e3ce1c2b@gmail.com> <742a2235-4571-aa7d-af90-14c708205c6f@gmail.com> <11446b0b-c8a4-4e5f-bfa0-0892b500f467@gmail.com> <61831f43-3b24-47d9-ec6f-15be6a4568c5@gmail.com> User-Agent: Trojita Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, May 11, 2019 4:56:56 PM CEST, Heiner Kallweit wrote: > On 11.05.2019 16:46, Vicente Bergas wrote: >> On Friday, May 10, 2019 10:28:06 PM CEST, Heiner Kallweit wrote: >>> On 10.05.2019 17:05, Vicente Bergas wrote: ... >>=20 >> Hello Heiner, >> just tried your patch and indeed the NPE is gone. But still no network... >> The MAC <-> PHY link was working before, so, maybe the rgmii=20 >> delays are not >> correctly configured. > > That's a question to the author of the original patch. My patch was just > meant to fix the NPE. In which configuration are you using the RTL8211E? > As a standalone PHY (with which MAC/driver?) or is it the integrated PHY > in a member of the RTL8168 family? It is the one on the Sapphire board, so is connected to the MAC on the RK3399 SoC. It is on page 8 of the schematics: http://dl.vamrs.com/products/sapphire_excavator/RK_SAPPHIRE_SOCBOARD_RK3399_L= PDDR3D178P232SD8_V12_20161109HXS.pdf > Serge: The issue with the NPE gave a hint already that you didn't test your= > patch. Was your patch based on an actual issue on some board and did you > test it? We may have to consider reverting the patch. > >> With this change it is back to working: >> --- a/drivers/net/phy/realtek.c >> +++ b/drivers/net/phy/realtek.c >> @@ -300,7 +300,6 @@ >> }, { >> PHY_ID_MATCH_EXACT(0x001cc915), >> .name =3D "RTL8211E Gigabit Ethernet", >> - .config_init =3D &rtl8211e_config_init, >> .ack_interrupt =3D &rtl821x_ack_interrupt, >> .config_intr =3D &rtl8211e_config_intr, >> .suspend =3D genphy_suspend, >> That is basically reverting the patch. >>=20 >> Regards, >> Vicen=C3=A7. >>=20 >>> Nevertheless your proposed patch looks good to me, just one small change >>> would be needed and it should be splitted. >>>=20 >>> The change to phy-core I would consider a fix and it should be fine to >>> submit it to net (net-next is closed currently). >>>=20 >>> Adding the warning to the Realtek driver is fine, but this would be ...