From 5990b39e26db1126f475f94ea78fe07ea3782e28 Mon Sep 17 00:00:00 2001 From: Tim Sell Date: Tue, 27 Sep 2016 14:42:22 -0400 Subject: [PATCH] staging: unisys: visorbus: fix vbus info generated for s-Par livedumps Previously, the lines describing devices controlled by the visorinput, visornic, and visorhba drivers (keyboard, mouse, ultravnic, sparvhba) would be missing from the vbus channel header. This is important info that is collected as part of s-Par livedumps, and can be examined via /sys/bus/visorbus/devices/visorbus/client_bus_info, e.g.: $ pwd /sys/bus/visorbus/devices $ cat visorbus1/client_bus_info Client device / client driver info for s-Par Console eartition (vbus #4294967295): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ -> [2]keyboard visorinput kernel ver. 4.8.0-rc6-ARCH+ -> [3]mouse visorinput kernel ver. 4.8.0-rc6-ARCH+ $ cat visorbus2/client_bus_info Client device / client driver info for s-Par IOVM eartition (vbus #4294967295): chipset visorchipset kernel ver. 4.8.0-rc6-ARCH+ clientbus visorbus kernel ver. 4.8.0-rc6-ARCH+ -> [0]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ -> [1]ultravnic visornic kernel ver. 4.8.0-rc6-ARCH+ -> [2]sparvhba visorhba kernel ver. 4.8.0-rc6-ARCH+ Signed-off-by: Tim Sell Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorbus_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index ccdb5a1f45d9..2b4abda0fa9e 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -796,14 +796,12 @@ fix_vbus_dev_info(struct visor_device *visordev) if (!visordev->device.driver) return; - hdr_info = (struct spar_vbus_headerinfo *)visordev->vbus_hdr_info; - if (!hdr_info) - return; - bdev = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL); if (!bdev) return; - + hdr_info = (struct spar_vbus_headerinfo *)bdev->vbus_hdr_info; + if (!hdr_info) + return; visordrv = to_visor_driver(visordev->device.driver); /* -- 2.39.5