From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 4F1DE70 for ; Tue, 8 Jun 2021 15:32:07 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 7F6FC68B05; Tue, 8 Jun 2021 17:32:03 +0200 (CEST) Date: Tue, 8 Jun 2021 17:32:03 +0200 From: 'Christoph Hellwig' To: David Laight Cc: 'Christoph Hellwig' , Guo Ren , Nick Kossifidis , Drew Fustini , Anup Patel , Palmer Dabbelt , "wefu@redhat.com" , Wei Wu =?utf-8?B?KOWQtOS8nyk=?= , linux-riscv , Linux Kernel Mailing List , linux-arch , "linux-sunxi@lists.linux.dev" , Guo Ren , Paul Walmsley , Benjamin Koch , Matteo Croce , Wei Fu Subject: Re: [PATCH RFC 0/3] riscv: Add DMA_COHERENT support Message-ID: <20210608153203.GA6802@lst.de> References: <20210519064435.GA3076809@x1> <20210519065352.GA31590@lst.de> <29733b0931d9dd6a2f0b6919067c7efe@mailhost.ics.forth.gr> <20210607062701.GB24060@lst.de> <2db975b5f24149b19191120b9f0f506b@AcuMS.aculab.com> X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2db975b5f24149b19191120b9f0f506b@AcuMS.aculab.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Jun 08, 2021 at 03:00:17PM +0000, David Laight wrote: > It is almost impossible to interface to many ethernet chips without > either coherent or uncached memory for the descriptor rings. > The status bits on the transmit ring are particularly problematic. > > The receive ring can be done with writeback+invalidate provided you > fill a cache line at a time. It is horrible, but it has been done. Take a look at: drivers/net/ethernet/i825xx/lasi_82596.c and drivers/net/ethernet/seeq/sgiseeq.c