switchtec: Add "running" status flag to fw partition info ioctl

This flag lets userspace know which firmware partitions are currently in
use as opposed to just active.  "Active" means they will be in use for the
next reboot, whereas "running" means they are currently in use.

If an old kernel is in use, or the firmware doesn't support these fields,
the new flag will not be set in the output.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
This commit is contained in:
Logan Gunthorpe 2017-06-15 14:12:23 -06:00 committed by Bjorn Helgaas
parent 2ea659a9ef
commit 079e3bc588
2 changed files with 23 additions and 2 deletions

View file

@ -39,6 +39,9 @@ struct switchtec_ioctl_flash_info {
__u32 padding;
};
#define SWITCHTEC_IOCTL_PART_ACTIVE 1
#define SWITCHTEC_IOCTL_PART_RUNNING 2
struct switchtec_ioctl_flash_part_info {
__u32 flash_partition;
__u32 address;