~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/scsi/bfa/bfa_ioc_ct.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc_s *ioc, bfa_boolean_t msix);
42
42
static void bfa_ioc_ct_notify_fail(struct bfa_ioc_s *ioc);
43
43
static void bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc);
 
44
static bfa_boolean_t bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc);
44
45
static void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc);
45
46
static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc);
46
47
static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc);
62
63
        hwif_ct.ioc_isr_mode_set = bfa_ioc_ct_isr_mode_set;
63
64
        hwif_ct.ioc_notify_fail = bfa_ioc_ct_notify_fail;
64
65
        hwif_ct.ioc_ownership_reset = bfa_ioc_ct_ownership_reset;
 
66
        hwif_ct.ioc_sync_start = bfa_ioc_ct_sync_start;
65
67
        hwif_ct.ioc_sync_join = bfa_ioc_ct_sync_join;
66
68
        hwif_ct.ioc_sync_leave = bfa_ioc_ct_sync_leave;
67
69
        hwif_ct.ioc_sync_ack = bfa_ioc_ct_sync_ack;
351
353
        writel(1, ioc->ioc_regs.ioc_sem_reg);
352
354
}
353
355
 
 
356
static bfa_boolean_t
 
357
bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc)
 
358
{
 
359
        uint32_t r32 = readl(ioc->ioc_regs.ioc_fail_sync);
 
360
        uint32_t sync_reqd = bfa_ioc_ct_get_sync_reqd(r32);
 
361
 
 
362
        /*
 
363
         * Driver load time.  If the sync required bit for this PCI fn
 
364
         * is set, it is due to an unclean exit by the driver for this
 
365
         * PCI fn in the previous incarnation. Whoever comes here first
 
366
         * should clean it up, no matter which PCI fn.
 
367
         */
 
368
 
 
369
        if (sync_reqd & bfa_ioc_ct_sync_pos(ioc)) {
 
370
                writel(0, ioc->ioc_regs.ioc_fail_sync);
 
371
                writel(1, ioc->ioc_regs.ioc_usage_reg);
 
372
                writel(BFI_IOC_UNINIT, ioc->ioc_regs.ioc_fwstate);
 
373
                writel(BFI_IOC_UNINIT, ioc->ioc_regs.alt_ioc_fwstate);
 
374
                return BFA_TRUE;
 
375
        }
 
376
 
 
377
        return bfa_ioc_ct_sync_complete(ioc);
 
378
}
 
379
 
354
380
/*
355
381
 * Synchronized IOC failure processing routines
356
382
 */