Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER

Yishai Hadas
2016-10-06T12:09:02Z

On 10/5/2016 8:44 PM, Jason Gunthorpe wrote:
> On Wed, Oct 05, 2016 at 06:16:45PM +0300, Yishai Hadas wrote:
>
>> Upon QP creation the code uses htonl for setting qp->doorbell_qpn (see
>> mlx4_create_qp_ex), later on this value is used without any change upon
>> writing a door bell. (see mmio_writel). No PCI swap is expected.
>
> Thanks, so the mlx drivers are doing what the kernel calls writel_be()?

It's logically the same. You can look also in mlx4 driver code in the
kernel [1], writel() is used on qp->doorbell_qpn which was previously
set to be BE as the hardware expects.

[1]