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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04FC6C433F5 for ; Sun, 9 Jan 2022 20:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AwHVsXEzmjq5U8XoBK9YepDBMJWRtC04efE/VXjV5aQ=; b=1XAa7dCsv3JaOw 6J4neXeBQp8sZTBZ/cVUkCHZ7XeLohUCuywZZhGBDr4aVCEeiSLnnT+1LTcPJoRbXTg+fPxqMPuCH CrLOD5lbgR47qYQVPCkiP7Jq55vSLQt3Jb85of3Pgr3bJTHf3X5eBEIZS3jNXS3pFbHazhfDjMP2G 5fmt9r8eBsfZXBGNJrlNpQfxbCN6aa/Sm5HVrrpvaXpVdzMflj/Y2BTG+cBDiFDFA4gm6WWpvSTnU w+H1O6JXTTP1MmVAMmrJWlBDjt4Fuo1F6HCvq05eK0cqZTIiZg1E4VrkC053ylv9tN+OSSXQwEU09 Ixc8NKMhjROiwe2IBOpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6f3u-008NK9-MM; Sun, 09 Jan 2022 20:45:10 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6f3r-008NJp-Uh for linux-arm-kernel@lists.infradead.org; Sun, 09 Jan 2022 20:45:09 +0000 Received: by mail-wm1-x32f.google.com with SMTP id o7-20020a05600c510700b00347e10f66d1so987146wms.0 for ; Sun, 09 Jan 2022 12:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Gi9wdT5oBY51uN+zY1MwVpQ/L/Lhj3gJuhU6uQRdk/w=; b=m1su08LbeO1QD13eo/+OKp3M9WjRJAE8Kaz45RmW61zZ/KHLJTuFEEGlr7OdcQdp6Y LRmE73W+JHeQGv9q1Jc3LbukOGWJNs7Anulqo+3FQZHPyShZnUppB4Xhntozni6/NXlU Ti6qB0FPK64y6jUD2meZdwvdm6/5BIwLEAU4WwqeDqtKOqvTMnCSDcdanbU1siPDSJlR luqBwyH5jm5f5m/0FyUei0zfhnfHze72CEYD/IHeb4ONc8HupgopkR9BxFf5WjokM4M0 eTRxuIyv2Jayi8ZmUfMdfg1yRZInYNod1HgV0VRmPTZx26GCAadz7olmnd07QVarAku1 7CVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Gi9wdT5oBY51uN+zY1MwVpQ/L/Lhj3gJuhU6uQRdk/w=; b=xgD3v18fid2hQtPXn5AIM/SipMBtTtetFpLAqHyVJE00d/DOF1Ia+2DACkk9rZFLpF CN4zCe3/m3yF/Xrkhk8aqzLS/ZExzIDesgo5buFVnmW5eVMmPWZKK6QjZGSfAxZH9gpX yp/CZ8uuqY3I8NEEHDUaG0FsllZxXO+SBg1nZFxG6KgOH7W8YY1bdlr2RFLv+4WJ8yOr dYFSfZjBd3BXslZgm5jnKFi7oE1HhydVB8Oo90Lfwv5wQVhOJPLMbLkbevE3MK2WTdKN nYf6AmwofQYBMtqKPLArBaLhfYhfNt5i5AJwGgl6OT/qvfKq1kbIu5Z4d07KJz7dplyY jQdQ== X-Gm-Message-State: AOAM530P81BxbsoPm/hKvQiNWvLBvWzGs9gWond/SMMrLl1sonA8ensn BpyfMxhE1YkUeqW0jk8HyvM= X-Google-Smtp-Source: ABdhPJxaNhA2ItZzKI6DN4P4iEVQQrkjsiqKEKfNL810ixld5yhvQDHS1ieLOJEQh6FXCWW/mskzSg== X-Received: by 2002:a7b:c931:: with SMTP id h17mr2675642wml.49.1641761105763; Sun, 09 Jan 2022 12:45:05 -0800 (PST) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id l14sm5030936wrr.53.2022.01.09.12.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 12:45:05 -0800 (PST) Date: Sun, 9 Jan 2022 21:45:01 +0100 From: Corentin Labbe To: conleylee@foxmail.com Cc: davem@davemloft.net, mripard@kernel.org, wens@csie.org, jernej.skrabec@gmail.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] sun4i-emac.c: enable emac tx dma Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220109_124508_037437_3387AFAD X-CRM114-Status: GOOD ( 19.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le Sun, Jan 09, 2022 at 05:17:55PM +0800, conleylee@foxmail.com a =E9crit : > From: conley > = > Hello > I am reading the R40 user manual and trying to create a new path to enable > emac tx dma channel. According to the figure 8-21(TX Operation Diagram), > I try to enable emac tx dma channel by the follow steps: > 1. enable tx dma mode > 2. set packet lengths > 2. move data from skb to tx fifo by using dma in xmit function. > 3. start transfer from tx fifo to phy in dma tx done callback > = > But it doesn't work. emac tx interrupt and dma finished interrupt are > raised, but no packets are transmitted (I test it by tcpdump). > Do you know how to configure the emac tx dma correctly? Thanks ~ > = Hello Here are my thoughts to help you: - Your email is not a real patch, but an ask for help, so you should not us= e [ PATCH ] in the subject. - If it was a patch, "v1" is not necessary - Your patch below is doing too many unrelated different things, it is hard= to see the DMA TX enable part - I think you could first send a preliminary patch which adds all EMAC_INT_= CTL_TX_xxx which are already used by the driver (to reduce the diff) - Without the DTB change, it is hard to see the whole picture, did you corr= ectly use the right dma number for an easy example. - Knowing also the board (and so PHY, modes etc...) could help - I think your priority should not to add TX, but to fix reported problems = to your initial patch (build warnings/error https://marc.info/?l=3Dlinux-ar= m-kernel&m=3D164159846213585&w=3D2) since your work on TX will need to be a= pplied after this. - For the previous point, always build test with at least 2 different 32/64= arch. And if possible a total different arch (like x86_64). Anyway, I will try to test your patch on my a10 board Regards _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel