Bug 4420
Summary: | (net tulip) Problem with 6 bit addressing in tulip_read_eeprom() | ||
---|---|---|---|
Product: | Drivers | Reporter: | Daniel Forsgren (daniel.forsgren) |
Component: | Network | Assignee: | Grant Grundler (grundler) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | bunk, grundler, kyle, protasnb |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.11.6 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
Patch to mask address in tulip_read_eeprom()
Proposed tulip_read_eeprom patch sent to netdev today |
Description
Daniel Forsgren
2005-03-30 04:01:09 UTC
Please submit a patch to fix it? Ok. A patch is on it's way. I just need to do some testing first. (it's really a one-liner as I described above - just mask the address before using it). Created attachment 4887 [details]
Patch to mask address in tulip_read_eeprom()
Added patch.
Jeff, can you review the patch in this bug? Any update on this please. Daniel, was the problem resolved for you in recent kernels? If not, maybe Grant can now take a look at it and the proposed patch. Well, if Daniel is not around the bug will have to be closed unfortunately. Thanks. Patch looks good to me and based on previous email, I expect it fixes the problem. I'll verify against current linus tree and submit to akpm with signed-off-by line. thanks! On second thought, patch isn't ok. We should NOT read some other "random" register instead of returning an error value. I'll attached a patch that I just submitted upstream that does two things: 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'll attach the patch I submitted as well to this bug report. Created attachment 15410 [details]
Proposed tulip_read_eeprom patch sent to netdev today
Perhaps this should be a separate bug, but de2104x.c has the same bug since it defines it's own copy of tulip_read_eeprom(). I suspect the right fix there would be to modify de2104x.c to use eeprom.c instead of keeping it's own copy of the same code. But that might not be a trivial change...and I don't have any de2104x cards to test with (I need to double check, but I don't think so offhand). Verified applied |