On Sun, Oct 27, 2019 at 08:22:34AM +0200, Leon Romanovsky wrote: > From: Michael Guralnik <michaelgur@xxxxxxxxxxxx> > > Add a test in mlx5_ib initialization process to test whether > write-combining is supported on the machine. > The test will run as part of the enable_driver callback to ensure that > the test runs after the device is setup and can create and modify the > QP needed, but runs before the device is exposed to the users. > > The test opens UD QP and posts NOP WQEs, the WQE written to the BlueFlame > is differnet from the WQE in memory, requesting CQE only on the BlueFlame > WQE. By checking whether we received a completion on one of these WQEs we > can know if BlueFlame succeeded and whether write-combining is supported. > > Change reporting of BlueFlame support to be dependent on write-combining > support. > > Signed-off-by: Michael Guralnik <michaelgur@xxxxxxxxxxxx> > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > --- > Changelog: > v0 -> v1: https://lore.kernel.org/linux-rdma/20191020064400.8344-1-leon@xxxxxxxxxx > * First patch was merged, resend second only. > * Changed spin_lock() to spin_lock_irqsave() in post_send_nop(). Probably this should just be spin_lock_irq as we are definitely not already in a IRQ or atomic context at this point. > * Updated post_send_nop() current position math calculations. > --- > drivers/infiniband/hw/mlx5/main.c | 15 +- > drivers/infiniband/hw/mlx5/mem.c | 199 +++++++++++++++++++++++++++ > drivers/infiniband/hw/mlx5/mlx5_ib.h | 6 + > drivers/infiniband/hw/mlx5/qp.c | 6 +- > 4 files changed, 223 insertions(+), 3 deletions(-) Applied to for-next, thanks Jason