diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2010-03-05 22:35:33 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-03-07 02:27:05 -0500 |
commit | 86e32dabbad0d860b2be3c30a33c10a134d4ccf1 (patch) | |
tree | e480ba9c619607bd0fa0b0ced11ce08d811129ec /drivers/scsi | |
parent | 72041ed8fc8ed92c11af90949bab7b08f3e34fd3 (diff) |
[SCSI] bfa: Fix to copy fpma MAC when requested by user space application.
Copy fpma MAC when requested by user space application. Added FPMA
mac address to the lport attributes structure.
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 | 7 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_lps.c | 12 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/bfa_svc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_port.h | 4 |
4 files changed, 20 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index 960ae1a7bcd0..7bb182dcbd7d 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c | |||
@@ -936,8 +936,13 @@ bfa_fcs_port_get_attr(struct bfa_fcs_port_s *port, | |||
936 | bfa_fcs_port_get_fabric_ipaddr(port), | 936 | bfa_fcs_port_get_fabric_ipaddr(port), |
937 | BFA_FCS_FABRIC_IPADDR_SZ); | 937 | BFA_FCS_FABRIC_IPADDR_SZ); |
938 | 938 | ||
939 | if (port->vport != NULL) | 939 | if (port->vport != NULL) { |
940 | port_attr->port_type = BFA_PPORT_TYPE_VPORT; | 940 | port_attr->port_type = BFA_PPORT_TYPE_VPORT; |
941 | port_attr->fpma_mac = | ||
942 | bfa_lps_get_lp_mac(port->vport->lps); | ||
943 | } else | ||
944 | port_attr->fpma_mac = | ||
945 | bfa_lps_get_lp_mac(port->fabric->lps); | ||
941 | 946 | ||
942 | } else { | 947 | } else { |
943 | port_attr->port_type = BFA_PPORT_TYPE_UNKNOWN; | 948 | port_attr->port_type = BFA_PPORT_TYPE_UNKNOWN; |
diff --git a/drivers/scsi/bfa/bfa_lps.c b/drivers/scsi/bfa/bfa_lps.c index 4c98bdab3119..730616f6e671 100644 --- a/drivers/scsi/bfa/bfa_lps.c +++ b/drivers/scsi/bfa/bfa_lps.c | |||
@@ -613,9 +613,9 @@ bfa_lps_get_max_vport(struct bfa_s *bfa) | |||
613 | bfa_get_attr(bfa, &ioc_attr); | 613 | bfa_get_attr(bfa, &ioc_attr); |
614 | 614 | ||
615 | if (ioc_attr.pci_attr.device_id == BFA_PCI_DEVICE_ID_CT) | 615 | if (ioc_attr.pci_attr.device_id == BFA_PCI_DEVICE_ID_CT) |
616 | return (BFA_LPS_MAX_VPORTS_SUPP_CT); | 616 | return BFA_LPS_MAX_VPORTS_SUPP_CT; |
617 | else | 617 | else |
618 | return (BFA_LPS_MAX_VPORTS_SUPP_CB); | 618 | return BFA_LPS_MAX_VPORTS_SUPP_CB; |
619 | } | 619 | } |
620 | 620 | ||
621 | /** | 621 | /** |
@@ -837,6 +837,14 @@ bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps) | |||
837 | return lps->lsrjt_expl; | 837 | return lps->lsrjt_expl; |
838 | } | 838 | } |
839 | 839 | ||
840 | /** | ||
841 | * Return fpma/spma MAC for lport | ||
842 | */ | ||
843 | struct mac_s | ||
844 | bfa_lps_get_lp_mac(struct bfa_lps_s *lps) | ||
845 | { | ||
846 | return lps->lp_mac; | ||
847 | } | ||
840 | 848 | ||
841 | /** | 849 | /** |
842 | * LPS firmware message class handler. | 850 | * LPS firmware message class handler. |
diff --git a/drivers/scsi/bfa/include/bfa_svc.h b/drivers/scsi/bfa/include/bfa_svc.h index 0d7ed4d963a7..71ffb75a71ca 100644 --- a/drivers/scsi/bfa/include/bfa_svc.h +++ b/drivers/scsi/bfa/include/bfa_svc.h | |||
@@ -316,6 +316,7 @@ wwn_t bfa_lps_get_peer_pwwn(struct bfa_lps_s *lps); | |||
316 | wwn_t bfa_lps_get_peer_nwwn(struct bfa_lps_s *lps); | 316 | wwn_t bfa_lps_get_peer_nwwn(struct bfa_lps_s *lps); |
317 | u8 bfa_lps_get_lsrjt_rsn(struct bfa_lps_s *lps); | 317 | u8 bfa_lps_get_lsrjt_rsn(struct bfa_lps_s *lps); |
318 | u8 bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps); | 318 | u8 bfa_lps_get_lsrjt_expl(struct bfa_lps_s *lps); |
319 | mac_t bfa_lps_get_lp_mac(struct bfa_lps_s *lps); | ||
319 | void bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status); | 320 | void bfa_cb_lps_flogi_comp(void *bfad, void *uarg, bfa_status_t status); |
320 | void bfa_cb_lps_flogo_comp(void *bfad, void *uarg); | 321 | void bfa_cb_lps_flogo_comp(void *bfad, void *uarg); |
321 | void bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status); | 322 | void bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status); |
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_port.h b/drivers/scsi/bfa/include/defs/bfa_defs_port.h index de0696c81bc4..1c74a8b94aad 100644 --- a/drivers/scsi/bfa/include/defs/bfa_defs_port.h +++ b/drivers/scsi/bfa/include/defs/bfa_defs_port.h | |||
@@ -185,6 +185,8 @@ struct bfa_port_attr_s { | |||
185 | wwn_t fabric_name; /* attached switch's nwwn */ | 185 | wwn_t fabric_name; /* attached switch's nwwn */ |
186 | u8 fabric_ip_addr[BFA_FCS_FABRIC_IPADDR_SZ]; /* attached | 186 | u8 fabric_ip_addr[BFA_FCS_FABRIC_IPADDR_SZ]; /* attached |
187 | * fabric's ip addr */ | 187 | * fabric's ip addr */ |
188 | struct mac_s fpma_mac; /* Lport's FPMA Mac address */ | ||
189 | u16 authfail; /* auth failed state */ | ||
188 | }; | 190 | }; |
189 | 191 | ||
190 | /** | 192 | /** |
@@ -235,7 +237,7 @@ struct bfa_port_aen_data_s { | |||
235 | enum bfa_ioc_type_e ioc_type; | 237 | enum bfa_ioc_type_e ioc_type; |
236 | wwn_t pwwn; /* WWN of the physical port */ | 238 | wwn_t pwwn; /* WWN of the physical port */ |
237 | wwn_t fwwn; /* WWN of the fabric port */ | 239 | wwn_t fwwn; /* WWN of the fabric port */ |
238 | mac_t mac; /* MAC addres of the ethernet port, | 240 | mac_t mac; /* MAC address of the ethernet port, |
239 | * applicable to CNA port only */ | 241 | * applicable to CNA port only */ |
240 | int phy_port_num; /*! For SFP related events */ | 242 | int phy_port_num; /*! For SFP related events */ |
241 | enum bfa_port_aen_sfp_pom level; /* Only transitions will | 243 | enum bfa_port_aen_sfp_pom level; /* Only transitions will |