diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2016-01-20 16:22:22 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-02-24 03:27:02 +0100 |
commit | 1c2ba475eb0e574f96cf51c21157ffdf0af0dd2a (patch) | |
tree | c388e98422f00d42069337123ee96df1658379b8 /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | bfa: deinline __bfa_trc() and __bfa_trc32() (diff) | |
download | linux-1c2ba475eb0e574f96cf51c21157ffdf0af0dd2a.tar.xz linux-1c2ba475eb0e574f96cf51c21157ffdf0af0dd2a.zip |
lpfc: Add lockdep assertions
Several functions in lpfc have comments stating that the function must
be called with the hbalock (or hostlock, or ringlock) held. Add
lockdep_assert_held() annotations to these functions, so one can
actually verify the locks are held.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index c37d72effbff..25b5dcd1a5c8 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -25,6 +25,7 @@ #include <linux/pci.h> #include <linux/kthread.h> #include <linux/interrupt.h> +#include <linux/lockdep.h> #include <scsi/scsi.h> #include <scsi/scsi_device.h> @@ -1314,6 +1315,8 @@ __lpfc_update_fcf_record_pri(struct lpfc_hba *phba, uint16_t fcf_index, { struct lpfc_fcf_pri *fcf_pri; + lockdep_assert_held(&phba->hbalock); + fcf_pri = &phba->fcf.fcf_pri[fcf_index]; fcf_pri->fcf_rec.fcf_index = fcf_index; /* FCF record priority */ @@ -1398,6 +1401,8 @@ __lpfc_update_fcf_record(struct lpfc_hba *phba, struct lpfc_fcf_rec *fcf_rec, struct fcf_record *new_fcf_record, uint32_t addr_mode, uint16_t vlan_id, uint32_t flag) { + lockdep_assert_held(&phba->hbalock); + /* Copy the fields from the HBA's FCF record */ lpfc_copy_fcf_record(fcf_rec, new_fcf_record); /* Update other fields of driver FCF record */ |