summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/efa/efa_com.c
AgeCommit message (Collapse)AuthorFilesLines
2021-01-28RDMA/efa: Remove duplication of upper/lower_32_bitsGal Pressman1-9/+6
The EFA_DMA_ADDR_TO_UINT32_HIGH/LOW macros are the same as the kernel's upper/lower_32_bits, remove them and use kernel macros instead. Link: https://lore.kernel.org/r/20210126120702.9807-3-galpress@amazon.com Reviewed-by: Firas JahJah <firasj@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-01-28RDMA/efa: Remove redundant NULL pointer check of CQEGal Pressman1-10/+6
A pointer to store the command completion must be provided as it is always used in efa_com_put_comp_ctx() to return the completion context back to the pool. Remove the NULL pointer check and the redundant 'status' field stored on the context as it could be retrieved from the completion itself. Link: https://lore.kernel.org/r/20210126120702.9807-2-galpress@amazon.com Reviewed-by: Firas JahJah <firasj@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-01-22RDMA/hw/efa/efa_com: Stop using param description notation for non-paramsLee Jones1-1/+1
Fixes the following W=1 kernel build warning(s): drivers/infiniband/hw/efa/efa_com.c:801: warning: Excess function parameter 'note' description in 'efa_com_admin_q_comp_intr_handler' Link: https://lore.kernel.org/r/20210121094519.2044049-4-lee.jones@linaro.org Cc: Gal Pressman <galpress@amazon.com> Cc: Yossi Leybovich <sleybo@amazon.com> Cc: Doug Ledford <dledford@redhat.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: linux-rdma@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-05-03RDMA/efa: Count admin commands errorsGal Pressman1-1/+4
Add a new stat that counts admin commands failures, which might help when debugging different issues. Link: https://lore.kernel.org/r/20200420062213.44577-4-galpress@amazon.com Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-02-28RDMA/efa: Properly document the interrupt mask registerGal Pressman1-3/+1
The fact that the LSB in the register is the enable bit should not be an implicit assumption between the driver and the device, properly document that in the register definition. Link: https://lore.kernel.org/r/20200225114010.21790-3-galpress@amazon.com Reviewed-by: Firas JahJah <firasj@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-02-28RDMA/efa: Unified getters/setters for device structs bitmask accessGal Pressman1-83/+71
Use unified macros for device structs access instead of open coding the shifts and masks over and over again. Link: https://lore.kernel.org/r/20200225114010.21790-2-galpress@amazon.com Reviewed-by: Firas JahJah <firasj@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-11-14RDMA/efa: Clear the admin command buffer prior to its submissionGal Pressman1-1/+4
We cannot rely on the entry memcpy as we only copy the actual size of the command, the rest of the bytes must be memset to zero. Currently providing non-zero memory will not have any user visible impact. However, since admin commands are extendable (in a backwards compatible way) everything beyond the size of the command must be cleared to prevent issues in the future. Fixes: 0420e542569b ("RDMA/efa: Implement functions that submit and complete admin commands") Link: https://lore.kernel.org/r/20191112092608.46964-1-galpress@amazon.com Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com> Reviewed-by: Firas JahJah <firasj@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-08-05RDMA/efa: Rate limit admin queue error printsGal Pressman1-31/+39
Admin queue error prints should never happen unless something wrong happened to the device. However, in the unfortunate case that it does, we should take extra care not to flood the log with error messages. Reviewed-by: Firas JahJah <firasj@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Link: https://lore.kernel.org/r/20190801171447.54440-3-galpress@amazon.com Signed-off-by: Doug Ledford <dledford@redhat.com>
2019-07-04RDMA/efa: Entropy in admin commands idDaniel Kranzdorf1-21/+23
Make admin commands id easier to distinguish by using relevant bits from the producer counter. This allows us to differentiate admin commands with the same producer index (happens after admin queue overlap), which is helpful when debugging. Signed-off-by: Daniel Kranzdorf <dkkranzd@amazon.com> Reviewed-by: Firas JahJah <firasj@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-05-29RDMA/efa: Remove unneeded admin commands abort flowGal Pressman1-73/+1
The admin commands abort flow is buggy (use-after-free) and not really necessary as it is guaranteed that after ib_unregister_device() is called there are no user verbs threads running in parallel, delete it. Suggested-by: Jason Gunthorpe <jgg@ziepe.ca> Reviewed-by: Firas JahJah <firasj@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-05-06RDMA/efa: Implement functions that submit and complete admin commandsGal Pressman1-0/+1160
Add admin commands submissions/completions implementation. Signed-off-by: Gal Pressman <galpress@amazon.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>