diff --git a/drivers/ub/hw/hns3/Kconfig b/drivers/ub/hw/hns3/Kconfig index 82ca7b9106739808fdd5978063001be780901343..541bf14fcd92c1ebbea2e1df7f589360dc6f40c5 100644 --- a/drivers/ub/hw/hns3/Kconfig +++ b/drivers/ub/hw/hns3/Kconfig @@ -8,7 +8,7 @@ config UB_UDMA_HNS3 tristate "HNS3 UB UDMA Driver" depends on UB && UB_URMA depends on ARM64 - depends on UBL && PCI + depends on HNS3 && UBL && PCI help This is a UB_UDMA_HNS3 driver for the Hisilicon UDMA engine. This driver depands on ubcore and uburma. diff --git a/drivers/ub/hw/hns3/hns3_udma_common.h b/drivers/ub/hw/hns3/hns3_udma_common.h index 588eb1fa091b22708574dac231e9333921b24a5e..35583b63f8e13055b65abec3e5b73945d16c73a6 100644 --- a/drivers/ub/hw/hns3/hns3_udma_common.h +++ b/drivers/ub/hw/hns3/hns3_udma_common.h @@ -66,7 +66,8 @@ _udma_reg_clear((ptr), field); \ *((uint32_t *)(ptr) + ((field) >> 32) / 32) |= \ cpu_to_le32(FIELD_PREP(GENMASK(((field) >> 32) % 32, \ - (((field) << 32) >> 32) % 32), _val)); \ + (((field) << 32) >> 32) % 32), _val & \ + GENMASK((((field) >> 32) - (((field) << 32) >> 32)), 0))); \ }) #define udma_reg_write(ptr, field, val) _udma_reg_write(ptr, field, val)