aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2010-03-03 20:42:51 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-04 05:40:02 -0500
commit2f9b8857a914b71ba1b84fb23a0a20a87de41c91 (patch)
tree0b103e419e52faa01ab0b45212adbb775a0a73be /drivers/scsi
parent5c1fb1d55672a74d1c318f67cdddbb599df9a76c (diff)
[SCSI] bfa: Enable IOC auto-recovery and IOC type fix.
bfa_ioc.c: - Enable IOC auto-recovery by default. - When CNA is in FC mode, return IOC type as FC (not FCoE) bfa_iocfc.c: - Set fcmode before pci initialization/setup. 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_ioc.c6
-rw-r--r--drivers/scsi/bfa/bfa_iocfc.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 397d7e9eade5..569b35d19a25 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -56,7 +56,7 @@ BFA_TRC_FILE(HAL, IOC);
56#define BFA_FLASH_CHUNK_NO(off) (off / BFI_FLASH_CHUNK_SZ_WORDS) 56#define BFA_FLASH_CHUNK_NO(off) (off / BFI_FLASH_CHUNK_SZ_WORDS)
57#define BFA_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS) 57#define BFA_FLASH_OFFSET_IN_CHUNK(off) (off % BFI_FLASH_CHUNK_SZ_WORDS)
58#define BFA_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS) 58#define BFA_FLASH_CHUNK_ADDR(chunkno) (chunkno * BFI_FLASH_CHUNK_SZ_WORDS)
59bfa_boolean_t bfa_auto_recover = BFA_FALSE; 59bfa_boolean_t bfa_auto_recover = BFA_TRUE;
60 60
61/* 61/*
62 * forward declarations 62 * forward declarations
@@ -1642,7 +1642,7 @@ bfa_ioc_boot(struct bfa_ioc_s *ioc, u32 boot_type, u32 boot_param)
1642void 1642void
1643bfa_ioc_auto_recover(bfa_boolean_t auto_recover) 1643bfa_ioc_auto_recover(bfa_boolean_t auto_recover)
1644{ 1644{
1645 bfa_auto_recover = BFA_FALSE; 1645 bfa_auto_recover = auto_recover;
1646} 1646}
1647 1647
1648 1648
@@ -2082,7 +2082,7 @@ bfa_ioc_get_attr(struct bfa_ioc_s *ioc, struct bfa_ioc_attr_s *ioc_attr)
2082 ioc_attr->state = bfa_sm_to_state(ioc_sm_table, ioc->fsm); 2082 ioc_attr->state = bfa_sm_to_state(ioc_sm_table, ioc->fsm);
2083 ioc_attr->port_id = ioc->port_id; 2083 ioc_attr->port_id = ioc->port_id;
2084 2084
2085 if (!ioc->ctdev) 2085 if (!ioc->ctdev || ioc->fcmode)
2086 ioc_attr->ioc_type = BFA_IOC_TYPE_FC; 2086 ioc_attr->ioc_type = BFA_IOC_TYPE_FC;
2087 else if (ioc->ioc_mc == BFI_MC_IOCFC) 2087 else if (ioc->ioc_mc == BFI_MC_IOCFC)
2088 ioc_attr->ioc_type = BFA_IOC_TYPE_FCoE; 2088 ioc_attr->ioc_type = BFA_IOC_TYPE_FCoE;
diff --git a/drivers/scsi/bfa/bfa_iocfc.c b/drivers/scsi/bfa/bfa_iocfc.c
index d7ab792a9e54..b5e7224bda4a 100644
--- a/drivers/scsi/bfa/bfa_iocfc.c
+++ b/drivers/scsi/bfa/bfa_iocfc.c
@@ -619,8 +619,6 @@ bfa_iocfc_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
619 619
620 bfa_ioc_attach(&bfa->ioc, bfa, &bfa_iocfc_cbfn, &bfa->timer_mod, 620 bfa_ioc_attach(&bfa->ioc, bfa, &bfa_iocfc_cbfn, &bfa->timer_mod,
621 bfa->trcmod, bfa->aen, bfa->logm); 621 bfa->trcmod, bfa->aen, bfa->logm);
622 bfa_ioc_pci_init(&bfa->ioc, pcidev, BFI_MC_IOCFC);
623 bfa_ioc_mbox_register(&bfa->ioc, bfa_mbox_isrs);
624 622
625 /** 623 /**
626 * Choose FC (ssid: 0x1C) v/s FCoE (ssid: 0x14) mode. 624 * Choose FC (ssid: 0x1C) v/s FCoE (ssid: 0x14) mode.
@@ -628,6 +626,9 @@ bfa_iocfc_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
628 if (0) 626 if (0)
629 bfa_ioc_set_fcmode(&bfa->ioc); 627 bfa_ioc_set_fcmode(&bfa->ioc);
630 628
629 bfa_ioc_pci_init(&bfa->ioc, pcidev, BFI_MC_IOCFC);
630 bfa_ioc_mbox_register(&bfa->ioc, bfa_mbox_isrs);
631
631 bfa_iocfc_init_mem(bfa, bfad, cfg, pcidev); 632 bfa_iocfc_init_mem(bfa, bfad, cfg, pcidev);
632 bfa_iocfc_mem_claim(bfa, cfg, meminfo); 633 bfa_iocfc_mem_claim(bfa, cfg, meminfo);
633 bfa_timer_init(&bfa->timer_mod); 634 bfa_timer_init(&bfa->timer_mod);