Add support for EDD4 fields and types.
PATCH 1/1 Add support for EDD4 fields and types.
Back in 2010, t13 EDD version 4 added a couple of storage types, some host bridge types (that are pretty much all represented identically), and a couple of fields on existing storage types.
This change makes the driver expose those to userland.
Signed-off-by Peter Jones <[email protected]>
--- drivers/firmware/edd.c | 15 ++++++++++----- include/uapi/linux/edd.h | 6 +++++- 2 files changed, 15 insertions(+), 6 deletions(-)
drivers/firmware/edd.c +10 -5
@@ -152,15 +152,15 @@ edd_show_host_bus(struct edd_device *edev, char *buf) info->params.interface_path.isa.base_address); }else if (!strncmp (info->params.host_bus_type,"PCIX" ,4 ) || !strncmp (info->params.host_bus_type,"PCI" ,3 ) || - !strncmp (info->params.host_bus_type,"XPRS" ,4 )) { + !strncmp (info->params.host_bus_type,"XPRS" ,4 ) || + !strncmp (info->params.host_bus_type,"HTPT" ,4 )) { p +=scnprintf (p, left,"\t%02x:%02x.%d channel: %u\n" , info->params.interface_path.pci.bus, info->params.interface_path.pci.slot, info->params.interface_path.pci.function, info->params.interface_path.pci.channel); - }else if (!strncmp (info->params.host_bus_type,"IBND" ,4 ) || - !strncmp (info->params.host_bus_type,"HTPT" ,4 )) { + }else if (!strncmp (info->params.host_bus_type,"IBND" ,4 )) { p +=scnprintf (p, left,"\tTBD: %llx\n" , info->params.interface_path.ibnd.reserved);
@@ -220,8 +220,13 @@ edd_show_interface(struct edd_device *edev, char *buf) p +=scnprintf (p, left,"\tidentity_tag: %x\n" , info->params.device_path.raid.array_number); }else if (!strncmp (info->params.interface_type,"SATA" ,4 )) { - p +=scnprintf (p, left,"\tdevice: %u\n" , - info->params.device_path.sata.device); + p +=scnprintf (p, left,"\tdevice: %u pmp: %u\n" , + info->params.device_path.sata.device, + info->params.device_path.sata.pmp); + }else if (!strncmp (info->params.interface_type,"SAS" ,4 )) { + p +=scnprintf (p, left,"\taddress: %llx lun: %llx\n" , + info->params.device_path.sas.address, + info->params.device_path.sas.lun); }else { p += scnprintf(p, left, "\tunknown: %llx %llx\n", info->params.device_path.unknown.reserved1,
include/uapi/linux/edd.h +5 -1
@@ -155,12 +155,16 @@ struct edd_device_params { } __attribute__ ((packed)) raid;struct {__u8 device; -__u8 reserved1; +__u8 pmp;__u16 reserved2;__u32 reserved3;__u64 reserved4; } __attribute__ ((packed)) sata;struct { +__u64 address; +__u64 lun; + } __attribute__ ((packed)) sas; +struct {__u64 reserved1;__u64 reserved2; } __attribute__ ((packed)) unknown;
Signature · 1 line
2.5.0