Subject: Re: [PATCH net] net/mlx4_en: correct the endianness of doorbell_qpn on big endian platform

From: Amir Vadai <[email-masked]>
Date: Mon, 15 Dec 2014 11:59:15 +0200

On 12/15/2014 3:32 AM, Wei Yang wrote:
[...]

Hi David's,

I need to do a native endianness write to the NIC register (the write is
on the fast path and the register value could be calculated once).

iowrite32be() is calling cpu_to_be32() on the value.
iowrite32() is calling cpu_to_le32().

I thought about using raw_writel() but as David Miller said, it lacks
necessary io barriers on some archs.

Does the only solution to this, is to add some sort of
iowrite32be_native(__be32 val,...) function to all the archs?

Thanks,
Amir