]> git.baikalelectronics.ru Git - kernel.git/commit
staging: unisys: add sysfs entries for parahotplug support
authorBenjamin Romer <benjamin.romer@unisys.com>
Tue, 29 Jul 2014 15:11:21 +0000 (11:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jul 2014 00:09:53 +0000 (17:09 -0700)
commit069425e45efebe37b16c3237818c4172fc39cb74
tree82ba1893ed69d1efdd06c0edb789201c138eeb8c
parent65a035f6a9bd291ace2162ecfe0a16ef15116a74
staging: unisys: add sysfs entries for parahotplug support

This patch adds new a new directory parahotplug to the visorchipset sysfs
directory, and two new attributes, deviceenabled, and devicedisabled, into the
new directory, to add s-Par parahotplug support.

The parahotplug interface is used to deal with SR-IOV recovery situations on
s-Par guest partitions. The command service partition will send a message to a
guest when an SR-IOV device that guest is using needs to be temporarily removed.
The message triggers a udev event that will cause a recovery script to run.
When that script has completed its work, it will write to one of the
parahotplug interfaces to send a message back to Command, indicating that the
recovery action has completed.

When a guest that is sharing an SR-IOV device is restarted, that guest will
take down the PF driver on the device, but any guests with VFs will not know
that their device needs to be reset as well. The recovery script makes it so
the device will be shut down fully and then restarted after the sharing guest
comes back up, and ensures that the timing is correct.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorchipset/visorchipset_main.c