Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1391378ybs; Mon, 25 May 2020 15:03:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNo3tUWJRJLY/K8RiMyM1bwoYhQM4QB+WwGPBMwMVCnM7thzc2vgWEQI8NEIH6SK85CjHu X-Received: by 2002:a17:906:c785:: with SMTP id cw5mr19802953ejb.543.1590444236917; Mon, 25 May 2020 15:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590444236; cv=none; d=google.com; s=arc-20160816; b=sGFRuUDngANYKutF+GN5iEKn5zFsRiOJ/Zp0jokv5JC1qQzQ8vUK4kLQBjSw/wrIyf /PozEx++Xq6uxGInhJA9+Dwong12d/lApHu3eSgV0vDboJ9VvO3a9LRN05PQm1qgz8BA v7DUN94a6XqZXgxz7bE0q3v4ISEnvqBgj+JTPFlXvF43aQw/7bu/1HCOtnLVMI2oeMes I6HLxRtZ84C6hdSGlx3pKN7O7gAQrJyUf5T6+gl6pOgb2HI6mOy0kVu+enaMKxd/w7/b 9Gtk9U2WB+t7B39Lset/QT0bAr7sSjRnvl0urBA00ouYbX4ZsCJvTb8Lhrn86ool90+m Vj/w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=BqJtalKXINUmB3F6S7Ib4gBPAtYoeHr02NlP/dN56ms=; b=yteXcn2pRv5X7peZRJAYUOh+tOJPy5tp5xLbwWE66CB6F8l5MWhfJQw3bceMqWgpLp GrIbPcfwflNES94lxIMQuEWRVq3QJpTgV+43cpg3mpqlsc2f0AHT3vcDY3E1+VQHKYp6 u/LE/xrxcMfRA1sgg6f/WcVq6kli8g0pmpd3o+xZa0ddl1ZdLnv4S8KPRFO0nJdeKVxA t/6s/NmMrE7wX5pbE9oxPKGYdV/KmM10kxZWDBWkYJninvkDY2oeAgiVPiGKBVdfSrkO IAEH8iUjPs2zXn6wdPfSpIsmPttvDZeeTVAbqKvyb9ZbTy7kAXZKCakstvq2McSl5gTd SwsA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si7364352edi.380.2020.05.25.15.03.34; Mon, 25 May 2020 15:03:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731228AbgEYV7W (ORCPT + 99 others); Mon, 25 May 2020 17:59:22 -0400 Received: from foss.arm.com ([217.140.110.172]:44600 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727842AbgEYV7V (ORCPT ); Mon, 25 May 2020 17:59:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E9CE131B; Mon, 25 May 2020 14:59:20 -0700 (PDT) Received: from [192.168.122.166] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 912333F6C4; Mon, 25 May 2020 14:59:20 -0700 (PDT) Subject: Re: [RFC 01/11] net: phy: Don't report success if devices weren't found To: Russell King - ARM Linux admin Cc: netdev@vger.kernel.org, davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com, madalin.bucur@oss.nxp.com, calvin.johnson@oss.nxp.com, linux-kernel@vger.kernel.org References: <20200522213059.1535892-1-jeremy.linton@arm.com> <20200522213059.1535892-2-jeremy.linton@arm.com> <20200523182054.GW1551@shell.armlinux.org.uk> <20200525094536.GK1551@shell.armlinux.org.uk> <20200525210751.GN1551@shell.armlinux.org.uk> From: Jeremy Linton Message-ID: <0eec69af-2099-2fee-f0f1-a83c7e4c2690@arm.com> Date: Mon, 25 May 2020 16:59:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200525210751.GN1551@shell.armlinux.org.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 5/25/20 4:07 PM, Russell King - ARM Linux admin wrote: > On Mon, May 25, 2020 at 04:02:13PM -0500, Jeremy Linton wrote: >>> So, I think you're going to have to add a work-around to ignore bit 0, >>> which brings up the question whether this is worth it or not. >> >> It does ignore bit 0, it gets turned into the C22 regs flag, and >> cleared/ignored in the remainder of the code (do to MMD loop indexes >> starting at 1). > > However, I've already pointed out that that isn't the case in a > number of functions that I listed in another email, and I suspect > was glossed over. > Hmm, right, I might not be understanding, I'm still considering your comments in 4/11 and a couple others.. OTOH, the mmd 0 logic could be completely removed, as its actually been broken for a year or so in linux (AFAIK) because the code triggering it was disabled when the C22 sanitation patch was merged. OTOH, this patch is still clearing the C22 flag from devices, so anything dependent entirely on that should have the same behavior as before. So, there is a bug in the is_valid_phy/device macro, because I messed it up when I converted it to a function because its using a signed val, when it should be unsigned. I don't think that is what you were hinting in 4/11 though. Thanks,