From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.186.91 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796222645; b=HCyXV8JfPS5zgOAxfwHZAuC6PFe6JdB8nj/0uegCpmvvxUkBicYby1cJSe7vYKD3xQy3 ZwaMq2VhAI9L3DFM0nfXg0Ce/Myy+bdV0VHO3ZoBS0wrQCo6t+IOs3EV0tKwAczavIl1p imRBG/fh4ZWlUudQBramRtZGvAslQUXO3GycQnlM8Xsuct8j19awoSIJvuVtWHsfF6JCR rvLdsu9Fm7KCfqtyrJB6mI3P7tloiMiCse0P/Nle/t4zqW4Zg8e2dd77b2xVnmthkXNEE +umIbbqGe+QFknkjTB14K/8tfeF7wk2v2d6pTIW/ioOitDGYqkz4g2H3MrWxSBiaKzg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796222645; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: Received:X-SEPP-Suspect:Received:Received:Received:Received:Received: Received:X-MS-Exchange-Authentication-Results:Received-SPF:Received: Received:Authentication-Results-Original:Received:Received:Date:From: To:CC:Subject:Message-ID:References:Content-Type:Content-Disposition: In-Reply-To:X-ClientProxiedBy:MIME-Version:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam-Untrusted: X-Microsoft-Antispam-Message-Info-Original: X-Forefront-Antispam-Report-Untrusted:X-Exchange-RoutingPolicyChecked: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-CodeTwo-MessageID: X-CodeTwoProcessed:X-EOPAttributedMessage: X-MS-Exchange-Transport-CrossTenantHeadersStripped: X-MS-Office365-Filtering-Correlation-Id-Prvs: X-Microsoft-Antispam-Untrusted: X-Microsoft-Antispam-Message-Info-Original: X-Forefront-Antispam-Report-Untrusted: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-SEPP-CCCVersion: X-MS-Exchange-SkipListedInternetSender: X-MS-Exchange-ExternalOriginalInternetSender: X-MS-Exchange-Transport-CrossTenantHeadersStripped: X-MS-PublicTrafficType:X-MS-Office365-Filtering-Correlation-Id-Prvs: X-SM-ruleversion:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=suo6PtGWMG2cz+1qXDMSr4zpXWO/UyU2LCYn7mQgG5g=; b=LlNRUXuQb+nN08QoIB4C2+0/duHCDkiR0btnE3r2lnLGxofzxz7Ziu4XHoFi1wbhTAya loHLCa2GRX0TBGfTJ0/7sNnUsOom514IfIdxU23f5hAfd/rV6LXkmkqYtqECKJscgdXBL Tci5uT3brNULGX+L/BOStrBJsBleJKQ/sO/1j3PDY0nEpC2w9JPWLSJW6WWeqMMW7HPVh hcb/MUZ6X+nOwROTUeu5CGEU0oDImfgVj4LdS8kmgoY6Zozr56ZoJbS3LFXdVhtSx6kUz QLB71FYgssamEnQ5/NWXkb/vO39oZWOiOYF2BWP3gP7iKM7/yqE+7P7fO3It6YRrgxg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=duagon.com; spf=pass smtp.mailfrom=duagon.com; dkim=pass header.d=duagon.com header.i=@duagon.com header.a=rsa-sha256 header.s=selector1 header.b=S5Yk5eXS; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.186.91 Received: from ZRAP278CU002.outbound.protection.outlook.com (mail-switzerlandnorthazon11020091.outbound.protection.outlook.com [52.101.186.91]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FF84606A31A; Wed, 2 Dec 2026 14:44:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0FF84606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=duagon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=duagon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=duagon.com header.i=@duagon.com header.a=rsa-sha256 header.s=selector1 header.b=S5Yk5eXS ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dOhGD7Wq7xYdlJ0g11jNbasUDMqOgOJN7Boc7gs69h90SymmHzUtDMjtXpV7Ru+KosVx089RjekEqUR6+E8gKe+5I9l593Oa8gV+luhxIvOlGPjUMAAjW4gbE7MvGsZqCwj9f9utb3ejKQ0bg+njv9GcgGNmMLWOVIRi5BTO9OJXHP3uoSGRvdCOGyH2EtXRkImOY4P0gUlkl86bzX41xHZPSevGoNAQeDbi6jFZUBWnM+80yN3+lVN4QfWtA3Ao8HChcE5eASFqa3LKJhSXHWhuDNgYjFiCa0sSrPF5aU7o6cux9lt5tv4LIBrtsmshWQQ6e5IWQqPG6dk9CQChWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=suo6PtGWMG2cz+1qXDMSr4zpXWO/UyU2LCYn7mQgG5g=; b=iwoMBoT0tKGwEuYga9ZLLlcs+NzQ413etl5Oc4KsyEmsJ8XdRspc5gPqgOkPfIyGEraU5zMJN/OMNPiP+WiDHEmiWaDjGxkwoB4uCVonCVAVU307gXK/rQcf2C1vwT+v+UB8/NX+WwRsGN4C2KAsNhIPQOVUuUErV1aoJ9Y7G7XlmHQqC9A6i2IwngKCEuw3FaDyVaV+R+sLQqYfIsSBSbhDYPL0s6vUoejnKmdaNeu54/HSgz7GQXGLxqPcJ0O4/DthuCkE7RyEpRN4FZfWNCXqSC4lCG0lPLnmhZXHFt1T+dzK0cXG1QAPKy54NDgoxD+bLMp+VRq5M+ChhQJi4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.93.85.16) smtp.rcpttodomain=davemloft.net smtp.mailfrom=duagon.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=duagon.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=duagon.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=suo6PtGWMG2cz+1qXDMSr4zpXWO/UyU2LCYn7mQgG5g=; b=S5Yk5eXSjPvk+ZYU7Z/dqXMEloFwRzZEroHz1nbk1gpkL8jsZlY0caWWWHhbeJR90Q+U/o/7tv6tRwtGs1VlqkFzInUT24fBHAGwnv1O7OWLaYGahl9KYwCTyqPNn+PZZN9F0aCn7gifaduNtDWNzW9nnqy7HRrF9Uh8wn+CSY0= Received: from PR3P193CA0011.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:50::16) by ZR0P278MB0122.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:18::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Wed, 2 Dec 2026 14:43:57 +0000 Received: from MI3PEPF00008483.eurprd02.prod.outlook.com (2603:10a6:102:50:cafe::3d) by PR3P193CA0011.outlook.office365.com (2603:10a6:102:50::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.662.13 via Frontend Transport; Wed, 2 Dec 2026 14:43:56 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 40.93.85.16) smtp.mailfrom=duagon.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=duagon.com; Received-SPF: Pass (protection.outlook.com: domain of duagon.com designates 40.93.85.16 as permitted sender) receiver=protection.outlook.com; client-ip=40.93.85.16; helo=ZRAP278CU002.outbound.protection.outlook.com; pr=C Received: from hz-deliver01.de.seppmail.cloud (2a01:4f8:a0:13df::219) by MI3PEPF00008483.mail.protection.outlook.com (2603:10a6:298:1::6a) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Wed, 2 Dec 2026 14:43:54 +0000 Received: from hz-glue05.de.seppmail.cloud (unknown [10.11.0.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hz-deliver01.de.seppmail.cloud (Postfix) with ESMTPS id 4jfgVt4FDvz4vVH; Wed, 2 Dec 2026 15:43:50 +0100 (CET) Received: from hz-glue05.de.seppmail.cloud (unknown [172.18.0.6]) by hz-glue05.de.seppmail.cloud (Postfix) with SMTP id 4jfgVt3rz3z1yFn; Wed, 2 Dec 2026 15:43:50 +0100 (CET) X-SEPP-Suspect: 99f19e66d19e4ded8e7cf6688912579b Received: from hz-scan07.de.seppmail.cloud (unknown [10.11.0.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hz-glue01.de.seppmail.cloud (Postfix) with ESMTPS id 4jfgVt2nrfz236B; Wed, 2 Dec 2026 15:43:50 +0100 (CET) Received: from hz-scan07 (localhost [127.0.0.1]) by hz-scan07.de.seppmail.cloud (Postfix) with SMTP id 4jfgVt1v1RzmtD; Wed, 02 Dec 2026 15:43:50 +0100 (CET) Received: from hz-m365gate03.de.seppmail.cloud (unknown [10.11.0.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hz-scan07.de.seppmail.cloud (Postfix) with ESMTPS; Wed, 02 Dec 2026 15:43:48 +0100 (CET) Received: from ZRAP278CU002.outbound.protection.outlook.com (mail-switzerlandnorthazlp17010016.outbound.protection.outlook.com [40.93.85.16]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.protection.outlook.com", Issuer "DigiCert SHA2 Secure Server CA" (not verified)) by hz-m365gate03.de.seppmail.cloud (Postfix) with ESMTPS id 4jfgVp6wz1z21Qt; Wed, 2 Dec 2026 15:43:46 +0100 (CET) Received: from LO4P123CA0125.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:192::22) by ZR5P278MB1810.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:af::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.11; Wed, 2 Dec 2026 14:43:42 +0000 Received: from AM7PEPF00000056.EURPRD83.prod.outlook.com (2603:10a6:600:192:cafe::1) by LO4P123CA0125.outlook.office365.com (2603:10a6:600:192::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.10 via Frontend Transport; Wed, 2 Dec 2026 14:43:42 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 20.79.220.33) smtp.mailfrom=duagon.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=duagon.com; Received-SPF: Pass (protection.outlook.com: domain of duagon.com designates 20.79.220.33 as permitted sender) receiver=protection.outlook.com; client-ip=20.79.220.33; helo=de1-emailsignatures-cloud.codetwo.com; pr=C Received: from de1-emailsignatures-cloud.codetwo.com (20.79.220.33) by AM7PEPF00000056.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.0 via Frontend Transport; Wed, 2 Dec 2026 14:43:41 +0000 Received: from ZRAP278CU002.outbound.protection.outlook.com (40.93.85.20) by de1-emailsignatures-cloud.codetwo.com with CodeTwo SMTP Server (TLS12) via SMTP; Wed, 02 Dec 2026 14:43:41 +0000 Authentication-Results-Original: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=duagon.com; Received: from ZR0P278MB0523.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:34::6) by ZR5P278MB008323.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:100::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.11; Wed, 2 Dec 2026 14:43:38 +0000 Received: from ZR0P278MB0523.CHEP278.PROD.OUTLOOK.COM ([fe80::30b2:3be9:48ab:c354]) by ZR0P278MB0523.CHEP278.PROD.OUTLOOK.COM ([fe80::30b2:3be9:48ab:c354%3]) with mapi id 15.21.0688.009; Wed, 2 Dec 2026 14:43:37 +0000 Date: Wed, 2 Dec 2026 15:43:24 +0100 From: Jose Javier Rodriguez Barbarin To: Andrew Lunn CC: netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, Filip Jensen Subject: Re: [RFC net-next 1/2] net: ethernet: add MEN Z87 driver Message-ID: References: <20261201154009.83819-1-dev-josejavier.rodriguez@duagon.com> <20261201154009.83819-2-dev-josejavier.rodriguez@duagon.com> <0ea1ef07-4296-4ca9-b963-996e514f03c1@lunn.ch> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <0ea1ef07-4296-4ca9-b963-996e514f03c1@lunn.ch> X-ClientProxiedBy: PAZP264CA0189.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:236::25) To ZR0P278MB0523.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:34::6) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: ZR0P278MB0523:EE_|ZR5P278MB008323:EE_|AM7PEPF00000056:EE_|ZR5P278MB1810:EE_|MI3PEPF00008483:EE_|ZR0P278MB0122:EE_ X-MS-Office365-Filtering-Correlation-Id: 58b12aae-301c-4bee-c109-08df5082b072 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|366016|376014|52116014|23010399003|1800799024|5023799004|11063799006|4143699003|6133799003|261009223027099003|3023799007|22082099003|18002099003|56012099006|10067099003|261021121427099003|261021123027099003|261102123227099003|261102130727099003|261022075727099003|261028144727099003|261022105027099003|261026140227099003|261026121527099003|38350700014; X-Microsoft-Antispam-Message-Info-Original: uOGzIKHGQiTeVQmo0ENXEgcsO2iQj6oSBuL6r15AOnMMJ1AfyBMtYWUQb6wLkurJeYWe6czu58dfx+oRFtNkuTqXcsJpmwI9JXq1ZcwBTmfFqWq3nVEVUz7eBtk6j0sQStmyTOXTJhwRA0elpAWw5svThRCISP4NjbU7vSEnLw+MsARewG1xILwaSv82g4S56ydJzgE3YwoYb5dJLZlTa1hE/kuDQZFK6M6j4QIljvFwfrym6tIUfY1TSieB42vIaimdQ/ZcQ8BtgUPLk025POW0OgDijcpzhsXQO6qDZHVm0vQ/RDASbpXAK45jwIpo61uS0qcll+weuzo27V5WOPpyhlmlGC1q7F6mX/y4QB00EhLhdXj6844e8026NjjhZkpmYneKjRM1z+dzwGtbYDjcxTOucpmSw2HVzPRYvWqaHOSJAgZR4/Y0OAQY9xZu1gBWTj3PNfHIvlt7ACcu0AiSbLxsTKc4DvwzwU+kq91q6Q5BIImg1YK3c9k+eHuwP7sbBfb8tijh/XJ+pxdx7S0lcOxZwbgthTE5DyVjnGGFJHH0Ie327BA8ikKNbGm/fAEsFwFjyNuyzjkFYhLFXG4oenoqEj0/cgM55i24oVIL/XqDjpXMcVYrBlof+QqzDXsu9+Zw5jrqGYPpm9Knybj3fOFWsBWMbYzkWCsFeQZQJZf3MOlIRy5zU6nNDZjbsNUGt/L/b/aGW1fzLgiRafjivoL+Hs43fbNib+jDtIw= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZR0P278MB0523.CHEP278.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(52116014)(23010399003)(1800799024)(5023799004)(11063799006)(4143699003)(6133799003)(261009223027099003)(3023799007)(22082099003)(18002099003)(56012099006)(10067099003)(261021121427099003)(261021123027099003)(261102123227099003)(261102130727099003)(261022075727099003)(261028144727099003)(261022105027099003)(261026140227099003)(261026121527099003)(38350700014);DIR:OUT;SFP:1102; X-Exchange-RoutingPolicyChecked: WhPzEEHS0cOTWAbpeprK8p6ZfbMEaS+zTpqQIsKbLXyr5XJkkTaum71CKWXdouPkoZclikOPJ+hX8pd/LIY/0aA1sn/4kxCxBBf+XLCizjgOR5LDvjRSGweNOK6oiCmLeXtkgMU5TSe5B45j+O85ltT7yAs8IOUgGpllG53Lgx9NL42XCb5RnzDkb65KAL1e4DVNcy7aCyjQQlde2+f1NRAFtyVqohTC0OjAkZ92Ao0Cp+DF/iJWUEGBcoaV6fzCwL0ceZKtevQ4WNkwqgIefzHDEL5kHcIRIEbajJyZERNy/P1bl9vmffs24rXQzWrShJHLXto2HGTZpEl4f5HuZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZR5P278MB008323 X-CodeTwo-MessageID: b6378450-f835-4d0d-a0a1-5ac61c653f2c.20261202144341@de1-emailsignatures-cloud.codetwo.com X-CodeTwoProcessed: true X-EOPAttributedMessage: 1 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7PEPF00000056.EURPRD83.prod.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 05cce932-7797-4523-afdf-08df5082a61f X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|14060799003|82310400026|35042699022|376014|36860700016|1800799024|23010399003|5023799004|11063799006|4143699003|6133799003|261009223027099003|22082099003|18002099003|3023799007|56012099006|10067099003|261021121427099003|261022105027099003|261022075727099003|261021123027099003|261102130727099003|261028144727099003|261102123227099003|261026140227099003|261026121527099003; X-Microsoft-Antispam-Message-Info-Original: gb4CPLfRqaI9CIW0CLAxblhN1nFb45m8WsOA+EPDwmiUxY1MDHjeHk37T5JdfKL2f9g9ZwTqbfJz3eTHGNEL9MlO+uwfJjiyNFdgW3uDromsuxw3s66MrOy7U+2NLItSS9C1/Usy3X/G6plp2qXCh1YnwZAZ94e2cEHbJUgg3KPN00WkClXNwgFxN4ERVSBuKNe0nfEIU1ZPtDjVp/9Zs7/BXMrHI5FwDMSc9SLU1OkryPb5S4WNMElKauAQq3sBTe7/ayNm3Igwx+BQ/RuKsTHroTlhOtgDDfz+uWcx+cp9K18PKlBitKN1mE6H47Tx3Tsm7UveLBoPsI3uQI8C9j2vOqR+saFFxZrTv8z7wlBaRgL5B6Qtbs8lrsF6mdp3SQ2HYVsnV8S6q5RqeWt/AtKPvhKj6CJfravYrXFr6Q2k3mWBN82xr/yCIGPXhsk98+KlhEaCfSLthxaz0aiN4WT9UhCb6QA+KdOoZ4jbP6VA+QhnulEZDFwFWQrIZ7P0USx5Wa5mcimFVGnjkOrQcOK7QWm8Y4rtedQ3LLJF9DlEIHzc0QV+HXV7pQ7r9E+VQY5O89COULEYGsobZydV+anxRYqBFYVD8EmzAI1e9oTNzxnFBZqcEmuXQeZGH8UGqWj/7pdlfICUa+QXFYeo1OUR7X6QpLRgbXixoKZLTX+TqXvXI1g+1OS+5teM8MR96XIxgxiK3HijCOLJd7LP3w== X-Forefront-Antispam-Report-Untrusted: CIP:20.79.220.33;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:de1-emailsignatures-cloud.codetwo.com;PTR:de1-emailsignatures-cloud.codetwo.com;CAT:NONE;SFS:(13230040)(14060799003)(82310400026)(35042699022)(376014)(36860700016)(1800799024)(23010399003)(5023799004)(11063799006)(4143699003)(6133799003)(261009223027099003)(22082099003)(18002099003)(3023799007)(56012099006)(10067099003)(261021121427099003)(261022105027099003)(261022075727099003)(261021123027099003)(261102130727099003)(261028144727099003)(261102123227099003)(261026140227099003)(261026121527099003);DIR:OUT;SFP:1102; X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZR5P278MB1810 X-SEPP-CCCVersion: 2026-11-17T09:39:28+01:00 93ee4c03 X-MS-Exchange-SkipListedInternetSender: ip=[40.93.85.16];domain=ZRAP278CU002.outbound.protection.outlook.com X-MS-Exchange-ExternalOriginalInternetSender: ip=[40.93.85.16];domain=ZRAP278CU002.outbound.protection.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: MI3PEPF00008483.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 291a9175-d631-40e8-3a74-08df5082a8e1 X-SM-ruleversion: 2.1.0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700016|1800799024|35042699022|376014|23010399003|82310400026|10070799003|5063699009|56012099006|261022075727099003|261102130727099003|261021121427099003|261102123227099003|261021123027099003|261026140227099003|261022105027099003|261026121527099003|261028144727099003|10067099003|261009223027099003|18002099003|22082099003|5023799004|11063799006|4143699003|6133799003|3023799007; X-Microsoft-Antispam-Message-Info: 7XaLXRuKWVoDomKJDE9b29F3dKmaGbdyjxxUOcwU3tyEAp9MgOIcAi5mbt3QuzeVqwZPV/4ZQgDMlq6YRJhIuGp9TosVvZqCaz2DzrVGA4Xo7Ib5UgTthPP8ZcI3TkrwdVjTrUlQ6ygSuQWXzapbtepWemEGCm8vTGy9ydRL3a+7CYGvrbVCGSqJMV/tq/+GpqpFx0YVGk62KrUBJ2+N5j9FG02hXgppc1TVcBBuROxkQ2DM6OponvGI50zr/tCGFpkRiqa14LOwNLadBtdPdm2JdUrcS+nvCXcQwjwuJwLqg3AEv0A+63Dty23xBdc3Sxue9xNGEP4ye10LS7VclM1zSnTGdcCyco8MMILgfdPlmHoMQ8wOmEzjYaj0b3qLWHjaOlZM4K8q21uzb7VwSy9K18KPUpUYsWgCJo06uK9SayHFldgSotYdUUpE8pZn2UM1GCX8T7k5g2/jcxpo/gBW1pfAHSPxTg43rDwVe5u452yPmPtDg6Q4n8ubyYxru8QiM+nP1uqJzTeos8NpVokfR1EG/9zj+8LOw8V1syIxxORFPUBeLsqQ/SXXaaBWhRihmwYna7lNfupgJ7jo/cHpdDfEowiJDLJf2fmTZqsTwnvrNFfisx1YdlsFx1AdyuqeeIXsMb1tY6Go72PNzK5kR8rpZ9GWncc2UO89NjpLw/uZSRyOspBdQ0QxPvGRJ+5L3zvYXVZEiXDpljkvzen+CCRFnWf0v56WbBWyRFr7iATY93oxu19j9TJy975uWkxn3redmE5oUdH12gAWpzzVIGlaDFlNB5YhkCTZzLsureVIo8dya4JOzlhWImG0 X-Forefront-Antispam-Report: CIP:2a01:4f8:a0:13df::219;CTRY:CH;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZRAP278CU002.outbound.protection.outlook.com;PTR:mail-switzerlandnorthazlp17010016.outbound.protection.outlook.com;CAT:NONE;SFS:(13230040)(36860700016)(1800799024)(35042699022)(376014)(23010399003)(82310400026)(10070799003)(5063699009)(56012099006)(261022075727099003)(261102130727099003)(261021121427099003)(261102123227099003)(261021123027099003)(261026140227099003)(261022105027099003)(261026121527099003)(261028144727099003)(10067099003)(261009223027099003)(18002099003)(22082099003)(5023799004)(11063799006)(4143699003)(6133799003)(3023799007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2cwbTe5eGd2Wm2gH+JGg5C6UM0tN4YdlayWPKQxRZXocnKuayyvabnrzT2gTNaY9XOsO9LEYjaPfKHNowkwMUBMY2ictbATjG2Y5vnu+BduSHyRbxfLJOYSQJS57vJieTkSikuPAkKSpDwD5eljTtPflKBd3hoaoA1V25xKeC9wAfkieRCC6VnAnk4YmBJu17vGSzCZWM1AYrpNH8mTNsN6lfATzqovovXXXaJrrsTV+3TDuSh5HxOijaj4O2GJFwH3aEdoVpyoMJtOkpgejhgQewYryCzfuqAiaZDOTUg/4WBZf2wASqkADpf4PQ4gBpf1pIo7QpnB/n2ZXU7Sns28GvBiPMG88Ge2wHAXVm8Y5WNEppawxZepyYQ0R5I/A1FAYovqqAdccvKH3GiGu7dstoiLHsXbdgzvhuaAEU3sE6Dt1Utc1GxhIefFPkefb X-OriginatorOrg: duagon.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 14:43:54.5249 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58b12aae-301c-4bee-c109-08df5082b072 X-MS-Exchange-CrossTenant-Id: e5e7e96e-8a28-45d6-9093-a40dd5b51a57 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5e7e96e-8a28-45d6-9093-a40dd5b51a57;Ip=[2a01:4f8:a0:13df::219];Helo=[hz-deliver01.de.seppmail.cloud] X-MS-Exchange-CrossTenant-AuthSource: MI3PEPF00008483.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZR0P278MB0122 Dear Andrew Lunn, First of all, thank you for your answer. I really appreciate all your suggestions. On Tue, Dec 01, 2026 at 07:27:10PM +0100, Andrew Lunn wrote: > > +static void z87_ethtool_get_drvinfo(struct net_device *dev, > > + struct ethtool_drvinfo *info) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + unsigned long flags; > > + > > + raw_spin_lock_irqsave(&np->lock, flags); > > + > > + strscpy(info->driver, np->model_name, sizeof(info->driver)); > > + strscpy(info->bus_info, dev_name(&dev->dev), sizeof(info->bus_info)); > > + > > + raw_spin_unlock_irqrestore(&np->lock, flags); > > Why is locking needed here? I don't know of any other driver which > does this. > > > +static const struct ethtool_ops men_z87_ethtool_ops = { > > + .get_drvinfo = z87_ethtool_get_drvinfo, > > + .get_link_ksettings = phy_ethtool_get_link_ksettings, > > + .set_link_ksettings = phy_ethtool_set_link_ksettings, > > + .nway_reset = phy_ethtool_nway_reset, > > Ideally you should use phylink, not phylib. The API is better, you are > less likely to make the errors everybody else does with pause, WoL, > EEE etc. I had the doubt of using phylink or phylib, I used phylib because I thought it would fit better with how my driver is implemented but I can study how to move from phylib to phylink. > > > +const struct ethtool_ops *z87_get_ethtool_ops(void) > > +{ > > + return &men_z87_ethtool_ops; > > +} > > Global function vs global structure. I would keep it KISS and just > make men_z87_ethtool_ops global. > > > +/* Generic BD accessors */ > > + > > +static inline void z87_bd_set_addr(const struct z87_private *np, struct z87_desc *desc, u32 addr) > > +{ > > + WRITE_ONCE(desc->addr, cpu_to_le32(addr)); > > + /* ensure DMA ordering */ > > + dma_wmb(); > > Getting the memory barrier correct is not simple. So they should not > be hidden in include files. Please put them in the C code where they > can be seen and reviewed easily. > > > +struct z87_i2c *z87_i2c_alloc(struct device *dev, unsigned long addr) > > +{ > > + struct z87_i2c *i2c; > > + int ret; > > + > > + i2c = kzalloc_obj(struct z87_i2c); > > + > > + if (!i2c) > > + return ERR_PTR(-ENOMEM); > > + > > + // Initialize z87_i2c stuff > > + i2c->base_addr = addr; > > + i2c->i2c_bug = 0; > > + > > + // Prepare i2c adapter > > + i2c->adapter.owner = THIS_MODULE; > > + i2c->adapter.dev.parent = dev; > > + i2c->adapter.algo_data = &i2c->algo_bit; > > + snprintf(i2c->adapter.name, sizeof(i2c->adapter.name), > > + "I2C adapter at %s", dev_name(dev)); > > + > > + // Prepare i2c bit-banging functions, parameters and private data. > > + i2c->algo_bit.setsda = z87_set_sda; > > + i2c->algo_bit.setscl = z87_set_scl; > > + i2c->algo_bit.getsda = z87_get_sda; > > + i2c->algo_bit.getscl = z87_get_scl; > > + i2c->algo_bit.udelay = 10; /* Recommended for SMBus */ > > + i2c->algo_bit.timeout = usecs_to_jiffies(1000); > > + i2c->algo_bit.data = i2c; > > Is this an existing open cores I2C bus master? Or is it specific to > this device? I'm just wondering if the whole thing exists somewhere > else and you just need to instantiate the driver. > It is specific to this device. There is no i2c controller behind it so I cannot use i2c-ocores, it is just a simple SMBus bit-bang register. > > +/* Typedefs */ > > +static int z87_open(struct net_device *dev); > > +static int z87_start_xmit(struct sk_buff *skb, struct net_device *dev); > > +static irqreturn_t z87_irq(int irq, void *dev_id); > > +static int z87_close(struct net_device *dev); > > +static void z87_tx_timeout(struct net_device *dev, unsigned int txqueue); > > +static int z87_poll(struct napi_struct *napi, int budget); > > +static void z87_pass_packet(struct napi_struct *napi, unsigned int idx); > > +static int z87_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); > > +static void z87_hash_table_setup(struct net_device *dev); > > +static int z87_ether_gen_crc(const u8 *data); > > +static const struct board_config *z87_get_board_config(struct mcb_device *mdev); > > +static void z87_load_mac_addr(struct net_device *dev); > > +static int z87_alloc_rx_bd(struct net_device *dev); > > +static void z87_free_rx_bd(struct net_device *dev); > > +static int z87_hw_stop(struct net_device *dev); > > +static int z87_hw_start(struct net_device *dev); > > Don't do this. Put the functions in the correct order so they are > declared before they are used. That allows the compiler to inline, so > you get better executable code. > > > +static int z87_change_mtu(struct net_device *netdev, int new_mtu) > > +{ > > + if (new_mtu < ETH_MIN_MTU || new_mtu > ETH_DATA_LEN) > > + return -EINVAL; > > If you set netdev->max_mtu and netdev->min_mtu, the core will do this > validation for you. > > > +static void z87_regdump(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + struct z87_desc tx_desc[Z087_TBD_NUM]; > > + u32 cur_tx, dty_tx, cur_rx; > > + unsigned long i = 0; > > + u32 tmp = 0; > > + > > + /* Snapshot software TX state; hardware may still update descriptors. */ > > + spin_lock_bh(&np->tx_lock); > > + cur_tx = np->cur_tx; > > + dty_tx = np->dty_tx; > > + cur_rx = READ_ONCE(np->cur_rx); > > + > > + spin_unlock_bh(&np->tx_lock); > > + > > + netdev_info(dev, "(netdevice '%s') base Addr: 0x%08lx\n", > > + dev->name, dev->base_addr); > > + > > + while (z87_reginfo[i].addr != 0xffff) { > > + tmp = z87_read32(dev, z87_reginfo[i].addr); > > + netdev_info(dev, "%s 0x%08x\n", z87_reginfo[i].name, tmp); > > + i++; > > + } > > + > > + z87_phy_regdump(dev); > > + > > + netdev_info(dev, "cur_tx 0x%02x, dty_tx 0x%02x, cur_rx 0x%02x\n", > > + cur_tx, dty_tx, cur_rx); > > + > > + if (READ_ONCE(np->msg_enable) > 0) { > > + netdev_info(dev, > > + "------------------ TX BDs: -------------------\n"); > > + for (i = 0; i < Z087_TBD_NUM; i++) { > > + tx_desc[i].flags = READ_ONCE(np->tx_desc[i].flags); > > + tx_desc[i].addr = READ_ONCE(np->tx_desc[i].addr); > > + > > + netdev_info(dev, > > + "%02lx STAT: 0x%04x LEN: 0x%04x ADR 0x%08x\n", > > + i, > > + z87_bd_get_flags(np, &tx_desc[i], 0xffff), > > + z87_bd_get_len(np, &tx_desc[i]), > > + z87_bd_get_addr(np, &tx_desc[i])); > > + } > > + > > + netdev_info(dev, > > + "------------------ RX BDs: -------------------\n"); > > + for (i = 0; i < Z087_RBD_NUM; i++) { > > + netdev_info(dev, > > + "%02lx STAT: 0x%04x LEN: 0x%04x ADR 0x%08x\n", > > + i, > > + z87_rbd_get_flags(np, i, 0xffff), > > + z87_rbd_get_len(np, i), > > + z87_rbd_get_addr(np, i)); > > + } > > + } > > +} > > This seems like debug code. It should not be in a mainline driver. > > > +static void z87_load_mac_addr(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + u8 mac[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; > > + struct sockaddr addr; > > + int res; > > + > > + z87_load_mac(dev, mac); > > + > > + if (is_valid_ether_addr(mac)) { > > + netdev_info(dev, > > + "using MAC %02x:%02x:%02x:%02x:%02x:%02x from registers.\n", > > + mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); > > This driver seems to be quite verbose. Generally, there is maybe one > call to netdev_info() in a driver. Consider change some of these to > netdev_dbg(), or removing them. > > > +static bool z87_rx_bd_errors(struct net_device *dev, unsigned int idx) > > +{ > > + const u16 rx_err_mask = OETH_RX_BD_OVERRUN | OETH_RX_BD_INVSYMB | > > + OETH_RX_BD_DRIBBLE | OETH_RX_BD_TOOLONG | > > + OETH_RX_BD_SHORT | OETH_RX_BD_CRCERR | > > + OETH_RX_BD_LATECOL; > > + struct z87_private *np = netdev_priv(dev); > > + u16 rx_err_flags; > > + > > + rx_err_flags = z87_rbd_get_flags(np, idx, rx_err_mask); > > + if (!rx_err_flags) > > + return false; > > + > > + if (rx_err_flags & OETH_RX_BD_OVERRUN) { > > + netdev_warn(dev, "*** RX: overrun[%u]\n", idx); > > These sorts of prints can spam the log, act as a DoS, if they can be > triggered from a remote device. > > > + DEV_STATS_INC(dev, rx_over_errors); > > The counter should be sufficient. > > > +static int z87_hw_stop(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + unsigned long flags; > > + int res; > > + > > + /* already stopped by a previous failed attempt (napi disabled, phy stopped) */ > > + if (test_bit(__Z87_HW_DEAD, &np->state)) > > + return -EIO; > > + > > + spin_lock_bh(&np->tx_lock); > > + set_bit(__Z87_DOWN, &np->state); > > + spin_unlock_bh(&np->tx_lock); > > + netif_tx_disable(dev); > > + > > + netif_carrier_off(dev); > > + > > + if (dev->phydev) > > + phy_stop(dev->phydev); > > It seems like z87_hw_start() always assumes there is a PHY, or it > errors out. So there is no need for the test. > > > +static int z87_hw_start(struct net_device *dev) > > +{ > > > + res = z87_phy_init(dev); > > + if (res < 0) { > > + netdev_err(dev, "*** PHY Initialization failed!\n"); > > + return res; > > + } > > + > > + phy_start(dev->phydev); > > > > +static int z87_probe(struct mcb_device *mdev, > > + const struct mcb_device_id *id) > > +{ > > + const struct board_config *cfg = NULL; > > + struct net_device *dev = NULL; > > + struct z87_private *np = NULL; > > + void *mem_virt_dma = NULL; > > + dma_addr_t mem_hw_dma; > > + struct resource *mem; > > + int res = -ENXIO; > > + > > + cfg = z87_get_board_config(mdev); > > + if (!cfg) > > + return -EOPNOTSUPP; > > + > > + /** > > + * mdev->inst is defined in a per-board basis, so lets check > > + * if there are more devices that defined for the board. In that > > + * case, something is wrong. > > + */ > > + if (mdev->inst >= cfg->num_devs) { > > + return dev_err_probe(&mdev->dev, -EINVAL, > > + "detected more devices than configured for board: %s", > > + cfg->board_name); > > + } > > Does something actually go wrong if there are more? Yes, It could crash as it tries to access to an array index that does not exist. However I am pretty sure this condition hardly could happens so I just could remove it. > > > + * if more than one Z87 ethernet core is implemented in one PCI function > > + * on one chameleon FPGA, the device port is important for distinct ethernet > > + * device identification during interface renaming via systemd/udev. We start > > + * counting at 1 to have a constant naming scheme; 0 is omitted during renaming > > + */ > > + dev->dev_port = mdev->inst + 1; > > This often goes wrong, if the module can be unloaded, or the device > unbound and bound again. We also see LLM generated patches changing > code like this, because in theory, it cover wrap around and then bad > things happened. The fact it will take years does not stop the script > kiddies using the LLM from submitting the patches. mdev->inst is not a counter, it is a value read by MCB from chameleon table and it identifies the physical Z87 core in the table. It is constant and stable across module reload and unbind/bind. I guess the comment could lead to mistake so I will just rewrite it. > > > diff --git a/drivers/net/ethernet/men/z87/men_z87_phy.c b/drivers/net/ethernet/men/z87/men_z87_phy.c > > new file mode 100644 > > index 000000000000..355eca9a3409 > > --- /dev/null > > +++ b/drivers/net/ethernet/men/z87/men_z87_phy.c > > @@ -0,0 +1,673 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +/* > > + * Copyright (c) 2026 duagon Germany GmbH > > + * > > + * See MAINTAINERS file for support contact information. > > + */ > > + > > +#include > > +#include "men_z87_main.h" > > +#include "men_z87_hw.h" > > +#include "men_z87_phy.h" > > + > > +/* timeout to wait for reply from MII */ > > +#define MII_ACCESS_TIMEOUT 10000 > > + > > +/* The expected values for a Micrel KSZ8041 PHY in the PHY Identifier Register #2 (PHYIDR2). */ > > +#define PHY_ID2_KSZ8041_1 0x1512 > > +#define PHY_ID2_KSZ8041_2 0x1513 > > The MAC driver should not care about what the PHY is. phylib drivers > driver the PHY, the MAC driver should not touch it. > > > +static int z87_mdio_read(struct mii_bus *bus, int addr, int regnum) > > +{ > > + struct net_device *dev = bus->priv; > > + > > + return __mdio_read(dev, addr, regnum); > > Pointless wrapper. > > > +static int dp83822_conf_led(struct net_device *dev, u16 val) > > Sorry, but no. The PHY driver should export the LEDs via > /sys/class/leds. Understood. I would like to agree on this approach. PHY driver dp83822 already implements the mechanism to handle LEDs in the correct way using DT nodes. My hardware (FPGA) is a PCI device that typically runs on x86 so there is DT node for the PCI function, the MCB devices or the PHYs yet. Another solution could be transforming of_phy_led()/of_phy_leds() functions on phy_device to fwnodes thus my driver just could create a subnode describing leds. Please could you help me with that? which could be the best approach? Anyway, both are out of scope of this patch series so for V2 I will just remove the LEDs handling. > > > +static void z87_adjust_link(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + struct phy_device *phydev; > > + bool changed; > > + int res; > > + > > + phydev = np->phy.phydev; > > + > > + if (!phydev) > > + return; > > + > > + changed = (np->phy.link != phydev->link); > > + > > + if (phydev->link) { > > + if (changed || > > + np->phy.speed != phydev->speed || > > + np->phy.duplex != phydev->duplex) { > > + /* > > + * Reconfigure the MAC when relevant parameters change. > > + */ > > + np->phy.speed = phydev->speed; > > + np->phy.duplex = phydev->duplex; > > + res = z87_set_duplex(dev, phydev->duplex); > > + if (res < 0) { > > + netdev_warn(dev, "half duplex not supported. link down\n"); > > Something is broken if you get asked to do half duplex and it is not > supported. > > > +int z87_phy_register_mdio(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + struct mii_bus *bus; > > + int ret; > > + > > + bus = mdiobus_alloc(); > > + if (!bus) > > + return -ENOMEM; > > + > > + bus->name = "men-z87-mdio"; > > + bus->read = z87_mdio_read; > > + bus->write = z87_mdio_write; > > + bus->parent = np->parent; > > + bus->priv = dev; > > + > > + snprintf(bus->id, MII_BUS_ID_SIZE, "phy-%s", dev_name(np->parent)); > > + > > + if (np->phy.phy_addr >= 0 && np->phy.phy_addr < 32) > > + bus->phy_mask = ~BIT(np->phy.phy_addr); > > This condition should never happen. If it does, something is broken, > and you probably want to error out. > > > +int z87_phy_unregister_mdio(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + > > + if (np->phy.mdiobus) { > > Can this be false? > > > + mdiobus_unregister(np->phy.mdiobus); > > + mdiobus_free(np->phy.mdiobus); > > + np->phy.mdiobus = NULL; > > + } > > + > > + return 0; > > +} > > + > > +int z87_phy_connect(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + struct phy_device *phydev; > > + int ret; > > + > > + phydev = mdiobus_get_phy(np->phy.mdiobus, np->phy.phy_addr); > > + if (!phydev) { > > + netdev_err(dev, "PHY not found at MDIO address: %d\n", > > + np->phy.phy_addr); > > + return -ENODEV; > > + } > > + > > + ret = phy_connect_direct(dev, phydev, > > + z87_adjust_link, > > + np->phy.phy_interface); > > + if (ret) { > > + netdev_err(dev, "Unable to connect PHY: %d\n", ret); > > + return ret; > > + } > > + > > + np->phy.phydev = phydev; > > + > > + /* Limit to the actual MAC capability */ > > + phy_set_max_speed(phydev, SPEED_100); > > Do the PHYs actually support > 100Mbps? Generally, this is not > needed. Occasionally you see a Fast Ethernet device using RGMII, > because the PHYs can be cheaper, but it is not common. In that case, > calling phy_set_max_speed() does make sense. > > > +int z87_phy_disconnect(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + > > + if (np->phy.phydev) { > > Can this be false? > > Kernel code generally does not have such tests. If z87_phy_connect() > works, you know you have a PHY, there is no need to do this test. If > z87_phy_connect() fails, z87_phy_disconnect() should never be called. > > So we don't like defensive code like this, it hides bugs. > > > + /* disable powerdown mode */ > > + reg_val = phy_read(dev->phydev, MII_100_BASE_TX_PHY); > > The PHY driver should do this. If it does not, something is broken in > the PHY driver. > > > +static int z87_phy_reset(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + u8 phy_addr = np->phy.phy_addr; > > + unsigned int wait_cnt = 1000; > > + s16 reg_val; > > + int res; > > + > > + phy_read(dev->phydev, MII_BMCR); > > + z87_read32(dev, Z087_REG_MIISTATUS); > > All this code should go. Let phylink/phylib drives the PHY. > > > +int z87_phy_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) > > +{ > > + if (!dev->phydev) > > + return -ENODEV; > > + > > + return phy_mii_ioctl(dev->phydev, ifr, cmd); > > There is a helper which does the dev->phydev test. However, is that > even possible? > > > +} > > + > > +void z87_phy_regdump(struct net_device *dev) > > +{ > > + struct z87_private *np = netdev_priv(dev); > > + const char *link_type; > > + s16 dat = 0; > > + > > + netdev_info(dev, "----- MII Registers -----\n"); > > + netdev_info(dev, "instance\t\t\t0x%02x\n", np->instance); > > + netdev_info(dev, "PHY ADR\t\t\t0x%02x\n", np->phy.phy_addr); > > With the ioctl handler, you can use miitool(1) to dump the PHY > registers. > > Andrew Regards, Javier R.