Grant Grundler 209261c019 [netdrvr] tulip_read_eeprom fixes for BUG 4420
If "location" is > "addr_len" bits, the high bits of location would interfere
with the READ_CMD sent to the eeprom controller.

A patch was submitted to bug:
    http://bugzilla.kernel.org/show_bug.cgi?id=4420

which simply truncated the "location", read whatever was in "location
modulo addr_len", and returned that value. That avoids confusing the
eeprom but seems like the wrong solution to me.

Correct would be to not read beyond "1 << addr_len" address of the eeprom.
I am submitting two changes to implement this:
1) tulip_read_eeprom will return zero (since we can't return -EINVAL)
   if this is attempted (defensive programming).
2) In tulip_core.c, fix the tulip_read_eeprom caller so they don't
   iterate past addr_len bits and make sure the entire tp->eeprom[]
   array is cleared.

I konw we don't strictly need both. I would prefer both in the tree
since it documents the issue and provides a second "defense" from
the bug from creeping back in.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-28 21:52:14 -04:00
..
2008-03-17 08:30:32 -04:00
2008-03-17 07:56:31 -04:00
2008-03-10 16:33:33 -07:00
2008-03-13 13:11:43 -07:00
2008-02-05 09:44:23 -08:00
2008-03-12 14:15:00 +01:00
2008-02-08 09:22:38 -08:00
2008-03-04 11:03:09 +02:00
2008-03-15 19:17:12 -07:00
2008-02-13 16:21:19 -08:00
2008-03-03 10:47:13 -08:00
2008-02-26 14:12:09 +09:00
2008-02-21 15:27:07 -08:00
2008-03-10 16:42:27 -07:00
2008-03-17 22:58:21 +11:00
2008-03-04 16:35:12 -08:00