netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, nsujir@broadcom.com
Subject: [PATCH 3/5 net-next] tg3: Fix 5762 NVRAM sizing
Date: Thu, 14 Feb 2013 14:13:40 -0800	[thread overview]
Message-ID: <1360880022-12856-3-git-send-email-mchan@broadcom.com> (raw)
In-Reply-To: <1360880022-12856-2-git-send-email-mchan@broadcom.com>

Don't set the default size to 128K if it is 5762.  Instead, rely on the
size we obtain from NVRAM location 0xf0.

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/ethernet/broadcom/tg3.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 3004d69..7ac0bd0 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -13883,7 +13883,8 @@ static void tg3_get_5720_nvram_info(struct tg3 *tp)
 			tp->nvram_size = TG3_NVRAM_SIZE_1MB;
 			break;
 		default:
-			tp->nvram_size = TG3_NVRAM_SIZE_128KB;
+			if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5762)
+				tp->nvram_size = TG3_NVRAM_SIZE_128KB;
 			break;
 		}
 		break;
@@ -13929,7 +13930,8 @@ static void tg3_get_5720_nvram_info(struct tg3 *tp)
 			tp->nvram_size = TG3_NVRAM_SIZE_1MB;
 			break;
 		default:
-			tp->nvram_size = TG3_NVRAM_SIZE_128KB;
+			if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5762)
+				tp->nvram_size = TG3_NVRAM_SIZE_128KB;
 			break;
 		}
 		break;
-- 
1.7.1

  reply	other threads:[~2013-02-14 21:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 22:13 [PATCH 1/5 net-next] tg3: Add 57766 device support Michael Chan
2013-02-14 22:13 ` [PATCH 2/5 net-next] tg3: Add EEE support for 5717 B0 Michael Chan
2013-02-14 22:13   ` Michael Chan [this message]
2013-02-14 22:13     ` [PATCH 4/5 net-next] tg3: Set initial carrier state to off Michael Chan
2013-02-14 22:13       ` [PATCH 5/5 net-next] tg3: Update version to 3.130 Michael Chan
2013-02-14 22:19   ` [PATCH 2/5 net-next] tg3: Add EEE support for 5717 B0 David Miller
2013-02-14 22:25 ` [PATCH 1/5 net-next] tg3: Add 57766 device support Joe Perches
2013-02-14 23:13   ` Nithin Nayak Sujir
2013-02-14 23:16     ` Joe Perches

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=1360880022-12856-3-git-send-email-mchan@broadcom.com \
    --to=mchan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nsujir@broadcom.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;
as well as URLs for NNTP newsgroup(s).