<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-13 22:59 GMT+01:00 Bill Paul <span dir="ltr"><<a href="mailto:wpaul@windriver.com" target="_blank">wpaul@windriver.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I recently found a need to re-flash the option ROM on an Intel 82574L gigabit<br>
ethernet card. These are a bit more common these days than the 82571 and 82572<br>
and relatively cheap. It turns out this works with flashrom, but it doesn't<br>
detect the PCI ID for the device out of the box. Below is a patch add it to<br>
nicintel_spi.c. Note that there are probably other devices in the PRO/1000<br>
family that would work too.<br>
<br>
Here's an example run with the latest code from svn:<br>
<br>
[...]<br>
flashrom v0.9.7-unknown on FreeBSD 10.0-RELEASE (amd64)<br>
flashrom is free software, get the source code at <a href="http://www.flashrom.org" target="_blank">http://www.flashrom.org</a><br>
<br>
Calibrating delay loop... OK.<br>
Found Winbond flash chip "W25X40" (512 kB, SPI) on nicintel_spi.<br>
Reading old flash chip contents... done.<br>
Erasing and writing flash chip... Erase/write done.<br>
Verifying flash... VERIFIED.<br>
[...]<br>
<br>
FreeBSD detects the device as follows:<br>
<br>
em1@pci0:2:0:0: class=0x020000 card=0xa01f8086 chip=0x10d38086 rev=0x00<br>
hdr=0x00<br>
    vendor     = 'Intel Corporation'<br>
    device     = '82574L Gigabit Network Connection'<br>
    class      = network<br>
    subclass   = ethernet<br>
<br>
I also added links to the Intel PCIe ethernet controllers programming manual<br>
and the 82574 datasheet.<br>
<br>
Incidentally, thanks to everyone involved for their work in this project. It<br>
helped me out of a bit of a jam.<br>
<br>
-Bill<br>
<br>
Signed-off-by: Bill Paul <<a href="mailto:wpaul@windriver.com">wpaul@windriver.com</a>><br></blockquote><div><br></div><div>This patch is Acked-by: Idwer Vollering <<a href="mailto:vidwer@gmail.com">vidwer@gmail.com</a>><br>
when you adjust the PDF URL in a follow-up patch, see below.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Index: nicintel_spi.c<br>
===================================================================<br>
--- nicintel_spi.c      (revision 1765)<br>
+++ nicintel_spi.c      (working copy)<br>
@@ -17,14 +17,20 @@<br>
  * along with this program; if not, write to the Free Software<br>
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA<br>
  */<br>
<br>
 /*<br>
- * Datasheet:<br>
+ * Datasheets:<br>
  * PCI/PCI-X Family of Gigabit Ethernet Controllers Software Developer's<br>
Manual<br>
  * 82540EP/EM, 82541xx, 82544GC/EI, 82545GM/EM, 82546GB/EB, and 82547xx<br>
  * <a href="http://download.intel.com/design/network/manuals/8254x_GBe_SDM.pdf" target="_blank">http://download.intel.com/design/network/manuals/8254x_GBe_SDM.pdf</a><br></blockquote><div><br>Would you change the hyperlink above to point to <a href="http://www.intel.com/content/www/us/en/ethernet-controllers/pci-pci-x-family-gbe-controllers-software-dev-manual.html">http://www.intel.com/content/www/us/en/ethernet-controllers/pci-pci-x-family-gbe-controllers-software-dev-manual.html</a> instead? That way it is inline with the other comments.<br>
 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+ *<br>
+ * PCIe GbE Controllers Open Source Software Developer's Manual<br>
+ * <a href="http://www.intel.com/content/www/us/en/ethernet-controllers/pcie-gbe-
controllers-open-source-manual.html" target="_blank">http://www.intel.com/content/www/us/en/ethernet-controllers/pcie-gbe-<br>
controllers-open-source-manual.html</a><br>
+ *<br>
+ * Intel 82574 Gigabit Ethernet Controller Family Datasheet<br>
+ * <a href="http://www.intel.com/content/www/us/en/ethernet-controllers/82574l-gbe-
controller-datasheet.html" target="_blank">http://www.intel.com/content/www/us/en/ethernet-controllers/82574l-gbe-<br>
controller-datasheet.html</a><br>
  */<br>
<br>
 #include <stdlib.h><br>
 #include <unistd.h><br>
 #include "flash.h"<br>
@@ -70,10 +76,11 @@<br>
 const struct dev_entry nics_intel_spi[] = {<br>
        {PCI_VENDOR_ID_INTEL, 0x105e, OK, "Intel", "82571EB Gigabit Ethernet<br>
Controller"},<br>
        {PCI_VENDOR_ID_INTEL, 0x1076, OK, "Intel", "82541GI Gigabit Ethernet<br>
Controller"},<br>
        {PCI_VENDOR_ID_INTEL, 0x107c, OK, "Intel", "82541PI Gigabit Ethernet<br>
Controller"},<br>
        {PCI_VENDOR_ID_INTEL, 0x10b9, OK, "Intel", "82572EI Gigabit Ethernet<br>
Controller"},<br>
+       {PCI_VENDOR_ID_INTEL, 0x10d3, OK, "Intel", "82574L Gigabit Ethernet<br>
Controller"},<br>
<br>
        {0},<br>
 };<br>
<br>
 static void nicintel_request_spibus(void)<br>
<span class=""><font color="#888888"><br>
--<br>
=============================================================================<br>
-Bill Paul            (510) 749-2329 | Senior Member of Technical Staff,<br>
                 <a href="mailto:wpaul@windriver.com">wpaul@windriver.com</a> | Master of Unix-Fu - Wind River Systems<br>
=============================================================================<br>
   "I put a dollar in a change machine. Nothing changed." - George Carlin<br>
=============================================================================<br>
<br>
_______________________________________________<br>
flashrom mailing list<br>
<a href="mailto:flashrom@flashrom.org">flashrom@flashrom.org</a><br>
<a href="http://www.flashrom.org/mailman/listinfo/flashrom" target="_blank">http://www.flashrom.org/mailman/listinfo/flashrom</a><br>
</font></span></blockquote></div><br></div></div>