Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266832
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller |
| Date | 2015-11-10 23:50 +0100 |
| Message-ID | <qtpTH-2Jl-13@gated-at.bofh.it> (permalink) |
| References | <qtjOi-7kQ-23@gated-at.bofh.it> <qtph1-2up-21@gated-at.bofh.it> <qtpK2-2FJ-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Nov 11, 2015 at 12:34 AM, Måns Rullgård <mans@mansr.com> wrote:
> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
>
>>> +static inline void nb8800_maskb(struct nb8800_priv *priv, int reg,
>>> + u32 mask, u32 val)
>>> +{
>>> + u32 old = nb8800_readb(priv, reg);
>>> + u32 new = (old & ~mask) | val;
>>
>> Shoudn't be "… | (val & mask);" ?
>
> No, it's meant to replace the bits in mask with the corresponding bits
> from val.
But you unconditionally use entire val value which might bring bits
outside of mask.
>> Block comments usually
>> /*
>> * text
>> */
>
> Documentation/CodingStyle says net/ and drivers/net/ are special, though
> currently a mix of styles can be found. Personally, I don't
> particularly care.
OK.
>>> + 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.
--
With Best Regards,
Andy Shevchenko
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-10 23:40 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-10 23:50 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 00:10 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-11 01:40 +0100
Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 01:50 +0100
csiph-web