Commit 0349d166 authored by Ralph Campbell's avatar Ralph Campbell Committed by Roland Dreier

IB/ipath: Fix byte order of pioavail in handle_errors()

Fix byte order of value assigned to pioavailshadow.  This bug was
detected by sparse endianness warnings.
Signed-off-by: default avatarRalph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent c263ff65
...@@ -798,7 +798,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) ...@@ -798,7 +798,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
void ipath_clear_freeze(struct ipath_devdata *dd) void ipath_clear_freeze(struct ipath_devdata *dd)
{ {
int i, im; int i, im;
__le64 val; u64 val;
unsigned long flags; unsigned long flags;
/* disable error interrupts, to avoid confusion */ /* disable error interrupts, to avoid confusion */
...@@ -835,8 +835,8 @@ void ipath_clear_freeze(struct ipath_devdata *dd) ...@@ -835,8 +835,8 @@ void ipath_clear_freeze(struct ipath_devdata *dd)
/* deal with 6110 chip bug */ /* deal with 6110 chip bug */
im = i > 3 ? i ^ 1 : i; im = i > 3 ? i ^ 1 : i;
val = ipath_read_kreg64(dd, (0x1000 / sizeof(u64)) + im); val = ipath_read_kreg64(dd, (0x1000 / sizeof(u64)) + im);
dd->ipath_pioavailregs_dma[i] = dd->ipath_pioavailshadow[i] dd->ipath_pioavailregs_dma[i] = cpu_to_le64(val);
= le64_to_cpu(val); dd->ipath_pioavailshadow[i] = val;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment