Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257845
b: refs/heads/master
c: 10a0737
h: refs/heads/master
i:
  257843: c4e651b
v: v3
  • Loading branch information
Krishna Gudipati authored and James Bottomley committed Jun 29, 2011
1 parent 96ab104 commit d67a51f
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 133 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a714134a857d3984250ee52fda7850b61bf8a94e
refs/heads/master: 10a07379247078448c076690657a076076bf89aa
43 changes: 36 additions & 7 deletions trunk/drivers/scsi/bfa/bfa_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,39 @@ bfa_isr_reqq(struct bfa_s *bfa, int qid)
void
bfa_msix_all(struct bfa_s *bfa, int vec)
{
bfa_intx(bfa);
u32 intr, qintr;
int queue;

intr = readl(bfa->iocfc.bfa_regs.intr_status);
if (!intr)
return;

/*
* RME completion queue interrupt
*/
qintr = intr & __HFN_INT_RME_MASK;
if (qintr && bfa->queue_process) {
for (queue = 0; queue < BFI_IOC_MAX_CQS; queue++)
bfa_isr_rspq(bfa, queue);
}

intr &= ~qintr;
if (!intr)
return;

/*
* CPE completion queue interrupt
*/
qintr = intr & __HFN_INT_CPE_MASK;
if (qintr && bfa->queue_process) {
for (queue = 0; queue < BFI_IOC_MAX_CQS; queue++)
bfa_isr_reqq(bfa, queue);
}
intr &= ~qintr;
if (!intr)
return;

bfa_msix_lpu_err(bfa, intr);
}

bfa_boolean_t
Expand Down Expand Up @@ -469,6 +501,9 @@ bfa_iocfc_send_cfg(void *bfa_arg)
/*
* initialize IOC configuration info
*/
cfg_info->single_msix_vec = 0;
if (bfa->msix.nvecs == 1)
cfg_info->single_msix_vec = 1;
cfg_info->endian_sig = BFI_IOC_ENDIAN_SIG;
cfg_info->num_cqs = cfg->fwcfg.num_cqs;
cfg_info->num_ioim_reqs = cpu_to_be16(cfg->fwcfg.num_ioim_reqs);
Expand Down Expand Up @@ -1080,12 +1115,6 @@ bfa_iocfc_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
ioc->trcmod = bfa->trcmod;
bfa_ioc_attach(&bfa->ioc, bfa, &bfa_iocfc_cbfn, &bfa->timer_mod);

/*
* Set FC mode for BFA_PCI_DEVICE_ID_CT_FC.
*/
if (pcidev->device_id == BFA_PCI_DEVICE_ID_CT_FC)
bfa_ioc_set_fcmode(&bfa->ioc);

bfa_ioc_pci_init(&bfa->ioc, pcidev, BFI_PCIFN_CLASS_FC);
bfa_ioc_mbox_register(&bfa->ioc, bfa_mbox_isrs);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/bfa/bfa_hw_cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bfa_hwcb_msix_ctrl_install(struct bfa_s *bfa)
return;

if (bfa->msix.nvecs == 1) {
for (i = BFI_MSIX_RME_QMAX_CB+1; i < BFI_MSIX_CB_MAX; i++)
for (i = BFI_MSIX_CPE_QMIN_CB; i < BFI_MSIX_CB_MAX; i++)
bfa->msix.handler[i] = bfa_msix_all;
return;
}
Expand Down
42 changes: 1 addition & 41 deletions trunk/drivers/scsi/bfa/bfa_ioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2399,12 +2399,6 @@ bfa_ioc_error_isr(struct bfa_ioc_s *ioc)
bfa_fsm_send_event(ioc, IOC_E_HWERROR);
}

void
bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc)
{
ioc->fcmode = BFA_TRUE;
}

/*
* return true if IOC is disabled
*/
Expand Down Expand Up @@ -2592,35 +2586,7 @@ bfa_ioc_get_adapter_model(struct bfa_ioc_s *ioc, char *model)

ioc_attr = ioc->attr;

/*
* model name
*/
if (ioc->asic_gen == BFI_ASIC_GEN_CT2) {
int np = bfa_ioc_get_nports(ioc);
char c;
switch (ioc_attr->card_type) {
case BFA_MFG_TYPE_PROWLER_F:
case BFA_MFG_TYPE_PROWLER_N:
case BFA_MFG_TYPE_PROWLER_C:
snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN,
"%s-%u-%u",
BFA_MFG_NAME, ioc_attr->card_type, np);
break;
case BFA_MFG_TYPE_PROWLER_D:
if (ioc_attr->ic == BFA_MFG_IC_FC)
c = 'F';
else
c = 'P';

snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN,
"%s-%u-%u%c",
BFA_MFG_NAME, ioc_attr->card_type, np, c);
break;
default:
break;
}
} else
snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u",
snprintf(model, BFA_ADAPTER_MODEL_NAME_LEN, "%s-%u",
BFA_MFG_NAME, ioc_attr->card_type);
}

Expand Down Expand Up @@ -2711,12 +2677,6 @@ bfa_ioc_get_mfg_mac(struct bfa_ioc_s *ioc)
return m;
}

bfa_boolean_t
bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc)
{
return ioc->fcmode || bfa_asic_id_cb(ioc->pcidev.device_id);
}

/*
* Retrieve saved firmware trace from a prior IOC failure.
*/
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/bfa/bfa_ioc.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ bfa_status_t bfa_ioc_ct2_pll_init(void __iomem *rb, enum bfi_asic_mode mode);
} while (0)
#define bfa_ioc_ownership_reset(__ioc) \
((__ioc)->ioc_hwif->ioc_ownership_reset(__ioc))
#define bfa_ioc_get_fcmode(__ioc) ((__ioc)->fcmode)
#define bfa_ioc_lpu_read_stat(__ioc) do { \
if ((__ioc)->ioc_hwif->ioc_lpu_read_stat) \
((__ioc)->ioc_hwif->ioc_lpu_read_stat(__ioc)); \
Expand Down Expand Up @@ -414,8 +415,6 @@ bfa_status_t bfa_ioc_debug_fwtrc(struct bfa_ioc_s *ioc, void *trcdata,
int *trclen);
bfa_status_t bfa_ioc_debug_fwcore(struct bfa_ioc_s *ioc, void *buf,
u32 *offset, int *buflen);
void bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc);
bfa_boolean_t bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc);
bfa_boolean_t bfa_ioc_sem_get(void __iomem *sem_reg);
void bfa_ioc_fwver_get(struct bfa_ioc_s *ioc,
struct bfi_ioc_image_hdr_s *fwhdr);
Expand Down
Loading

0 comments on commit d67a51f

Please sign in to comment.