From patchwork Thu Feb 22 15:38:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Karumanchi, Vineeth" X-Patchwork-Id: 204823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp24347dyb; Thu, 22 Feb 2024 07:42:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWNDQ2kl3PMt5lfqPTDOODTaezYy+YCHYbXfKEERMaAbJcRFI01KlVvHWZW713AaG9VOAliwNpWcyj578xw6uCmIDAIHA== X-Google-Smtp-Source: AGHT+IEZCESSDrz+QT3YCOP6mgXW960KfdIfXY1x19p3pDp/LiHlCbqvL43MCand6Q7P2fWaJvyR X-Received: by 2002:a05:6870:b24e:b0:21e:5bca:82b7 with SMTP id b14-20020a056870b24e00b0021e5bca82b7mr22394643oam.25.1708616525562; Thu, 22 Feb 2024 07:42:05 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y187-20020a638ac4000000b005dc905460d2si10115567pgd.233.2024.02.22.07.42.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:42:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76789-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="keKtKI/3"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-76789-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76789-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C7CADB25C08 for ; Thu, 22 Feb 2024 15:39:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C739B15098D; Thu, 22 Feb 2024 15:39:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="keKtKI/3" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2047.outbound.protection.outlook.com [40.107.223.47]) (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 DD8FF14E2C1; Thu, 22 Feb 2024 15:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616348; cv=fail; b=uogPUzSJ4iYK8T2Wcn+jzJt7wRtMrwP3Vu0Czr36xYiqG9NCCy7QKZuDxWeYxHtnspKlSSW76STHTDZvmZx+MAfzetZBbDenWPxCLZGWQpT9+X2H9YIa55v/SyWW2Z18c8MKmgcNHAht451gbR/ABAgwxcy8uYW/ZGLRrMaWdE4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616348; c=relaxed/simple; bh=pVgDWY7Vh3oh0pn7BCdgxn5a1A4hpSLzYjWaE6znHuQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nXAltRsV3kfVxy3YeGz0+r+oIwmM7rKLekSgnfLFH1XAQeApbW8eyPs5YEMaFClMxby8bhwOcwIraYllcPnu+UpWs+H+QR8jYcfAvIuGKAlnIbJPawp0bwe3dSjON+fH+GeSfs3ehPDXrGcaRBMOawaDIZMDCwPYitMUqD1QRvE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=keKtKI/3; arc=fail smtp.client-ip=40.107.223.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NWfnovSjWeoXuP4/jqljzMBmjbCAsTOnRf5wRc+UNqlRKSILMZk1TiUNudyDwsgLCyNVeXRHana8ls1UXHETCp/vuyvFh/WlclTAlJ1d+jzh81ki6vwqVBsNslnnEMi4RVfzcWmxI7BYBlLPPXXx7I6RRkU12fY/+TCreQtTXXiRfivXY3Pm3zWCq0R+hOmC44nglegN6SZIPBEhlgzi3xJF8M6fy/ymdkqQKeKvQhazHKYA3Xb9ZVryWcmBh7SVeKm3JLYt/28nk3yeFiRaqy3lf8aq7dgk/wrNR9i18LIPn6XfSIzNg2izOB4ilYGpSAfvgcHBxRGYwZuyn3heQw== 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=hsoY10WdZw6+Rl0HTPa8ePLCVGbbC6QEqqiTEj/qlTA=; b=SDNTc3c4Fsg2ZONFLn3pzWQzrNQzvdDuLnTK/sCtoxj2knxfak1DSUlng+KX90swRcj343R/3htFTgQypauWCqSbFUJ7ImjT+rB6QppzWhG1MU0FbeZ87hxr/IhHZydwLRNu2MP/AkRXyB7aVbpERLU/CcbQkCRuU9yuklIXMNyzzx04WeX4uk89Se9bjdD3H2RGteNhjXxi2Awl+Z/qOqdotIspm/B4BOggNh7XHnb3OA/0ayxNQ6CcY4X6zrCvKJP93qriFOPsoa085hqVdMkuqTym5Ts+JmLy0HKsUPxD9Igbpftn2co86LghpsnZpej/0TGqZl3LL67iOQiBmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=microchip.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hsoY10WdZw6+Rl0HTPa8ePLCVGbbC6QEqqiTEj/qlTA=; b=keKtKI/3l4Z3hxgkIjSso7SRClfFgFpYwpvOwARZBxILYGdBMnsr6W4Qisy3NhGWGhad62GLbfPWLLL3wEgfHibNSARMQsz8Oc27DvCHvtkpx4ZGqIEVnGn4m06b6o4vYIF4UJAlx/z6fbVdGOvgNnYklJ3/TfP/LAboGI6elVw= Received: from BN0PR04CA0117.namprd04.prod.outlook.com (2603:10b6:408:ec::32) by CH2PR12MB4970.namprd12.prod.outlook.com (2603:10b6:610:67::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.22; Thu, 22 Feb 2024 15:39:03 +0000 Received: from BN1PEPF00004681.namprd03.prod.outlook.com (2603:10b6:408:ec:cafe::b9) by BN0PR04CA0117.outlook.office365.com (2603:10b6:408:ec::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.43 via Frontend Transport; Thu, 22 Feb 2024 15:39:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN1PEPF00004681.mail.protection.outlook.com (10.167.243.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Thu, 22 Feb 2024 15:39:03 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 22 Feb 2024 09:39:03 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 22 Feb 2024 07:39:02 -0800 Received: from xhdvineethc40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 22 Feb 2024 09:38:58 -0600 From: Vineeth Karumanchi To: , , , , , , , , , , , CC: , , , , Subject: [PATCH net-next v2 1/4] net: macb: queue tie-off or disable during WOL suspend Date: Thu, 22 Feb 2024 21:08:45 +0530 Message-ID: <20240222153848.2374782-2-vineeth.karumanchi@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> References: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004681:EE_|CH2PR12MB4970:EE_ X-MS-Office365-Filtering-Correlation-Id: 71c73af5-5f9f-42bb-afa2-08dc33bc65f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6J2Yt+8RWBqy0yz1yVyyc7IOePaE/2cfeeNqOyBmEugQuLSyME83NzpG0kw8Xei5rIF9d/dhWuEkaPFg9du0yB2aOhjPY0qFT8n1ExW/ecc7fchS3E4qQedCGKHMnyCkpkqHaqFXAzW6Ol9M9emLZQgNSm1cM1XAQg90QNBjIWHQE1nT15KRp2zThwJ6ilZgN1ifG0rTpf1GZWChxtqoQs+5/238ptNnMKHRFGqe72Yn5ZZGFtOldN5B1dh+Y23x0oRHvf0cRKk2J2y/nIf1DsSPXbW6VxqUuHM91a6DZc6rhyPWkYNt8FngGa715gZM3ysY6XNSbU6MFwp+7kZ/6D2YanxKa/0UULtUUjpulGp2SXeYzdIlJ0whFzF53t2LxLUhB46kNWAY1eqnhPkiyCt3MO0Y52NrlWKO0zOQDfn0tIHkGx95GlTjPwPWUfN85wHrE3nypMCOL7B5E1MsO3hYxfTvIgDWQBpSdrREJU6wCd57LHCXsHoeDPBXedaNXvCUJ8zgKK2npLs2RNxtcAMZGbYzKqbot5WSZP4p6ndhQ7rG1hQi9Yuufj1k/KAYfRhIehFf7smRXmE7Bc4BMe3xaBzr3ldrI0d+mB9E2b3sM0IF8MDRDPHumd2WrD9d8JYhKCu0NPTkS4T6gxRT1hpTRabEVDigyRtdfMK84EU= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(36860700004)(40470700004)(46966006)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 15:39:03.6505 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 71c73af5-5f9f-42bb-afa2-08dc33bc65f1 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004681.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4970 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791614281988034425 X-GMAIL-MSGID: 1791614281988034425 When GEM is used as a wake device, it is not mandatory for the RX DMA to be active. The RX engine in IP only needs to receive and identify a wake packet through an interrupt. The wake packet is of no further significance; hence, it is not required to be copied into memory. By disabling RX DMA during suspend, we can avoid unnecessary DMA processing of any incoming traffic. During suspend, perform either of the below operations: - tie-off/dummy descriptor: Disable unused queues by connecting them to a looped descriptor chain without free slots. - queue disable: The newer IP version allows disabling individual queues. Co-developed-by: Harini Katakam Signed-off-by: Harini Katakam Signed-off-by: Vineeth Karumanchi --- drivers/net/ethernet/cadence/macb.h | 7 +++ drivers/net/ethernet/cadence/macb_main.c | 60 ++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index aa5700ac9c00..50cd35ef21ad 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -645,6 +645,10 @@ #define GEM_T2OFST_OFFSET 0 /* offset value */ #define GEM_T2OFST_SIZE 7 +/* Bitfields in queue pointer registers */ +#define MACB_QUEUE_DISABLE_OFFSET 0 /* disable queue */ +#define MACB_QUEUE_DISABLE_SIZE 1 + /* Offset for screener type 2 compare values (T2CMPOFST). * Note the offset is applied after the specified point, * e.g. GEM_T2COMPOFST_ETYPE denotes the EtherType field, so an offset @@ -733,6 +737,7 @@ #define MACB_CAPS_NEEDS_RSTONUBR 0x00000100 #define MACB_CAPS_MIIONRGMII 0x00000200 #define MACB_CAPS_NEED_TSUCLK 0x00000400 +#define MACB_CAPS_QUEUE_DISABLE 0x00000800 #define MACB_CAPS_PCS 0x01000000 #define MACB_CAPS_HIGH_SPEED 0x02000000 #define MACB_CAPS_CLK_HW_CHG 0x04000000 @@ -1254,6 +1259,8 @@ struct macb { u32 (*macb_reg_readl)(struct macb *bp, int offset); void (*macb_reg_writel)(struct macb *bp, int offset, u32 value); + struct macb_dma_desc *rx_ring_tieoff; + dma_addr_t rx_ring_tieoff_dma; size_t rx_buffer_size; unsigned int rx_ring_size; diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 898debfd4db3..f34933ef03b0 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -2477,6 +2477,12 @@ static void macb_free_consistent(struct macb *bp) unsigned int q; int size; + if (bp->rx_ring_tieoff) { + dma_free_coherent(&bp->pdev->dev, macb_dma_desc_get_size(bp), + bp->rx_ring_tieoff, bp->rx_ring_tieoff_dma); + bp->rx_ring_tieoff = NULL; + } + bp->macbgem_ops.mog_free_rx_buffers(bp); for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { @@ -2568,6 +2574,16 @@ static int macb_alloc_consistent(struct macb *bp) if (bp->macbgem_ops.mog_alloc_rx_buffers(bp)) goto out_err; + /* Required for tie off descriptor for PM cases */ + if (!(bp->caps & MACB_CAPS_QUEUE_DISABLE)) { + bp->rx_ring_tieoff = dma_alloc_coherent(&bp->pdev->dev, + macb_dma_desc_get_size(bp), + &bp->rx_ring_tieoff_dma, + GFP_KERNEL); + if (!bp->rx_ring_tieoff) + goto out_err; + } + return 0; out_err: @@ -2575,6 +2591,19 @@ static int macb_alloc_consistent(struct macb *bp) return -ENOMEM; } +static void macb_init_tieoff(struct macb *bp) +{ + struct macb_dma_desc *desc = bp->rx_ring_tieoff; + + if (bp->caps & MACB_CAPS_QUEUE_DISABLE) + return; + /* Setup a wrapping descriptor with no free slots + * (WRAP and USED) to tie off/disable unused RX queues. + */ + macb_set_addr(bp, desc, MACB_BIT(RX_WRAP) | MACB_BIT(RX_USED)); + desc->ctrl = 0; +} + static void gem_init_rings(struct macb *bp) { struct macb_queue *queue; @@ -2598,6 +2627,7 @@ static void gem_init_rings(struct macb *bp) gem_rx_refill(queue); } + macb_init_tieoff(bp); } static void macb_init_rings(struct macb *bp) @@ -2615,6 +2645,8 @@ static void macb_init_rings(struct macb *bp) bp->queues[0].tx_head = 0; bp->queues[0].tx_tail = 0; desc->ctrl |= MACB_BIT(TX_WRAP); + + macb_init_tieoff(bp); } static void macb_reset_hw(struct macb *bp) @@ -5215,6 +5247,7 @@ static int __maybe_unused macb_suspend(struct device *dev) unsigned long flags; unsigned int q; int err; + u32 tmp; if (!device_may_wakeup(&bp->dev->dev)) phy_exit(bp->sgmii_phy); @@ -5224,17 +5257,38 @@ static int __maybe_unused macb_suspend(struct device *dev) if (bp->wol & MACB_WOL_ENABLED) { spin_lock_irqsave(&bp->lock, flags); - /* Flush all status bits */ - macb_writel(bp, TSR, -1); - macb_writel(bp, RSR, -1); + + /* Disable Tx and Rx engines before disabling the queues, + * this is mandatory as per the IP spec sheet + */ + tmp = macb_readl(bp, NCR); + macb_writel(bp, NCR, tmp & ~(MACB_BIT(TE) | MACB_BIT(RE))); for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { + /* Disable RX queues */ + if (bp->caps & MACB_CAPS_QUEUE_DISABLE) { + queue_writel(queue, RBQP, MACB_BIT(QUEUE_DISABLE)); + } else { + /* Tie off RX queues */ + queue_writel(queue, RBQP, + lower_32_bits(bp->rx_ring_tieoff_dma)); +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT + queue_writel(queue, RBQPH, + upper_32_bits(bp->rx_ring_tieoff_dma)); +#endif + } /* Disable all interrupts */ queue_writel(queue, IDR, -1); queue_readl(queue, ISR); if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) queue_writel(queue, ISR, -1); } + /* Enable Receive engine */ + macb_writel(bp, NCR, tmp | MACB_BIT(RE)); + /* Flush all status bits */ + macb_writel(bp, TSR, -1); + macb_writel(bp, RSR, -1); + /* Change interrupt handler and * Enable WoL IRQ on queue 0 */ From patchwork Thu Feb 22 15:38:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Karumanchi, Vineeth" X-Patchwork-Id: 204822 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp23717dyb; Thu, 22 Feb 2024 07:40:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXRPqory1NNPeBJdIVaf5o1XL7AyG2yv9EZNmO5WaPxN7vV8pfhLKmONeC47ZdBZjWtniM22+LiTNVwILCgVHQUWTLYxQ== X-Google-Smtp-Source: AGHT+IF6ZV11z1Ncv8W5zhSanb6gF/N8HtFAYZB3Shp7vDf0cSYSjGjIydcoUiFSZyW0PuDTfyFS X-Received: by 2002:a17:902:6e08:b0:1dc:aea:10f2 with SMTP id u8-20020a1709026e0800b001dc0aea10f2mr9859116plk.10.1708616449768; Thu, 22 Feb 2024 07:40:49 -0800 (PST) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n15-20020a170902f60f00b001dc139ccb71si5740820plg.169.2024.02.22.07.40.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:40:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76791-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=sUC9aYru; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-76791-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76791-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8D5E7286ECE for ; Thu, 22 Feb 2024 15:40:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0857F153BC8; Thu, 22 Feb 2024 15:39:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="sUC9aYru" Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2078.outbound.protection.outlook.com [40.107.95.78]) (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 D66E7150993; Thu, 22 Feb 2024 15:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616358; cv=fail; b=MEg1s+by47U292Pzd/QPvkanEDz0CkDbjMVZb39o3M5d+mfYEEgGy2y3l2i/0cUlsBlGFdjQfMJn8IGdGkt/kqDZhQK+addIffwLKXpDWGm0gafqAEOz1roPWNOXqWesy3K3kRtXlv95JD4XdqPhEkHjT1ynD/dFge+i8IfhHY0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616358; c=relaxed/simple; bh=1PKypLK2oER96MwVi6ukeVIyBLYb4YYpkyI91O/2gI0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AZ+TOdlPs2W9AjBbji+4xyH4CToMhXNGciMsp+BcQDz2vexis+BQw2HbB/RylPhM3w8xVIqB5jSedQx0Gu8tz0NL+0AxYcpQw4EHVnShHZ5fHtL0mRC80fsnSZhwnmrMd/HTlH3OEgYrs5ObnhIrdq2TWSu/CwcjC97QtyKg2R0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=sUC9aYru; arc=fail smtp.client-ip=40.107.95.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VfFlIxyjqGymg1To4zdxOfub+3v3boceeAMcx0eKvtcl0Wg68M8ZHfa7nBPKe38ZO8ULjrDNQGg2J+jpJI13xVSDrVxhqp10b8jgU23P2lLgTFbzgdfLYXGfEfG2izxT4DzGLJsMlsUOvJysEBj89hg0KTc4Yw4agDA44woz8uQnBQ3dVAAyBkjPUa027kZP0E66D1caesfD0zL7NknNouzshsITSNpquLBgWQPsdQV3DpxU2BCj65QjNcqU5e73hai8d1V/43d5tVhZzxEcvqj7cz+QIibACc9rWUE2hDUmtXwJYgkG7re8B2QYt/O/SkSf6/+MrXXDJfPh/Lfcjg== 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=5Jyx6kzP7fUom9fCjOWZFl/O6SQxEPBB9/Nh0WvrjGs=; b=csjzH+pNYpVInXB1p4n5cs+ons7WWDb0LHHaMgycIRzO5mFo5TyW2dobxeu91gW7IHyyliugg5sJ7cx7dUCJJHsAiWtlq4FsnPin9HsPAA9fxk1z+jdXbQJvOCr0NCbwvIEwjLGUxQl4IkhzuzUqvHjBhfZzn808I7TH342kVhCTEA/xuckupbXhKxb+BHY2qof+WY8VNZm7tEDzEI4DBvsgVY3AC5UHrkGwDCdiHohsQMBwIO3fWkg4l+sRFxyxnuNlw3FC7EsfKXhKKPQZK+DunposQTiJJOZaJxNJ0axvtsbC56+YIQvBLlJ0W16fX7AUQTMICVgSnHSdkNYa0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=microchip.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Jyx6kzP7fUom9fCjOWZFl/O6SQxEPBB9/Nh0WvrjGs=; b=sUC9aYrupW304aMvoz2/tM6mmVmIPQuUEEwKUAKelebyhS1ddkZbI+HdTgxBxvecFPT7m9rgdImTihEUm3o5mhtF+5tDP8gmvwX0pYkNcxAgjxN6OBiZ4tBeB+MsXU8ObH9aHW9I5Pkx3ZUA+OgRU0lsneMtnUWUTk+pLib7TU8= Received: from BN8PR12CA0025.namprd12.prod.outlook.com (2603:10b6:408:60::38) by CY8PR12MB8340.namprd12.prod.outlook.com (2603:10b6:930:7a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.24; Thu, 22 Feb 2024 15:39:12 +0000 Received: from BN1PEPF00004685.namprd03.prod.outlook.com (2603:10b6:408:60:cafe::4) by BN8PR12CA0025.outlook.office365.com (2603:10b6:408:60::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.43 via Frontend Transport; Thu, 22 Feb 2024 15:39:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN1PEPF00004685.mail.protection.outlook.com (10.167.243.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Thu, 22 Feb 2024 15:39:11 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 22 Feb 2024 09:39:07 -0600 Received: from xhdvineethc40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 22 Feb 2024 09:39:03 -0600 From: Vineeth Karumanchi To: , , , , , , , , , , , CC: , , , , Subject: [PATCH net-next v2 2/4] net: macb: Add ARP support to WOL Date: Thu, 22 Feb 2024 21:08:46 +0530 Message-ID: <20240222153848.2374782-3-vineeth.karumanchi@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> References: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: vineeth.karumanchi@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004685:EE_|CY8PR12MB8340:EE_ X-MS-Office365-Filtering-Correlation-Id: 380395c1-66e3-443a-3642-08dc33bc6a8b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nIrukuAaEzigbLrbDqZPJg/t1E4QDQoD5txaLJCQsYwgb1mfZghbyyeJ0s4pr7kB40jp/eGg1+TQJfkX6FztAhh+yxoTmeqQhzPVQtAiFY9OwWsk9SpJQnObQe0DW1EGMa0aRn6Oqr588O8lmkg9U2Y19nbtVRy4uq2W7vDfMdZG4xURZXkDwNRnWEeGbIzMV/D5/wcwJs4jbly7jrD1j5kkG84EBZ0+KxRYuvBzItoN8azClOCIlMWW/6kED+sZfheyY0EyuFZMUg+in06YOkZHs+nSzYI+JuoHNOdsWPIJ0nVeXRqgCMYCos49/ZmishLKlHgSlfEbWu2mDXwQq0np8PJQQOIV5zv+/pkV64TnktR2HZvVuKIO3fnXCOG1g5bmFU2pXtrwuR1UacQjqWjNj3Tm5RZCcHxiCYU+4Zje5A6jszb2tjNtlpbPmBk75I4fAfumRFKszfe/SZq7LotFL/W4h9BrB7LuCd54G9wCKPlcsAHGIgNYoiFw2HzADhbE2p0XeVL9SRGF4AJoE5fNMhH/37hIqGcTiGJ+mMgpuP/hMCtT0H2HAkuLthlg7cRgbK9QQzDlJVMDo9W65oAlGC5ZMCp5jXQoQAXPUg4e9UoRUw+/IUBfBwdHyp1einNZxz7Ox/yEjtzpHHwoWZ5vfabcTriAMIcyDJyX6pg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(36860700004)(46966006)(40470700004)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 15:39:11.3831 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 380395c1-66e3-443a-3642-08dc33bc6a8b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004685.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8340 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791614202616389921 X-GMAIL-MSGID: 1791614202616389921 -Add wake-on LAN support using ARP with the provision to select through ethtool. Advertise wakeup capability in the probe and get the supported modes from OS policy (MACB_CAPS_WOL). -Re-order MACB_WOL_<> macros for ease of extension. -Add ARP support configurable through ethtool, "wolopts" variable in struct macb contains the current WOL options configured through ethtool. -For WOL via ARP, ensure the IP address is assigned and report an error otherwise. Co-developed-by: Harini Katakam Signed-off-by: Harini Katakam Signed-off-by: Vineeth Karumanchi --- drivers/net/ethernet/cadence/macb.h | 2 + drivers/net/ethernet/cadence/macb_main.c | 52 +++++++++++++++++------- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index 50cd35ef21ad..c9ca61959f3c 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -738,6 +738,7 @@ #define MACB_CAPS_MIIONRGMII 0x00000200 #define MACB_CAPS_NEED_TSUCLK 0x00000400 #define MACB_CAPS_QUEUE_DISABLE 0x00000800 +#define MACB_CAPS_WOL 0x00001000 #define MACB_CAPS_PCS 0x01000000 #define MACB_CAPS_HIGH_SPEED 0x02000000 #define MACB_CAPS_CLK_HW_CHG 0x04000000 @@ -1306,6 +1307,7 @@ struct macb { unsigned int jumbo_max_len; u32 wol; + u32 wolopts; /* holds value of rx watermark value for pbuf_rxcutthru register */ u32 rx_watermark; diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index f34933ef03b0..62d796ef4035 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -38,6 +38,7 @@ #include #include #include +#include #include "macb.h" /* This structure is only used for MACB on SiFive FU540 devices */ @@ -84,8 +85,9 @@ struct sifive_fu540_macb_mgmt { #define GEM_MTU_MIN_SIZE ETH_MIN_MTU #define MACB_NETIF_LSO NETIF_F_TSO -#define MACB_WOL_HAS_MAGIC_PACKET (0x1 << 0) -#define MACB_WOL_ENABLED (0x1 << 1) +#define MACB_WOL_ENABLED (0x1 << 0) +#define MACB_WOL_HAS_MAGIC_PACKET (0x1 << 1) +#define MACB_WOL_HAS_ARP_PACKET (0x1 << 2) #define HS_SPEED_10000M 4 #define MACB_SERDES_RATE_10G 1 @@ -3278,18 +3280,18 @@ static void macb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) { struct macb *bp = netdev_priv(netdev); - if (bp->wol & MACB_WOL_HAS_MAGIC_PACKET) { + if (bp->wol & (MACB_WOL_HAS_MAGIC_PACKET | MACB_WOL_HAS_ARP_PACKET)) phylink_ethtool_get_wol(bp->phylink, wol); - wol->supported |= WAKE_MAGIC; - - if (bp->wol & MACB_WOL_ENABLED) - wol->wolopts |= WAKE_MAGIC; - } + wol->supported |= (bp->wol & MACB_WOL_HAS_MAGIC_PACKET) ? WAKE_MAGIC : 0; + wol->supported |= (bp->wol & MACB_WOL_HAS_ARP_PACKET) ? WAKE_ARP : 0; + /* Pass wolopts to ethtool */ + wol->wolopts = bp->wolopts; } static int macb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) { struct macb *bp = netdev_priv(netdev); + bp->wolopts = 0; int ret; /* Pass the order to phylink layer */ @@ -3300,11 +3302,14 @@ static int macb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) if (!ret || ret != -EOPNOTSUPP) return ret; - if (!(bp->wol & MACB_WOL_HAS_MAGIC_PACKET) || - (wol->wolopts & ~WAKE_MAGIC)) + if (!(bp->wol & (MACB_WOL_HAS_MAGIC_PACKET | MACB_WOL_HAS_ARP_PACKET)) || + (wol->wolopts & ~(WAKE_MAGIC | WAKE_ARP))) return -EOPNOTSUPP; - if (wol->wolopts & WAKE_MAGIC) + bp->wolopts |= (wol->wolopts & WAKE_MAGIC) ? WAKE_MAGIC : 0; + bp->wolopts |= (wol->wolopts & WAKE_ARP) ? WAKE_ARP : 0; + + if (bp->wolopts) bp->wol |= MACB_WOL_ENABLED; else bp->wol &= ~MACB_WOL_ENABLED; @@ -5087,7 +5092,6 @@ static int macb_probe(struct platform_device *pdev) bp->wol = 0; if (of_property_read_bool(np, "magic-packet")) bp->wol |= MACB_WOL_HAS_MAGIC_PACKET; - device_set_wakeup_capable(&pdev->dev, bp->wol & MACB_WOL_HAS_MAGIC_PACKET); bp->usrio = macb_config->usrio; @@ -5115,6 +5119,11 @@ static int macb_probe(struct platform_device *pdev) /* setup capabilities */ macb_configure_caps(bp, macb_config); + if (bp->caps & MACB_CAPS_WOL) + bp->wol |= (MACB_WOL_HAS_ARP_PACKET | MACB_WOL_HAS_MAGIC_PACKET); + + device_set_wakeup_capable(&pdev->dev, (bp->wol) ? true : false); + #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT if (GEM_BFEXT(DAW64, gem_readl(bp, DCFG6))) { dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44)); @@ -5244,6 +5253,7 @@ static int __maybe_unused macb_suspend(struct device *dev) struct net_device *netdev = dev_get_drvdata(dev); struct macb *bp = netdev_priv(netdev); struct macb_queue *queue; + struct in_ifaddr *ifa; unsigned long flags; unsigned int q; int err; @@ -5256,6 +5266,12 @@ static int __maybe_unused macb_suspend(struct device *dev) return 0; if (bp->wol & MACB_WOL_ENABLED) { + /* Check for IP address in WOL ARP mode */ + ifa = rcu_dereference(__in_dev_get_rcu(bp->dev)->ifa_list); + if ((bp->wolopts & WAKE_ARP) && !ifa) { + netdev_err(netdev, "IP address not assigned\n"); + return -EOPNOTSUPP; + } spin_lock_irqsave(&bp->lock, flags); /* Disable Tx and Rx engines before disabling the queues, @@ -5289,6 +5305,14 @@ static int __maybe_unused macb_suspend(struct device *dev) macb_writel(bp, TSR, -1); macb_writel(bp, RSR, -1); + tmp = (bp->wolopts & WAKE_MAGIC) ? MACB_BIT(MAG) : 0; + if (bp->wolopts & WAKE_ARP) { + tmp |= MACB_BIT(ARP); + /* write IP address into register */ + tmp |= MACB_BFEXT(IP, + (__force u32)(cpu_to_be32p((uint32_t *)&ifa->ifa_local))); + } + /* Change interrupt handler and * Enable WoL IRQ on queue 0 */ @@ -5304,7 +5328,7 @@ static int __maybe_unused macb_suspend(struct device *dev) return err; } queue_writel(bp->queues, IER, GEM_BIT(WOL)); - gem_writel(bp, WOL, MACB_BIT(MAG)); + gem_writel(bp, WOL, tmp); } else { err = devm_request_irq(dev, bp->queues[0].irq, macb_wol_interrupt, IRQF_SHARED, netdev->name, bp->queues); @@ -5316,7 +5340,7 @@ static int __maybe_unused macb_suspend(struct device *dev) return err; } queue_writel(bp->queues, IER, MACB_BIT(WOL)); - macb_writel(bp, WOL, MACB_BIT(MAG)); + macb_writel(bp, WOL, tmp); } spin_unlock_irqrestore(&bp->lock, flags); From patchwork Thu Feb 22 15:38:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Karumanchi, Vineeth" X-Patchwork-Id: 204821 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp23481dyb; Thu, 22 Feb 2024 07:40:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWwPN550L4UZcNVn3lxS/5iLqHqLoltAch50PczAZ4R6GZ/X6N5y1IeqORTX4soAxGvEcDc1oeIe5vUe7xUBVae8tHuxg== X-Google-Smtp-Source: AGHT+IFx40aSIUjbuaU01TaWYWpAoGzJNkKkrm1XJL55R0zcgT+wRIHkUCpCWPyUtzWuYeSvrR8W X-Received: by 2002:a05:6a00:2717:b0:6e2:f52b:6c8e with SMTP id x23-20020a056a00271700b006e2f52b6c8emr15609717pfv.14.1708616423744; Thu, 22 Feb 2024 07:40:23 -0800 (PST) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e7-20020a056a001a8700b006e2f87df15dsi507722pfv.140.2024.02.22.07.40.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76790-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=fqXjLTxt; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-76790-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76790-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 86BC4282152 for ; Thu, 22 Feb 2024 15:40:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D92541534E5; Thu, 22 Feb 2024 15:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="fqXjLTxt" Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2068.outbound.protection.outlook.com [40.107.237.68]) (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 13D9F14D42F; Thu, 22 Feb 2024 15:39:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616356; cv=fail; b=qV6nTM0kXPyMzD6WVt18EB8ANG4v8lr5soX7KpdRyZMdV71oUpd2cdZrr5j1u3Upj7oPaZ3pUyPAzA6nqc7uclEh44FEbX2kve/WE9Gu5HvGwH48n/7Ki4XQd3mish+yQYuSoI9V49QSnz9T7GN8O5YSl60JSNvlr1Ym8H6vseE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616356; c=relaxed/simple; bh=WfAEceRZtG0V1VXu4bIbpDalpE3BX+aX2y67FyHyYDk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rPrqEi85ArCzaX3YTNCaxIC4aYafgQA01Q3OG+B+zgfUXhPB/FBIioVpyMHcjmJFQGIv/MgIKzrjAORLW0T6c775rOcX92wDFSZPV+G1qiQNOOldP0H1xZFJrSOD4kQ0e33m/6l++bUXDEkcCyMyjamFVtk+oNB8WJVQEvV8xMw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=fqXjLTxt; arc=fail smtp.client-ip=40.107.237.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fbX9Iz9qwgGqMOqjFpadrR/d6YU+i2K8OrB3TAygNcINou+y1jCBnZW3833RIkZebGDRgpCc4yTcDCiayZgMfwinnN0k0+9c56id7elGZkJHq6j270IiHt7g8ueIvxbPBJH2sKHWP3se/BrYI2I11uSYzsF+gC+5OLrXEIQLkpWenIzzgMnp2rmXTT3vHggRWLLfDWWRpXYCyCqaDHgM8fq/WCCGTr9XYHAuUDllchA8lPDGA9uGO+6kVRNkdaF/QVTQ1g/iVZhwkJpgdiZqHeTM4/7lM5L3raia9StNRHayuh9qngzivIibRVz5OqatyZPEw/FObu+jt0rekgWQcg== 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=sEfOiApCO1nKugYASoMo+CeWWoI3rZh0oPJ+9KQa/kQ=; b=MvKIOoeGpAYNxEqjnUtJHdL+DXKc5DZwvcNNA3KqivnTcg4W7LOi5E1vIsCQmUqkiqBjl1tIT8i5nocKOARXJ2TTdAMZYFGO//xnHpuazQrH9qVcPrcrBpnAhwU99l29WuAA9zmexVdT0pvN+fu2/fjGDUVSrUmV5EsE0r20LSTHM47ScXCrTMdBb4EOOD+t6sValFd8C0IharKObJa6FQuhUVMZNit4X/dmbdOsCxmkSQGnGUWikgFBIl8/o1tc4AFu2/a/F5vQ+a6mQJlDdCDeKdsQlZ34sgmwLmdsvvabvNH/UOkKTPBbkuyk0Gtq+EqzC8Hrp2Smbw7ovG1Eiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=microchip.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sEfOiApCO1nKugYASoMo+CeWWoI3rZh0oPJ+9KQa/kQ=; b=fqXjLTxtF7U1bbKq0LoytU53Wmu4ZKbMCgKCU7k7+Mwlb+ycpHaxU+1EUPwvPAmsE0CeLMcDj9pqx1qJTKowxKqu1FgI6b6LJ5QeIq1zady5PYwi/2YIkfr0Izuv80iU2MTFgj1AmVvv7USTNzte5gD4zQ0A8hMnrd61TvznFfM= Received: from BN8PR12CA0034.namprd12.prod.outlook.com (2603:10b6:408:60::47) by SA3PR12MB9105.namprd12.prod.outlook.com (2603:10b6:806:382::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.23; Thu, 22 Feb 2024 15:39:12 +0000 Received: from BN1PEPF00004685.namprd03.prod.outlook.com (2603:10b6:408:60:cafe::1) by BN8PR12CA0034.outlook.office365.com (2603:10b6:408:60::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.41 via Frontend Transport; Thu, 22 Feb 2024 15:39:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN1PEPF00004685.mail.protection.outlook.com (10.167.243.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Thu, 22 Feb 2024 15:39:12 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 22 Feb 2024 09:39:11 -0600 Received: from xhdvineethc40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 22 Feb 2024 09:39:07 -0600 From: Vineeth Karumanchi To: , , , , , , , , , , , CC: , , , , Subject: [PATCH net-next v2 3/4] net: macb: Enable queue disable and WOL Date: Thu, 22 Feb 2024 21:08:47 +0530 Message-ID: <20240222153848.2374782-4-vineeth.karumanchi@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> References: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: vineeth.karumanchi@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004685:EE_|SA3PR12MB9105:EE_ X-MS-Office365-Filtering-Correlation-Id: 83424f55-b7cd-406f-07db-08dc33bc6b1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5CxwMs5gkzW1KDFQ0s8r5V9e8xLsl8rqIsoNkenIhP7kbAA5xjjYCDNloLYONYlWZjvobKykvuQpIsw1W/L1oYSG1SQCzRg1UxaOkOC6nvmBsSXkZ+wM4pULpfD0XW5F8Q/NY61Y42XA67SGTvMxrc3c7645/dRrXZOoHf3uZLR6S+y+VXe/Qtzg4JwP5w/T9lJtcnqzLVPljFRFG4TLH8PCMueoQdD8oZEp9bx2970C936Gck3uyR16CL1aH8ktcXn5b6exO9Bm+FwdCamvkVCWSwQUgQFr42bmm1RhzBvO2T5neT3NuHy7D0QdqZW8ImPDda1ElI04Q/Hxs9ChTFcOhS4hDDTAqj/OQwvRXeboilQaXDhCSVLTI+99ED73fdVcUWYHQ9oJow+NBhqsTWF+Oic5EY2GAAZsUPIPZGyZdvKBYa61uVdDzbGvQqbTUNrgx81aDxikrEi94IHPyrPloFagkJhLVZ30DHr41VsqouiIa15LQJhWNXtk3QaRFwlHDl5IDJoUp9RfdiMcr/IDfnPk6otv0WyvWONSpqF2KJde5JHjox8iK7BsNa6vmm7q5+FcZhVU47959P/hW2T+2Vwhc6IyoLX27Le00OPwfqwk5u99Z3XiJbScMqEL/lTimlchIe4cd4L60FvFImrQFEbMM+H6eAIr5KlT/N0= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(36860700004)(46966006)(40470700004)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 15:39:12.3363 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83424f55-b7cd-406f-07db-08dc33bc6b1f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004685.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9105 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791614175222901381 X-GMAIL-MSGID: 1791614175222901381 - Enable WOL for ZynqMP devices. - Enable queue disable and WOL for Versal devices. Signed-off-by: Vineeth Karumanchi --- drivers/net/ethernet/cadence/macb_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 62d796ef4035..55d8c1f3ee80 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4903,7 +4903,7 @@ static const struct macb_config np4_config = { static const struct macb_config zynqmp_config = { .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | - MACB_CAPS_JUMBO | + MACB_CAPS_JUMBO | MACB_CAPS_WOL | MACB_CAPS_GEM_HAS_PTP | MACB_CAPS_BD_RD_PREFETCH, .dma_burst_length = 16, .clk_init = macb_clk_init, @@ -4954,7 +4954,9 @@ static const struct macb_config sama7g5_emac_config = { static const struct macb_config versal_config = { .caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO | - MACB_CAPS_GEM_HAS_PTP | MACB_CAPS_BD_RD_PREFETCH | MACB_CAPS_NEED_TSUCLK, + MACB_CAPS_GEM_HAS_PTP | MACB_CAPS_BD_RD_PREFETCH | + MACB_CAPS_QUEUE_DISABLE | MACB_CAPS_NEED_TSUCLK | + MACB_CAPS_WOL, .dma_burst_length = 16, .clk_init = macb_clk_init, .init = init_reset_optional, From patchwork Thu Feb 22 15:38:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Karumanchi, Vineeth" X-Patchwork-Id: 204825 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp24815dyb; Thu, 22 Feb 2024 07:42:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWJmSZdnGkdOro0YcwQL1S+JW0nLTqpfqbqxWkLTMotPR7fx2aSm6FkgmLsiFloqUQUz4Ts/NjdsEuI4u/ZukkSjXAToA== X-Google-Smtp-Source: AGHT+IEeBQiDAJ+uvHpd6m4Pt08ViXbERAyqiQ+/7Cuab8jrXZScZvA6/058gNh5dkqln8+qXZvk X-Received: by 2002:a05:6358:3a04:b0:178:f895:5978 with SMTP id g4-20020a0563583a0400b00178f8955978mr30967090rwe.10.1708616578363; Thu, 22 Feb 2024 07:42:58 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t185-20020a6381c2000000b005d72fd9d73asi10317187pgd.602.2024.02.22.07.42.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 07:42:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76792-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=2kg7YYJL; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-76792-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76792-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8224FB268B6 for ; Thu, 22 Feb 2024 15:40:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53F9C153BD6; Thu, 22 Feb 2024 15:39:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="2kg7YYJL" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) (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 90662152E07; Thu, 22 Feb 2024 15:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616361; cv=fail; b=AuEUHeDiU/ViAct/PkBBJ0n0oxB0CqGgwFoWkkdiFkyj2QbP1cAV+hjtQaImCuFnHMEFcf14tWnPnPIqJl6osUZE7pER//gSvVBAdaZOpSt7s1SEnNoUrSN3VOnL4lqZoSj0aeoU1IqX9I1kQVYbhWYAsO6cWhkLQ/SFXA/SgYA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708616361; c=relaxed/simple; bh=K/JdAhcKRXCA0M0L7U/DYTYlmfjcFhkKyuFSf2KSXp8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XokD20p8OgwhyR70KlhvyLBMmWCjVni/1KKIUwGK9nGiP9Xsfy1KZAnBJ1hV0iZSf+rvMfyT3XI7ewh70WRYLnkZ77/ygv3jWfw+S9otaBAM/WOj/NXgIeyQsF8g5yhh+ghiTXgx/32t2GxDyDSE1TvbPWwqhhe+uxdYSyUm4XQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=2kg7YYJL; arc=fail smtp.client-ip=40.107.94.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GOd/04ZEXd7yg50I/HS6vqhWpw4437XEq8V0BudhBMbuXw6ktjigZlaR32AJRqQZ7bllVDIC6Ymw0Wzhmolm88Bwewo+iUXvOJvTUvMsih1qQUqpfLPA88ffTxNXvqifEhnJ2Tpky1BEb+GCStX+FZ+CdIRjNOuEgc3aV71ut7fRP/CgrcLA+Yz7BnBFG1ZlSs4jJbx6vPx5w1n/D6YZOyvq2M4m13Scpwn0eYxZIb4R6FFBgJ9maYl2NxIAgAqkFkUqX5VA/3omq2sIP+X5As3cL0fWrCl2qc8wRrgZEmlZJQ8ibUiurD6sVwAIgVYbopsQpIZy3nA732iQB9i6yw== 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=1sY55USOYqGVVfb2BFIg25xYCkPJMmBZ9K5PMjhSSJw=; b=Ut1jH8H9Ov9seDSFapclHmPDVOMPSptA3Mutn3Opvf3m46J5EuYs2ydCjMRQG9D7wdDk6rNsnYqtBwG8aFIQhzRzX7IL+K5kwe6r9D1MxJvVhuVkJXMCsA43beRX8KVawGpfMomUfd2ujF549rVxIqifjKCcJ6BCVk7EONt5r+BYPE/6STaYAwlJtJKxnevbr09CSOEocjKi0JdwmL61CBwrWTsY1iAg90Wi96WKFGNLdz0Z8e06LkNnUM0KodZbxAra+EE510tKzkeMHbm9kywBDJdT8jY9NKRieOXSNxJQY2RisL0ydiQcy2ce/XPSxJzm/3r/dLn5eUiAt9XCqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=microchip.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1sY55USOYqGVVfb2BFIg25xYCkPJMmBZ9K5PMjhSSJw=; b=2kg7YYJLq4bv74sTlKAkOuk7eRd/UAyF/oY8cAXqMrGJlP9JXpDQjiwNW867Xbl+tObluUMP3XiL7QUVaJQTGzad9+JpDjBIM6nLdHIncwHs3NWC9/lU5oCHBiv+pOaoeboFovp3BSHMPZUJgsMo0NvMOJJGhnMdexJvlSg8ayc= Received: from BN1PR12CA0021.namprd12.prod.outlook.com (2603:10b6:408:e1::26) by PH7PR12MB5782.namprd12.prod.outlook.com (2603:10b6:510:1d1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.20; Thu, 22 Feb 2024 15:39:17 +0000 Received: from BN1PEPF00004684.namprd03.prod.outlook.com (2603:10b6:408:e1:cafe::f2) by BN1PR12CA0021.outlook.office365.com (2603:10b6:408:e1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.42 via Frontend Transport; Thu, 22 Feb 2024 15:39:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN1PEPF00004684.mail.protection.outlook.com (10.167.243.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Thu, 22 Feb 2024 15:39:16 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 22 Feb 2024 09:39:16 -0600 Received: from xhdvineethc40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 22 Feb 2024 09:39:12 -0600 From: Vineeth Karumanchi To: , , , , , , , , , , , CC: , , , , Subject: [PATCH net-next v2 4/4] dt-bindings: net: cdns,macb: Deprecate magic-packet property Date: Thu, 22 Feb 2024 21:08:48 +0530 Message-ID: <20240222153848.2374782-5-vineeth.karumanchi@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> References: <20240222153848.2374782-1-vineeth.karumanchi@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: vineeth.karumanchi@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004684:EE_|PH7PR12MB5782:EE_ X-MS-Office365-Filtering-Correlation-Id: 41a67c64-c821-40b6-cd25-08dc33bc6dca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IYcLOSFeikfM/vIqYH+c0zvkhuM3vzRg/97OVWjjv5MAx2Jy8MhwI2vVXZ3EilPFF8jUIFe9BWZWKMtKRiiTlBlhOKC3OFRMs/qDUSZuAltpXxTWUu12L2maR6TXXhlmSHNXvqrBrSQnwSVNqL3t2XmrUP5utbLcm6xyR2cs+weis4wnAS3Pi+2gtO6FKp5RROuhqNvdmqkf1sd0XXJ5whcHm9luTO13UFtHZInGrAZaRIFuukbro+nf0cgjGMTslGmq//leXqJ4o6UPNDj1hX+JYET/wR9rld/PxwEdFuLr/+7f585mAO55J69C45cOkGMSpNs5yTiYF4MsyXlV8gmEdtkpc4hdyXLHUjOpRf9BzHx2xDf73xHWi2nf8TtnKoYmEUYZvOw3FP4NGz2kQMpGGi4kuYnsee1JOzFxAPq4pI7IbyrcEk8+lHD0/CmwzuwCQEwqy30OtSIOtJRBuo4zDwaA1IPeeaeVJcsIjv5UiojwaBuTx8/mCoSQ+LIkd1EIBYhEqXgwglHOCR7XO6BRT6dDxU3JmNrqtJY1+9EULeZTgieHV6Cbv0PouyzgAQRc5RkEunEvQjsli2skbPfjoX5BdPcyE/lmLCl8BvA+8C9Bvuwux85+5auUAYvYI/g1y1njcn3zncn8htHsMKtWzLPRSXXlhtv+Rq23TeM= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(36860700004)(46966006)(40470700004)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 15:39:16.8174 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41a67c64-c821-40b6-cd25-08dc33bc6dca X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004684.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5782 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791614336971453079 X-GMAIL-MSGID: 1791614336971453079 WOL modes such as magic-packet should be an OS policy. Leverage MACB_CAPS_WOL on supported devices to advertise supported modes through ethtool. Use ethtool to activate the required mode. Suggested-by: Andrew Lunn Signed-off-by: Vineeth Karumanchi Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/net/cdns,macb.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/cdns,macb.yaml b/Documentation/devicetree/bindings/net/cdns,macb.yaml index bf8894a0257e..096309bf3235 100644 --- a/Documentation/devicetree/bindings/net/cdns,macb.yaml +++ b/Documentation/devicetree/bindings/net/cdns,macb.yaml @@ -141,6 +141,7 @@ patternProperties: magic-packet: type: boolean + deprecated: true description: Indicates that the hardware supports waking up via magic packet.