From: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>
To: linux-kernel@vger.kernel.org
Cc: "Bjørn Mork" <bjorn@mork.no>,
"Len Sorensen" <lsorense@csclub.uwaterloo.ca>,
linux@sierrawireless.com, netdev@vger.kernel.org
Subject: Endianess bug fix for sierra_net
Date: Fri, 7 Sep 2012 18:14:02 -0400 [thread overview]
Message-ID: <20120907221402.GJ15650@csclub.uwaterloo.ca> (raw)
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;
next reply other threads:[~2012-09-07 22:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 22:14 Lennart Sorensen [this message]
2012-09-10 19:06 ` Endianess bug fix for sierra_net David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120907221402.GJ15650@csclub.uwaterloo.ca \
--to=lsorense@csclub.uwaterloo.ca \
--cc=bjorn@mork.no \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@sierrawireless.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).