From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
"linville@tuxdriver.com" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"joshuacov@googlemail.com" <joshuacov@googlemail.com>,
"stephenbeahm@comcast.net" <stephenbeahm@comcast.net>,
"stable@kernel.org" <stable@kernel.org>,
David Quan <David.Quan@Atheros.com>
Subject: Re: [PATCH] ath5k: Fix eeprom checksum check for custom sized eeproms
Date: Tue, 5 Jan 2010 15:11:21 -0800 [thread overview]
Message-ID: <20100105231121.GG2086@tux> (raw)
In-Reply-To: <40f31dec1001051506j2648a4ccp4871b6855e1c417@mail.gmail.com>
On Tue, Jan 05, 2010 at 03:06:11PM -0800, Nick Kossifidis wrote:
> 2010/1/4 Luis R. Rodriguez <lrodriguez@atheros.com>:
> > On Mon, Jan 4, 2010 at 10:09 AM, Nick Kossifidis <mickflemm@gmail.com> wrote:
> >> 2010/1/4 Luis R. Rodriguez <lrodriguez@atheros.com>:
> >>>
> >>> +
> >>> +/* FLASH(EEPROM) Defines for AR531X chips */
> >>> +#define AR5K_EEPROM_SIZE_LOWER 0x1b /* size info -- lower */
> >>> +#define AR5K_EEPROM_SIZE_UPPER 0x1c /* size info -- upper */
> >>> +#define AR5K_EEPROM_SIZE_UPPER_MASK 0xfff0
> >>> +#define AR5K_EEPROM_SIZE_UPPER_SHIFT 4
> >>> +#define AR5K_EEPROM_SIZE_ENDLOC_SHIFT 12
> >>> +
> >>
> >> AR531X chips are SoCs, are you sure this comment is correct ?
> >
> > I got that from the legacy HAL, so just using that as a source of
> > documentation for this.
> >
> >> In the docs this marks the end of EAR section (and the end of
> >> checksum) for EEPROMs larger than 16k
> >> valid values for checksum end are 0x00000C0 to 0x0080000
> >
> > I didn't see this used, just replicating what I saw in the legacy HAL
> > to match the code on Linux with what we have on other operating
> > systems. Not sure about the valid values for the checksum as per
> > documentation Vs what is implemented, I am just following what I see
> > implemented to ensure consistency.
> >
> >> Also to calculate EEPROM size (stored on the first 4 bits of 0x1c) you
> >> do this according to the docs
> >> 2 ^ (EEPROM size + 9) and valid values are from 1 to 11 (11 = 1MB)
> >
> > OK thanks so the eep_max should not be > 11 ?
> >
>
> I guess
>
> eep_max > (3 * AR5K_EEPROM_INFO_MAX)
>
> should be
>
> eep_max > 1024
; 0x400 - 0x00c0
0x340
0x340 = 832
Whatever that means not sure. Have been lazy to read the EEPROM docs.
Anyway once we are certain of a value it can be updated. For now this
fixed some user issues, the main goal of the limit check was to prevent
out of range access to some bogus registers or doing an infinite loop
when a busted EEPROM was detected. This was already merged, once we
get the right value we can update this.
Luis
prev parent reply other threads:[~2010-01-05 23:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-04 15:40 [PATCH] ath5k: Fix eeprom checksum check for custom sized eeproms Luis R. Rodriguez
2010-01-04 18:09 ` Nick Kossifidis
2010-01-04 18:15 ` Luis R. Rodriguez
2010-01-05 23:06 ` Nick Kossifidis
2010-01-05 23:11 ` Luis R. Rodriguez [this message]
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=20100105231121.GG2086@tux \
--to=lrodriguez@atheros.com \
--cc=David.Quan@Atheros.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=joshuacov@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mickflemm@gmail.com \
--cc=stable@kernel.org \
--cc=stephenbeahm@comcast.net \
/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).