linux-stable/drivers/platform/mellanox
Liming Sun 1c0e5701c5 platform/mellanox: mlxbf-tmfifo: Fix a memory barrier issue
The virtio framework uses wmb() when updating avail->idx. It
guarantees the write order, but not necessarily loading order
for the code accessing the memory. This commit adds a load barrier
after reading the avail->idx to make sure all the data in the
descriptor is visible. It also adds a barrier when returning the
packet to virtio framework to make sure read/writes are visible to
the virtio code.

Fixes: 1357dfd726 ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc")
Signed-off-by: Liming Sun <limings@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/1620433812-17911-1-git-send-email-limings@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-05-19 15:24:52 +02:00
..
Kconfig platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver 2020-10-28 12:00:24 +01:00
Makefile platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver 2020-10-28 12:00:24 +01:00
mlxbf-bootctl.c platform/mellanox: Typo fix in the file mlxbf-bootctl.c 2021-03-23 21:06:04 +01:00
mlxbf-bootctl.h platform/mellanox: Add bootctl driver for Mellanox BlueField Soc 2019-10-15 10:55:10 +03:00
mlxbf-pmc.c platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver 2020-10-28 12:00:24 +01:00
mlxbf-tmfifo-regs.h platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc 2019-05-06 17:54:42 +03:00
mlxbf-tmfifo.c platform/mellanox: mlxbf-tmfifo: Fix a memory barrier issue 2021-05-19 15:24:52 +02:00
mlxreg-hotplug.c platform/mellanox: mlxreg-hotplug: move to use request_irq by IRQF_NO_AUTOEN flag 2021-04-08 16:20:09 +02:00
mlxreg-io.c platform/mellanox: mlxreg-io: Add support for complex attributes 2020-07-15 12:45:07 +03:00