xen-platform: re-structure unplug_disks
commit3d89e3f7e816b6edbe3a516c754d20288a4e7937
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 24 Jan 2017 14:05:45 +0000 (24 14:05 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 27 Jan 2017 23:23:28 +0000 (27 15:23 -0800)
tree53f823f0315fe5f63c7fed2d7f7c79ee640d5210
parent3aca12f841fcd6f3a7477076dad0d564360500de
xen-platform: re-structure unplug_disks

The current code is poorly structured and potentially leads to multiple
config space reads when one is sufficient. Also the UNPLUG_ALL_IDE_DISKS
flag is mis-named since it also results in SCSI disks being unplugged.

This patch renames the flag and re-structures the code to be more
efficient, and readable.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
hw/i386/xen/xen_platform.c