From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Tue, 17 Dec 2019 16:25:38 +0000 Subject: [U-Boot] [PATCH] net/phy: Fix phy_connect() for phy addr 0 In-Reply-To: <423b0427-c8b3-8e2e-d64c-ae06d79214b6@denx.de> References: <20191105040439.23450-1-priyanka.jain@nxp.com> <20191107191543.GK19317@bill-the-cat> <423b0427-c8b3-8e2e-d64c-ae06d79214b6@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, On Tue, Dec 17, 2019 at 1:39 AM Marek Vasut wrote: > > On 11/7/19 9:04 PM, Joe Hershberger wrote: > > On Thu, Nov 7, 2019 at 1:16 PM Tom Rini wrote: > >> > >> On Tue, Nov 05, 2019 at 04:05:11AM +0000, Priyanka Jain wrote: > >> > >>> Fix 'mask' calculation in phy_connect() for phy addr '0'. > >>> 'mask' is getting set to '0xffffffff' for phy addr '0' > >>> in phy_connect() whereas expected value is '0'. > >>> > >>> > >>> Signed-off-by: Priyanka Jain > >> > >> Reported-by: tetsu-aoki via github > > > > Acked-by: Joe Hershberger > > Sadly, this breaks systems where a PHY is at address 0. > I have such an STM32MP1 system with LAN8720 PHY and since this patch, I > cannot use ethernet. Please revert. It seems like a case that shouldn't have worked before. What about this board requires the mask to be all 'f's, other than specifying the wrong phy address? It seems that in your case the phy address is not actually 0 (or the computed mask would find it), but your board dts may be setting it to 0 as an "unknown" value, but the correct unknown value should be "-1". It seems the issue is with these boards. Cheers, -Joe