Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334115
b: refs/heads/master
c: ee02006
h: refs/heads/master
i:
  334113: bcd0db8
  334111: 0544733
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Oct 8, 2012
1 parent 090c8dd commit 7bf4b9f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 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: 33cb82dc8c38d451b5220611102dccda16431be5
refs/heads/master: ee02006b5336db1a259f34c3a390be43b32063b7
15 changes: 11 additions & 4 deletions trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -12099,6 +12099,7 @@ lpfc_modify_fcp_eq_delay(struct lpfc_hba *phba, uint16_t startq)
struct lpfc_queue *eq;
int cnt, rc, length, status = 0;
uint32_t shdr_status, shdr_add_status;
uint32_t result;
int fcp_eqidx;
union lpfc_sli4_cfg_shdr *shdr;
uint16_t dmult;
Expand All @@ -12117,8 +12118,11 @@ lpfc_modify_fcp_eq_delay(struct lpfc_hba *phba, uint16_t startq)
eq_delay = &mbox->u.mqe.un.eq_delay;

/* Calculate delay multiper from maximum interrupt per second */
dmult = phba->cfg_fcp_imax / phba->cfg_fcp_io_channel;
dmult = LPFC_DMULT_CONST/dmult - 1;
result = phba->cfg_fcp_imax / phba->cfg_fcp_io_channel;
if (result > LPFC_DMULT_CONST)
dmult = 0;
else
dmult = LPFC_DMULT_CONST/result - 1;

cnt = 0;
for (fcp_eqidx = startq; fcp_eqidx < phba->cfg_fcp_io_channel;
Expand Down Expand Up @@ -12174,7 +12178,7 @@ lpfc_modify_fcp_eq_delay(struct lpfc_hba *phba, uint16_t startq)
* fails this function will return -ENXIO.
**/
uint32_t
lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint16_t imax)
lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax)
{
struct lpfc_mbx_eq_create *eq_create;
LPFC_MBOXQ_t *mbox;
Expand Down Expand Up @@ -12206,7 +12210,10 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint16_t imax)
LPFC_EQE_SIZE);
bf_set(lpfc_eq_context_valid, &eq_create->u.request.context, 1);
/* Calculate delay multiper from maximum interrupt per second */
dmult = LPFC_DMULT_CONST/imax - 1;
if (imax > LPFC_DMULT_CONST)
dmult = 0;
else
dmult = LPFC_DMULT_CONST/imax - 1;
bf_set(lpfc_eq_context_delay_multi, &eq_create->u.request.context,
dmult);
switch (eq->entry_count) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/lpfc/lpfc_sli4.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ void lpfc_sli4_hba_reset(struct lpfc_hba *);
struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *, uint32_t,
uint32_t);
void lpfc_sli4_queue_free(struct lpfc_queue *);
uint32_t lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint16_t);
uint32_t lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint32_t);
uint32_t lpfc_modify_fcp_eq_delay(struct lpfc_hba *, uint16_t);
uint32_t lpfc_cq_create(struct lpfc_hba *, struct lpfc_queue *,
struct lpfc_queue *, uint32_t, uint32_t);
Expand Down

0 comments on commit 7bf4b9f

Please sign in to comment.