Skip to content

Commit 5afec27

Browse files
Sinan KayaAlex Williamson
authored andcommitted
vfio: platform: add extra debug info argument to call reset
Getting ready to bring out extra debug information to the caller so that more verbose information can be printed when an error is observed. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Reviewed-by: Baptiste Reynal <b.reynal@virtualopensystems.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent a12a936 commit 5afec27

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/vfio/platform/vfio_platform_common.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ static void vfio_platform_regions_cleanup(struct vfio_platform_device *vdev)
161161
kfree(vdev->regions);
162162
}
163163

164-
static int vfio_platform_call_reset(struct vfio_platform_device *vdev)
164+
static int vfio_platform_call_reset(struct vfio_platform_device *vdev,
165+
const char **extra_dbg)
165166
{
166167
if (vdev->of_reset) {
167168
dev_info(vdev->device, "reset\n");
@@ -179,7 +180,7 @@ static void vfio_platform_release(void *device_data)
179180
mutex_lock(&driver_lock);
180181

181182
if (!(--vdev->refcnt)) {
182-
vfio_platform_call_reset(vdev);
183+
vfio_platform_call_reset(vdev, NULL);
183184
vfio_platform_regions_cleanup(vdev);
184185
vfio_platform_irq_cleanup(vdev);
185186
}
@@ -208,7 +209,7 @@ static int vfio_platform_open(void *device_data)
208209
if (ret)
209210
goto err_irq;
210211

211-
vfio_platform_call_reset(vdev);
212+
vfio_platform_call_reset(vdev, NULL);
212213
}
213214

214215
vdev->refcnt++;
@@ -340,7 +341,7 @@ static long vfio_platform_ioctl(void *device_data,
340341
return ret;
341342

342343
} else if (cmd == VFIO_DEVICE_RESET) {
343-
return vfio_platform_call_reset(vdev);
344+
return vfio_platform_call_reset(vdev, NULL);
344345
}
345346

346347
return -ENOTTY;

0 commit comments

Comments
 (0)