* SEEPROM test patch
@ 2009-04-14 17:21 Matt Carlson
2009-04-14 17:44 ` James Bottomley
0 siblings, 1 reply; 3+ messages in thread
From: Matt Carlson @ 2009-04-14 17:21 UTC (permalink / raw)
To: Robin Holt, James Bottomley; +Cc: Michael Chan, netdev, Parisc List
James, Robin. I looked through the patches again and found that the
SEEPROM routines were not being adjusted correctly along with the flash
NVRAM access routines. The patch below should shore up the difference.
The patch works on both BE and LE systems.
Can you apply the patch below and see if it fixes your problem? (You
may have to back out David's changes for the mac addresses to be
restored, but 'eeprom -e' dumps should be fixed.) If it does, I'll
post a replacement patch that documents why the code is doing what it's
doing.
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 6a736dd..3ef43c2 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -2190,7 +2190,10 @@ static int tg3_nvram_read_using_eeprom(struct tg3 *tp,
if (!(tmp & EEPROM_ADDR_COMPLETE))
return -EBUSY;
- *val = tr32(GRC_EEPROM_DATA);
+ tmp = tr32(GRC_EEPROM_DATA);
+
+ *val = swab32(tmp);
+
return 0;
}
@@ -10657,13 +10660,13 @@ static int tg3_nvram_write_block_using_eeprom(struct tg3 *tp,
for (i = 0; i < len; i += 4) {
u32 addr;
- __be32 data;
+ __le32 data;
addr = offset + i;
memcpy(&data, buf + i, 4);
- tw32(GRC_EEPROM_DATA, be32_to_cpu(data));
+ tw32(GRC_EEPROM_DATA, le32_to_cpu(data));
val = tr32(GRC_EEPROM_ADDR);
tw32(GRC_EEPROM_ADDR, val | EEPROM_ADDR_COMPLETE);
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: SEEPROM test patch
2009-04-14 17:21 SEEPROM test patch Matt Carlson
@ 2009-04-14 17:44 ` James Bottomley
2009-04-14 18:22 ` Robin Holt
0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2009-04-14 17:44 UTC (permalink / raw)
To: Matt Carlson; +Cc: Robin Holt, Michael Chan, netdev, Parisc List
On Tue, 2009-04-14 at 10:21 -0700, Matt Carlson wrote:
> James, Robin. I looked through the patches again and found that the
> SEEPROM routines were not being adjusted correctly along with the flash
> NVRAM access routines. The patch below should shore up the difference.
> The patch works on both BE and LE systems.
>
> Can you apply the patch below and see if it fixes your problem? (You
> may have to back out David's changes for the mac addresses to be
> restored, but 'eeprom -e' dumps should be fixed.) If it does, I'll
> post a replacement patch that documents why the code is doing what it's
> doing.
Yes, that seems to work better: both the mac address and ethtool -e
output are back to what 2.6.29 reports.
James
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SEEPROM test patch
2009-04-14 17:44 ` James Bottomley
@ 2009-04-14 18:22 ` Robin Holt
0 siblings, 0 replies; 3+ messages in thread
From: Robin Holt @ 2009-04-14 18:22 UTC (permalink / raw)
To: James Bottomley
Cc: Matt Carlson, Robin Holt, Michael Chan, netdev, Parisc List
On Tue, Apr 14, 2009 at 05:44:17PM +0000, James Bottomley wrote:
> On Tue, 2009-04-14 at 10:21 -0700, Matt Carlson wrote:
> > James, Robin. I looked through the patches again and found that the
> > SEEPROM routines were not being adjusted correctly along with the flash
> > NVRAM access routines. The patch below should shore up the difference.
> > The patch works on both BE and LE systems.
> >
> > Can you apply the patch below and see if it fixes your problem? (You
> > may have to back out David's changes for the mac addresses to be
> > restored, but 'eeprom -e' dumps should be fixed.) If it does, I'll
> > post a replacement patch that documents why the code is doing what it's
> > doing.
>
> Yes, that seems to work better: both the mac address and ethtool -e
> output are back to what 2.6.29 reports.
Works for me as well.
Thanks,
Robin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-14 18:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 17:21 SEEPROM test patch Matt Carlson
2009-04-14 17:44 ` James Bottomley
2009-04-14 18:22 ` Robin Holt
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).