get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2218086/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2218086,
    "url": "http://patchwork.ozlabs.org/api/patches/2218086/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260331113025.1566878-4-wei.fang@nxp.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260331113025.1566878-4-wei.fang@nxp.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260331113025.1566878-4-wei.fang@nxp.com/",
    "date": "2026-03-31T11:30:14",
    "name": "[v4,net-next,03/14] net: enetc: add pre-boot initialization for i.MX94 switch",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "263fa24dbd7e6888e7b39460720ca548859fafe4",
    "submitter": {
        "id": 84380,
        "url": "http://patchwork.ozlabs.org/api/people/84380/?format=api",
        "name": "Wei Fang",
        "email": "wei.fang@nxp.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260331113025.1566878-4-wei.fang@nxp.com/mbox/",
    "series": [
        {
            "id": 498181,
            "url": "http://patchwork.ozlabs.org/api/series/498181/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=498181",
            "date": "2026-03-31T11:30:11",
            "name": "Add preliminary NETC switch support for i.MX94",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/498181/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218086/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218086/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19068-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256\n header.s=selector1 header.b=OVH02gLz;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19068-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=pass smtp.remote-ip=\"2a01:111:f403:c201::3\" arc.chain=microsoft.com",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256\n header.s=selector1 header.b=OVH02gLz;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=permerror (SPF Permanent Error: Void lookup limit of 2 exceeded)\n smtp.mailfrom=nxp.com (client-ip=2a01:111:f403:c201::3;\n helo=as8pr04cu009.outbound.protection.outlook.com;\n envelope-from=wei.fang@nxp.com; receiver=lists.ozlabs.org)",
            "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nxp.com;"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flQqz3B7dz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 22:29:19 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4flQqf1FWXz2ypm;\n\tTue, 31 Mar 2026 22:29:02 +1100 (AEDT)",
            "from AS8PR04CU009.outbound.protection.outlook.com\n (mail-westeuropeazlp170110003.outbound.protection.outlook.com\n [IPv6:2a01:111:f403:c201::3])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange secp256r1 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4flQqc6RVCz2ynH\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 31 Mar 2026 22:29:00 +1100 (AEDT)",
            "from AM8PR04MB7284.eurprd04.prod.outlook.com (2603:10a6:20b:1dc::8)\n by PA1PR04MB11406.eurprd04.prod.outlook.com (2603:10a6:102:4f1::22) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.15; Tue, 31 Mar\n 2026 11:28:52 +0000",
            "from AM8PR04MB7284.eurprd04.prod.outlook.com\n ([fe80::9cd6:51bd:82b:98dc]) by AM8PR04MB7284.eurprd04.prod.outlook.com\n ([fe80::9cd6:51bd:82b:98dc%5]) with mapi id 15.20.9745.027; Tue, 31 Mar 2026\n 11:28:52 +0000"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774956542;\n\tcv=pass;\n b=cJ4hmeRGCN57t0xmriIfGnI0o94lxIJHpqk47sCoEDJ9Zgn1z2VVP0LRKVJemOD8deQM3wyywcMfCrturBfjLT37fkcplfznYskCC2T0iiXFMnLlLEWuSKArHHJ+UcKMKjdzm3d1ssMqg97T18fYwl6yAZapQB7dc7Qxy0dBEuVfZXnlK6AB55CxV73rbE34tjNUk4ZZTm6/akneL/ngAJmngwsnVL7Jky2cXnP1Pw4vrav8Hwkf6rvxJZDZ+txY06o0Auh9MXGbdbVb2aePpzdbKy3dThy3/WFiqL+m/RUHeE63GU/4GBvG09nbXMLMWN8KkK3xi8IzWCVWmUMZoQ==",
            "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=igtjQjjq5KtBHWH23nvChnXmKKNq2s8qj45gGryelrCyEtmHXDgd3FGq9KlC/DVABF38FQSFRj76zgNhxaAjiVc3rUtFpHQ0EB+pklMiyZtWuSioHOQEZNDA1IobUE4yezydmwmfhMTy/EGSg/m1YD8ARnybE1CTOPrkDre9zJtf+/O5/5SFViPOp4WMxq4z/1qbpld7GayIjrLMrPPN9spkoqX+G+xGtYZZgGRtqsi6nMSOW8Yq88JLFBpakUccd15PAcfm+HVJxlzrvaxvEzK4A+pUs44E3rpcHtaHqsTcYKtusqg5znZbs7Bcr61mkv6rCgwOawpEfLnDjAr9rg=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774956542; c=relaxed/relaxed;\n\tbh=tziJeOEw/BS+e7YU+4V7x/VXYezCf1g2NlxkGwA58ng=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=N6REgd4P2THoewgmNpo8FwSnjqvIE7EXuVxOr9Pg/d5X/3dBogjsnnXffCYk0QkRLS6fM3j7oOIQf9dsgwUcIJr07MCzWe4aqdmTX8fw3VP8dOn2hFT/uumDKFU95f8Vmk6syrdKRvTDJPZgsAuV8y11WYlkNSBUlUhaJgvtgKtCR5hX244DqtoNaXLi91Ugx/MC4+egCSKDwnbitH4ExJEfAsoox3P6DnHl8OQTbx19MHWRQaWg4VrwTzwvGlAFNVn1szUA0P6R/PbNwQcKnJg4BeXruSt1H77yCH+6KPvODGmOVmTod24DXCh8Ws7E0aR4cMyKeb1otT1x1fQw7g==",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=tziJeOEw/BS+e7YU+4V7x/VXYezCf1g2NlxkGwA58ng=;\n b=quQ6utFdeKMJdV244JrEJ+QIV3EvxbxU3cw+MS/J1z55yp+oBiyQn/dWaSeciVRKQ8AgxTlQLOInPOthJmIYGpDWXNn5eUQNFPc6ig8Kh1AUs1yPSrC1sXhBwgQ9yeZbaFg0aOBXll6vjytPUmwqIExZqS8PjymYaaUDbaPKe6FPyiv/IcCYJyJG2Kwoq+OgMh3j/hbuTveIXcY0gQxbulbYGcKvAHu+5KH7VKYK3EIIGTWwE2a0J8oqYo2nO+osYv9pAmwbk6P5Eicm3GC/PlmWZd0ZJlsbamLtZULbokA1a2+lr6x04zUjTUwC0PDnZ+QD1dK3QrY6wzXuwVhLtQ=="
        ],
        "ARC-Authentication-Results": [
            "i=2; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com; dkim=pass (2048-bit key;\n unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256\n header.s=selector1 header.b=OVH02gLz; dkim-atps=neutral;\n spf=permerror (client-ip=2a01:111:f403:c201::3;\n helo=as8pr04cu009.outbound.protection.outlook.com;\n envelope-from=wei.fang@nxp.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=nxp.com",
            "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass\n header.d=nxp.com; arc=none"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=tziJeOEw/BS+e7YU+4V7x/VXYezCf1g2NlxkGwA58ng=;\n b=OVH02gLz1xX/VRqqWoHb3qk1Vas2qnncuuG8Lo+99oX8YYxb+A4p4ARx5+DCpGWAxPCoEj3vs4ndczujcwuJFGAF0KMSEX7i/vfiIcFb/3UE0T7C6xKzVjFF1QW/NrLXbLSmFVr6WKHy/rgeV50FwOHrXETgrBmg0Uf4/zwRaTa1Xw+7jSkKiOiNQ+kV8YCgcXr/sTsapdkLfcbJy38HG1yRoKo+ZnoigbeGT5r6gP5IRAPpjddjJvo/ffKz5cmTUefQTqfM33z6+DX6A36z7KplhurxPtCuprqK1nKWoADJb7yQMJb8Ly8qVlU5Uem/9FBEWt8GKPjzoX5gx/6qGw==",
        "From": "Wei Fang <wei.fang@nxp.com>",
        "To": "claudiu.manoil@nxp.com,\n\tvladimir.oltean@nxp.com,\n\txiaoning.wang@nxp.com,\n\tandrew+netdev@lunn.ch,\n\tdavem@davemloft.net,\n\tedumazet@google.com,\n\tkuba@kernel.org,\n\tpabeni@redhat.com,\n\trobh@kernel.org,\n\tkrzk+dt@kernel.org,\n\tconor+dt@kernel.org,\n\tf.fainelli@gmail.com,\n\tfrank.li@nxp.com,\n\tchleroy@kernel.org,\n\thorms@kernel.org,\n\tlinux@armlinux.org.uk,\n\tandrew@lunn.ch",
        "Cc": "netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\timx@lists.linux.dev",
        "Subject": "[PATCH v4 net-next 03/14] net: enetc: add pre-boot initialization for\n i.MX94 switch",
        "Date": "Tue, 31 Mar 2026 19:30:14 +0800",
        "Message-Id": "<20260331113025.1566878-4-wei.fang@nxp.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20260331113025.1566878-1-wei.fang@nxp.com>",
        "References": "<20260331113025.1566878-1-wei.fang@nxp.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "MA5P287CA0151.INDP287.PROD.OUTLOOK.COM\n (2603:1096:a01:1d7::14) To AM8PR04MB7284.eurprd04.prod.outlook.com\n (2603:10a6:20b:1dc::8)",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "AM8PR04MB7284:EE_|PA1PR04MB11406:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "a72505c6-10e0-4c17-1c34-08de8f18af62",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|19092799006|376014|52116014|366016|7416014|1800799024|18002099003|56012099003|22082099003|38350700014|921020;",
        "X-Microsoft-Antispam-Message-Info": "\n\taSKs0LFoo2SE6IFibvkF4TIvUlGB4BxFnsm85kaI6VrcRlHpy7rdQHpGOvy352T56tJuhOUw7+dDuQ/h517rWvzO/nOFj8C86OH+MGhYn9H8NLjdMxBWQNmsTKzWmAA89qCisaoMzzXRV5wnhXz3dhmTdyh9VC8Z8FHgo5slYtDCDjeBTh27h4bcrrJ7v219wM0fsMFPEGdEeOaJw2VK9dC+6uAklv94n8P22iWXO3M0XWljZTFGiaYHzziTirulsyjsKKDtKYMKxRCzCSXvg1taxeVGx2MDLbqCjW8vXxnxLe7lh6Fminh9iABVeNwds4tJoEEUuo3YefXYfEujInCAf5ptd/nGQaxe8GphnN+4a1OULVdJuF8B7WxTfHeVxByax2XsX81GFUulfsDPV47eUyyZbE6utQ/BqfKOVRMbIKsWbRzNfUTX6rnpY+xXu3SNBc9B3w302y6m+jUfiXgKUhotKypj74Hc1hYFHT2t0nXUm0AoOs895u862vgDweRRYPZjv9oNnUtVnJwD83lYvh8qQUluSWmgYyOZmh3IRVszmxvmOGJAGVhyWGH2MBZkIHsnFYsFjRWBqGDsbUA0yDcqSUzaqdxQ9SAGdO7X2pMFrXzLER5IPQF7W420cz73pehmcRULacjd+lcqSxBOMyH7UpN7TdjTliwJq6xVtozh0HUih+Y7bWaP75untSwD8Fv5FJACGNeZVIfpYMU6gzSudiArVY3i0f9P2LcSeqf282g2BykHWnPZnoDJj2McELMC2BqNOXv8t9B4WKXhxDjXVFCfP8a0tAwU3y4suIWV7KuXySDvbFeMVGkM",
        "X-Forefront-Antispam-Report": "\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM8PR04MB7284.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(19092799006)(376014)(52116014)(366016)(7416014)(1800799024)(18002099003)(56012099003)(22082099003)(38350700014)(921020);DIR:OUT;SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n NxNS69CGIeWWAFaoHpCr4aiWwlWnzw78YsUPwIJYDkCgAUzOt3Tf+pHHRogFTTnCxw4CndLULOAEp2SHmTcSNNppi0wOLdUqVJtHSW30VBxxvH+9lNKrv6hbBKBwroXAxNCwTfmNDawUBgpXpZVOy6EXxf3QAk5qJ3jhZIjBhXkOJ1Q717hMkpBaIhlhl9OK4UBjVLofWYFbFxieytyBnxLd4lnhvE+AyVZH0TR6pNM39ytvojCCk0IKOVTl/oqGoW7JKTRKcdcI9/K63ehQI1gUKWV32/VBxoiIBFrKtmGGTeR7RgA+fRZxc/oiiTnwYlu9wKTi0O0FIECVxX0wItxmd8+Q7IhQLRysUugVz096iaRO6+OGKsD/IIxxmZi50uCPwOCkg8T+Q8xWkhJuuBsk0L1z0KhQad3fGapD3HGJgAypmPpy0nmDb64p/hpE2JcHHe1wzoV727eyzlfL59dUK0IACKKfvemuIny8ij8Kvq22FklOopAPuUMjzP1+wo1vhL4+AT8VGBdmuY4mORZpxv/YgZBilsu+d0Lu48xiIkia+sf/uwAlSR6pLtU1zMwp+sAWqDHcZlv8NJ3gUA5zFFy5wh6rF+F1kaZA4IrruuEpP0kAj1/5Kx7qP1mQ1v9JlOZCMPecQNX4lxQDJ9j9qSVtcCbRrWkTIyfkBihPeY3OXYFQkRkCnHW8bd5kdS1wrJbpn2GP8GlOzHa/1ba92f/Lc9af7w/GCqhwHmNNnCIXq0CE79LSkxihbkkUssS0qn7+tYx8IHObIcqhhO8CjBu8iKKOPuQc2bBRHtonwwGUOTjrJKPKCH2zz0a/LV+PwjSPgId8zfZkPeb5Z1LWeYFh6odLAi4SWXnHI9YDbC/LiPIaWfH+CKCda7g/sON7Sfg7TgZCuUfOFpVl0V0FeQj4bq7IeviAM7uguj5r1eNZPf56jjZV0gyHA9EgKdoD4UZ4oYxzDfQ72FD5yhGGYbjaA+RsmWSzeD9Oxzf3ouEuocF5/sw0wWr2dWCKhb4G1O2x1p5AOe5ePzsGgs3Bo+qddabkHnPtqYYfLedNyfCEYk1F/nvVeZa8E7ROHBsuzCLdGJypi1oymFriaGgAw4lWQIk1WAcgCRig9A7sVVvB9OZl8VjY1KWo9QY5ZR2MHpWznOcWLKJnOgn7pSyZC/yN3/Ge/LAFRcfKkJ8Hrs7nihpV4O4Ur8lefqROuDAQQ60rPNIIQANqg7PPDoXCdfrLmAFSqvFXw0yEa4SrEDCL5mWDn3TmezQiGxxdHzwbJvSrDCQPU7lqrfvJy3fOi9J6xImEn4bj8L5WCUidY2FJOPhG3dbWVpEaecn7NgDjGcZ46S6rL4hfzZ2Zp3sPqwzlxRz3qeSz0YFQs1XH6rWPQQ4NGilSbo/w9sQN++cQoQuiuJtvPV6Bo5VayR+7woNHfuo2GGllVQsTLdKUqccmQauTSc8CUvf+JxSk7cB5wScy1CtN8XV1wUY+z4Kp5G1n0E6sXqOJf+rrgTb+YaiJfgER9+mLv3lFF+TuuJyAprhPvZVvfu6NK3ID5cOi0+IUk6WIyo/USPgwnBXSTpard1mfxiy0rew7e0ySXOzsj3ZGsWEAmRJ3e+ks96Fc7i9xFf2Ys1iktDS0UlAQ8iEd9hRm3ewTLMeXegU65rfgcX9z9aMwxlcxjJkMAsBFHRfaDtyrZYnB52teEchwJeFEL8VaYx8RPlXm+E0m",
        "X-OriginatorOrg": "nxp.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n a72505c6-10e0-4c17-1c34-08de8f18af62",
        "X-MS-Exchange-CrossTenant-AuthSource": "AM8PR04MB7284.eurprd04.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "31 Mar 2026 11:28:51.9497\n (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "686ea1d3-bc2b-4c6f-a92c-d99c5c301635",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n SETRupl9bg4yfUY1+eqZdZeh9flADfUN+GxO6krcWiXhu+j480jBrI5xUOkg8PMeP1dRj0jjzbIVNjpuh21jQg==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PA1PR04MB11406",
        "X-Spam-Status": "No, score=0.8 required=3.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,\n\tSPF_HELO_PASS,T_SPF_PERMERROR autolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "Before probing the NETC switch driver, some pre-initialization needs to\nbe set in NETCMIX and IERB to ensure that the switch can work properly.\nFor example, i.MX94 NETC switch has three external ports and each port\nis bound to a link. And each link needs to be configured so that it can\nwork properly, such as I/O variant and MII protocol.\n\nIn addition, the switch port 2 (MAC 2) and ENETC 0 (MAC 3) share the same\nparallel interface, they cannot be used at the same time due to the SoC\nconstraint. And the MAC selection is controlled by the mac2_mac3_sel bit\nof EXT_PIN_CONTROL register. Currently, the interface is set for ENETC 0\nby default unless the switch port 2 is enabled in the DT node.\n\nLike ENETC, each external port of the NETC switch can manage its external\nPHY through its port MDIO registers. And the port can only access its own\nexternal PHY by setting the PHY address to the LaBCR[MDIO_PHYAD_PRTAD].\nIf the accessed PHY address is not equal to LaBCR[MDIO_PHYAD_PRTAD], then\nthe MDIO access initiated by port MDIO will be invalid.\n\nSigned-off-by: Wei Fang <wei.fang@nxp.com>\n---\n .../ethernet/freescale/enetc/netc_blk_ctrl.c  | 188 ++++++++++++++++--\n 1 file changed, 166 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c b/drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c\nindex 92a0f824dae7..c21230f7a7fb 100644\n--- a/drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c\n+++ b/drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c\n@@ -261,40 +261,112 @@ static int imx94_link_config(struct netc_blk_ctrl *priv,\n }\n \n static int imx94_enetc_link_config(struct netc_blk_ctrl *priv,\n-\t\t\t\t   struct device_node *np)\n+\t\t\t\t   struct device_node *np,\n+\t\t\t\t   bool *enetc0_en)\n {\n \tint link_id = imx94_enetc_get_link_id(np);\n \n \tif (link_id < 0)\n \t\treturn link_id;\n \n+\tif (link_id == IMX94_ENETC0_LINK && of_device_is_available(np))\n+\t\t*enetc0_en = true;\n+\n \treturn imx94_link_config(priv, np, link_id);\n }\n \n+static struct device_node *netc_get_switch_ports(struct device_node *np)\n+{\n+\tstruct device_node *ports;\n+\n+\tports = of_get_child_by_name(np, \"ports\");\n+\tif (!ports)\n+\t\tports = of_get_child_by_name(np, \"ethernet-ports\");\n+\n+\treturn ports;\n+}\n+\n+static int imx94_switch_link_config(struct netc_blk_ctrl *priv,\n+\t\t\t\t    struct device_node *np,\n+\t\t\t\t    bool *swp2_en)\n+{\n+\tstruct device_node *ports;\n+\tint port_id, err = 0;\n+\n+\tports = netc_get_switch_ports(np);\n+\tif (!ports)\n+\t\treturn -ENODEV;\n+\n+\tfor_each_available_child_of_node_scoped(ports, child) {\n+\t\tif (of_property_read_u32(child, \"reg\", &port_id) < 0) {\n+\t\t\terr = -ENODEV;\n+\t\t\tgoto end;\n+\t\t}\n+\n+\t\tswitch (port_id) {\n+\t\tcase 0 ... 2: /* External ports */\n+\t\t\terr = imx94_link_config(priv, child, port_id);\n+\t\t\tif (err)\n+\t\t\t\tgoto end;\n+\n+\t\t\tif (port_id == 2)\n+\t\t\t\t*swp2_en = true;\n+\n+\t\t\tbreak;\n+\t\tcase 3: /* CPU port */\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\terr = -EINVAL;\n+\t\t\tgoto end;\n+\t\t}\n+\t}\n+\n+end:\n+\tof_node_put(ports);\n+\n+\treturn err;\n+}\n+\n static int imx94_netcmix_init(struct platform_device *pdev)\n {\n \tstruct netc_blk_ctrl *priv = platform_get_drvdata(pdev);\n \tstruct device_node *np = pdev->dev.of_node;\n+\tbool enetc0_en = false, swp2_en = false;\n \tu32 val;\n \tint err;\n \n \tfor_each_child_of_node_scoped(np, child) {\n \t\tfor_each_child_of_node_scoped(child, gchild) {\n-\t\t\tif (!of_device_is_compatible(gchild, \"pci1131,e101\"))\n-\t\t\t\tcontinue;\n-\n-\t\t\terr = imx94_enetc_link_config(priv, gchild);\n-\t\t\tif (err)\n-\t\t\t\treturn err;\n+\t\t\tif (of_device_is_compatible(gchild, \"pci1131,e101\")) {\n+\t\t\t\terr = imx94_enetc_link_config(priv, gchild,\n+\t\t\t\t\t\t\t      &enetc0_en);\n+\t\t\t\tif (err)\n+\t\t\t\t\treturn err;\n+\t\t\t} else if (of_device_is_compatible(gchild,\n+\t\t\t\t\t\t\t   \"pci1131,eef2\")) {\n+\t\t\t\terr = imx94_switch_link_config(priv, gchild,\n+\t\t\t\t\t\t\t       &swp2_en);\n+\t\t\t\tif (err)\n+\t\t\t\t\treturn err;\n+\t\t\t}\n \t\t}\n \t}\n \n-\t/* ENETC 0 and switch port 2 share the same parallel interface.\n-\t * Currently, the switch is not supported, so this interface is\n-\t * used by ENETC 0 by default.\n+\tif (enetc0_en && swp2_en) {\n+\t\tdev_err(&pdev->dev,\n+\t\t\t\"Cannot enable swp2 and enetc0 at the same time\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* ENETC 0 and switch port 2 share the same parallel interface, they\n+\t * cannot be enabled at the same time. The interface is set for the\n+\t * ENETC 0 by default unless the switch port 2 is enabled in the DTS.\n \t */\n \tval = netc_reg_read(priv->netcmix, IMX94_EXT_PIN_CONTROL);\n-\tval |= MAC2_MAC3_SEL;\n+\tif (!swp2_en)\n+\t\tval |= MAC2_MAC3_SEL;\n+\telse\n+\t\tval &= ~MAC2_MAC3_SEL;\n \tnetc_reg_write(priv->netcmix, IMX94_EXT_PIN_CONTROL, val);\n \n \treturn 0;\n@@ -610,6 +682,77 @@ static int imx94_enetc_mdio_phyaddr_config(struct netc_blk_ctrl *priv,\n \treturn 0;\n }\n \n+static int imx94_ierb_enetc_init(struct netc_blk_ctrl *priv,\n+\t\t\t\t struct device_node *np,\n+\t\t\t\t u32 phy_mask)\n+{\n+\tint err;\n+\n+\terr = imx94_enetc_update_tid(priv, np);\n+\tif (err)\n+\t\treturn err;\n+\n+\treturn imx94_enetc_mdio_phyaddr_config(priv, np, phy_mask);\n+}\n+\n+static int imx94_switch_mdio_phyaddr_config(struct netc_blk_ctrl *priv,\n+\t\t\t\t\t    struct device_node *np,\n+\t\t\t\t\t    int port_id, u32 phy_mask)\n+{\n+\tint addr;\n+\n+\t/* The switch has 3 external ports at most */\n+\tif (port_id > 2)\n+\t\treturn 0;\n+\n+\taddr = netc_get_phy_addr(np);\n+\tif (addr < 0) {\n+\t\tif (addr == -ENODEV)\n+\t\t\treturn 0;\n+\n+\t\treturn addr;\n+\t}\n+\n+\tif (phy_mask & BIT(addr)) {\n+\t\tdev_err(&priv->pdev->dev,\n+\t\t\t\"Found same PHY address in EMDIO and switch node\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tnetc_reg_write(priv->ierb, IERB_LBCR(port_id),\n+\t\t       LBCR_MDIO_PHYAD_PRTAD(addr));\n+\n+\treturn 0;\n+}\n+\n+static int imx94_ierb_switch_init(struct netc_blk_ctrl *priv,\n+\t\t\t\t  struct device_node *np,\n+\t\t\t\t  u32 phy_mask)\n+{\n+\tstruct device_node *ports;\n+\tint port_id, err = 0;\n+\n+\tports = netc_get_switch_ports(np);\n+\tif (!ports)\n+\t\treturn -ENODEV;\n+\n+\tfor_each_available_child_of_node_scoped(ports, child) {\n+\t\terr = of_property_read_u32(child, \"reg\", &port_id);\n+\t\tif (err)\n+\t\t\tgoto end;\n+\n+\t\terr = imx94_switch_mdio_phyaddr_config(priv, child,\n+\t\t\t\t\t\t       port_id, phy_mask);\n+\t\tif (err)\n+\t\t\tgoto end;\n+\t}\n+\n+end:\n+\tof_node_put(ports);\n+\n+\treturn err;\n+}\n+\n static int imx94_ierb_init(struct platform_device *pdev)\n {\n \tstruct netc_blk_ctrl *priv = platform_get_drvdata(pdev);\n@@ -625,17 +768,18 @@ static int imx94_ierb_init(struct platform_device *pdev)\n \n \tfor_each_child_of_node_scoped(np, child) {\n \t\tfor_each_child_of_node_scoped(child, gchild) {\n-\t\t\tif (!of_device_is_compatible(gchild, \"pci1131,e101\"))\n-\t\t\t\tcontinue;\n-\n-\t\t\terr = imx94_enetc_update_tid(priv, gchild);\n-\t\t\tif (err)\n-\t\t\t\treturn err;\n-\n-\t\t\terr = imx94_enetc_mdio_phyaddr_config(priv, gchild,\n-\t\t\t\t\t\t\t      phy_mask);\n-\t\t\tif (err)\n-\t\t\t\treturn err;\n+\t\t\tif (of_device_is_compatible(gchild, \"pci1131,e101\")) {\n+\t\t\t\terr = imx94_ierb_enetc_init(priv, gchild,\n+\t\t\t\t\t\t\t    phy_mask);\n+\t\t\t\tif (err)\n+\t\t\t\t\treturn err;\n+\t\t\t} else if (of_device_is_compatible(gchild,\n+\t\t\t\t\t\t\t   \"pci1131,eef2\")) {\n+\t\t\t\terr = imx94_ierb_switch_init(priv, gchild,\n+\t\t\t\t\t\t\t     phy_mask);\n+\t\t\t\tif (err)\n+\t\t\t\t\treturn err;\n+\t\t\t}\n \t\t}\n \t}\n \n",
    "prefixes": [
        "v4",
        "net-next",
        "03/14"
    ]
}