mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
vdpa: bugfixes
fixes in mlx5 and pds drivers. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmVtsp0PHG1zdEByZWRo YXQuY29tAAoJECgfDbjSjVRpvEEH/1m4H6MagE0fZpgzx0mevsOM1mqEyTko9RIy G08TPP5zxlvjg1Ca+LJmrS8242d0KTZ+RGY/Cw7CdeEl23x6daljuQJO488jAbjK zD2tk4ciDabzVuzUNmYshLkMN31tRSWng/tRnx6J1Tu6NYes3lTHOQjk6wr6Ii8i FYEgytrg/dfoTeCqf3/pqLhJMq11LtnUoYvz9FQBPddCyn1XmbcbsdUNGVjojQqn L74nOUVbUyiRRm1WHS9xOErwkWMD41saOOKsAs5EmCaDpjU7C8YTX0kO1EYBUUqA lig2WEnEi73EhsSwQjQ7UtYAgA7R/sJD96njI2RA/jyaw85BjUw= =v4dZ -----END PGP SIGNATURE----- Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vdpa fixes from Michael Tsirkin: "Fixes in mlx5 and pds drivers" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: pds_vdpa: set features order pds_vdpa: clear config callback when status goes to 0 pds_vdpa: fix up format-truncation complaint vdpa/mlx5: preserve CVQ vringh index
This commit is contained in:
commit
1e53574844
|
|
@ -2815,13 +2815,18 @@ static int setup_cvq_vring(struct mlx5_vdpa_dev *mvdev)
|
|||
struct mlx5_control_vq *cvq = &mvdev->cvq;
|
||||
int err = 0;
|
||||
|
||||
if (mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ))
|
||||
if (mvdev->actual_features & BIT_ULL(VIRTIO_NET_F_CTRL_VQ)) {
|
||||
u16 idx = cvq->vring.last_avail_idx;
|
||||
|
||||
err = vringh_init_iotlb(&cvq->vring, mvdev->actual_features,
|
||||
MLX5_CVQ_MAX_ENT, false,
|
||||
(struct vring_desc *)(uintptr_t)cvq->desc_addr,
|
||||
(struct vring_avail *)(uintptr_t)cvq->driver_addr,
|
||||
(struct vring_used *)(uintptr_t)cvq->device_addr);
|
||||
|
||||
if (!err)
|
||||
cvq->vring.last_avail_idx = cvq->vring.last_used_idx = idx;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ void pds_vdpa_debugfs_add_vdpadev(struct pds_vdpa_aux *vdpa_aux)
|
|||
debugfs_create_file("config", 0400, vdpa_aux->dentry, vdpa_aux->pdsv, &config_fops);
|
||||
|
||||
for (i = 0; i < vdpa_aux->pdsv->num_vqs; i++) {
|
||||
char name[8];
|
||||
char name[16];
|
||||
|
||||
snprintf(name, sizeof(name), "vq%02d", i);
|
||||
debugfs_create_file(name, 0400, vdpa_aux->dentry,
|
||||
|
|
|
|||
|
|
@ -318,9 +318,8 @@ static int pds_vdpa_set_driver_features(struct vdpa_device *vdpa_dev, u64 featur
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
pdsv->negotiated_features = nego_features;
|
||||
|
||||
driver_features = pds_vdpa_get_driver_features(vdpa_dev);
|
||||
pdsv->negotiated_features = nego_features;
|
||||
dev_dbg(dev, "%s: %#llx => %#llx\n",
|
||||
__func__, driver_features, nego_features);
|
||||
|
||||
|
|
@ -461,8 +460,10 @@ static void pds_vdpa_set_status(struct vdpa_device *vdpa_dev, u8 status)
|
|||
|
||||
pds_vdpa_cmd_set_status(pdsv, status);
|
||||
|
||||
/* Note: still working with FW on the need for this reset cmd */
|
||||
if (status == 0) {
|
||||
struct vdpa_callback null_cb = { };
|
||||
|
||||
pds_vdpa_set_config_cb(vdpa_dev, &null_cb);
|
||||
pds_vdpa_cmd_reset(pdsv);
|
||||
|
||||
for (i = 0; i < pdsv->num_vqs; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user