All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Daniel Hellstrom <daniel@gaisler.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
Date: Fri, 10 Jun 2011 14:49:11 +0100	[thread overview]
Message-ID: <1307713751.22348.602.camel@localhost> (raw)
In-Reply-To: <1307711777-12119-1-git-send-email-daniel@gaisler.com>

On Fri, 2011-06-10 at 15:16 +0200, Daniel Hellstrom wrote:
> Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
> ---
>  drivers/net/dl2k.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
> index c445457..4bbbd7b 100644
> --- a/drivers/net/dl2k.c
> +++ b/drivers/net/dl2k.c
> @@ -346,7 +346,7 @@ parse_eeprom (struct net_device *dev)
>  	if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) {	/* D-Link Only */
>  		/* Check CRC */
>  		crc = ~ether_crc_le (256 - 4, sromdata);
> -		if (psrom->crc != crc) {
> +		if (psrom->crc != cpu_to_le32(crc)) {q

You still have a rogue 'q' there.

Ben.

>  			printk (KERN_ERR "%s: EEPROM data CRC error.\n",
>  					dev->name);
>  			return -1;

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2011-06-10 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 13:16 [PATCH 1/1] dl2k: EEPROM CRC calculation wrong endianess on bigendian machine Daniel Hellstrom
2011-06-10 13:49 ` Ben Hutchings [this message]
2011-06-10 14:54   ` Daniel Hellstrom

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=1307713751.22348.602.camel@localhost \
    --to=bhutchings@solarflare.com \
    --cc=daniel@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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.