[SCSI] bfa: Fix for bcu or hcm faa query hang
authorVijaya Mohan Guvva <vmohan@brocade.com>
Thu, 21 Nov 2013 09:37:46 +0000 (01:37 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 19 Dec 2013 15:39:05 +0000 (07:39 -0800)
This patch set fixes the issue of brocade management utility hang
(bcu/HCM) when faa attributes are queried from multiple application
threads. Hang was due to race between the threads and completion handler
corruption.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/bfa/bfa_core.c

index 520540a5fef6d13ce22192e5ad4930ae21a29240..e3f67b097a5ca78df71b382e2fedf8a380c92e16 100644 (file)
@@ -1367,10 +1367,6 @@ bfa_faa_query(struct bfa_s *bfa, struct bfa_faa_attr_s *attr,
        struct bfa_iocfc_s      *iocfc = &bfa->iocfc;
        bfa_status_t            status;
 
-       iocfc->faa_args.faa_attr = attr;
-       iocfc->faa_args.faa_cb.faa_cbfn = cbfn;
-       iocfc->faa_args.faa_cb.faa_cbarg = cbarg;
-
        status = bfa_faa_validate_request(bfa);
        if (status != BFA_STATUS_OK)
                return status;
@@ -1378,6 +1374,10 @@ bfa_faa_query(struct bfa_s *bfa, struct bfa_faa_attr_s *attr,
        if (iocfc->faa_args.busy == BFA_TRUE)
                return BFA_STATUS_DEVBUSY;
 
+       iocfc->faa_args.faa_attr = attr;
+       iocfc->faa_args.faa_cb.faa_cbfn = cbfn;
+       iocfc->faa_args.faa_cb.faa_cbarg = cbarg;
+
        iocfc->faa_args.busy = BFA_TRUE;
        memset(&faa_attr_req, 0, sizeof(struct bfi_faa_query_s));
        bfi_h2i_set(faa_attr_req.mh, BFI_MC_IOCFC,
This page took 0.026361 seconds and 5 git commands to generate.