* [PATCH 1/1] dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
@ 2011-06-10 13:16 Daniel Hellstrom
2011-06-10 13:49 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Hellstrom @ 2011-06-10 13:16 UTC (permalink / raw)
To: davem; +Cc: netdev, bhutchings
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
printk (KERN_ERR "%s: EEPROM data CRC error.\n",
dev->name);
return -1;
--
1.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
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
2011-06-10 14:54 ` Daniel Hellstrom
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2011-06-10 13:49 UTC (permalink / raw)
To: Daniel Hellstrom; +Cc: davem, netdev
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.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
2011-06-10 13:49 ` Ben Hutchings
@ 2011-06-10 14:54 ` Daniel Hellstrom
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Hellstrom @ 2011-06-10 14:54 UTC (permalink / raw)
To: Ben Hutchings; +Cc: davem, netdev
Ben Hutchings wrote:
>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.
>
>
ooh, you got a sharp eye, I wonder how that made it into there... I will
resend, thanks!
Daniel
>Ben.
>
>
>
>> printk (KERN_ERR "%s: EEPROM data CRC error.\n",
>> dev->name);
>> return -1;
>>
>>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-10 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-06-10 14:54 ` Daniel Hellstrom
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).