* 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
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).