habanalabs: fix endianness handling for packets from user
authorBen Segal <bpsegal20@gmail.com>
Thu, 1 Aug 2019 23:20:32 +0000 (23:20 +0000)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 12 Aug 2019 06:01:10 +0000 (09:01 +0300)
commit213ad5ad016a0da975b35f54e8cd236c3b04724b
treea86289aa7e499be88a265dfe4918fca3bbb27ca9
parentc8113756ba27298d6e95403c087dc5881b419a99
habanalabs: fix endianness handling for packets from user

Packets that arrive from the user and need to be parsed by the driver are
assumed to be in LE format.

This patch fix all the places where the code handles these packets and use
the correct endianness macros to handle them, as the driver handles the
packets in CPU format (LE or BE depending on the arch).

Signed-off-by: Ben Segal <bpsegal20@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/include/goya/goya_packets.h