Modify two code bugs inside the driver, update the format of the
driver's log and comments, and delete an unused macro definition.
Longfang Liu (5):
hisi_acc_vfio_pci: Fixes error return code issue
hisi_acc_vfio_pci: Fix device data address combination problem
hisi_acc_vfio_pci: Remove useless function parameter
hisi_acc_vfio_pci: Remove useless macro definitions
hisi_acc_vfio_pci: Update some log and comment formats
.../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 36 ++++++++++---------
.../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 7 ++--
2 files changed, 22 insertions(+), 21 deletions(-)
--
2.33.0
The queue address of the accelerator device should be combined into
a dma address in a way of combining the low and high bits.
The previous combination is wrong and needs to be modified.
Signed-off-by: Longfang Liu <[email protected]>
---
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
index 7ce656a7cf5c..0638a8a6b0c1 100644
--- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
+++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
@@ -528,12 +528,12 @@ static int vf_qm_state_save(struct hisi_acc_vf_core_device *hisi_acc_vdev,
return -EINVAL;
/* Every reg is 32 bit, the dma address is 64 bit. */
- vf_data->eqe_dma = vf_data->qm_eqc_dw[2];
+ vf_data->eqe_dma = vf_data->qm_eqc_dw[1];
vf_data->eqe_dma <<= QM_XQC_ADDR_OFFSET;
- vf_data->eqe_dma |= vf_data->qm_eqc_dw[1];
- vf_data->aeqe_dma = vf_data->qm_aeqc_dw[2];
+ vf_data->eqe_dma |= vf_data->qm_eqc_dw[0];
+ vf_data->aeqe_dma = vf_data->qm_aeqc_dw[1];
vf_data->aeqe_dma <<= QM_XQC_ADDR_OFFSET;
- vf_data->aeqe_dma |= vf_data->qm_aeqc_dw[1];
+ vf_data->aeqe_dma |= vf_data->qm_aeqc_dw[0];
/* Through SQC_BT/CQC_BT to get sqc and cqc address */
ret = qm_get_sqc(vf_qm, &vf_data->sqc_dma);
--
2.33.0
On Thu, Sep 22, 2022 at 04:39:23PM +0800, Longfang Liu wrote:
> Modify two code bugs inside the driver, update the format of the
> driver's log and comments, and delete an unused macro definition.
>
> Longfang Liu (5):
> hisi_acc_vfio_pci: Fixes error return code issue
> hisi_acc_vfio_pci: Fix device data address combination problem
> hisi_acc_vfio_pci: Remove useless function parameter
> hisi_acc_vfio_pci: Remove useless macro definitions
> hisi_acc_vfio_pci: Update some log and comment formats
>
> .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 36 ++++++++++---------
> .../vfio/pci/hisilicon/hisi_acc_vfio_pci.h | 7 ++--
> 2 files changed, 22 insertions(+), 21 deletions(-)
For the series
Reviewed-by: Jason Gunthorpe <[email protected]>
Jason