Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jul 2007 11:00:16 GMT
From:      W Forms <wforms@safe-mail.net>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/112710: [re] if_re driver detects incorrect b243a405a405 MAC address on SMC9452TX-1 pci gigabit cards
Message-ID:  <200707031100.l63B0GV0020511@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/112710; it has been noted by GNATS.

From: W Forms <wforms@safe-mail.net>
To: bug-followup@FreeBSD.org
Cc: Pyun YongHyeon <pyunyh@gmail.com>
Subject: Re: kern/112710: [re] if_re driver detects incorrect b243a405a405 MAC address on SMC9452TX-1 pci gigabit cards
Date: Tue, 3 Jul 2007 12:51:21 +0200

 I run some more tests yesterday which provided additional useful  
 information regarding the nature of this problem.
 
 1., Booting from a FreeBSD 4.11R install CD no gigabit cards showed  
 up in dmesg. I ASSume 4.11 doesn't yet know about the if_re driver,  
 it doesn't support these later edition gigabit cards or the if_re  
 driver is just simply not part of the 4.11 generic kernel on the CD.
 
 2., Booting from a FreeBSD 5.5R install CD the "5 bad cards" are  
 detected as re0..re4 and they do have their correct MAC addresses. I  
 was unable to reproduce the incorrect MAC address issue using the  
 5.5R CD, it always picked up the correct ones. I ASSume that 5.5R is  
 free of the bug I originally described in this PR.
 
 3., Using a FreeBSD 6.0R install CD I got the same results as with  
 the 5.5R CD described above. YES, this was a surprise to me, but 6.0R  
 also seems to be free of this bug. Whatever causes the incorrect MAC  
 addresses, it might have got into the code along the 6.1 and 6.2  
 changes.
 
 4., This is an extremely interesting and surprising outcome. Listen  
 to this!
 Using a 6.2R install CD, or any 6.2R (generic), 6.2R-p3..p4 (custom)  
 and 6.2-STABLE system from my harddisk, 5 of the gigabit cards get  
 the incorrect MAC address. BUT NOT ALWAYS!
 The system is turned off (power off). Turn it on and boot any 6.2  
 system, and the 5 cards have the incorrect MAC address. Do a  
 "shutdown -p now" or forcibly turn the power off by holding the power  
 button for 5-10 seconds, the power on the system again booting  
 FreeBSD 6.2, and you get the same fake MAC addresses again, and  
 again, and again.
 Now, instead of "shutdown -p now" (powering down) just restart/reboot  
 the system with "shutdown -r now", and believe or not, when the same  
 system comes back up again all the "5 bad cards" now use their  
 correct MAC address. Do this again as many times as you wish, and you  
 always get the correct MAC addresses. Interesting, isn't it ?!
 I thorougly tested this because I didn't want to believe it myself.  
 The Netfinity 5000 with the 5 cards proved this, the ThinkCentre  
 Pentium D machine with any one of the "5 bad cards" also reliably  
 proved this, and even the OpenBSD 4.1 boot CD proved this on both  
 machines.
 Summary: First boot from power-off state always yields the incorrect  
 MAC address for the "5 bad cards", both on any FreeBSD 6.2 system  
 (after "shutdown -p") and on OpenBSD 4.1 (the install CD, after "halt  
 -p" at the shell). Do a reboot (soft-reset or "shutdown -r") and both  
 FreeBSD 6.2 and OpenBSD 4.1 will come up with the correct MAC address.
 
 All these above tests were carried out WITHOUT the patch Pyun  
 YongHyeon submitted.
 Now let's see what happens when the patch is used:
 
 I., My attempt to apply the patch returned and error on my system,  
 and the entire patch was rejected. My source was at FreeBSD 6.2- 
 RELEASE-p4 level, so the two files the patch wants to modify might  
 have been slightly different from Pyun YongHyeon's ones. I was able  
 to locate the appropriate positions in the files (the original code  
 was the same, but it was at a slightly different location) and made  
 the changes manually (changing half of two lines in the first file,  
 and adding two lines to the second file).
 
 II. The code changes fit into my current state of the sources (6.2- 
 RELEASE-p4) as "make buildkernel KERNCONF=mykernel" and "make  
 installkernel KERNCONF=mykernel" went without problems and the system  
 boots fine with the new kernel and patched if_re driver.
 
 III. Using the patched kernel and if_re driver I was unable to  
 reproduce the original defect. Even after power off state the system  
 comes up, and upon loading the if_re driver all the cards (including  
 the "5 bad ones") always have their correct MAC address.
 I don't really understand this, since from what I can see all that  
 Pyun YongHyeon's changes do is replacing a constant value of 6 and 8  
 with macros containing the value of 6 and 8. (unless those comments  
 at the end of the line do some meaningful jiggery-pokery too). But I  
 don't have to understand this; I just have to try it, conclude, and  
 accept. So that is what I do.
 So far, the patch appears to fix the problem. I will report back if I  
 find otherwise.
 Until then, allow me to say thanks for the patch to Pyun YongHyeon.  
 Thank you!
 
 Regards,
 Keve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707031100.l63B0GV0020511>