In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior
to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW".
And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST".
Fix it by moving the second line prior to the first one that mentioned
above.
Fixes: dffbaf7880 ("e1000: revert fix for multicast in VF")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Replace the raw I/O device memory read/write access with eal
abstraction for I/O device memory read/write access to fix
portability issues across different architectures.
CC: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
MAC-PHY desync may occur causing misdetection of link up event.
Disabling K1-off feature can work around the problem.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This works around a possible stalled packet issue, which may occur due to
clock recovery from the PCH being too slow, when the LAN is transitioning
from K1 at 1G link speed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
For I217 revision 6, when entering Ultra Low Power (ULP) we need to enable
Low Power Link Up (LPLU) and disable Gig speed to make it work.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
LANPHYPC low duration of 10 usec was too low for some corner cases
causing interface mismatches during Ultra Low Power (ULP) exit.
This patch increases the LANPHYPC low duration to 1 msec.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
There are some client PHY Ultra Low Power (ULP) register bits that are
configured by the Manageability Engine (ME) FW.
The driver must ensure that these bits are cleared on exit from ULP.
Ordinarily the ME FW would do that, but there are cases in which the
FW is not present, and the driver must handle that.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
When Ultra Low Power (ULP) enabled, the client PHY needs to be set up
for link configuration after cable reconnected.
Previously link configuration was only done in auto-negotiate mode.
Do link configuration also in autoneg disabled mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add definition MAX_RX_JUMBO_FRAME_SIZE for igb.
All igb parts (82575 and newer) have 9.5K max jumbo frame size.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
I354 support was missing in the e1000_get_fw_version() which resulted in
the FW version not being reported. Support added.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The driver shouldn't give up if it fails to get the hardware mailbox lock.
This can happen in a situation where the PF-VF communication channel is
heavily loaded and causes complete communications failure between the PF
and VF drivers.
Add a counter and a delay. The driver will now retry ten times,
waiting one millisecond between retries.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
With new hardware (I219), Ultra Low Power (ULP) exit takes significantly
longer time. Therefore, driver must wait longer.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add the missing braces to the 'if' statements to fix the misleading
identation. This also fixes the following build errors when building
with gcc >= 6:
drivers/net/e1000/base/e1000_phy.c:4156:2:
error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (locked)
drivers/net/e1000/base/e1000_phy.c:4158:3:
note: ...this statement, but the latter is misleadingly indented as if
it is guarded by the 'if'
if (!ready)
drivers/net/e1000/base/e1000_phy.c:4221:2:
error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (locked)
drivers/net/e1000/base/e1000_phy.c:4223:3:
note: ...this statement, but the latter is misleadingly indented as if
it is guarded by the 'if'
if (!ready)
Signed-off-by: Markos Chandras <mchandras@suse.de>
Modified driver and eal code to support I217 and I218 Intel NICs.
Compiled and tested (via testpmd) on Ubuntu 14.04 for target
x86_64-native-linuxapp-gcc
Compiled for target x86_64-native-linuxapp-clang
Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
On power up, the MAC - PHY interface needs to be set to PCIe, even if
cable is disconnected. In ME systems, the ME handles this on exit from
Sx(Sticky mode) state. In non-ME, the driver handles it. Added a check
for non-ME system to the driver code that handles that.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Previously, in check_reset_block RSPCIPHY was polled for 100 ms before determining
that the ME veto is set. This needed to be increased to 300 ms.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Enabling ulp on link down when cable is connect caused an infinite
loop of linkup/down indications in the NDIS driver.
After discussed, correct flow is to enable ULP only when cable is
disconnected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Requires driver changes!
Change e1000_set_eee_i350 and e1000_set_eee_i354 to have flags allowing
changes in the advertised EEE speeds.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
There are some images which contain ETrackID in inverted format. This patch
allows reading this format.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
EEARBC has changed on i210. It means EEARBC has a different address on
i210 than on other NICs. So, add a new entity named EEARBC_I210 to the
register list and make sure the right one is being used on i210.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
These are the defaults for the packet buffer size registers that need to
be explicitly set back if someone changes them and comes back to a normal
driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This patch is for the following updates to the K1 configurations:
Tx idle period for entering K1 should be 128 ns.
Minimum Tx idle period in K1 should be 256 ns.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
In case that auto-negotiate is not enabled, call
e1000_setup_copper_link_generic instead of e1000_phy_setup_autoneg.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
e1000_check_for_link_media_swap() is supposed to check PHY page 0 for
copper and PHY page 1 for "other" (fiber) link. We switched back from
page 1 to page 0 too soon, before e1000_check_for_link_82575() is
executed and we were never finding link on fiber (other).
Note: The precedence of link type is controlled by the PHY settings.
If the link is copper, as the M88E1112 page address is set to 1, it should be
set back to 0 before checking this link.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Fix for I217 Packet Loss issue - The Management Engine sets the FEXTNVM4
Beacon Duration incorrectly. This fix ensures that the correct value will
always be set. Correct value for this field is 8 usec.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
TIPG value is increased when setting speed to 10 half to prevent
packet loss. However, it was never decreased again when speed
changes. This caused performance issues in the NDIS driver.
Fix this to restore TIPG to default value on non 10 half.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
For DH89XXCC_SGMII, write flush leaves registers of this device trashed
(0xFFFFFFFF). Added check for this device.
Also, after both for Port SW Reset and Device Reset case, platform should
wait at least 3ms before reading any registers. Since waiting is
conditionally executed only for Device Reset - removed the condition.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The i210 has two EEPROM access registers that are located in
non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously
and EEMNGCTL should also be corrected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The wrong bit is being used in PHYREG16 for PHY power down. In addition,
the use of PHYREG 16 is unnecessary if bit 11 of PHYREG 0 is used.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This is a patch to change the value of register 776.20[11:2] for jumbo
mode from 0x1A to 0x1F. This is to enlarge the gap between read and
write pointers in the TX Fifo.
And replace the magic number with a macro by the way.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Several customers have reported a link flap issue on 82579. The symptoms
are random and intermittent link losses when 82579 is connected to specific
switches. Issue has been root caused as interoperability problem between
the NIC and at least some Broadcom PHYs in the Energy Efficient Ethernet
wake mechanism.
To fix the issue, we are disabling the Phase Locked Loop shutdown in 100M
Low Power Idle. This solution will cause an increase of power in 100M EEE
link. It may cost additional 28mW in this specific mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Add u32 return value to function e1000_resume_workarounds_pchlan,
so that calling function can detect PHY access failure during resuming
flow.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Adding code where missing to handle case where calls to
e1000_read_kmrn_reg_80003es2lan and e1000_write_kmrn_reg_80003es2lan return
an error value.
Also, when accessing the E1000_KMRNCTRLSTA_INBAND_PARAM offset to disable
far-end loopback on 80003es2lan devices, make the handling of a read or
write failure consistent between hw_init and hw_reset.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Adding code to a case where e1000_nvn_read is called, but there is no
consideration for when the read fails (returns an error code).
Also, this patch adds an error message to a base NVM reading function that
is missing it for consistency.
This patch is not covering all cases of these conditions, it only covers
the code used by the e1000e driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Previously, the rar_set functions were of type void, and when they failed
to program an address register they would, at most, put a message into
the log and end. The fact that they failed to program an address into a
address register, if checked for, should be captured and passed back to
the caller so that the drivers can deal with the situation (or not) as
they deem best.
Drivers can ignore or use the return value. No change to base drivers
is mandated by this change unless a driver wants to handle the failure
to program an address register (e.g. evaluate the return value).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Although this change should be optimized out by the compiler, just
return a constant directly rather than declare a variable.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
The "FIXME" comment is revomed from e1000_acquire_swfw_sync_80003es2lan
but forgotten being removed from e1000_acquire_swfw_sync_82575 while
the similar changes were made to both.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>