aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_ioc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.c')
-rw-r--r--drivers/scsi/bfa/bfa_ioc.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 268c071ce673..1600f747eb6c 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -1838,54 +1838,54 @@ bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr)
1838} 1838}
1839 1839
1840/** 1840/**
1841 * hal_wwn_public 1841 * bfa_wwn_public
1842 */ 1842 */
1843wwn_t 1843wwn_t
1844bfa_ioc_get_pwwn(struct bfa_ioc_s *ioc) 1844bfa_ioc_get_pwwn(struct bfa_ioc_s *ioc)
1845{ 1845{
1846 union { 1846 return ioc->attr->pwwn;
1847 wwn_t wwn;
1848 u8 byte[sizeof(wwn_t)];
1849 }
1850 w;
1851
1852 w.wwn = ioc->attr->mfg_wwn;
1853
1854 if (bfa_ioc_portid(ioc) == 1)
1855 w.byte[7]++;
1856
1857 return w.wwn;
1858} 1847}
1859 1848
1860wwn_t 1849wwn_t
1861bfa_ioc_get_nwwn(struct bfa_ioc_s *ioc) 1850bfa_ioc_get_nwwn(struct bfa_ioc_s *ioc)
1862{ 1851{
1863 union { 1852 return ioc->attr->nwwn;
1864 wwn_t wwn;
1865 u8 byte[sizeof(wwn_t)];
1866 }
1867 w;
1868
1869 w.wwn = ioc->attr->mfg_wwn;
1870
1871 if (bfa_ioc_portid(ioc) == 1)
1872 w.byte[7]++;
1873
1874 w.byte[0] = 0x20;
1875
1876 return w.wwn;
1877} 1853}
1878 1854
1879u64 1855u64
1880bfa_ioc_get_adid(struct bfa_ioc_s *ioc) 1856bfa_ioc_get_adid(struct bfa_ioc_s *ioc)
1881{ 1857{
1882 return ioc->attr->mfg_wwn; 1858 return ioc->attr->mfg_pwwn;
1883} 1859}
1884 1860
1885mac_t 1861mac_t
1886bfa_ioc_get_mac(struct bfa_ioc_s *ioc) 1862bfa_ioc_get_mac(struct bfa_ioc_s *ioc)
1887{ 1863{
1888 mac_t mac; 1864 /*
1865 * Currently mfg mac is used as FCoE enode mac (not configured by PBC)
1866 */
1867 if (bfa_ioc_get_type(ioc) == BFA_IOC_TYPE_FCoE)
1868 return bfa_ioc_get_mfg_mac(ioc);
1869 else
1870 return ioc->attr->mac;
1871}
1872
1873wwn_t
1874bfa_ioc_get_mfg_pwwn(struct bfa_ioc_s *ioc)
1875{
1876 return ioc->attr->mfg_pwwn;
1877}
1878
1879wwn_t
1880bfa_ioc_get_mfg_nwwn(struct bfa_ioc_s *ioc)
1881{
1882 return ioc->attr->mfg_nwwn;
1883}
1884
1885mac_t
1886bfa_ioc_get_mfg_mac(struct bfa_ioc_s *ioc)
1887{
1888 mac_t mac;
1889 1889
1890 mac = ioc->attr->mfg_mac; 1890 mac = ioc->attr->mfg_mac;
1891 mac.mac[MAC_ADDRLEN - 1] += bfa_ioc_pcifn(ioc); 1891 mac.mac[MAC_ADDRLEN - 1] += bfa_ioc_pcifn(ioc);