]> git.baikalelectronics.ru Git - kernel.git/commitdiff
habanalabs: update patched_cb_size for Wreg32
authorRachel Stahl <rstahl@habana.ai>
Sun, 17 May 2020 05:33:54 +0000 (08:33 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 19 May 2020 11:48:41 +0000 (14:48 +0300)
The patch_cb_size is not updated for Wreg32 in its validate function, so
updated in goya_validate_cb.

Signed-off-by: Rachel Stahl <rstahl@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/goya/goya.c

index 56f415f9120a920275ce7a072d3a02f013f0e12c..15b6c3228e37ce91588f0adf9d627ac7b17acf49 100644 (file)
@@ -3394,6 +3394,7 @@ static int goya_validate_cb(struct hl_device *hdev,
                         */
                        rc = goya_validate_wreg32(hdev,
                                parser, (struct packet_wreg32 *) user_pkt);
+                       parser->patched_cb_size += pkt_size;
                        break;
 
                case PACKET_WREG_BULK: