From: Arnd Bergmann <arnd@arndb.de>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org,
ath9k-devel@qca.qualcomm.com, robh+dt@kernel.org,
chunkeey@googlemail.com, kvalo@codeaurora.org, nbd@nbd.name
Subject: Re: [PATCH 2/5] ath9k: Set the "big endian" bit of the AR9003 EEPROM templates
Date: Mon, 22 Aug 2016 17:31:23 +0200 [thread overview]
Message-ID: <14216135.Y4g7Oly61q@wuerfel> (raw)
In-Reply-To: <CAFBinCBdv9poKwjsDeGue30x0B9aUjxdkb5BHZcBgouOMAGWMQ@mail.gmail.com>
On Monday, August 22, 2016 1:56:46 PM CEST Martin Blumenstingl wrote:
> On Mon, Aug 22, 2016 at 1:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Sunday, August 21, 2016 4:49:03 PM CEST Martin Blumenstingl wrote:
> >> We will default to the system's native endianness for the eepmisc value.
> >> This may be overwritten by the actual calibration data. If it is not
> >> overwritten we interpret the template data in it's native endianness,
> >> meaning that no swapping is required.
> >
> > I'm still skeptical about this one. What is the significance of "native
> > endianess" here? You are keying the endianess of the eeprom tables off the
> > way the CPU operates, but for a PCI device there is no correlation between
> > those two.
> (the ar9003 eeprom format and handling is different compared to 9287,
> def and 4k)
> ar9003_eeprom.c contains EEPROM templates -> these are compiled into
> the ath9k kernel module. Values from these templates can be
> overwritten by the EEPROM found on the actual hardware.
> This change tries to handle the case where the values in the hardware
> EEPROM do not override any of the template values (means final EEPROM
> data = template data). In this case the we can simply rely on the
> endianness which was used to compile ath9k.ko.
Ok, I see what you mean now. However, looking at the source now, I
also see
#define LE16(x) cpu_to_le16(x)
#define LE32(x) cpu_to_le32(x)
.baseEepHeader = {
.regDmn = { LE16(0), LE16(0x1f) },
suggesting that the fields are meant to be little-endian in object
code, and your patch does not change that. In fact, Felix's
ffdc4cbe5b17 ("ath9k_hw: clean up EEPROM endian handling on AR9003")
seems to have corrected this already.
Arnd
next prev parent reply other threads:[~2016-08-22 15:31 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 14:49 [PATCH 0/5] ath9k: EEPROM swapping improvements Martin Blumenstingl
[not found] ` <20160821144906.30984-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-21 14:49 ` [PATCH 1/5] ath9k: Add a #define for the EEPROM "eepmisc" endianness bit Martin Blumenstingl
[not found] ` <20160821144906.30984-2-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-22 11:42 ` Arnd Bergmann
2016-08-21 14:49 ` [PATCH 2/5] ath9k: Set the "big endian" bit of the AR9003 EEPROM templates Martin Blumenstingl
[not found] ` <20160821144906.30984-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-22 11:47 ` Arnd Bergmann
2016-08-22 11:56 ` Martin Blumenstingl
2016-08-22 15:31 ` Arnd Bergmann [this message]
2016-08-22 20:31 ` Martin Blumenstingl
2016-08-21 14:49 ` [PATCH 3/5] ath9k: Add an eeprom_ops callback for retrieving the eepmisc value Martin Blumenstingl
2016-08-21 14:49 ` [PATCH 4/5] ath9k: Make the EEPROM swapping check use the eepmisc register Martin Blumenstingl
2016-08-21 14:49 ` [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree Martin Blumenstingl
[not found] ` <20160821144906.30984-6-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-08-22 11:52 ` Arnd Bergmann
2016-08-28 21:10 ` Martin Blumenstingl
2016-08-29 12:10 ` Arnd Bergmann
[not found] ` <201608291410.44338.arnd-r2nGTMty4D4@public.gmane.org>
2016-08-29 19:45 ` Martin Blumenstingl
2016-08-29 21:25 ` Arnd Bergmann
[not found] ` <201608292325.38091.arnd-r2nGTMty4D4@public.gmane.org>
2016-08-29 22:07 ` Martin Blumenstingl
2016-08-30 7:57 ` Arnd Bergmann
2016-10-02 22:29 ` [PATCH v2 0/7] ath9k: EEPROM swapping improvements Martin Blumenstingl
[not found] ` <20161002222913.12223-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2016-10-02 22:29 ` [PATCH v2 1/7] ath9k: Add a #define for the EEPROM "eepmisc" endianness bit Martin Blumenstingl
2016-10-02 22:29 ` [PATCH v2 2/7] ath9k: indicate that the AR9003 EEPROM template values are little endian Martin Blumenstingl
2016-10-02 22:29 ` [PATCH v2 3/7] ath9k: Add an eeprom_ops callback for retrieving the eepmisc value Martin Blumenstingl
2016-10-02 22:29 ` [PATCH v2 4/7] ath9k: replace eeprom_param EEP_MINOR_REV with get_eeprom_rev Martin Blumenstingl
2016-10-02 22:29 ` [PATCH v2 5/7] ath9k: consistently use get_eeprom_rev(ah) Martin Blumenstingl
2016-10-02 22:29 ` [PATCH v2 6/7] ath9k: Make the EEPROM swapping check use the eepmisc register Martin Blumenstingl
2016-10-02 22:29 ` [PATCH v2 7/7] ath9k: define all EEPROM fields in Little Endian format Martin Blumenstingl
2016-10-12 13:18 ` [PATCH v2 0/7] ath9k: EEPROM swapping improvements Kalle Valo
[not found] ` <87insxg0yc.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-11-25 15:06 ` Valo, Kalle
[not found] ` <871sxza9al.fsf-HodKDYzPHsUD5k0oWYwrnHL1okKdlPRT@public.gmane.org>
2016-11-25 23:49 ` Martin Blumenstingl
2016-12-12 20:05 ` Martin Blumenstingl
[not found] ` <CAFBinCC6JWBhZwma=66fBi3_to2SaHOMNDQS23jHNhcc+RUcYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-13 12:03 ` Valo, Kalle
2016-12-14 6:45 ` Adrian Chadd
[not found] ` <CAJ-Vmo=3zox7QkFUA-3yxtvSTzPT4GiFkoOUU3cPTXSN4xV8vQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-17 14:40 ` Martin Blumenstingl
2016-12-15 8:34 ` Valo, Kalle
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=14216135.Y4g7Oly61q@wuerfel \
--to=arnd@arndb.de \
--cc=ath9k-devel@lists.ath9k.org \
--cc=ath9k-devel@qca.qualcomm.com \
--cc=chunkeey@googlemail.com \
--cc=devicetree@vger.kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=nbd@nbd.name \
--cc=robh+dt@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