diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2010-03-05 22:36:00 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-07 02:28:41 -0500 |
commit | f926a05f5c1507aeae0e36175a03c0a19c201187 (patch) | |
tree | c345e6caf5e30c3acf04b119bfa78d10f36a94bd /drivers/scsi | |
parent | 7af074dc9d343f69bab4bfd699e6d7ba09915fd9 (diff) |
[SCSI] bfa: FCS authentication related changes.
Made FCS authentication related changes to state machines and header
files.
Made changes in FCS state machines to handle the case when secret
string is NULL.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs_lport.c | 2 | ||||
-rw-r--r-- | drivers/scsi/bfa/fabric.c | 6 | ||||
-rw-r--r-- | drivers/scsi/bfa/fcs_fabric.h | 1 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_auth.h | 22 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_pport.h | 4 |
5 files changed, 33 insertions, 2 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index 7bb182dcbd7d..4a51aac7ab04 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c | |||
@@ -931,6 +931,8 @@ bfa_fcs_port_get_attr(struct bfa_fcs_port_s *port, | |||
931 | if (port->fabric) { | 931 | if (port->fabric) { |
932 | port_attr->port_type = bfa_fcs_fabric_port_type(port->fabric); | 932 | port_attr->port_type = bfa_fcs_fabric_port_type(port->fabric); |
933 | port_attr->loopback = bfa_fcs_fabric_is_loopback(port->fabric); | 933 | port_attr->loopback = bfa_fcs_fabric_is_loopback(port->fabric); |
934 | port_attr->authfail = | ||
935 | bfa_fcs_fabric_is_auth_failed(port->fabric); | ||
934 | port_attr->fabric_name = bfa_fcs_port_get_fabric_name(port); | 936 | port_attr->fabric_name = bfa_fcs_port_get_fabric_name(port); |
935 | memcpy(port_attr->fabric_ip_addr, | 937 | memcpy(port_attr->fabric_ip_addr, |
936 | bfa_fcs_port_get_fabric_ipaddr(port), | 938 | bfa_fcs_port_get_fabric_ipaddr(port), |
diff --git a/drivers/scsi/bfa/fabric.c b/drivers/scsi/bfa/fabric.c index 20a686a420a2..b02ed7653eb6 100644 --- a/drivers/scsi/bfa/fabric.c +++ b/drivers/scsi/bfa/fabric.c | |||
@@ -895,6 +895,12 @@ bfa_fcs_fabric_is_loopback(struct bfa_fcs_fabric_s *fabric) | |||
895 | return bfa_sm_cmp_state(fabric, bfa_fcs_fabric_sm_loopback); | 895 | return bfa_sm_cmp_state(fabric, bfa_fcs_fabric_sm_loopback); |
896 | } | 896 | } |
897 | 897 | ||
898 | bfa_boolean_t | ||
899 | bfa_fcs_fabric_is_auth_failed(struct bfa_fcs_fabric_s *fabric) | ||
900 | { | ||
901 | return bfa_sm_cmp_state(fabric, bfa_fcs_fabric_sm_auth_failed); | ||
902 | } | ||
903 | |||
898 | enum bfa_pport_type | 904 | enum bfa_pport_type |
899 | bfa_fcs_fabric_port_type(struct bfa_fcs_fabric_s *fabric) | 905 | bfa_fcs_fabric_port_type(struct bfa_fcs_fabric_s *fabric) |
900 | { | 906 | { |
diff --git a/drivers/scsi/bfa/fcs_fabric.h b/drivers/scsi/bfa/fcs_fabric.h index 8237bd5e7217..244c3f00c50c 100644 --- a/drivers/scsi/bfa/fcs_fabric.h +++ b/drivers/scsi/bfa/fcs_fabric.h | |||
@@ -47,6 +47,7 @@ void bfa_fcs_fabric_uf_recv(struct bfa_fcs_fabric_s *fabric, | |||
47 | struct fchs_s *fchs, u16 len); | 47 | struct fchs_s *fchs, u16 len); |
48 | u16 bfa_fcs_fabric_vport_count(struct bfa_fcs_fabric_s *fabric); | 48 | u16 bfa_fcs_fabric_vport_count(struct bfa_fcs_fabric_s *fabric); |
49 | bfa_boolean_t bfa_fcs_fabric_is_loopback(struct bfa_fcs_fabric_s *fabric); | 49 | bfa_boolean_t bfa_fcs_fabric_is_loopback(struct bfa_fcs_fabric_s *fabric); |
50 | bfa_boolean_t bfa_fcs_fabric_is_auth_failed(struct bfa_fcs_fabric_s *fabric); | ||
50 | enum bfa_pport_type bfa_fcs_fabric_port_type(struct bfa_fcs_fabric_s *fabric); | 51 | enum bfa_pport_type bfa_fcs_fabric_port_type(struct bfa_fcs_fabric_s *fabric); |
51 | void bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric); | 52 | void bfa_fcs_fabric_psymb_init(struct bfa_fcs_fabric_s *fabric); |
52 | void bfa_fcs_fabric_port_delete_comp(struct bfa_fcs_fabric_s *fabric); | 53 | void bfa_fcs_fabric_port_delete_comp(struct bfa_fcs_fabric_s *fabric); |
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_auth.h b/drivers/scsi/bfa/include/defs/bfa_defs_auth.h index dd19c83aba58..45df32820911 100644 --- a/drivers/scsi/bfa/include/defs/bfa_defs_auth.h +++ b/drivers/scsi/bfa/include/defs/bfa_defs_auth.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define PRIVATE_KEY 19009 | 23 | #define PRIVATE_KEY 19009 |
24 | #define KEY_LEN 32399 | 24 | #define KEY_LEN 32399 |
25 | #define BFA_AUTH_SECRET_STRING_LEN 256 | 25 | #define BFA_AUTH_SECRET_STRING_LEN 256 |
26 | #define BFA_AUTH_FAIL_NO_PASSWORD 0xFE | ||
26 | #define BFA_AUTH_FAIL_TIMEOUT 0xFF | 27 | #define BFA_AUTH_FAIL_TIMEOUT 0xFF |
27 | 28 | ||
28 | /** | 29 | /** |
@@ -41,6 +42,27 @@ enum bfa_auth_status { | |||
41 | BFA_AUTH_STATUS_UNKNOWN = 9, /* authentication status unknown */ | 42 | BFA_AUTH_STATUS_UNKNOWN = 9, /* authentication status unknown */ |
42 | }; | 43 | }; |
43 | 44 | ||
45 | enum bfa_auth_rej_code { | ||
46 | BFA_AUTH_RJT_CODE_AUTH_FAILURE = 1, /* auth failure */ | ||
47 | BFA_AUTH_RJT_CODE_LOGICAL_ERR = 2, /* logical error */ | ||
48 | }; | ||
49 | |||
50 | /** | ||
51 | * Authentication reject codes | ||
52 | */ | ||
53 | enum bfa_auth_rej_code_exp { | ||
54 | BFA_AUTH_MECH_NOT_USABLE = 1, /* auth. mechanism not usable */ | ||
55 | BFA_AUTH_DH_GROUP_NOT_USABLE = 2, /* DH Group not usable */ | ||
56 | BFA_AUTH_HASH_FUNC_NOT_USABLE = 3, /* hash Function not usable */ | ||
57 | BFA_AUTH_AUTH_XACT_STARTED = 4, /* auth xact started */ | ||
58 | BFA_AUTH_AUTH_FAILED = 5, /* auth failed */ | ||
59 | BFA_AUTH_INCORRECT_PLD = 6, /* incorrect payload */ | ||
60 | BFA_AUTH_INCORRECT_PROTO_MSG = 7, /* incorrect proto msg */ | ||
61 | BFA_AUTH_RESTART_AUTH_PROTO = 8, /* restart auth protocol */ | ||
62 | BFA_AUTH_AUTH_CONCAT_NOT_SUPP = 9, /* auth concat not supported */ | ||
63 | BFA_AUTH_PROTO_VER_NOT_SUPP = 10,/* proto version not supported */ | ||
64 | }; | ||
65 | |||
44 | struct auth_proto_stats_s { | 66 | struct auth_proto_stats_s { |
45 | u32 auth_rjts; | 67 | u32 auth_rjts; |
46 | u32 auth_negs; | 68 | u32 auth_negs; |
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h b/drivers/scsi/bfa/include/defs/bfa_defs_pport.h index bf320412ee24..88662a15a21b 100644 --- a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h +++ b/drivers/scsi/bfa/include/defs/bfa_defs_pport.h | |||
@@ -232,7 +232,7 @@ struct bfa_pport_attr_s { | |||
232 | u32 pid; /* port ID */ | 232 | u32 pid; /* port ID */ |
233 | enum bfa_pport_type port_type; /* current topology */ | 233 | enum bfa_pport_type port_type; /* current topology */ |
234 | u32 loopback; /* external loopback */ | 234 | u32 loopback; /* external loopback */ |
235 | u32 rsvd1; | 235 | u32 authfail; /* auth fail state */ |
236 | u32 rsvd2; /* padding for 64 bit */ | 236 | u32 rsvd2; /* padding for 64 bit */ |
237 | }; | 237 | }; |
238 | 238 | ||
@@ -247,7 +247,7 @@ struct bfa_pport_fc_stats_s { | |||
247 | u64 rx_words; /* received words */ | 247 | u64 rx_words; /* received words */ |
248 | u64 lip_count; /* LIPs seen */ | 248 | u64 lip_count; /* LIPs seen */ |
249 | u64 nos_count; /* NOS count */ | 249 | u64 nos_count; /* NOS count */ |
250 | u64 error_frames; /* errored frames (sent?) */ | 250 | u64 error_frames; /* errored frames */ |
251 | u64 dropped_frames; /* dropped frames */ | 251 | u64 dropped_frames; /* dropped frames */ |
252 | u64 link_failures; /* link failure count */ | 252 | u64 link_failures; /* link failure count */ |
253 | u64 loss_of_syncs; /* loss of sync count */ | 253 | u64 loss_of_syncs; /* loss of sync count */ |