]> git.baikalelectronics.ru Git - kernel.git/commitdiff
habanalabs/gaudi: use correct type in assignment
authorOded Gabbay <ogabbay@kernel.org>
Fri, 24 Jun 2022 13:05:59 +0000 (16:05 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 12 Jul 2022 06:09:25 +0000 (09:09 +0300)
packets are defined as LE so we need to convert before assigning
values to them.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi/gaudi.c

index 8cf3382fa0395ca51a71eaa7c6c10405e6182b01..9ecae3da9133ccef7a6c584e24f6413d520b14b8 100644 (file)
@@ -5772,7 +5772,7 @@ static void gaudi_add_end_of_cb_packets(struct hl_device *hdev, void *kernel_add
        cq_pkt = kernel_address + len - (sizeof(struct packet_msg_prot) * 2);
 
        while ((void *)cq_padding < (void *)cq_pkt) {
-               cq_padding->ctl = FIELD_PREP(GAUDI_PKT_CTL_OPCODE_MASK, PACKET_NOP);
+               cq_padding->ctl = cpu_to_le32(FIELD_PREP(GAUDI_PKT_CTL_OPCODE_MASK, PACKET_NOP));
                cq_padding++;
        }