Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391AbbKKAo2 (ORCPT ); Tue, 10 Nov 2015 19:44:28 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:43211 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbbKKAo1 (ORCPT ); Tue, 10 Nov 2015 19:44:27 -0500 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Andy Shevchenko Cc: "linux-kernel\@vger.kernel.org" , netdev , slash.tmp@free.fr Subject: Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller References: <1447172063-27234-1-git-send-email-mans@mansr.com> Date: Wed, 11 Nov 2015 00:44:26 +0000 In-Reply-To: (Andy Shevchenko's message of "Wed, 11 Nov 2015 02:36:43 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1320 Lines: 34 Andy Shevchenko writes: > On Wed, Nov 11, 2015 at 1:07 AM, Måns Rullgård wrote: >> Andy Shevchenko writes: > >>>>>> + nb8800_writel(priv, NB8800_TX_DESC_ADDR, txb->dma_desc); >>>>>> + wmb(); /* ensure desc addr is written before starting DMA */ >>>>> >>>>> Hm… Have I missed corresponding rmb() ? If it's about MMIO, perhaps mmiowb() ? >>>> >>>> Possibly. >>> >>> Standalone wmb() doesn't make sense. >> >> It does if you need to enforce ordering between normal and I/O memory. >> In fact, since the descriptor is filled in using normal memory accesses, >> my understanding is that mmiowb() would be insufficient here. The >> comment could be improved, however. > > Can you then explain what exactly you are assured against in all cases > where you are using wmb()s? It seems I don't recognize this part in > some excerpts. Certainly. I'll re-read memory-barriers.txt to make sure I'm doing the right thing, then write a better comment. -- Måns Rullgård mans@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/