Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp374208rdb; Thu, 15 Feb 2024 02:58:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZPG54Wxwq5oEwy4XK4ReK8yZMrd33kdz6LeSeHpsMvyO2vp5dUQIWteeQVoyWDzJF6/w3PzRKzI5EQh63HB86tHHGxbPXMB+R+AVxPQ== X-Google-Smtp-Source: AGHT+IFWJ8cYvqbiTuYxmpUgv31rzU+SqRRyc3TFEIJYVxViL518r27N3aE7GsdgxlcDS1kA2hVJ X-Received: by 2002:a05:6871:693:b0:219:57d1:b6c8 with SMTP id l19-20020a056871069300b0021957d1b6c8mr1435537oao.4.1707994691973; Thu, 15 Feb 2024 02:58:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707994691; cv=pass; d=google.com; s=arc-20160816; b=yJSaAgMILLjWu41qSvWtooqOd/fAJ7Dpx2LZpZY00mSo9pk82Oa1uVIQToImoXb0fM Ithb/P8r4JtGmRfWPlbOmFmGf2n7kbvTjeRB55jO9T/MdwGm2jcD1/KguvtC/2u+56mm ZwuhMf0UOc5C2badGs3VZoJm8BPaTO9JEeeYluYZa1RUSiM9Zy0kJUMx3P0TXnDYHJqM 8QNQykXWSHd3D8sWmEJHm6VG2es2NAGp5Bmj8C0sRViq+iSBN2s/UbvC10qcXC9haj3a Ks0bKXve6mfl2657AIPdKYPAgnTFVSvDk9Y41nsq/o/a5fKEhZnmHQkXNiREz8Vw/07K 6uRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=S3f0rb4C5lvPslwqInmE+iQAff85wgbT5AhACglF67s=; fh=zxwepY9OroidS3bCDfT23Ux3y9QWiA96UGb75crABOs=; b=RNeAal1MgDdKDSWGZQSDsfs0TGRa3z/yM6yimzwSxN1k0XZI5FXyr+Mpham4xJ/mAl 2sGczbacdBMoxXcKbNBL9vJZjbmZKQTkKLi2i7xngw7gKnqNp0NUKSm2rpyXGXXE2hES 4Kh6MTLiz7ukqrPRCQiOJ1KLTsyKrtZj5i4jcVhbiqlifZxSyYDSvnAVIO3AhlBoMy4G tnT8Sx5+oV3DJ2AgCeufilIsIgmbD4D2qaI6vvjDG7yJOHW2op8oxv4pd2UdFgQzNSy5 go9V04iezKQxaxfM5YGKBIeDPZnc0U+HFE3rH2cGQ6b0/UV0RTaLs5d4lpbHn92H9VM+ EwOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=Satc0Gr7; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-66615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66615-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l193-20020a6391ca000000b005dc98d91163si942782pge.56.2024.02.15.02.58.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 02:58:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66615-linux.lists.archive=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=@tuxon.dev header.s=google header.b=Satc0Gr7; arc=pass (i=1 spf=pass spfdomain=tuxon.dev dkim=pass dkdomain=tuxon.dev); spf=pass (google.com: domain of linux-kernel+bounces-66615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66615-linux.lists.archive=gmail.com@vger.kernel.org" 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 1167EB2A30F for ; Thu, 15 Feb 2024 10:20:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4438C6996E; Thu, 15 Feb 2024 10:20:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="Satc0Gr7" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9032669D00 for ; Thu, 15 Feb 2024 10:20:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707992403; cv=none; b=VejIcHoTS3AeLLJSXCNp6ImriJOjTF7mS4fgRN09yATq/+8FEwRw7gnINEYHmnX6FpY9VB/9ruLXALaoRm/fCCIuZwmSr/5JxnMXlx1FBVCXnZ77qkHbiAWqeTM60450kgFBIF+QfZZfsCRlL7R3cNEvp6U/s88XryY01RdNnDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707992403; c=relaxed/simple; bh=6T+B23RM48DgKeyvyI3A1orWH9VcY1C1hi6ykGKmpV4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hdCM1i5XbPzcD0gQTJJ+LA2rLSdVOZrHRslmBwSgx/YG54jAWRX+J4qpEBlxuZTyelF4Zv50Z/uSSl8IRnShOrI4RroGAlchzWDzkQx1pDJ1AaCNduYVMkwF7v1XXxq09/0NFc/GVn8e1B3HALrBLEqwe2lRSdeZqzXU7amUIp4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev; spf=pass smtp.mailfrom=tuxon.dev; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b=Satc0Gr7; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-411e71d8a2bso4986875e9.1 for ; Thu, 15 Feb 2024 02:20:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1707992399; x=1708597199; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=S3f0rb4C5lvPslwqInmE+iQAff85wgbT5AhACglF67s=; b=Satc0Gr7dlkIf4mTMylvPBzcysXP5Y0We7A2r+7GRPVKq0ypgv6NB+ymw81vh29Nf+ 5B+1Q+sQz/8x+cUC1zc2ul+wcXyWcWqKva7+TEAE5A2q24sAixzu0aRMUsFAqNFwLuDr VmIrEYo1uh0aAZRqDThQCrbb/KdDQsRjVONkpmnnct1cWsyeJHxhXlydF1DQdS0q5/eG OuxvAfva4GXpcHJxtpd+b1NQVUwXaOmnWDuVWwDXW77oupIbE835nIJVh7EAeaXM2q9o k0ysVx+jBM2BvslKpXrg9vtE4Wp6rS3cHpUntG230L34nIJ8WwCJaNAApMQYeV0+b53k N/oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707992399; x=1708597199; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=S3f0rb4C5lvPslwqInmE+iQAff85wgbT5AhACglF67s=; b=WG/C3nz52pNgKq+JPqk8Bbe9VwQoO/iTUwiKqTicOMLrE53K93gJdPIbmJ4XLWurYG 75xYvT0wf6ZCnPG/35kExxNivCUaZfH5MPzY4tZ+NsshLlvIbsMkXQ6HsHDc6ld3KpCN BCUXesmQsdlg6sQ7hkaN3QJ7AwFbg5tPPB6kcAQpxlK4WIoxBHi1Wq/EL/ERd/CC/s2Q j6yUaYtTndHLM04Qi6h9vxPPQ14v52W/TejILEFkdVv4crxIifGe+50lyb6IeILthtB9 nwRLh+TkmTdzo9faY1VaAPUGtPx8GGlgiPXpwssGDoF6WHJ6plFEb/4yeTY9XObyK4lA 2xPg== X-Forwarded-Encrypted: i=1; AJvYcCV9p2YGQx2D8jKJIoGYmXWoF3xLhCV52sowHWdqKaprKSFe0RVONfROmJVJ3M5GYgOsLEFgZKN7ZMgp819JpfnJGZEtpkdNuaOOoRC+ X-Gm-Message-State: AOJu0YwQpgyfDcPbo/DAloMYwxBPwd8f89j0hOpc+XrsQ6nZ8qDgsvi7 T/7rtUfkH7lDOLASCzRJfRUjT2jTdm4NOXmDHdtdob03sQx/tZuChW2leHu8/qI= X-Received: by 2002:a05:600c:1f8d:b0:410:c5a9:a24a with SMTP id je13-20020a05600c1f8d00b00410c5a9a24amr908467wmb.20.1707992398598; Thu, 15 Feb 2024 02:19:58 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.20]) by smtp.gmail.com with ESMTPSA id t12-20020a05600c198c00b004107686650esm1518508wmq.36.2024.02.15.02.19.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Feb 2024 02:19:57 -0800 (PST) Message-ID: <0815e67c-36b8-4626-90a2-f11607915da2@tuxon.dev> Date: Thu, 15 Feb 2024 12:19:56 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 1/3] net: macb: queue tie-off or disable during WOL suspend Content-Language: en-US To: "Karumanchi, Vineeth" , nicolas.ferre@microchip.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux@armlinux.org.uk Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, git@amd.com References: <20240130104845.3995341-1-vineeth.karumanchi@amd.com> <20240130104845.3995341-2-vineeth.karumanchi@amd.com> <6a8d100c-57a5-4c92-b744-453c106352ad@amd.com> From: claudiu beznea In-Reply-To: <6a8d100c-57a5-4c92-b744-453c106352ad@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, Vineeth, On 15.02.2024 07:43, Karumanchi, Vineeth wrote: > Hi Claudiu, > > On 2/3/2024 9:08 PM, claudiu beznea wrote: > <...> >>>           queue->tx_skb = NULL; >>> @@ -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; >> You also need to free the previously allocated rx buffers. > > Are you referring to (bp->macbgem_ops.mog_alloc_rx_buffers(bp)) allocation ? > It was freed in macb_free_consistent(): >              ... >              bp->macbgem_ops.mog_free_rx_buffers(bp); >              ... You're right, my bad. > > Please let me know if you are referring to different buffers. I was referring to bp->macbgem_ops.mog_alloc_rx_buffers but hat is covered as you pointed out. Thank you, Claudiu Beznea