OSDN Git Service

pci/shpc: more generic handle hot-unplug in shpc_slot_command()
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Thu, 16 Feb 2023 18:03:42 +0000 (21:03 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Mar 2023 08:10:48 +0000 (03:10 -0500)
commitdedf052a254187c333b7d1c9b8c95a0c325e6a18
treecbaf043d52790bc21634a7eb7a2b0eea693d2a64
parent025e2088db8765e1b0db3703fe27073808d12c1b
pci/shpc: more generic handle hot-unplug in shpc_slot_command()

Free slot if both conditions (power-led = OFF and state = DISABLED)
becomes true regardless of the sequence. It is similar to how PCIe
hotplug works.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Anton Kuchin <antonkuchin@yandex-team.ru>
Message-Id: <20230216180356.156832-5-vsementsov@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci/shpc.c