Commit e47da193 authored by James Bottomley's avatar James Bottomley

FC Transport updates - additional fc host attributes

From: 	James.Smart@Emulex.Com

This patch adds 5 more FC transport host attributes in support of HBAAPI. 
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 65c333c9
...@@ -270,6 +270,16 @@ static int fc_setup_host_transport_attrs(struct Scsi_Host *shost) ...@@ -270,6 +270,16 @@ static int fc_setup_host_transport_attrs(struct Scsi_Host *shost)
sizeof(fc_host_symbolic_name(shost))); sizeof(fc_host_symbolic_name(shost)));
fc_host_supported_speeds(shost) = FC_PORTSPEED_UNKNOWN; fc_host_supported_speeds(shost) = FC_PORTSPEED_UNKNOWN;
fc_host_maxframe_size(shost) = -1; fc_host_maxframe_size(shost) = -1;
memset(fc_host_hardware_version(shost), 0,
sizeof(fc_host_hardware_version(shost)));
memset(fc_host_firmware_version(shost), 0,
sizeof(fc_host_firmware_version(shost)));
memset(fc_host_serial_number(shost), 0,
sizeof(fc_host_serial_number(shost)));
memset(fc_host_opt_rom_version(shost), 0,
sizeof(fc_host_opt_rom_version(shost)));
memset(fc_host_driver_version(shost), 0,
sizeof(fc_host_driver_version(shost)));
fc_host_port_id(shost) = -1; fc_host_port_id(shost) = -1;
fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN; fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
...@@ -536,6 +546,11 @@ fc_private_host_rd_attr_cast(node_name, "0x%llx\n", 20, unsigned long long); ...@@ -536,6 +546,11 @@ fc_private_host_rd_attr_cast(node_name, "0x%llx\n", 20, unsigned long long);
fc_private_host_rd_attr_cast(port_name, "0x%llx\n", 20, unsigned long long); fc_private_host_rd_attr_cast(port_name, "0x%llx\n", 20, unsigned long long);
fc_private_host_rd_attr(symbolic_name, "%s\n", (FC_SYMBOLIC_NAME_SIZE +1)); fc_private_host_rd_attr(symbolic_name, "%s\n", (FC_SYMBOLIC_NAME_SIZE +1));
fc_private_host_rd_attr(maxframe_size, "%u bytes\n", 20); fc_private_host_rd_attr(maxframe_size, "%u bytes\n", 20);
fc_private_host_rd_attr(hardware_version, "%s\n", (FC_VERSION_STRING_SIZE +1));
fc_private_host_rd_attr(firmware_version, "%s\n", (FC_VERSION_STRING_SIZE +1));
fc_private_host_rd_attr(serial_number, "%s\n", (FC_SERIAL_NUMBER_SIZE +1));
fc_private_host_rd_attr(opt_rom_version, "%s\n", (FC_VERSION_STRING_SIZE +1));
fc_private_host_rd_attr(driver_version, "%s\n", (FC_VERSION_STRING_SIZE +1));
/* Dynamic Host Attributes */ /* Dynamic Host Attributes */
...@@ -772,6 +787,11 @@ fc_attach_transport(struct fc_function_template *ft) ...@@ -772,6 +787,11 @@ fc_attach_transport(struct fc_function_template *ft)
SETUP_HOST_ATTRIBUTE_RD(symbolic_name); SETUP_HOST_ATTRIBUTE_RD(symbolic_name);
SETUP_HOST_ATTRIBUTE_RD(supported_speeds); SETUP_HOST_ATTRIBUTE_RD(supported_speeds);
SETUP_HOST_ATTRIBUTE_RD(maxframe_size); SETUP_HOST_ATTRIBUTE_RD(maxframe_size);
SETUP_HOST_ATTRIBUTE_RD(hardware_version);
SETUP_HOST_ATTRIBUTE_RD(firmware_version);
SETUP_HOST_ATTRIBUTE_RD(serial_number);
SETUP_HOST_ATTRIBUTE_RD(opt_rom_version);
SETUP_HOST_ATTRIBUTE_RD(driver_version);
SETUP_HOST_ATTRIBUTE_RD(port_id); SETUP_HOST_ATTRIBUTE_RD(port_id);
SETUP_HOST_ATTRIBUTE_RD(port_type); SETUP_HOST_ATTRIBUTE_RD(port_type);
......
...@@ -185,6 +185,8 @@ struct fc_host_statistics { ...@@ -185,6 +185,8 @@ struct fc_host_statistics {
#define FC_FC4_LIST_SIZE 32 #define FC_FC4_LIST_SIZE 32
#define FC_SYMBOLIC_NAME_SIZE 256 #define FC_SYMBOLIC_NAME_SIZE 256
#define FC_VERSION_STRING_SIZE 64
#define FC_SERIAL_NUMBER_SIZE 80
struct fc_host_attrs { struct fc_host_attrs {
/* Fixed Attributes */ /* Fixed Attributes */
...@@ -195,6 +197,11 @@ struct fc_host_attrs { ...@@ -195,6 +197,11 @@ struct fc_host_attrs {
char symbolic_name[FC_SYMBOLIC_NAME_SIZE]; char symbolic_name[FC_SYMBOLIC_NAME_SIZE];
u32 supported_speeds; u32 supported_speeds;
u32 maxframe_size; u32 maxframe_size;
char hardware_version[FC_VERSION_STRING_SIZE];
char firmware_version[FC_VERSION_STRING_SIZE];
char serial_number[FC_SERIAL_NUMBER_SIZE];
char opt_rom_version[FC_VERSION_STRING_SIZE];
char driver_version[FC_VERSION_STRING_SIZE];
/* Dynamic Attributes */ /* Dynamic Attributes */
u32 port_id; u32 port_id;
...@@ -226,6 +233,16 @@ struct fc_host_attrs { ...@@ -226,6 +233,16 @@ struct fc_host_attrs {
(((struct fc_host_attrs *)(x)->shost_data)->supported_speeds) (((struct fc_host_attrs *)(x)->shost_data)->supported_speeds)
#define fc_host_maxframe_size(x) \ #define fc_host_maxframe_size(x) \
(((struct fc_host_attrs *)(x)->shost_data)->maxframe_size) (((struct fc_host_attrs *)(x)->shost_data)->maxframe_size)
#define fc_host_hardware_version(x) \
(((struct fc_host_attrs *)(x)->shost_data)->hardware_version)
#define fc_host_firmware_version(x) \
(((struct fc_host_attrs *)(x)->shost_data)->firmware_version)
#define fc_host_serial_number(x) \
(((struct fc_host_attrs *)(x)->shost_data)->serial_number)
#define fc_host_opt_rom_version(x) \
(((struct fc_host_attrs *)(x)->shost_data)->opt_rom_version)
#define fc_host_driver_version(x) \
(((struct fc_host_attrs *)(x)->shost_data)->driver_version)
#define fc_host_port_id(x) \ #define fc_host_port_id(x) \
(((struct fc_host_attrs *)(x)->shost_data)->port_id) (((struct fc_host_attrs *)(x)->shost_data)->port_id)
#define fc_host_port_type(x) \ #define fc_host_port_type(x) \
...@@ -285,6 +302,11 @@ struct fc_function_template { ...@@ -285,6 +302,11 @@ struct fc_function_template {
unsigned long show_host_symbolic_name:1; unsigned long show_host_symbolic_name:1;
unsigned long show_host_supported_speeds:1; unsigned long show_host_supported_speeds:1;
unsigned long show_host_maxframe_size:1; unsigned long show_host_maxframe_size:1;
unsigned long show_host_hardware_version:1;
unsigned long show_host_firmware_version:1;
unsigned long show_host_serial_number:1;
unsigned long show_host_opt_rom_version:1;
unsigned long show_host_driver_version:1;
/* host dynamic attributes */ /* host dynamic attributes */
unsigned long show_host_port_id:1; unsigned long show_host_port_id:1;
unsigned long show_host_port_type:1; unsigned long show_host_port_type:1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment