Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86189
b: refs/heads/master
c: eafe1df
h: refs/heads/master
i:
  86187: 0635e88
v: v3
  • Loading branch information
Matthew Wilcox authored and James Bottomley committed Feb 22, 2008
1 parent 1db03d7 commit 2827d6f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: 65fecc77f3c47c5e8758d133b8ec47dcc16ed207
refs/heads/master: eafe1df9e311034cce204e43c0e45c91723b802f
18 changes: 9 additions & 9 deletions trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,37 +648,37 @@ lpfc_sli_hbqbuf_fill_hbqs(struct lpfc_hba *phba, uint32_t hbqno, uint32_t count)
unsigned long flags;
struct hbq_dmabuf *hbq_buffer;

if (!phba->hbqs[hbqno].hbq_alloc_buffer) {
if (!phba->hbqs[hbqno].hbq_alloc_buffer)
return 0;
}

start = phba->hbqs[hbqno].buffer_count;
end = count + start;
if (end > lpfc_hbq_defs[hbqno]->entry_count) {
if (end > lpfc_hbq_defs[hbqno]->entry_count)
end = lpfc_hbq_defs[hbqno]->entry_count;
}

/* Check whether HBQ is still in use */
spin_lock_irqsave(&phba->hbalock, flags);
if (!phba->hbq_in_use) {
spin_unlock_irqrestore(&phba->hbalock, flags);
return 0;
}
if (!phba->hbq_in_use)
goto out;

/* Populate HBQ entries */
for (i = start; i < end; i++) {
hbq_buffer = (phba->hbqs[hbqno].hbq_alloc_buffer)(phba);
if (!hbq_buffer)
return 1;
goto err;
hbq_buffer->tag = (i | (hbqno << 16));
if (lpfc_sli_hbq_to_firmware(phba, hbqno, hbq_buffer))
phba->hbqs[hbqno].buffer_count++;
else
(phba->hbqs[hbqno].hbq_free_buffer)(phba, hbq_buffer);
}

out:
spin_unlock_irqrestore(&phba->hbalock, flags);
return 0;
err:
spin_unlock_irqrestore(&phba->hbalock, flags);
return 1;
}

int
Expand Down

0 comments on commit 2827d6f

Please sign in to comment.