diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-12-20 21:58:32 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-01-10 18:01:24 -0500 |
commit | 5b7db7af522d9f281ff8bf540d2b5cbea2206b27 (patch) | |
tree | 7e2b2750a13a5ee9794d1893a0b575419cde95cf /drivers/scsi/bfa/bfad.c | |
parent | 8ca2dd87e7f29df99389e9dc41f7a45a35223672 (diff) |
[SCSI] bfa: Implement LUN Masking feature using the SCSI Slave Callouts.
This patch re-implements LUN Masking feature using SCSI Slave Callouts. With
the new design in the slave_alloc entry point; for each new LUN discovered we
check with our internal LUN Masking config whether to expose or to mask this
particular LUN. We return -ENXIO (No such device or address) from slave_alloc
for the LUNs we don't want to be exposed. We also notify the SCSI mid-layer
to do a sequential LUN scan rather than REPORT_LUNS based scan if LUN masking
is enabled on our HBA port, since a -ENXIO from any LUN in REPORT_LUNS based
scan translates to a scan abort. This patch also handles the dynamic lun
masking config change from enable to disable or vice-versa by resetting
sdev_bflags of LUN 0 appropriately.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfad.c')
-rw-r--r-- | drivers/scsi/bfa/bfad.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 66fb72531b3..404fd10ddb2 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
@@ -674,6 +674,7 @@ bfad_vport_create(struct bfad_s *bfad, u16 vf_id, | |||
674 | 674 | ||
675 | spin_lock_irqsave(&bfad->bfad_lock, flags); | 675 | spin_lock_irqsave(&bfad->bfad_lock, flags); |
676 | bfa_fcs_vport_start(&vport->fcs_vport); | 676 | bfa_fcs_vport_start(&vport->fcs_vport); |
677 | list_add_tail(&vport->list_entry, &bfad->vport_list); | ||
677 | spin_unlock_irqrestore(&bfad->bfad_lock, flags); | 678 | spin_unlock_irqrestore(&bfad->bfad_lock, flags); |
678 | 679 | ||
679 | return BFA_STATUS_OK; | 680 | return BFA_STATUS_OK; |
@@ -1404,6 +1405,7 @@ bfad_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid) | |||
1404 | bfad->ref_count = 0; | 1405 | bfad->ref_count = 0; |
1405 | bfad->pport.bfad = bfad; | 1406 | bfad->pport.bfad = bfad; |
1406 | INIT_LIST_HEAD(&bfad->pbc_vport_list); | 1407 | INIT_LIST_HEAD(&bfad->pbc_vport_list); |
1408 | INIT_LIST_HEAD(&bfad->vport_list); | ||
1407 | 1409 | ||
1408 | /* Setup the debugfs node for this bfad */ | 1410 | /* Setup the debugfs node for this bfad */ |
1409 | if (bfa_debugfs_enable) | 1411 | if (bfa_debugfs_enable) |