Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp222286rdb; Tue, 16 Jan 2024 23:01:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaj+CJD7UrA2iHO8QhjmU8Y6akLnPQnWSzus1ONjrrOic/AXzkGP6AYjk2B/23DUUS/2PL X-Received: by 2002:a17:907:c20e:b0:a2c:b119:a79f with SMTP id ti14-20020a170907c20e00b00a2cb119a79fmr2701435ejc.181.1705474870755; Tue, 16 Jan 2024 23:01:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705474870; cv=pass; d=google.com; s=arc-20160816; b=FFG78IH7zdOB/tZtY3apDtQnwfKlkaTHT2crMEHbBfULgyXl1eDw4VmRpWl8Sgj4Wj umnx6Zv4heM61w7rJnIMGLuftbUH0mtmcvBC9TsVE7SweGbkvv8v8t6QxUlTsK19K1tk n/uXp3AjM0OuVRruHNJiC2e6scEldOpvDkWrTH9P5TZYeTRfVwstFXUDSoUE4Ru3vZdN tMTpdiNhJ6sAwzZ65zWUtrE1kMKU4EAD9+u/folHV8vaSX9YNNuEP1nW/GvVSRp7wtrx xrlmcqZUAzeVyqPLrYXYWQfR4VHpZlp+O1lC8ggS4xpbz68rjejKkcNwK+YwWsowiYtc W1Fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=AuqIUbDsdh5jhxBSCU/cWA/zJ4KgisT+JkTQXpz8Tck=; fh=kQr/RNziZSE8hzDvnOcSVc0upD5YY8kBNp3RCQF0YcE=; b=xZcnWAFBa7vpV9oSexT4UJ+icCrmtLZnLf5xrHE+usiv7w4hyHmoYKB7Jw3JlX5D6s 7BPcRXEXn67RDwbanS5SirnoGJnGuzl0A+AeB2ntx6BvIOJDHkf7PvFk8MpSWjxSmass 89vyQC6JrzbBJ7iMz+1wNPR6XsAJoixaX+Jt71L4B8UUoOo62PeGNBPlEVpcyrhMVLyU NG5iNCmmMbPI7xYG11Bv5tbQRhJeTiv5S9rOpsDrJFo+JkkIFIqvsS3Za1VWBOoouCe3 V0W+u5XWi6kQu6h4gWBvcZqRsyHaVNB6uN/WOuwWQV8Qd0q/ozXUGYLOk59MzCTKdPht ej5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@purestorage.com header.s=google2022 header.b="WSVO/x5f"; arc=pass (i=1 dkim=pass dkdomain=purestorage.com dmarc=pass fromdomain=purestorage.com); spf=pass (google.com: domain of linux-kernel+bounces-28442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h7-20020a170906398700b00a2b2c19ac78si5617874eje.556.2024.01.16.23.01.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 23:01:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@purestorage.com header.s=google2022 header.b="WSVO/x5f"; arc=pass (i=1 dkim=pass dkdomain=purestorage.com dmarc=pass fromdomain=purestorage.com); spf=pass (google.com: domain of linux-kernel+bounces-28442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28442-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 487D81F24ED3 for ; Wed, 17 Jan 2024 01:51:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55DC41FA2; Wed, 17 Jan 2024 01:51:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="WSVO/x5f" Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A89A01385 for ; Wed, 17 Jan 2024 01:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705456289; cv=none; b=GMF/vMqscYL9lBfvl8NTyjNy3lVV9y7rNbciXzslRPkC+28fecy/vbgU6ODq+S5jUf+se1yfz+tdWA7KuPLmm1++JZU9ryv1ul5PttJNPD8CAuZoHdvgSuXeRnuy/vyejbUFNcC0hs5RizY49x8OxMDn+OQKguG3DAyigAXFGXY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705456289; c=relaxed/simple; bh=JiFl8+epB08Zl1NjWmOkd5YBmmVt1tz60AanHbyhe74=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=OsBMFxCX4+4x1xS8ZMWIpvgA78ocvEIquEArCKVagSgswLTU+NKdeR0wM+j3RyC+Xl0tLcVdPovuZ6URSrf5xBaRzgO4/jkXsSrf0n4hgluvAVzSBH/XrF6e3C4V+4ZWYIK55SbkG0Ujw8fPrepSI182YogxAuPYK3vKrwyjfrk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=WSVO/x5f; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-50e7b03fbbeso2148797e87.0 for ; Tue, 16 Jan 2024 17:51:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1705456286; x=1706061086; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AuqIUbDsdh5jhxBSCU/cWA/zJ4KgisT+JkTQXpz8Tck=; b=WSVO/x5fPuwycl8CKwhFYhlFQ2iuk+/Q+WP73E2OWp47eDqAZvO8JOgOZjyBuc1Cn0 AJ7awd+USytZferI/JjYDnK67pQQrV5LeAtKJVvaG9Zmsj8neM14oOZHOoqqBD4ko1OG Y9uUJfNsm1Nxaf6gicO+7IZ5oQXUS0ez+d+psJGBMCIoDgING/OxL8ZoXImz2aVj9UxK 6wAva0pJ0yom/6k82pjnXIAxA9fGYmiwIIPI+eFR+y+cZB1/dORnG4JYWuI0JJdouju4 60ve3QcDn5mP1VKCyT/c/DWIcNwNCr1vSLp7yQMGiYORvEAih8Lc79pNC3TfBI2n/GiM MzEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705456286; x=1706061086; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AuqIUbDsdh5jhxBSCU/cWA/zJ4KgisT+JkTQXpz8Tck=; b=WQAKlv8O3GjVfi2O2JO9V6uspj+JAxtZrU07L0ZlSFtPz60iO5MLRrOF7hNqegJIhk oNc1aJRvMEsjJc7+uPCdPDDtB10/+ut0eLZw3jhRimd0ftb+K5ms7kkzrJCfunFqIqN2 u9JJZBCT5RPJAduKn2JzjSit6o5I54wSKiY+lqIl+ZMz1xoWOgdS8boWPkRKbG9nuWI/ 3+Xn0PYXtVFxn7dm4143S+PVymTO7S36ZI+tR09N5nNyBm9P7dVdXXbaT5ONlXLGzstz Z6F9IEe4WRmEbAkStcwMRLdv+ybAjiqw8r0v8C8T/ZLqbvYnJ8TMnpbtJ8ijFIW9cpkq jxFw== X-Gm-Message-State: AOJu0YxVjJe2bOZjzF2BjrSwiXWDbGWFcWSmraYqm4dfdOh7OMXF97xQ 973geZ0Pk7rncaIyRqyVoTW79YffsaFlt4NzNMzCLP/CiwP+YA== X-Received: by 2002:a2e:4e02:0:b0:2cd:3731:9c52 with SMTP id c2-20020a2e4e02000000b002cd37319c52mr278711ljb.2.1705456285645; Tue, 16 Jan 2024 17:51:25 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240116193542.711482-1-tmenninger@purestorage.com> <04d22048-737a-4281-a43f-b125ebe0c896@lunn.ch> In-Reply-To: From: Tim Menninger Date: Tue, 16 Jan 2024 17:51:13 -0800 Message-ID: Subject: Re: [PATCH] net: dsa: mv88e6xxx: Make *_c45 callbacks agree with phy_*_c45 callbacks To: Andrew Lunn Cc: f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 16, 2024 at 3:21=E2=80=AFPM Andrew Lunn wrote: > > > Hi Andrew, > > > > It bubbles up as EIO (the translation happens in get_phy_c45_ids when > > get_phy_c45_devs_in_pkg fails) and ultimately causes the probe to fail. > > > > The EIO causes the scan to stop and fail immediately - the way I read > > mdiobus_scan_bus_c45, only ENODEV is permissible. > > O.K. At minimum, this should be added to the commit message. > > However, i'm wondering if this is the correct fix. I would prefer that > the scan code just acts on the -EOPNOTSUPP the same was as > -ENODEV. Maybe the error code from phy_c45_probe_present() should be > returned as is. And mdiobus_scan_bus_c45() is extended to handle > -EOPNOTSUPP ? > > Andrew Noted about the commit message. To return -EOPNOTSUPP high enough up that the mdiobus_scan function(s) can directly handle it would mean at minimum, these functions have -EOPNOTSUPP added to their respective list of possible return values: - get_phy_c45_ids (static) - phy_get_c45_ids - get_phy_device - mdiobus_scan (static) - mdiobus_scan_c22 (static) - mdiobus_scan_c45 (static) I didn't look beyond to see whether any callers of phy_get_c45_ids or get_phy_device also return errors as-are, but it feels a little broad in scope to me. My impression is still that the read_c45 function should agree with the phy_read_c45 function, but that isn't a hill I care to die on if you still think otherwise. Thoughts?