mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
ibft: Expose iBFT acpi header via sysfs
Some ethernet adapter vendors are supplying products which support optional (payed license) features. On some adapters this includes a hardware iscsi initiator. The same adapters in a normal (no extra licenses) mode of operation can be used as a software iscsi initiator. In addition, software iscsi boot initiators are becoming a standard part of many vendors uefi implementations. This is creating difficulties during early boot/install determining the proper configuration method for these adapters when they are used as a boot device. The attached patch creates sysfs entries to expose information from the acpi header of the ibft table. This information allows for a method to easily determining if an ibft table was created by a ethernet card's firmware or the system uefi/bios. In the case of a hardware initiator this information in combination with the pci vendor and device id can be used to ascertain any vendor specific behaviors that need to be accommodated. Reviewed-by: Lee Duncan <lduncan@suse.com> Signed-off-by: David Bond <dbond@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
committed by
Konrad Rzeszutek Wilk
parent
9a99425f07
commit
b3c8eb5038
@@ -64,6 +64,12 @@ enum iscsi_boot_initiator_properties_enum {
|
||||
ISCSI_BOOT_INI_END_MARKER,
|
||||
};
|
||||
|
||||
enum iscsi_boot_acpitbl_properties_enum {
|
||||
ISCSI_BOOT_ACPITBL_SIGNATURE,
|
||||
ISCSI_BOOT_ACPITBL_OEM_ID,
|
||||
ISCSI_BOOT_ACPITBL_OEM_TABLE_ID,
|
||||
};
|
||||
|
||||
struct attribute_group;
|
||||
|
||||
struct iscsi_boot_kobj {
|
||||
@@ -127,6 +133,13 @@ iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index,
|
||||
umode_t (*is_visible) (void *data, int type),
|
||||
void (*release) (void *data));
|
||||
|
||||
struct iscsi_boot_kobj *
|
||||
iscsi_boot_create_acpitbl(struct iscsi_boot_kset *boot_kset, int index,
|
||||
void *data,
|
||||
ssize_t (*show)(void *data, int type, char *buf),
|
||||
umode_t (*is_visible)(void *data, int type),
|
||||
void (*release)(void *data));
|
||||
|
||||
struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name);
|
||||
struct iscsi_boot_kset *iscsi_boot_create_host_kset(unsigned int hostno);
|
||||
void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset);
|
||||
|
||||
Reference in New Issue
Block a user