All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Michael Buesch <mb@bu3sch.de>
Cc: Andrew Morton <akpm@osdl.org>,
	zambrano@broadcom.com, netdev@vger.kernel.org, davem@redhat.com
Subject: Re: [PATCH] b44: fix eeprom endianess issue
Date: Wed, 23 Aug 2006 12:55:02 -0400	[thread overview]
Message-ID: <44EC8866.9050704@garzik.org> (raw)
In-Reply-To: <200608231238.49783.mb@bu3sch.de>

Michael Buesch wrote:
>> Please note that this test is only compile tested, as
>> I don't have a b44 device.

>> @@ -2055,7 +2055,7 @@
>>  	u16 *ptr = (u16 *) data;
>>  
>>  	for (i = 0; i < 128; i += 2)
>> -		ptr[i / 2] = readw(bp->regs + 4096 + i);
>> +		ptr[i / 2] = cpu_to_le16(readw(bp->regs + 4096 + i));
>>  


This looks a bit weird.  readw() swaps on big-endian already.

This patch swaps each word -again- on big-endian, even though the only 
user of the eeprom data is the get-invariants code that reads the MAC 
address and phy id.

	Jeff



  reply	other threads:[~2006-08-23 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23 10:32 [PATCH] b44: fix eeprom endianess issue Michael Buesch
2006-08-23 10:38 ` Michael Buesch
2006-08-23 16:55   ` Jeff Garzik [this message]
2006-08-23 18:06     ` Michael Buesch

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=44EC8866.9050704@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@osdl.org \
    --cc=davem@redhat.com \
    --cc=mb@bu3sch.de \
    --cc=netdev@vger.kernel.org \
    --cc=zambrano@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.