Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sinan Kaya and committed by
Alex Williamson
5afec274 a12a9368

+5 -4
+5 -4
drivers/vfio/platform/vfio_platform_common.c
··· 161 161 kfree(vdev->regions); 162 162 } 163 163 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) 165 166 { 166 167 if (vdev->of_reset) { 167 168 dev_info(vdev->device, "reset\n"); ··· 180 179 mutex_lock(&driver_lock); 181 180 182 181 if (!(--vdev->refcnt)) { 183 - vfio_platform_call_reset(vdev); 182 + vfio_platform_call_reset(vdev, NULL); 184 183 vfio_platform_regions_cleanup(vdev); 185 184 vfio_platform_irq_cleanup(vdev); 186 185 } ··· 209 208 if (ret) 210 209 goto err_irq; 211 210 212 - vfio_platform_call_reset(vdev); 211 + vfio_platform_call_reset(vdev, NULL); 213 212 } 214 213 215 214 vdev->refcnt++; ··· 341 340 return ret; 342 341 343 342 } else if (cmd == VFIO_DEVICE_RESET) { 344 - return vfio_platform_call_reset(vdev); 343 + return vfio_platform_call_reset(vdev, NULL); 345 344 } 346 345 347 346 return -ENOTTY;