From: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
To: Kalle Valo <kvalo@adurom.com>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
<linville@tuxdriver.com>, <linux-wireless@vger.kernel.org>,
Johannes Berg <johannes@sipsolutions.net>,
"Luis R . Rodriguez" <rodrigue@qca.qualcomm.com>
Subject: Re: [PATCH v5 1/2] wireless: Driver for 60GHz card wil6210
Date: Mon, 12 Nov 2012 19:58:22 +0200 [thread overview]
Message-ID: <2199722.SIyuOP2QQY@lx-vladimir> (raw)
In-Reply-To: <87txsuybw4.fsf@purkki.adurom.net>
On Monday, November 12, 2012 07:22:19 PM Kalle Valo wrote:
> Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> writes:
> >> Please see
> >> ath6kl's struct wmi_begin_scan_cmd on wmi.h for an example
> >> of how to specify endianess to ensure that you can use this
> >> driver on big or little endian. So although its great you
> >> managed to successfully use sparse with -D__CHECK_ENDIAN__
> >> endianess may be broken on this command and all over your
> >> wmi.h. I won't even review that file then.
> >
> > I know about __le16 etc., but I have no big endian host to check it with.
> > Thus, I'd prefer to mention that code is not ready for big endian platform
> > rather then submit untested code. If there is a way to check endiannes
> > without having big endian host, I'd be happy to know.
> > Also, is there a good way to check in Kconfig we are on Little endian?
>
> I think this is wrong aproach. The endian support doesn't need to be
> perfect, especially if you don't have any hardware to test with. Just
> add endian annotations to all the fields you know of, run sparse and fix
> the warnings. This should only take few hours and is much better than
> refusing to compile on big endian machines.
>
> You will get very close to a working code with that method, and it means
> that all future code will have endian support "automatically" (as the
> code will follow the style already used in the driver). And whenever
> someone will try the driver in a big endian machine there's less to
> debug and fix, with very good luck (and careful review!) it might even
> work out of box :)
Yes, it make sense. I noticed also I have to use __raw_{read|write}l functions
to copy buffers to/from PCI iomem, as otherwise io{read|write}32 would swap
bytes for big endian hosts, since PCI is little endian.
I will go for it.
Thanks, Vladimir
next prev parent reply other threads:[~2012-11-12 17:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 16:36 [PATCH v5 0/2] driver for 60g Wilocity chip wil6210 Vladimir Kondratiev
2012-10-31 16:36 ` [PATCH v5 1/2] wireless: Driver for 60GHz card wil6210 Vladimir Kondratiev
2012-11-08 19:29 ` Luis R. Rodriguez
2012-11-11 16:15 ` Vladimir Kondratiev
2012-11-12 17:22 ` Kalle Valo
2012-11-12 17:58 ` Vladimir Kondratiev [this message]
2012-11-13 19:39 ` Johannes Berg
2012-11-09 8:39 ` 60 GHz interface types (was: [PATCH v5 1/2] wireless: Driver for 60GHz card wil6210) Johannes Berg
2012-11-11 8:15 ` Vladimir Kondratiev
2012-11-11 13:42 ` Johannes Berg
2012-11-11 16:53 ` Vladimir Kondratiev
2012-11-12 10:15 ` Johannes Berg
2012-11-12 10:24 ` Johannes Berg
2012-11-12 14:57 ` Vladimir Kondratiev
2012-11-12 15:17 ` Johannes Berg
2012-11-12 15:01 ` Vladimir Kondratiev
2012-11-12 17:22 ` Vladimir Kondratiev
2012-10-31 16:36 ` [PATCH v5 2/2] wireless: integrate wil6210 driver into build structure Vladimir Kondratiev
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=2199722.SIyuOP2QQY@lx-vladimir \
--to=qca_vkondrat@qca.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=kvalo@adurom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@do-not-panic.com \
--cc=rodrigue@qca.qualcomm.com \
/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