From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EF2A2E7F03 for ; Mon, 10 Nov 2025 21:57:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762811833; cv=none; b=MEOErvDkMKmKo83bQnw/mJtAql84dXgVxq2jftloePQolgG/cDIrsDnMoC+43AOfdeAwQLJtzQ6fp154dJItVr8HNwK25rvjQdjwxA1HbSAJiHNOzc/isROi4mu4fWQnWVH2Vm0y0xT5BTRcvtpMlBLIRkdfHVUDipN+MP7xeYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762811833; c=relaxed/simple; bh=Xd4yjBfAyJ7WIjueA3uY0bwo3lW8plzFar6f8bGG6V4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BWyyZ/Z8wQXSYWHam5XfW4/x8GifQRo3uVDqTYcz1lmiAVnefhILuVuHS1DYSH/XY12QDToiVptoPu1oI3ENAM9hFb+T33m3Bxugoaql+sFAThGxGZn+9NQgPoUUk6/MD5VzTb+XwKnGaHTl6Vvikb/DSGveoKpm0SEbr5ZmC78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=mdVljZdI; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="mdVljZdI" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MPj5lLILXJm/fFdL+c+qxM1mbap6FqdsVQaAiJwf41A=; b=mdVljZdIzrbRYiwdsEIsecse58 6Q0fycpZeV2ULG0elO590gA5ZzsZ+aWwbNl8IYyH0qXs05ZhgLGujjPqTlAlbCkrom4mpxINe+OKt OWHiZakgvsFaFFYCcgpVJZrnNXGlQsPDJiuAarBgJ5wjq3BTwRdDuZUERYGHeqNgvnJB2ZXNGOsHz efWj2pBoN5X273SvVqfilol1LhbGtl1HZRBxAE12KMeRXfg//FNwhGBzAx2H6L/hRxzfdfF8njgo2 zWlPgk6zmbfPQK5OnsHz2dMlYfY/yI2qOZn8v5xcdVN59p7lKz6mYiNIF1rBaGWhV7tKxC3UP/hti J47XWNJQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55574) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vIZsm-000000001eZ-023F; Mon, 10 Nov 2025 21:57:04 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vIZsj-000000002KU-3ZWs; Mon, 10 Nov 2025 21:57:01 +0000 Date: Mon, 10 Nov 2025 21:57:01 +0000 From: "Russell King (Oracle)" To: Heiner Kallweit Cc: Andrew Lunn , Jakub Kicinski , Paolo Abeni , Eric Dumazet , David Miller , "netdev@vger.kernel.org" Subject: Re: [PATCH net-next] net: phy: fixed_phy: use genphy_read_abilities to simplify the code Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) On Mon, Nov 10, 2025 at 10:11:24PM +0100, Heiner Kallweit wrote: > Populating phy->supported can be achieved easier by using > genphy_read_abilities(). Are you sure about that? > - switch (status->speed) { > - case SPEED_1000: > - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, > - phy->supported); > - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, > - phy->supported); > - fallthrough; > - case SPEED_100: > - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, > - phy->supported); > - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, > - phy->supported); > - fallthrough; > - case SPEED_10: > - default: > - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, > - phy->supported); > - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, > - phy->supported); This code sets both HD and FD for each speed, and if at 1G it sets 100M and 10M as well, if at 100M, it sets 10M as well. However, swphy emulation (including what was reported through BMSR and ESTAT) has only ever indicated one speed and duplex supported via the normal ability bits in these registers. So, "simplifying" the code introduces user visible changes. This needs to be mentioned in the commit message. The next questions are: 1. does this difference matter? 2. is it a bug fix? 3. is swphy wrong? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!