aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_ioc.c
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-07-08 22:45:56 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:04:04 -0400
commited96932470e4ca3aab29518a748dc1162853b456 (patch)
tree7585615e2cd952edbbd7c1bec1e414c699656ff3 /drivers/scsi/bfa/bfa_ioc.c
parent293f82d59ed8b6d61d242e40ee7a6a146fae5eaa (diff)
[SCSI] bfa: enable basic PBC support
The patch includes the driver side changes to enable basic PBC (PreBoot Configuration) feature. - Data structure changes and new definitions for PBC. - APIs to access PBC info. - Remove unused code. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc.c')
-rw-r--r--drivers/scsi/bfa/bfa_ioc.c41
1 files changed, 10 insertions, 31 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index ef3b3fefbe74..268c071ce673 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -1608,6 +1608,13 @@ bfa_ioc_error_isr(struct bfa_ioc_s *ioc)
1608 bfa_fsm_send_event(ioc, IOC_E_HWERROR); 1608 bfa_fsm_send_event(ioc, IOC_E_HWERROR);
1609} 1609}
1610 1610
1611void
1612bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc)
1613{
1614 ioc->fcmode = BFA_TRUE;
1615 ioc->port_id = bfa_ioc_pcifn(ioc);
1616}
1617
1611#ifndef BFA_BIOS_BUILD 1618#ifndef BFA_BIOS_BUILD
1612 1619
1613/** 1620/**
@@ -1697,6 +1704,9 @@ bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc,
1697 /* For now, model descr uses same model string */ 1704 /* For now, model descr uses same model string */
1698 bfa_ioc_get_adapter_model(ioc, ad_attr->model_descr); 1705 bfa_ioc_get_adapter_model(ioc, ad_attr->model_descr);
1699 1706
1707 ad_attr->card_type = ioc_attr->card_type;
1708 ad_attr->is_mezz = bfa_mfg_is_mezz(ioc_attr->card_type);
1709
1700 if (BFI_ADAPTER_IS_SPECIAL(ioc_attr->adapter_prop)) 1710 if (BFI_ADAPTER_IS_SPECIAL(ioc_attr->adapter_prop))
1701 ad_attr->prototype = 1; 1711 ad_attr->prototype = 1;
1702 else 1712 else
@@ -1866,30 +1876,6 @@ bfa_ioc_get_nwwn(struct bfa_ioc_s *ioc)
1866 return w.wwn; 1876 return w.wwn;
1867} 1877}
1868 1878
1869wwn_t
1870bfa_ioc_get_wwn_naa5(struct bfa_ioc_s *ioc, u16 inst)
1871{
1872 union {
1873 wwn_t wwn;
1874 u8 byte[sizeof(wwn_t)];
1875 }
1876 w , w5;
1877
1878 bfa_trc(ioc, inst);
1879
1880 w.wwn = ioc->attr->mfg_wwn;
1881 w5.byte[0] = 0x50 | w.byte[2] >> 4;
1882 w5.byte[1] = w.byte[2] << 4 | w.byte[3] >> 4;
1883 w5.byte[2] = w.byte[3] << 4 | w.byte[4] >> 4;
1884 w5.byte[3] = w.byte[4] << 4 | w.byte[5] >> 4;
1885 w5.byte[4] = w.byte[5] << 4 | w.byte[6] >> 4;
1886 w5.byte[5] = w.byte[6] << 4 | w.byte[7] >> 4;
1887 w5.byte[6] = w.byte[7] << 4 | (inst & 0x0f00) >> 8;
1888 w5.byte[7] = (inst & 0xff);
1889
1890 return w5.wwn;
1891}
1892
1893u64 1879u64
1894bfa_ioc_get_adid(struct bfa_ioc_s *ioc) 1880bfa_ioc_get_adid(struct bfa_ioc_s *ioc)
1895{ 1881{
@@ -1907,13 +1893,6 @@ bfa_ioc_get_mac(struct bfa_ioc_s *ioc)
1907 return mac; 1893 return mac;
1908} 1894}
1909 1895
1910void
1911bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc)
1912{
1913 ioc->fcmode = BFA_TRUE;
1914 ioc->port_id = bfa_ioc_pcifn(ioc);
1915}
1916
1917bfa_boolean_t 1896bfa_boolean_t
1918bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc) 1897bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc)
1919{ 1898{