aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfad_bsg.c
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2012-03-13 20:39:36 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-03-28 04:55:22 -0400
commitdb9d8a75afd9dbd32c80d12d6033eca3336ef4f2 (patch)
treee13c0bc9be09b70028a3672f2c666e7dfd7ff8d3 /drivers/scsi/bfa/bfad_bsg.c
parenta6b963db0de3c9aa22db2f872e38c2a12edf09a7 (diff)
[SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation.
Made changes to the Fabric Assigned Address(FAA) feature implementation. Introduced the IOCFC state machine, which now handles the FAA logic, IOC and BFA sub-modules enablement. Removed un-wanted FAA enable/disable routines; FAA is enabled by default. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfad_bsg.c')
-rw-r--r--drivers/scsi/bfa/bfad_bsg.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index f62cf4981473..31a1d8a027b8 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -1288,50 +1288,6 @@ out:
1288} 1288}
1289 1289
1290int 1290int
1291bfad_iocmd_faa_enable(struct bfad_s *bfad, void *cmd)
1292{
1293 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
1294 unsigned long flags;
1295 struct bfad_hal_comp fcomp;
1296
1297 init_completion(&fcomp.comp);
1298 iocmd->status = BFA_STATUS_OK;
1299 spin_lock_irqsave(&bfad->bfad_lock, flags);
1300 iocmd->status = bfa_faa_enable(&bfad->bfa, bfad_hcb_comp, &fcomp);
1301 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1302
1303 if (iocmd->status != BFA_STATUS_OK)
1304 goto out;
1305
1306 wait_for_completion(&fcomp.comp);
1307 iocmd->status = fcomp.status;
1308out:
1309 return 0;
1310}
1311
1312int
1313bfad_iocmd_faa_disable(struct bfad_s *bfad, void *cmd)
1314{
1315 struct bfa_bsg_gen_s *iocmd = (struct bfa_bsg_gen_s *)cmd;
1316 unsigned long flags;
1317 struct bfad_hal_comp fcomp;
1318
1319 init_completion(&fcomp.comp);
1320 iocmd->status = BFA_STATUS_OK;
1321 spin_lock_irqsave(&bfad->bfad_lock, flags);
1322 iocmd->status = bfa_faa_disable(&bfad->bfa, bfad_hcb_comp, &fcomp);
1323 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1324
1325 if (iocmd->status != BFA_STATUS_OK)
1326 goto out;
1327
1328 wait_for_completion(&fcomp.comp);
1329 iocmd->status = fcomp.status;
1330out:
1331 return 0;
1332}
1333
1334int
1335bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd) 1291bfad_iocmd_faa_query(struct bfad_s *bfad, void *cmd)
1336{ 1292{
1337 struct bfa_bsg_faa_attr_s *iocmd = (struct bfa_bsg_faa_attr_s *)cmd; 1293 struct bfa_bsg_faa_attr_s *iocmd = (struct bfa_bsg_faa_attr_s *)cmd;
@@ -2636,12 +2592,6 @@ bfad_iocmd_handler(struct bfad_s *bfad, unsigned int cmd, void *iocmd,
2636 case IOCMD_FLASH_DISABLE_OPTROM: 2592 case IOCMD_FLASH_DISABLE_OPTROM:
2637 rc = bfad_iocmd_ablk_optrom(bfad, cmd, iocmd); 2593 rc = bfad_iocmd_ablk_optrom(bfad, cmd, iocmd);
2638 break; 2594 break;
2639 case IOCMD_FAA_ENABLE:
2640 rc = bfad_iocmd_faa_enable(bfad, iocmd);
2641 break;
2642 case IOCMD_FAA_DISABLE:
2643 rc = bfad_iocmd_faa_disable(bfad, iocmd);
2644 break;
2645 case IOCMD_FAA_QUERY: 2595 case IOCMD_FAA_QUERY:
2646 rc = bfad_iocmd_faa_query(bfad, iocmd); 2596 rc = bfad_iocmd_faa_query(bfad, iocmd);
2647 break; 2597 break;