summaryrefslogtreecommitdiff
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2015-06-12 16:46:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-12 17:08:07 -0700
commit86ea8acc6b494dbadd16a82ed778a68d5b4d4091 (patch)
tree3e30d4010a88fa75b3ec7e2024d7b9594b41fa0e /drivers/staging/unisys
parent5e54654c41bfb9216b551fd3a3891c2da60eadae (diff)
staging: unisys: Don't hold device responses until driver loads
Currently if a driver is not loaded for a device, we will not respond to the device create until it is done. This causes s-Par to not mark the partition running if the driver for the device is not loaded. Since there are several devices that could be assigned to a guest that don't have an actual driver this will cause us to never go running. If the device driver is loaded, we WILL continue to only respond to the device PAUSE message when the device driver has responded that it is done with the device. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorbus/visorbus_main.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 6fa17eadc306..6db47196c189 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -70,7 +70,6 @@ static const struct attribute_group *visorbus_bus_groups[] = {
NULL,
};
-
/** This describes the TYPE of bus.
* (Don't confuse this with an INSTANCE of the bus.)
*/
@@ -745,19 +744,6 @@ visordriver_probe_device(struct device *xdev)
away:
if (rc != 0)
put_device(&dev->device);
- /* We could get here more than once if the child driver module is
- * unloaded and re-loaded while devices are present. That's why we
- * need a flag to be sure that we only respond to the device_create
- * once. We cannot respond to the device_create prior to here,
- * because until we call drv->probe() above, the channel has not been
- * initialized.
- */
- if (!dev->responded_to_device_create) {
-
- dev->responded_to_device_create = true;
- if (chipset_responders.device_create)
- (*chipset_responders.device_create)(dev, rc);
- }
return rc;
}
@@ -1305,15 +1291,15 @@ chipset_device_create(struct visor_device *dev_info)
POSTCODE_SEVERITY_INFO);
rc = create_visor_device(dev_info);
- if (rc < 0) {
+ if (chipset_responders.device_create)
+ chipset_responders.device_create(dev_info, rc);
+
+ if (rc < 0)
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
POSTCODE_SEVERITY_ERR);
- if (chipset_responders.device_create)
- (*chipset_responders.device_create)(dev_info, rc);
- }
-
- POSTCODE_LINUX_4(DEVICE_CREATE_SUCCESS_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_INFO);
+ else
+ POSTCODE_LINUX_4(DEVICE_CREATE_SUCCESS_PC, dev_no, bus_no,
+ POSTCODE_SEVERITY_INFO);
}
static void