Skip to content

Commit

Permalink
IB/ipath: Fix byte order of pioavail in handle_errors()
Browse files Browse the repository at this point in the history
Fix byte order of value assigned to pioavailshadow.  This bug was
detected by sparse endianness warnings.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Apr 17, 2008
1 parent c263ff6 commit 0349d16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/infiniband/hw/ipath/ipath_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
void ipath_clear_freeze(struct ipath_devdata *dd)
{
int i, im;
__le64 val;
u64 val;
unsigned long flags;

/* disable error interrupts, to avoid confusion */
Expand Down Expand Up @@ -835,8 +835,8 @@ void ipath_clear_freeze(struct ipath_devdata *dd)
/* deal with 6110 chip bug */
im = i > 3 ? i ^ 1 : i;
val = ipath_read_kreg64(dd, (0x1000 / sizeof(u64)) + im);
dd->ipath_pioavailregs_dma[i] = dd->ipath_pioavailshadow[i]
= le64_to_cpu(val);
dd->ipath_pioavailregs_dma[i] = cpu_to_le64(val);
dd->ipath_pioavailshadow[i] = val;
}

/*
Expand Down

0 comments on commit 0349d16

Please sign in to comment.