* Re: PATCH: 3c59x 00:00:00:00:00:00 MAC failure
2004-09-29 16:52 ` Jeff Garzik
@ 2004-09-29 15:58 ` Alan Cox
2004-09-29 17:07 ` Jeff Garzik
0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2004-09-29 15:58 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Russell King, Alan Cox, Linux Kernel Mailing List, akpm
On Mer, 2004-09-29 at 17:52, Jeff Garzik wrote:
> > Shouldn't this be using is_valid_ether_addr() ?
>
> Yes.
Fixed in my tree - want another diff ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* PATCH: 3c59x 00:00:00:00:00:00 MAC failure
@ 2004-09-29 16:30 Alan Cox
2004-09-29 16:45 ` Russell King
0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2004-09-29 16:30 UTC (permalink / raw)
To: linux-kernel, akpm, jgarzik
The 3com EEPROM has a checksum but unfortunately it seems that a zapped
EEPROM returning all zero values passes the checksum test fine and we try
and use it.
--- drivers/net/3c59x.c~ 2004-09-29 17:23:42.964453264 +0100
+++ drivers/net/3c59x.c 2004-09-29 17:28:40.358242536 +0100
@@ -1295,6 +1295,13 @@
for (i = 0; i < 6; i++)
printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
}
+ /* Unfortunately an all zero eeprom passes the checksum and this
+ gets found in the wild in failure cases. Crypto is hard 8) */
+ if (memcmp(dev->dev_addr, "\0\0\0\0\0", 6) == 0) {
+ retval = -EINVAL;
+ printk(KERN_ERR "*** EEPROM MAC address is invalid.\n");
+ goto free_ring; /* With every pack */
+ }
EL3WINDOW(2);
for (i = 0; i < 6; i++)
outb(dev->dev_addr[i], ioaddr + i);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PATCH: 3c59x 00:00:00:00:00:00 MAC failure
2004-09-29 16:30 PATCH: 3c59x 00:00:00:00:00:00 MAC failure Alan Cox
@ 2004-09-29 16:45 ` Russell King
2004-09-29 16:52 ` Jeff Garzik
0 siblings, 1 reply; 5+ messages in thread
From: Russell King @ 2004-09-29 16:45 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, akpm, jgarzik
On Wed, Sep 29, 2004 at 12:30:23PM -0400, Alan Cox wrote:
> The 3com EEPROM has a checksum but unfortunately it seems that a zapped
> EEPROM returning all zero values passes the checksum test fine and we try
> and use it.
>
>
> --- drivers/net/3c59x.c~ 2004-09-29 17:23:42.964453264 +0100
> +++ drivers/net/3c59x.c 2004-09-29 17:28:40.358242536 +0100
> @@ -1295,6 +1295,13 @@
> for (i = 0; i < 6; i++)
> printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
> }
> + /* Unfortunately an all zero eeprom passes the checksum and this
> + gets found in the wild in failure cases. Crypto is hard 8) */
> + if (memcmp(dev->dev_addr, "\0\0\0\0\0", 6) == 0) {
Shouldn't this be using is_valid_ether_addr() ?
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PATCH: 3c59x 00:00:00:00:00:00 MAC failure
2004-09-29 16:45 ` Russell King
@ 2004-09-29 16:52 ` Jeff Garzik
2004-09-29 15:58 ` Alan Cox
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2004-09-29 16:52 UTC (permalink / raw)
To: Russell King, Alan Cox; +Cc: linux-kernel, akpm
Russell King wrote:
> On Wed, Sep 29, 2004 at 12:30:23PM -0400, Alan Cox wrote:
>
>>The 3com EEPROM has a checksum but unfortunately it seems that a zapped
>>EEPROM returning all zero values passes the checksum test fine and we try
>>and use it.
>>
>>
>>--- drivers/net/3c59x.c~ 2004-09-29 17:23:42.964453264 +0100
>>+++ drivers/net/3c59x.c 2004-09-29 17:28:40.358242536 +0100
>>@@ -1295,6 +1295,13 @@
>> for (i = 0; i < 6; i++)
>> printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
>> }
>>+ /* Unfortunately an all zero eeprom passes the checksum and this
>>+ gets found in the wild in failure cases. Crypto is hard 8) */
>>+ if (memcmp(dev->dev_addr, "\0\0\0\0\0", 6) == 0) {
>
>
> Shouldn't this be using is_valid_ether_addr() ?
Yes.
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PATCH: 3c59x 00:00:00:00:00:00 MAC failure
2004-09-29 15:58 ` Alan Cox
@ 2004-09-29 17:07 ` Jeff Garzik
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2004-09-29 17:07 UTC (permalink / raw)
To: Alan Cox; +Cc: Russell King, Alan Cox, Linux Kernel Mailing List, akpm
Alan Cox wrote:
> On Mer, 2004-09-29 at 17:52, Jeff Garzik wrote:
>
>>>Shouldn't this be using is_valid_ether_addr() ?
>>
>>Yes.
>
>
> Fixed in my tree - want another diff ?
pretty please :)
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-29 17:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-29 16:30 PATCH: 3c59x 00:00:00:00:00:00 MAC failure Alan Cox
2004-09-29 16:45 ` Russell King
2004-09-29 16:52 ` Jeff Garzik
2004-09-29 15:58 ` Alan Cox
2004-09-29 17:07 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox