public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Timur Tabi <timur@tabi.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/eeprom: update MAX_NUM_PORTS to fix program failure
Date: Thu, 29 Aug 2013 10:09:22 -0500	[thread overview]
Message-ID: <521F6422.2040807@tabi.org> (raw)
In-Reply-To: <3F453DDFF675A64A89321A1F35281021A8DA06@039-SN1MPN1-004.039d.mgd.msft.net>

On 08/29/2013 04:56 AM, Liu Shengzhou-B36685 wrote:

>> If the EEPROM is 128 bytes, then you have a non-conformant EEPROM.

> What is a conformant EEPROM?

A conformant EEPROM has a size of 256 bytes .

> The size of struct of EEPROM_NXID should be able to conform to real size of EEPROM, regardless it's 128 or 256 EEPROM.

The problem is that the CRC is at the end of the structure, so that

> It's not reasonable to limit MAX_NUM_PORTS to 23, generally we don't need 23 MAC addresses to store in EEPROM.
> 23 is just suitable to 256 bytes EEPROM.

Actually, the 23 should be changed to 31.  York, this patch needs to be
applied: http://patchwork.ozlabs.org/patch/170753/

>> And using the #ifdef to determine this is definitely the wrong way.

> Why? What's your way?

If you need to define a new EEPROM format, then the version number needs
to be changed to v2, and the code needs to dynamically handle v1 and v2.

BTW, your patch breaks EVERY OTHER BOARD.  You can't just change the 23
to a 9 for every board.  Did you test your patch on other boards?

-- 
Timur Tabi

  reply	other threads:[~2013-08-29 15:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08  9:14 [U-Boot] [PATCH] powerpc/eeprom: update MAX_NUM_PORTS to fix program failure Shengzhou Liu
2013-08-11 23:50 ` Timur Tabi
2013-08-29  9:56   ` Liu Shengzhou-B36685
2013-08-29 15:09     ` Timur Tabi [this message]
2013-08-30 11:04       ` Liu Shengzhou-B36685
2013-08-30 13:19         ` Timur Tabi

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=521F6422.2040807@tabi.org \
    --to=timur@tabi.org \
    --cc=u-boot@lists.denx.de \
    /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