From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A8CDC433EF for ; Thu, 30 Sep 2021 06:02:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8FAA610A2 for ; Thu, 30 Sep 2021 06:02:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D8FAA610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B9D16E2E3; Thu, 30 Sep 2021 06:02:29 +0000 (UTC) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by gabe.freedesktop.org (Postfix) with ESMTPS id B44B56EB03 for ; Wed, 29 Sep 2021 23:05:05 +0000 (UTC) Received: by mail-ed1-x533.google.com with SMTP id v10so14742478edj.10 for ; Wed, 29 Sep 2021 16:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=junDmjsGeeXH6AFTkfwWvE4eRp4hhF7+aaNBz6qBSf8=; b=nh+yG0zcGzynV4sBXDmkkmzICeb9RD15jcVuXjresYcIPWYL58XSbBQJPKfFUhr8HZ MK4Ib2UM8QwPkWwPxTMaRQEZ7gbfZVkjY7R55PfgC8cA3vxaGIuubZfMiyj9VlQerY0G qzd51mNwVvGn5OlKaSz/Lja0vXV7+4AkM9gTHuvhGWaH7j6tX0+l7bCARq1tzxrntQrq CvBE28bSBCl3RlT5j8Yqj/eKQpRAQ+yYCXcXk9WsLzhOo96mtf6lFIu/3zDEbovoQwEZ tHt6Xf2OqFLnM2+N8UUPKz225lJqSVJC5Yg9eYivz/QUcj3aj93WFOKT1cDCHpAZRDjK QYuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=junDmjsGeeXH6AFTkfwWvE4eRp4hhF7+aaNBz6qBSf8=; b=rSpDT/1UXWGmEMRzAXJPNEX3+4tpJUDpzmYg/DdJDmqTvmtUQ25Vz2ZTLmArr3ZHjA Q/LKg5A0vzQu1dIveYGh/Mr1GX9QdThbdiVz4cA3bzM5aszqHxoaCKpQWyyRsmjZ+JCm 0xQIVGduAdodtVirti/yOVlYS15PQSZd/vW0QPt79ZfNCXXJpOjWUkFKwneN2zyrGx2J q6nYiHI5KdKsCEDlm7/7PmE7iDQe7+CKznF2bQPK/7nGyoqg6H85AFBJloilb0Dx+Gmr EWohzn9UR4rYs+Tu2YKD1my2m3VXfg15y7aXFYaxwWgHt66z9x8MFiPThvWHXkLUwuXr E8Wg== X-Gm-Message-State: AOAM532Qm+PQeQu9JXZPZJOk33TEdNIDfSfQnfGfP7TM+9SX6WyUPZIS FhDSloo1dh14VCB0OOaRPDuEP/t/8XuUSpEZh2o= X-Google-Smtp-Source: ABdhPJxNd8W4XXeXlRU3CKfDahGD6/F3XW55XhcqTgBtosY67UqcxtnkEDtJXvkNIg6AA+Ojjixpjh5S39+glLbrxjQ= X-Received: by 2002:a05:6402:513:: with SMTP id m19mr1037540edv.184.1632956703972; Wed, 29 Sep 2021 16:05:03 -0700 (PDT) MIME-Version: 1.0 References: <1632519891-26510-1-git-send-email-justinpopo6@gmail.com> <1632519891-26510-4-git-send-email-justinpopo6@gmail.com> In-Reply-To: From: Justin Chen Date: Wed, 29 Sep 2021 16:04:53 -0700 Message-ID: Subject: Re: [PATCH net-next 3/5] net: bcmasp: Add support for ASP2.0 Ethernet controller To: Andrew Lunn Cc: Florian Fainelli , netdev@vger.kernel.org, bcm-kernel-feedback-list , "David S. Miller" , Jakub Kicinski , Rob Herring , Doug Berger , Heiner Kallweit , Russell King , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Randy Dunlap , Arnd Bergmann , Michael Chan , Geert Uytterhoeven , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "open list:DMA BUFFER SHARING FRAMEWORK" , "open list:DMA BUFFER SHARING FRAMEWORK" , "moderated list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Thu, 30 Sep 2021 06:02:28 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sun, Sep 26, 2021 at 6:58 AM Andrew Lunn wrote: > > > > > +static int bcmasp_set_priv_flags(struct net_device *dev, u32 flags) > > > > +{ > > > > + struct bcmasp_intf *intf = netdev_priv(dev); > > > > + > > > > + intf->wol_keep_rx_en = flags & BCMASP_WOL_KEEP_RX_EN ? 1 : 0; > > > > + > > > > + return 0; > > > > > > Please could you explain this some more. How can you disable RX and > > > still have WoL working? > > > > Wake-on-LAN using Magic Packets and network filters requires keeping the > > UniMAC's receiver turned on, and then the packets feed into the Magic Packet > > Detector (MPD) block or the network filter block. In that mode DRAM is in > > self refresh and there is local matching of frames into a tiny FIFO however > > in the case of magic packets the packets leading to a wake-up are dropped as > > there is nowhere to store them. In the case of a network filter match (e.g.: > > matching a multicast IP address plus protocol, plus source/destination > > ports) the packets are also discarded because the receive DMA was shut down. > > > > When the wol_keep_rx_en flag is set, the above happens but we also allow the > > packets that did match a network filter to reach the small FIFO (Justin > > would know how many entries are there) that is used to push the packets to > > DRAM. The packet contents are held in there until the system wakes up which > > is usually just a few hundreds of micro seconds after we received a packet > > that triggered a wake-up. Once we overflow the receive DMA FIFO capacity > > subsequent packets get dropped which is fine since we are usually talking > > about very low bit rates, and we only try to push to DRAM the packets of > > interest, that is those for which we have a network filter. > > > > This is convenient in scenarios where you want to wake-up from multicast DNS > > (e.g.: wake on Googlecast, Bonjour etc.) because then the packet that > > resulted in the system wake-up is not discarded but is then delivered to the > > network stack. > > Thanks for the explanation. It would be easier for the user if you > automate this. Enable is by default for WoL types which have user > content? > Yup that can work. We can enable it for WAKE_FILTER type wol and leave it disabled otherwise. > > > > + /* Per ch */ > > > > + intf->tx_spb_dma = priv->base + TX_SPB_DMA_OFFSET(intf); > > > > + intf->res.tx_spb_ctrl = priv->base + TX_SPB_CTRL_OFFSET(intf); > > > > + /* > > > > + * Stop gap solution. This should be removed when 72165a0 is > > > > + * deprecated > > > > + */ > > > > > > Is that an internal commit? > > > > Yes this is a revision of the silicon that is not meant to see the light of > > day. > > So this can all be removed? > Yup. That can be removed > Andrew Thanks for the review. Justin