* Endianess bug fix for sierra_net
@ 2012-09-07 22:14 Lennart Sorensen
2012-09-10 19:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Lennart Sorensen @ 2012-09-07 22:14 UTC (permalink / raw)
To: linux-kernel; +Cc: Bjørn Mork, Len Sorensen, linux, netdev
I discovered I couldn't get sierra_net to work on a powerpc. Turns out
the firmware attribute check assumes the system is little endian and
hence fails because the attributes is a 16 bit value.
Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
index 7be49ea..8e22417 100644
--- a/drivers/net/usb/sierra_net.c
+++ b/drivers/net/usb/sierra_net.c
@@ -656,7 +656,7 @@ static int sierra_net_get_fw_attr(struct usbnet *dev, u16 *datap)
return -EIO;
}
- *datap = *attrdata;
+ *datap = le16_to_cpu(*attrdata);
kfree(attrdata);
return result;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Endianess bug fix for sierra_net
2012-09-07 22:14 Endianess bug fix for sierra_net Lennart Sorensen
@ 2012-09-10 19:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-09-10 19:06 UTC (permalink / raw)
To: lsorense; +Cc: linux-kernel, bjorn, linux, netdev
From: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>
Date: Fri, 7 Sep 2012 18:14:02 -0400
> I discovered I couldn't get sierra_net to work on a powerpc. Turns out
> the firmware attribute check assumes the system is little endian and
> hence fails because the attributes is a 16 bit value.
>
> Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-10 19:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07 22:14 Endianess bug fix for sierra_net Lennart Sorensen
2012-09-10 19:06 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.