浏览代码

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<n>/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 <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Sell 9 年之前
父节点
当前提交
5990b39e26
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      drivers/staging/unisys/visorbus/visorbus_main.c

+ 3 - 5
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);
 
 	/*