Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp489618rwo; Fri, 21 Jul 2023 15:37:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlFyc1UI3pvNuNRNBThTGZxG49LrbjBzbqAyApQiPKztVjB53B2XOGsknrRbb6Tt3ciMecXL X-Received: by 2002:a05:6a20:3d26:b0:133:f860:ac42 with SMTP id y38-20020a056a203d2600b00133f860ac42mr3936792pzi.34.1689979071484; Fri, 21 Jul 2023 15:37:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689979071; cv=pass; d=google.com; s=arc-20160816; b=ZF+OW7sNiIzf1luo9Yw0lN2uxDsdIS5Vm+qqn45TMYy7ZB5i9ub9e/fIKsT2Gs7K5R 2xhkwtKyZyDd236net1Dp3tilddK9uJMriZPmqox6pHfzlN3BQwOL+kKpUskf62yuLaw /0IVlYdrBLHKbDysApm+2BijGQSrLMn3FdAzp6jx7IVWtreGPycSZFty911tERxK6vT5 bHYiW86d1kJXDnIZgC8I910iqtlXxN4Vz6eT/KV/HiCEqdWk6Bu7BLEQSc+2giU8Hplg 7xclZZckMUjtAj+8BvoIMAoAsmgT1tmeHnLSBvyQ92npw8hcoW26R25uSoQBTXqU1Pfp HQsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=kRREMhVZIkOsTxTeiVOlXqhLyvXghKDGYzAnM0TfQ5o=; fh=9o/ixfpBdJQQwVGpU5GymN86swCT2TZCVpdZGEeP8vQ=; b=tCj88vCemRkHiAfy5rVnzed+cwF7HpqZOA32HLBn2ZZJ9EWsYxmu/LBm48MsOBsVed Hr0BegA7tYLonA36jzh5zqtViubUYl9460Je3HLi+U6l+nh/chy0H4GZDtFevroOTnrF +BodvtrXpIgla2Th6b0lOyzDPRC+3bkXg+O3WN5ckLYpQU+yUAH8+DpcePxzpwUT89Q9 DzjrlsAHzhGOXFaQqqvRhlAkmdCp/anLAefFaDjtbVK7L0jzF0YIVk6xk2+n+1zrDexP 84w16FKfmhuV/HSVcC5ykJLjZVSqE1uQwkcrvnWB1v6lxfoUsIIKbdDmtMZcMRWLpg/s OcmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="jG/+MLRI"; dkim=pass header.i=@microchiptechnology.onmicrosoft.com header.s=selector2-microchiptechnology-onmicrosoft-com header.b=UTGeTBpG; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k188-20020a633dc5000000b0053ff2b1be42si3957605pga.113.2023.07.21.15.37.18; Fri, 21 Jul 2023 15:37:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="jG/+MLRI"; dkim=pass header.i=@microchiptechnology.onmicrosoft.com header.s=selector2-microchiptechnology-onmicrosoft-com header.b=UTGeTBpG; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229779AbjGUWKD (ORCPT + 99 others); Fri, 21 Jul 2023 18:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjGUWKC (ORCPT ); Fri, 21 Jul 2023 18:10:02 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBC6C2733; Fri, 21 Jul 2023 15:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1689977400; x=1721513400; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=xCaatXyYTu+mgi4yNim5DPgeEZs2qz94ewRXGMC3ocU=; b=jG/+MLRIrxYzxc39RqvN1OmFVJ0xFy573b0//h4sWDkzbvL6oh+2GZR6 X3tf98plvGupux9C6JxjdmdTrURpfyNeQsetQ3rSx4kSZWg878eaoixR5 9JQJhrz34p2KgTN4rY7j/CNFvhiS7qpBcKlwIC7VeWZVNJntAy1sll4mf REYAvEesfoiahJmBt/r7h18C2q4UYMp+LXKO+Ti1ugCAo3vT57DL5q0Pj l/gbcCvbPvhXwljJOvlgvbSyHmXQ04qXq2FDu7n/ZN5VRtbHMhRFo9fFj BP4noFkVhDpqF22K1YEKzBpiu5L5B10GWJgElNt4jMpnVeA2nQY6ERMCk Q==; X-IronPort-AV: E=Sophos;i="6.01,222,1684825200"; d="scan'208";a="224478554" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 21 Jul 2023 15:09:59 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 21 Jul 2023 15:10:00 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Fri, 21 Jul 2023 15:09:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BzkS3dzidU71gaB5dGxLlZ+UwIdeIs/Wwbna/uHy7wbwvLWgeRrgrlktb6ujEPK74JRNtfQBnnew+NKuVji0grvCF92ua9z1KX25Xi/Hg/cG4A0V2t27I6USRfqcJd0xQksygEP/B5hC4EPanpWsbdr0tgeQ1l16IcVVmdii3zAfb2M0cZ/7NwCSBy8OcNiE9AYi5kLfUkEmjfczdPxyuTIuTlDiNB6PiYKl6tqCIf5c9bRJrO6tOZFfNR5lckDqNvBzt11ixRIt/YW0FMfAcLAK04Ziy/K3+rUiXfT13lGc3X+j3yL3BStybFkkDPWT2dNE2Gu6TtwobSi02UwJ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=kRREMhVZIkOsTxTeiVOlXqhLyvXghKDGYzAnM0TfQ5o=; b=ms6sSgozO0JECW2wTpH/DeNvYuOhjN6yJQShfq9iIWkme4A9XkF1V6kh1ws7zbcA55fmDHxEoD5/TvObElUQXwfp33QBJwj1Dco7qcOLRMcaDZkhbl3LvOyfCE+tsNscUb/mfD95o7AvZKaUV2dJCLwoJmPFb4ki+lkDabEXJPpDdVEQ/lhA3R/2jNDNEVCZOYdYC7yrcLAKzqpxe17lhiQZauTCCAk9isKe97k0yvQvYDvKt1EM+N93H4DODvxx/83qdkdwgHYDYOt7QpBIDRgte4zoZIw1aeG9yfz9MRBL4mnrrvlACANKCNDrGYB+Kyvg9bNlXgL2pnRuSLAAUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kRREMhVZIkOsTxTeiVOlXqhLyvXghKDGYzAnM0TfQ5o=; b=UTGeTBpGwzuT5SWrjsnFP9G9t7n+KHXAlUIAiHqDuOrLemMkiW+14ODXmMbNJs1cILRsy0SW/aUIqayqRF9gaa4DzYipHyEmGkoTpMsSpy/LiHJrIrcyTmHbhNeJxxMIKcMjqbxnu+ZVQN8MaT6jBLnTXxGDYQ34jxlEMMPGvrI= Received: from BYAPR11MB3558.namprd11.prod.outlook.com (2603:10b6:a03:b3::11) by CO6PR11MB5585.namprd11.prod.outlook.com (2603:10b6:5:356::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.25; Fri, 21 Jul 2023 22:09:58 +0000 Received: from BYAPR11MB3558.namprd11.prod.outlook.com ([fe80::4d01:8ebd:2fc2:b27e]) by BYAPR11MB3558.namprd11.prod.outlook.com ([fe80::4d01:8ebd:2fc2:b27e%5]) with mapi id 15.20.6609.024; Fri, 21 Jul 2023 22:09:57 +0000 From: To: CC: , , , , , , , , , , , , , , , , , Subject: RE: [PATCH net-next v2 6/6] net: dsa: microchip: ksz9477: make switch MAC address configurable Thread-Topic: [PATCH net-next v2 6/6] net: dsa: microchip: ksz9477: make switch MAC address configurable Thread-Index: AQHZu9sdBwmlpMS6ZUOBzMfaJAqtQK/Exicg Date: Fri, 21 Jul 2023 22:09:57 +0000 Message-ID: References: <20230721135501.1464455-1-o.rempel@pengutronix.de> <20230721135501.1464455-7-o.rempel@pengutronix.de> In-Reply-To: <20230721135501.1464455-7-o.rempel@pengutronix.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microchip.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BYAPR11MB3558:EE_|CO6PR11MB5585:EE_ x-ms-office365-filtering-correlation-id: 072b2707-a371-4bb6-b2dd-08db8a37384b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3B4HNoNMfQqeH8WsNniQNGywErP1MtoL4AiyDc7Oq0SZv4szLU45UdHgCqell2g7GSakApvRKsrq/k/J8Q5C9VvWvvmDdiqBRhq2WniRn88lGKipP4028aUZwLwnmqlBHDFN9eeqE61s3PeF1XlAV+IiYzGcmx9+mwJwc1p10TsbY+GQnizOxaWELy9dH90PL5EuWxQUoDHVtdpzooihQJKjPeArvwFB2W3X7cl8vDOGnCFcoYroFUXz0L4EusD3v82DJNp676mbDlSm843zVmvhA1ZTYQ6mrFjwsYrIcV1MU34RngD6J7I8JxjDG0a5gZ/3s9JHLO1+gUYyOlbWN5y53vcm+trSp7OPwqcfxT7u/zOggwnORPf8dK/CEkJaxZ5wjVcfNvCoVZDRgK0EEGDQBF37gbms6xQCwuCHC92HfR4REUmOAmVG1/HzynmqgDI0yJEUC4bpQ/bNKk+4KXzmIPmNb3bUkuknsqbtlhVBOVsMZgLk3WKsE7TPNuWoyMmsPSAkIPdiHtaRcUfIz6mnpVfC5FGgyJ5oE56pEae7bimzn6AMQjTwWMXpnylHVXtH4x7VfqnH2o6d9PHdlw5VXfm7Ci8cITAUTFCxZ2aAPfOpCaHXSuC0Ih7cpifZ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3558.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(39860400002)(136003)(396003)(376002)(366004)(451199021)(38070700005)(2906002)(4744005)(122000001)(38100700002)(55016003)(6916009)(26005)(66446008)(66556008)(66946007)(66476007)(4326008)(64756008)(76116006)(186003)(316002)(5660300002)(6506007)(7696005)(52536014)(41300700001)(9686003)(54906003)(33656002)(478600001)(86362001)(8936002)(71200400001)(8676002)(7416002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RvysyXj87K9NRcXVcG+YK9lnJ/ALzQiNMfV6aKTyR91Q4RfdPOM9XUZR6RFU?= =?us-ascii?Q?qLpIgTYwQPGuNFgpdPx2/cqqy8JhC2RtNgfg30OiVvat3ra8LdcY0NhEYATS?= =?us-ascii?Q?TnBGTidcaahEt4BiiyQwo4XKQwenr2Yfg0iK1vpk/t5DUTKAzqCtb/wzhvGA?= =?us-ascii?Q?G7Meq9CI6yOagc4vyD7ShmKYZnGASMFhf3kLLtJ2N8HaDoDY3VcBBxuZlDJl?= =?us-ascii?Q?4mCiDkY6AHxG/DOjm3mzJWtzzghYG+qn1MwN0LhVZUrqDdYBwv/27IV+Akst?= =?us-ascii?Q?bxlMIj0jz7GvA/yOStKC9BTvIIGfj83qgtIFx/EZ5oHAYDpGA2MTET4q7gI5?= =?us-ascii?Q?nCOjEPD3ul24j5ja9EF1KwgisKqSqBtA18WARJl9n8NpR/rFc3znBLJ0pkKv?= =?us-ascii?Q?51oSPBrBzsXbvexa11ZHIvXzZ2sbo5rmAW5SO0QKwopeGyzDOYCfhjZveo0N?= =?us-ascii?Q?JG+FBG6NWHwsvY4ih6A+v0kIiAcDbu6+b9oO0TN8REQ6CLB+AkurCfBqL7KP?= =?us-ascii?Q?w98wt2oqkeEdXx9HYBizGICAo4Qsa2mBfCj0K5l4uLUvR7eN+m4DQyKQtJBA?= =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HpBc37i0KBI0d2pjOcdS+1EpG?= =?us-ascii?Q?cDGLbbA9Or9LX4CzZ3rR3zzRYXHKiC0xuB0MbNbfxONx7tKsqP7bRSXLa/47?= =?us-ascii?Q?BSo3+9bxctbSj6NUvn1cCoINpqWcHXzruqVGiqlq?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3558.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 072b2707-a371-4bb6-b2dd-08db8a37384b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jul 2023 22:09:57.5028 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jJrToid+kold4yyA4XpHyFrZRSkXqingxoLbqb5STKPuHE3W/yYmdbiTANVm0ROP2bBRMIgquS+zmciZULQ3Ylj1bd24ogw4/KJILF2Kyrk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR11MB5585 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > The switch MAC address is used for sending pause frames and for Wake on M= agic > Packet. So, make use of local-mac-address property in the switch node > root and configure it in the HW. > > @@ -1211,6 +1211,14 @@ int ksz9477_setup(struct dsa_switch *ds) > if (dev->wakeup_source) > ksz_write8(dev, REG_SW_PME_CTRL, PME_ENABLE); >=20 > + if (is_valid_ether_addr(dev->mac_addr)) { > + int i; > + > + for (i =3D 0; i < ETH_ALEN; i++) > + ksz_write8(dev, REG_SW_MAC_ADDR_0 + i, > + dev->mac_addr[i]); > + } > + > + > + mac =3D of_get_property(dev->dev->of_node, "local-mac-add= ress", > + NULL); > + if (mac) > + memcpy(dev->mac_addr, mac, ETH_ALEN); =20 So the Magic Packet uses the same MAC address for all KSZ9477 switches if local-mac-address is not defined. Is that practical in real operating environment? The DSA driver used to have an API to set the MAC address to the switch, but it was removed because nobody used it.