Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298252
b: refs/heads/master
c: 25090d3
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Mar 27, 2012
1 parent 0b4454a commit 8a3da92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: d438bd3aef8ec96af02f5cba0c43aaffd35c0b46
refs/heads/master: 25090d398e97309931f87682174f377cf0ac1131
14 changes: 8 additions & 6 deletions trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -13286,7 +13286,7 @@ lpfc_sli4_post_els_sgl_list_ext(struct lpfc_hba *phba)
LPFC_MBOXQ_t *mbox;
uint32_t reqlen, alloclen, index;
uint32_t mbox_tmo;
uint16_t rsrc_start, rsrc_size, els_xri_cnt;
uint16_t rsrc_start, rsrc_size, els_xri_cnt, post_els_xri_cnt;
uint16_t xritag_start = 0, lxri = 0;
struct lpfc_rsrc_blks *rsrc_blk;
int cnt, ttl_cnt, rc = 0;
Expand All @@ -13308,6 +13308,7 @@ lpfc_sli4_post_els_sgl_list_ext(struct lpfc_hba *phba)

cnt = 0;
ttl_cnt = 0;
post_els_xri_cnt = els_xri_cnt;
list_for_each_entry(rsrc_blk, &phba->sli4_hba.lpfc_xri_blk_list,
list) {
rsrc_start = rsrc_blk->rsrc_start;
Expand All @@ -13317,11 +13318,12 @@ lpfc_sli4_post_els_sgl_list_ext(struct lpfc_hba *phba)
"3014 Working ELS Extent start %d, cnt %d\n",
rsrc_start, rsrc_size);

loop_cnt = min(els_xri_cnt, rsrc_size);
if (ttl_cnt + loop_cnt >= els_xri_cnt) {
loop_cnt = els_xri_cnt - ttl_cnt;
ttl_cnt = els_xri_cnt;
}
loop_cnt = min(post_els_xri_cnt, rsrc_size);
if (loop_cnt < post_els_xri_cnt) {
post_els_xri_cnt -= loop_cnt;
ttl_cnt += loop_cnt;
} else
ttl_cnt += post_els_xri_cnt;

mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
if (!mbox)
Expand Down

0 comments on commit 8a3da92

Please sign in to comment.