Skip to content

Commit

Permalink
[intel] Do not enable ASDE on i350 backplane NIC
Browse files Browse the repository at this point in the history
On most Intel NICs, Auto-Speed Detection Enable (ASDE) can be used to
automatically detect the correct link speed by sampling the link using
the internal PHY.  This feature is automatically inhibited when not
appropriate for the physical link (e.g. when using internal SerDes
mode on the 8254x).

On the i350 datasheet ASDE is a reserved bit, but the relevant
auto-speed detection hardware appears still to be present.  However,
enabling ASDE on the i350 1000BASE-KX backplane NIC seems to cause an
immediate link failure.  It is possible that the auto-speed detection
hardware is still present, is not connected to a physical link, and is
not inhibited from being applied in this mode.

Work around this problem by adding an INTEL_NO_ASDE flag bit
(analogous to INTEL_NO_PHY_RST), and applying this for the i350
backplane NIC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Apr 16, 2017
1 parent e6616da commit 2d79b20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/drivers/net/intel.c
Expand Up @@ -295,7 +295,9 @@ static int intel_reset ( struct intel_nic *intel ) {
mdelay ( INTEL_RESET_DELAY_MS );

/* Set a sensible default configuration */
ctrl |= ( INTEL_CTRL_SLU | INTEL_CTRL_ASDE );
if ( ! ( intel->flags & INTEL_NO_ASDE ) )
ctrl |= INTEL_CTRL_ASDE;
ctrl |= INTEL_CTRL_SLU;
ctrl &= ~( INTEL_CTRL_LRST | INTEL_CTRL_FRCSPD | INTEL_CTRL_FRCDPLX );
writel ( ctrl, intel->regs + INTEL_CTRL );
mdelay ( INTEL_RESET_DELAY_MS );
Expand Down Expand Up @@ -1110,7 +1112,7 @@ static struct pci_device_id intel_nics[] = {
PCI_ROM ( 0x8086, 0x1518, "82576ns", "82576NS SerDes", 0 ),
PCI_ROM ( 0x8086, 0x1521, "i350", "I350", 0 ),
PCI_ROM ( 0x8086, 0x1522, "i350-f", "I350 Fiber", 0 ),
PCI_ROM ( 0x8086, 0x1523, "i350-b", "I350 Backplane", 0 ),
PCI_ROM ( 0x8086, 0x1523, "i350-b", "I350 Backplane", INTEL_NO_ASDE ),
PCI_ROM ( 0x8086, 0x1524, "i350-2", "I350", 0 ),
PCI_ROM ( 0x8086, 0x1525, "82567v-4", "82567V-4", 0 ),
PCI_ROM ( 0x8086, 0x1526, "82576-5", "82576", 0 ),
Expand Down
2 changes: 2 additions & 0 deletions src/drivers/net/intel.h
Expand Up @@ -306,6 +306,8 @@ enum intel_flags {
INTEL_VMWARE = 0x0002,
/** PHY reset is broken */
INTEL_NO_PHY_RST = 0x0004,
/** ASDE is broken */
INTEL_NO_ASDE = 0x0008,
};

/**
Expand Down

0 comments on commit 2d79b20

Please sign in to comment.