Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328787
b: refs/heads/master
c: aa6fbb7
h: refs/heads/master
i:
  328785: 9f529d6
  328783: c9236c7
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Sep 14, 2012
1 parent 42db005 commit 39b94b8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 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: 2a76a28314993d27668fc7f9d5b6427facce4318
refs/heads/master: aa6fbb757ab6fce4647bafd28f9a49e5b0fa07db
18 changes: 17 additions & 1 deletion trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -2825,10 +2825,26 @@ lpfc_sli_rsp_pointers_error(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)
void lpfc_poll_eratt(unsigned long ptr)
{
struct lpfc_hba *phba;
uint32_t eratt = 0;
uint32_t eratt = 0, rem;
uint64_t sli_intr, cnt;

phba = (struct lpfc_hba *)ptr;

/* Here we will also keep track of interrupts per sec of the hba */
sli_intr = phba->sli.slistat.sli_intr;

if (phba->sli.slistat.sli_prev_intr > sli_intr)
cnt = (((uint64_t)(-1) - phba->sli.slistat.sli_prev_intr) +
sli_intr);
else
cnt = (sli_intr - phba->sli.slistat.sli_prev_intr);

/* 64-bit integer division not supporte on 32-bit x86 - use do_div */
rem = do_div(cnt, LPFC_ERATT_POLL_INTERVAL);
phba->sli.slistat.sli_ips = cnt;

phba->sli.slistat.sli_prev_intr = sli_intr;

/* Check chip HA register for error event */
eratt = lpfc_sli_check_eratt(phba);

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/lpfc/lpfc_sli.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ struct lpfc_sli_stat {
uint64_t mbox_stat_err; /* Mbox cmds completed status error */
uint64_t mbox_cmd; /* Mailbox commands issued */
uint64_t sli_intr; /* Count of Host Attention interrupts */
uint64_t sli_prev_intr; /* Previous cnt of Host Attention interrupts */
uint64_t sli_ips; /* Host Attention interrupts per sec */
uint32_t err_attn_event; /* Error Attn event counters */
uint32_t link_event; /* Link event counters */
uint32_t mbox_event; /* Mailbox event counters */
Expand Down

0 comments on commit 39b94b8

Please sign in to comment.