Home | History | Annotate | Download | only in ixgbe
History log of /src/sys/dev/pci/ixgbe/ixgbe_phy.c
RevisionDateAuthorComments
 1.29  24-Dec-2021  msaitoh Update copyright to 2020.

FreeBSD: 8455e365f77f5b66ac9521dbcd690f79345ce147
 1.28  15-Dec-2021  msaitoh Match X550_PHY_ID correctly on X550.

- Sync with FreeBSD ix-3.3.18.
- phy_id's revision field is cleared, so use new X550_PHY_ID.
- Before this commit, phy_id was set to ixgbe_phy_cu_unknown on X550.
Now it's set to ixgbe_phy_aq.
 1.27  10-Dec-2021  msaitoh Whitespace fix. Sync with FreeBSD ix-3.3.14.
 1.26  10-Dec-2021  msaitoh Move increments after evaluations.

FreeBSD: dc11ba4eb3fe5cce615f361de83e85e07005ca24 or ix-3.3.14
DPDK: 390445ec30b4c52a3d2887c3d2a202d9cf37ea8e

The retry variable was being incremented before it was evaluated by the
subsequent conditional against the maximum retries to figure out which
message to print. So we'll move the increment op to the end.
 1.25  10-Dec-2021  msaitoh Remove unnecessary return value check.

FreeBSD: 3a89005394bc5d82ce9b6baa9e7f8dee362354ae
DPDK: 4b0ee6529b7897c2a08dd56669f07ac1f46a8474
 1.24  30-Apr-2021  msaitoh Add missing __KERNEL_RCSID().
 1.23  31-Aug-2020  msaitoh branches: 1.23.6;
If an SFP+ module is not inserted, don't try to access SFP+ EEPROM.
This change eliminate long timeout.

Reduce code duplication using with ixgbe_sfp_cage_full(hw).
 1.22  31-Aug-2020  msaitoh Fix 82598 SFP+ problems.

On 82598, SFP+'s MOD_ABS isn't connected to the MAC's GPIO pin, so we can't
call ixgbe_sfp_cage_full(). Always issue TASK_MOD from ixgbe_handle_timer()
on 82598.

Fix ixgbe_identify_sfp_module_generic() for ixgbe_phy_nl. In the driver,
hw->phy.type sometimes be compared with ixgbe_phy_nl.
In ixgbe_identify_sfp_module_generic(), hw->phy.type may be overridden with
another value. For ixgbe_phy_nl, some code don't override phy.type but others
were not. Make it consistently keep ixgbe_phy_nl. This change fixes a problem
that ixgbe_is_sfp() change the return value true to false when any SFP+
devices are connected to the cage on 82598 and never recover from it.

Don't schedule MSF(multi speed fiber) task from ixgbe_handle_mod() on 82598.
This task is only for devices which support multi speed fiber and 82598
doesn't support it. Before ixgbe.c rev. 1.237, ixgbe_handle_mod() isn't
called on 82598 because 82598 has no SFP+ module insertion/removal interrupt.
ixgbe.c rev. 1.237 changed to call the function via timer on 82598.
This change fixes a bug that 82598 DA interface's link flaps.
 1.21  17-Apr-2020  msaitoh No functional change:
- modify comment
- whitespace fix
 1.20  23-Dec-2019  msaitoh branches: 1.20.6;
Add recovery code for unsupported SFP+.

Before this commit:
If an unsuppored SFP module is inserted before booting, the driver attach
failed and there was no way to recover form it without rebooting or
detaching/reattaching drvier (drvctl -d && drvctl -r pciN).
After this commit:
We can automatically recover any time by replacing it with a supported
module.
 1.19  16-Dec-2019  msaitoh No functional change:

- Remove unused code.
- Remove extra spaces.
- KNF.
 1.18  06-Dec-2018  msaitoh branches: 1.18.4;
Apply FreeBSD ix-3.3.6.tar.gz's change to NetBSD. Tested on C3000 and X550-T1,
but not tested on Xeon D:
- Add firmware recovery mode for X550, X550A(Xeon D) and X550EM (C3000):
- FreeBSD always set IXGBE_FEATURE_RECOVERY_MODE without checking the
NVM image version. We compare it against 2.0 to not to make new callout and
not to call extra atomic operations.
- In some FreeBSD's sysctl functions, atomic_load_acq_int() is called
before a null pointer check. We call it after null pointer check.
- Before calling atomic_load_acq_uint(), check adapter->feat_en flags
to save atomic operation call.
- We don't check recovery_mode in ixgbe_set_sysctl_value() because this
function doesn't touch any hardware register.
- NetBSD don't have FreeBSD's atomic_load_acq_int()-like function, so do it
with membar_sync(). Thanks riastradh@ for the advice.
- FreeBSD's ix-3.3.6 changed ixgbe_enable_aim from TRUE to FALSE, but we will
keep it as TRUE because we have already fixed some bugs.
- Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This
was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and removed in
ix-3.3.6.tar.gz.
- On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of
ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em() has
extra check (e.g. exclude 1G copper).
- if_sriov.c's change doesn't affect to NetBSD because we don't support
SR-IOV PF function.
 1.17  04-Apr-2018  msaitoh branches: 1.17.2;
Sync with FreeBSD r331224 except ixv_if_update_admin_status()'s change:
- Fix length of reading buffer when the command is Read Flash in
ixgbe_host_interface_command().
- Add missing start_hw() call in ixv_init_locked(). This is not a real bug
because start_hw just set hw->adapter_stopped to false and anyone refer it.
- Style change.
- Update comment.
 1.16  04-Apr-2018  msaitoh Sync with the remaining part of FreeBSD r328265 except sfp_reinit stuff:
- Always schedule module intterrupt in ixgbe_config_link() when a device is
SFP+ based.
- Use not loop index but txr->me in ixv_initialize_{transmit,receive}_units().
It's required for VMDQ but NetBSD doesn't use it, so it's not a bug in
NetBSD.
- Simplify ixgbe_bp_wd_set(). No functional change.
- Whitespace.
 1.15  15-Mar-2018  msaitoh Add some changes from ix-3.2.17.tar.gz and r328265. Not fully synchronized.
Some others (e.g. sfp cage interrupt and bypass adapter stuff) will be merged
later:
- Initialize firmware command buffer correctly in ixgbe_read_ee_hostif_X550()
and ixgbe_read_ee_hostif_buffer_X550(). These functions are used when reading
NVM.
- Fix a bug that ixgbe_mng_present() misunderstand management capability on
X550 and newer on some environment. X550 changed FWSM bit definition.
See X540 document and X550's document and compare them.
- Fix checksum calculation in ixgbe_set_fw_drv_ver_generic(). This function is
not used in NetBSD.
- Add some unused funtions.
- Whitespace fix.
 1.14  06-Dec-2017  msaitoh branches: 1.14.2;
Sync with FreeBSD's r326022. All of the following changes have no influence
to netbsd:
- Check ETHERCAP_VLAN_HWTAGGING in ixgbe_setup_vlan_hw_support(). This change
has no influence to netbsd because it's enabled by default and NetBSD has
no API to disable it.
- Fix for netmap module.
- Remove never defined UDP_IPV4_EX
- Add SPDX-License-Identifier
 1.13  07-Nov-2017  msaitoh Fix a bug that X550T(1) didn't linkup if it forces 100BaseTX-FDX.
Popular switches and OSes don't use auto-negotiation if the media is
100BASE-TX (and 10BASE-T). Do the same thig.

Another fix is required for Denverton's _T device which use firmware.
 1.12  30-Aug-2017  msaitoh - Sync with FreeBSD r320688 (and up to r322865):
- Add C3000(Denvertion(-NS)) support.
- Add bypass function support for bypass adapters. Sysctls are provided.
Not tested because I have no any bypass adapter.
- ixv(4): set RSS mapping.
- Change EEE sysctl.
- ixv(4): Add TSOv6.
- ixv(4): Mailbox API 1.2 and more are implemented and comment says it
negotiate with 1.2 but it really does 1.1...
- Remove thermal test sysctl.
- Fix unknown bugs.
- Print driver feature capabilities and enable bits when verbose boot.
 1.11  19-Jan-2017  msaitoh branches: 1.11.6;
Reduce diff against FreeBSD. No functional change.
 1.10  05-Dec-2016  msaitoh branches: 1.10.2;
Update ixg(4) and ixv(4) up to FreeBSD r303890:
- Configure ixgbe phy & gbic power.
Setup phy and gbic power as per Linux 4.3.13 driver.
This fixes link not detected on X540-AT2 after booting to Linux which
turns the phy power off on detach. (FreeBSD r295093)
- Fixup DA cable detection routine. (FreeBSD r303032)
- Some minor changes
 1.9  02-Dec-2016  msaitoh Update ixg(4) and ixv(4) up to FreeBSD r292674:
- Add X552 SFP+ and X550T single port.
- Bug fixes.
 1.8  01-Dec-2016  msaitoh Update ixg(4) and ixv(4) up to FreeBSD r282299:
- Add support for X55x.
- ADD EEE support (not tested).
- Add WOL support (not tested).
- Add suspend/resume support (not testd).
- Add LPLU support (not tested).
- Add DMA Coalescing (note verified).
- Not tested well for sysctls.
- Fix ixgbe_set_advertise() a bit. At least, FreeBSD r294578 is required
to work hw.ixg0.advertise_speed sysctl correctly.
 1.7  01-Dec-2016  msaitoh Update ixg(4) and ixv(4) up to FreeBSD r280197:
- Add support for 82599_QSFP_SF_QP and X540T1.
- Add partial support for X55x. It's required to sync with FreeBSD r282299
to support X55x.
- Bugfixes.
 1.6  05-Aug-2015  msaitoh branches: 1.6.2;
Sync ixg(4) up to FreeBSD r279805 (or r280181) which include some bugfixes.
TODO:
- Merge r280182 and newer. It's required to support X55x.
- MSI/MSI-X support.
 1.5  24-Apr-2015  msaitoh Sync ixg(4) up to FreeBSD r250108:
- Cleanup some unused counters and some unused code.
- Improve performance.
- Fix flow control - don't override user value on re-init
- Fix to make 1G optics work correctly
- Change to interrupt enabling - some bits were incorrect
for certain hardware.
- Certain stats fixes, remove a duplicate increment of
ierror, thanks to Scott Long for pointing these out.
- Fix the setting of RX which related to multicast.
- Some netmap related fixes.
 1.4  02-Apr-2015  msaitoh Update our ixg(4) driver up to FreeBSD r238149:
- Add TSO6 support.
- The max size in dma tag is changed from 65535 to 262140 (IXGBE_TSO_SIZE).
The value is the same as other *BSDs. The change might cause a address
space shortage (ixgbe_dmamap_create() might fail) on some machines.
- Fix a lot of bugs.
- Improve performance.
 1.3  27-Mar-2015  msaitoh Synchronize our ixg(4) driver up to FreeBSD r230775:
- Add X540 support.
- Add 100BaseTX support.
- Fix a lot of bugs.
- Improve performance.
 1.2  17-Apr-2014  christos branches: 1.2.2; 1.2.4;
CIT 744275: Increase max_retry so we retry once.
 1.1  12-Aug-2011  dyoung branches: 1.1.2; 1.1.12; 1.1.16; 1.1.26;
Add sources for ixgbe(4), a Intel 82599 10-gigabit ethernet driver
ported from FreeBSD.
 1.1.26.1  10-Aug-2014  tls Rebase.
 1.1.16.1  18-May-2014  rmind sync with head
 1.1.12.2  03-Dec-2017  jdolecek update from HEAD
 1.1.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.5  05-Feb-2017  skrll Sync with HEAD
 1.2.4.4  05-Dec-2016  skrll Sync with HEAD
 1.2.4.3  22-Sep-2015  skrll Sync with HEAD
 1.2.4.2  06-Jun-2015  skrll Sync with HEAD
 1.2.4.1  06-Apr-2015  skrll Sync with HEAD
 1.2.2.3  14-Jun-2016  snj Pull up following revision(s) (requested by msaitoh in ticket #1174):
sys/dev/pci/ixgbe/README: 1.2
sys/dev/pci/ixgbe/ixgbe.c: 1.30-1.33, 1.35 via patch
sys/dev/pci/ixgbe/ixgbe.h: 1.8 via patch
sys/dev/pci/ixgbe/ixgbe_82598.c: 1.5 via patch
sys/dev/pci/ixgbe/ixgbe_82599.c: 1.10 via patch
sys/dev/pci/ixgbe/ixgbe_api.c: 1.8-1.11 via patch
sys/dev/pci/ixgbe/ixgbe_api.h: 1.5-1.6 via patch
sys/dev/pci/ixgbe/ixgbe_common.c: 1.6-1.7 via patch
sys/dev/pci/ixgbe/ixgbe_common.h: 1.5 via patch
sys/dev/pci/ixgbe/ixgbe_osdep.h: 1.9 via patch
sys/dev/pci/ixgbe/ixgbe_phy.c: 1.6 via patch
sys/dev/pci/ixgbe/ixgbe_phy.h: 1.5 via patch
sys/dev/pci/ixgbe/ixgbe_type.h: 1.11, 1.13 via patch
sys/dev/pci/ixgbe/ixgbe_vf.c: 1.5-1.6 via patch
sys/dev/pci/ixgbe/ixv.c: 1.9-1.10, 1.12-1.14 via patch
sys/dev/pci/ixgbe/ixv.h: 1.6 via patch
sys/dev/pci/ixgbe/ixgbe_dcb.c: 1.1
sys/dev/pci/ixgbe/ixgbe_dcb.h: 1.1
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: 1.1
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h: 1.1
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c: 1.1
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h: 1.1
Sync ixg(4) up to ixgbe.c rev. 1.35 except MSI/MSI-X and NET_MPSAFE:
- Sync ixg(4) up to FreeBSD r279805 (or r280181) which include some
bugfixes.
- Add missing evcnt_detach(&rxr->rx_copies) in ixgbe_detach().
- Fix error path in ixgbe_attach() and ixgbe_detatch() to prevent
panic.
- Remove unreachable code.
- Remove duplicated assignment of mh->m_len.
- Reduce the diff against FreeBSD (tabs, spaces and comments)
- ixv.c: Fix unintialized data. Include vlan.h and check NVLAN.
- Avoid shadowing global `min'.
 1.2.2.2  06-May-2015  riz Pull up following revisions (requested by msaitoh in ticket #734):
sys/dev/pci/ixgbe/LICENSE 1.2
sys/dev/pci/ixgbe/ixgbe.c 1.28-1.29
sys/dev/pci/ixgbe/ixgbe.h 1.7
sys/dev/pci/ixgbe/ixgbe_82598.c 1.4
sys/dev/pci/ixgbe/ixgbe_82598.h 1.3
sys/dev/pci/ixgbe/ixgbe_82599.c 1.9
sys/dev/pci/ixgbe/ixgbe_82599.h 1.2
sys/dev/pci/ixgbe/ixgbe_api.c 1.7
sys/dev/pci/ixgbe/ixgbe_api.h 1.4
sys/dev/pci/ixgbe/ixgbe_common.c 1.5
sys/dev/pci/ixgbe/ixgbe_common.h 1.4
sys/dev/pci/ixgbe/ixgbe_mbx.h 1.4
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.3
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.7
sys/dev/pci/ixgbe/ixgbe_phy.c 1.5
sys/dev/pci/ixgbe/ixgbe_phy.h 1.4
sys/dev/pci/ixgbe/ixgbe_type.h 1.10
sys/dev/pci/ixgbe/ixgbe_vf.c 1.4
sys/dev/pci/ixgbe/ixgbe_vf.h 1.5
sys/dev/pci/ixgbe/ixgbe_x540.c 1.3
sys/dev/pci/ixgbe/ixgbe_x540.h 1.2
sys/dev/pci/ixgbe/ixv.c 1.8

- Sync ixg(4) up to FreeBSD r250108:
- Cleanup some unused counters and some unused code.
- Improve performance.
- Fix flow control - don't override user value on re-init
- Fix to make 1G optics work correctly
- Change to interrupt enabling - some bits were incorrect
for certain hardware.
- Certain stats fixes, remove a duplicate increment of
ierror, thanks to Scott Long for pointing these out.
- Fix the setting of RX which related to multicast.
- Some netmap related fixes.
- Fixes link error without vlan. PR#49879 reported by Hauke Fath.
[msaitoh, ticket #734]
 1.2.2.1  19-Apr-2015  riz Apply patch (requested by msaitoh in ticket #697):
sys/dev/pci/files.pci 1.375 via patch
sys/dev/pci/ixgbe/ixgbe.c 1.24-1.27 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.4-1.6 via patch
sys/dev/pci/ixgbe/ixgbe_82598.c 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_82598.h 1.1-1.2 via patch
sys/dev/pci/ixgbe/ixgbe_82599.c 1.6-1.8 via patch
sys/dev/pci/ixgbe/ixgbe_82599.h 1.1 via patch
sys/dev/pci/ixgbe/ixgbe_api.c 1.5-1.6 via patch
sys/dev/pci/ixgbe/ixgbe_api.h 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_common.c 1.3-1.4 via patch
sys/dev/pci/ixgbe/ixgbe_common.h 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.h 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.4-1.6 via patch
sys/dev/pci/ixgbe/ixgbe_phy.c 1.3-1.4 via patch
sys/dev/pci/ixgbe/ixgbe_phy.h 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_type.h 1.8-1.9 via patch
sys/dev/pci/ixgbe/ixgbe_vf.c 1.2-1.3 via patch
sys/dev/pci/ixgbe/ixgbe_vf.h 1.3-1.4 via patch
sys/dev/pci/ixgbe/ixgbe_x540.c 1.1-1.2 via patch
sys/dev/pci/ixgbe/ixgbe_x540.h 1.1 via patch
sys/dev/pci/ixgbe/ixv.c 1.5-1.7 via patch
sys/dev/pci/ixgbe/ixv.h 1.4-1.5 via patch

Synchronize our ixg(4) driver up to FreeBSD r243716:
- Add X540 support.
- Add TSO6 support.
- Add 100BaseTX support.
- The max size in dma tag is changed from 65535 to 262140 (IXGBE_TSO_SIZE).
The value is the same as other *BSDs. The change might cause a address
space shortage (ixgbe_dmamap_create() might fail) on some machines.
- Show 1000Base-SX correctly.
- Fix if_baudrate from 1G to 10G.
- Fix a bug that ifconfig -z (SOICZIFDATA) doesn't work.
- Fix a lot of bugs.
- Improve performance.
[msaitoh, ticket #697]
 1.6.2.2  20-Mar-2017  pgoyette Sync with HEAD
 1.6.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.10.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.11.6.9  30-Jan-2022  martin Pull up the following, requested by msaitoh in ticket #1729:

sys/dev/pci/ixgbe/if_sriov.c 1.12-1.16
sys/dev/pci/ixgbe/ixgbe.c 1.295-1.297,1.300,1.304 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.84
sys/dev/pci/ixgbe/ixgbe_82598.c 1.17-1.18
sys/dev/pci/ixgbe/ixgbe_82598.h 1.9
sys/dev/pci/ixgbe/ixgbe_82599.c 1.24-1.28
sys/dev/pci/ixgbe/ixgbe_82599.h 1.8
sys/dev/pci/ixgbe/ixgbe_api.c 1.26-1.27
sys/dev/pci/ixgbe/ixgbe_api.h 1.16
sys/dev/pci/ixgbe/ixgbe_bypass.h 1.3
sys/dev/pci/ixgbe/ixgbe_common.c 1.34-1.42
sys/dev/pci/ixgbe/ixgbe_common.h 1.15-1.16
sys/dev/pci/ixgbe/ixgbe_dcb.c 1.12-1.13
sys/dev/pci/ixgbe/ixgbe_dcb.h 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.10-1.12
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.8
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.8
sys/dev/pci/ixgbe/ixgbe_fdir.h 1.4
sys/dev/pci/ixgbe/ixgbe_features.h 1.4
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.13-1.15
sys/dev/pci/ixgbe/ixgbe_mbx.h 1.15-1.18
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.8
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.31
sys/dev/pci/ixgbe/ixgbe_phy.c 1.25-1.29
sys/dev/pci/ixgbe/ixgbe_phy.h 1.13
sys/dev/pci/ixgbe/ixgbe_rss.h 1.6
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.5
sys/dev/pci/ixgbe/ixgbe_type.h 1.51-1.54
sys/dev/pci/ixgbe/ixgbe_vf.c 1.28-1.29
sys/dev/pci/ixgbe/ixgbe_vf.h 1.15
sys/dev/pci/ixgbe/ixgbe_x540.c 1.20-1.22
sys/dev/pci/ixgbe/ixgbe_x540.h 1.10
sys/dev/pci/ixgbe/ixgbe_x550.c 1.21-1.25
sys/dev/pci/ixgbe/ixgbe_x550.h 1.7
sys/dev/pci/ixgbe/ixv.c 1.170, 1.174-1.175 via patch

- Add typecast for type mismatch.
- Fix retry count calculation of I2C read/write.
- Wait longer for link after fiber MAC setup.
- ixv(4): Use adapter->mta for the multicast array memory instead of
the on-stack array.
- Match X550_PHY_ID correctly on X550.
- Print NVM image version on 82598.
- Use 64bit for lxon + lxoff.
- Don't expose garbage data of hw.ixvN.debug.
- Some NetBSD unrelated changes:
- Fix infinite recursion on PCIe link down if VMDQ is used.
- Move PF mailbox initialization from ixgbe_attach() to
ixgbe_init_iov().
- Add IPv6 mask for flow director.
- Change error level in ixgbe_fc_autoneg().
- Check host interface return status when writing NVM.
- Change DCB credit parameters.
- Restore some mailbox related functions. Revert part of ixgbe_mbx.c
rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change.
- Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to
IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change.
- Remove unused argument. Change argument.
- Remove unnecessary return value check.
- Remove debug error message.
- Remove dead code.
- Add some unused macros.
- Fix typo in comment.
- Rename some functions.
- Sort lines, modify comment.
- Whitespace fix.
 1.11.6.8  15-Sep-2021  martin Pull up the following (all via patch), requested by msaitoh in ticket #1696:

sysdev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
sysdev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch
sysdev/pci/ixgbe/ix_txrx.c 1.68-1.93
sysdev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch
sysdev/pci/ixgbe/if_bypass.c 1.7-1.9
sysdev/pci/ixgbe/if_fdir.c 1.4-1.5
sysdev/pci/ixgbe/if_sriov.c 1.10-1.11
sysdev/pci/ixgbe/ixgbe_82598.c 1.16
sysdev/pci/ixgbe/ixgbe_82599.c 1.23
sysdev/pci/ixgbe/ixgbe_api.c 1.25
sysdev/pci/ixgbe/ixgbe_bypass.h 1.2
sysdev/pci/ixgbe/ixgbe_common.c 1.30-1.33
sysdev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11
sysdev/pci/ixgbe/ixgbe_dcb.h 1.7
sysdev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9
sysdev/pci/ixgbe/ixgbe_dcb_82598.h 1.7
sysdev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9
sysdev/pci/ixgbe/ixgbe_dcb_82599.h 1.7
sysdev/pci/ixgbe/ixgbe_fdir.h 1.3
sysdev/pci/ixgbe/ixgbe_features.h 1.3
sysdev/pci/ixgbe/ixgbe_mbx.c 1.12
sysdev/pci/ixgbe/ixgbe_netbsd.c 1.16-1.17
sysdev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14
sysdev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4
sysdev/pci/ixgbe/ixgbe_netmap.h 1.2
sysdev/pci/ixgbe/ixgbe_osdep.c 1.7
sysdev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30
sysdev/pci/ixgbe/ixgbe_phy.c 1.24
sysdev/pci/ixgbe/ixgbe_rss.h 1.5
sysdev/pci/ixgbe/ixgbe_sriov.h 1.4
sysdev/pci/ixgbe/ixgbe_type.h 1.49
sysdev/pci/ixgbe/ixgbe_vf.c 1.27
sysdev/pci/ixgbe/ixgbe_x540.c 1.18-1.19
sysdev/pci/ixgbe/ixgbe_x540.h 1.9
sysdev/pci/ixgbe/ixgbe_x550.c 1.19-1.20
sysdev/pci/ixgbe/ixgbe_x550.h 1.6
sysdev/pci/files.pci 1.438
share/man/man4/ixg.4 1.15
share/man/man4/ixv.4 1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
Before this commit, resource shortage was easily occurred because
the total number of the clusters is small.
- Improve performance:
- Use m_adj(ETHER_ALIGN) more.
- Sprinkle __predict_false() in the RX path.
- Don't pre-allocate a cluster for RXCOPY case to improve short
packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
DMA buffer. Also, when the buffer is already freed, do not call
bus_dmamap_unload(9) (no resource leaks with this change). This
change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
address. At least, this change is required for macppc
(sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
panic.
- Save the discard_multidesc state to not to forget the state by
exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.
 1.11.6.7  02-Sep-2020  martin Pull up following revision(s) (requested by msaitoh in ticket #1601):

sys/dev/pci/ixgbe/ixgbe_82598.c: revision 1.13
sys/dev/pci/ixgbe/ixgbe.c: revision 1.219
sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.20
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.17
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.22
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.44

Add recovery code for unsupported SFP+.

Before this commit:
If an unsupported SFP module is inserted before booting, the driver attach
failed and there was no way to recover form it without rebooting or
detaching/reattaching driver (drvctl -d && drvctl -r pciN).

After this commit:
We can automatically recover any time by replacing it with a supported
module.
 1.11.6.6  05-Aug-2020  martin Pull up the following revisions, requested by msaitoh in ticket #1587:

sys/dev/pci/ixgbe/ix_txrx.c 1.62-1.63 via patch
sys/dev/pci/ixgbe/ixgbe.c 1.225, 1.228-1.229,
1.232 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.64, 1.66
sys/dev/pci/ixgbe/ixv.c 1.146, 1.148-1.150
via patch
sys/dev/pci/ixgbe/ixgbe_common.c 1.27
sys/dev/pci/ixgbe/ixgbe_vf.c 1.23
sys/dev/pci/ixgbe/ixgbe_82598.c 1.15
sys/dev/pci/ixgbe/ixgbe_x550.c 1.18
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.14
sys/dev/pci/ixgbe/ixgbe_phy.c 1.21
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.26

- Fix IXGBE_LE32_TO_CPUS() macro for big endian machine. This problem
was only on X550.
- Add debug printf()s.
- Use unsigned to avoid undefined behavior in
ixgbe_fc_enable_generic().
- Modify a little to reduce diff between ixgbe.c and ixv.c.
No functional change.
- Modify comment.
- Remove unused macros.
- Whitespace fix.
- Fix typos.
 1.11.6.5  24-Jan-2020  martin Pull up the following, requested by msaitoh in ticket #1490:

sys/dev/pci/ixgbe/if_bypass.c 1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.5
sys/dev/pci/ixgbe/ix_txrx.c 1.58-1.60
sys/dev/pci/ixgbe/ixgbe.c 1.195,1.220-1.221 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.60-1.2
sys/dev/pci/ixgbe/ixgbe_api.c 1.24
sys/dev/pci/ixgbe/ixgbe_common.c 1.26
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.11-1.12
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.24
sys/dev/pci/ixgbe/ixgbe_phy.c 1.19
sys/dev/pci/ixgbe/ixgbe_82598.c 1.14
sys/dev/pci/ixgbe/ixv.c 1.122,1.142,1.144 via patch

- Use unsigned to avoid undefined behavior in
ix{gbe,v}_[un]register_vlan().
- Free RX structure correctly when detaching.
- Remove unused code.
- Remove extra spaces.
- Fix some typos in comment.
- KNF.
 1.11.6.4  22-Jul-2019  martin Pull up the following revisions (via patch), requested by msaitoh in
ticket #1301:

sys/dev/pci/ixgbe/if_sriov.c 1.5-1.6
sys/dev/pci/ixgbe/ix_txrx.c 1.53-1.54
sys/dev/pci/ixgbe/ixgbe_x550.h 1.5
sys/dev/pci/ixgbe/ixgbe.c 1.169-1.170,1.176,1.179,1.181,1.185-1.186,1.188-1.192 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.53,1.55
sys/dev/pci/ixgbe/ixgbe_82599.c 1.21
sys/dev/pci/ixgbe/ixgbe_api.c 1.22-1.23
sys/dev/pci/ixgbe/ixgbe_api.h 1.14-1.15
sys/dev/pci/ixgbe/ixgbe_x550.c 1.14-1.15
sys/dev/pci/ixgbe/ixgbe_common.c 1.23
sys/dev/pci/ixgbe/ixgbe_common.h 1.14
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.11
sys/dev/pci/ixgbe/ixgbe_mbx.h 1.14
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.2
sys/dev/pci/ixgbe/ixgbe_features.h 1.2
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.9
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.9-1.10
sys/dev/pci/ixgbe/ixgbe_phy.c 1.18
sys/dev/pci/ixgbe/ixgbe_type.h 1.37,1.39-1.40
sys/dev/pci/ixgbe/ixgbe_vf.c 1.18
sys/dev/pci/ixgbe/ixv.c 1.112-1.114,1.117,1.119 via patch

Sync ixgbe up to 20190717 except ETHERCAP or ixv's VLAN stuff:
- Add firmware recovery mode for X550, X550A(Xeon D) and X550EM(C3000).
- Remove IXGBE_DEV_ID_82599_LS(0x154f) support again.
- On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of
ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em()
has extra check (e.g. exclude 1G copper).
- It's not required to calculate unused queues' statistics.
- Remove ETHERCAP_VLAN_HWFILTER's definition.
- Match 82598_BX(0x1508), 82599_KR(0x1517), 82599_SFP_EM(0x1507),
X550EM_X_XFI(0x15b0), X550EM_A_QSFP(0x15ca) and
X550EM_A_QSFP_N(0x15cc)
- Add missing XFI support into ixgbe_get_link_capabilities_X550em().
- Other than IXGBE_VF_RESET should wait ACK, so use
ixgbevf_write_msg_read_ack() instead of write_posted() in
ixgbe_update_mc_addr_list_vf().
- When ixv_check_link() failed in the watchdog function, reset the
interface.
- Remove RXCSUM register modification in
ixv_initialize_receive_units(). It seems it's not required.
- Remove some debug printf in ixv_print_debug_info().
- Calculate vector's bit location correctly when the vector >= 31
in ixgbe_allocate_msix().
- Fix hung queue check when the queue number >= 31.
- On ENETRESET case, not continue and quit the ifflags_cb() function
because if_init() will do the same thing.
- Fix bugs in unused code.
- Fix typo in comment.
- Fix typo in unused code.
- Whitespace fixes. KNF.
 1.11.6.3  14-Apr-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #750):

sys/dev/pci/ixgbe/ixgbe_x540.h: revision 1.8
sys/dev/pci/ixgbe/ixgbe_82598.c: revision 1.11
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c: revision 1.6
sys/dev/pci/ixgbe/ixgbe_82598.c: revision 1.12
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c: revision 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h: revision 1.6
sys/dev/pci/ixgbe/ixgbe_fdir.h: revision 1.2
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h: revision 1.6
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: revision 1.6
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.18
sys/dev/pci/ixgbe/if_sriov.c: revision 1.3
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: revision 1.7
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe_mbx.h: revision 1.13
sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.7
sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.16
sys/dev/pci/ixgbe/ixgbe_dcb.c: revision 1.8
sys/dev/pci/ixgbe/ixgbe_vf.c: revision 1.17
sys/dev/pci/ixgbe/ixgbe_dcb.h: revision 1.6
sys/dev/pci/ixgbe/if_bypass.c: revision 1.4
sys/dev/pci/ixgbe/ixv.c: revision 1.91
sys/dev/pci/ixgbe/ixgbe_rss.h: revision 1.4
sys/dev/pci/ixgbe/ixv.c: revision 1.92
sys/dev/pci/ixgbe/ixv.c: revision 1.93
sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.4
sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.12
sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.13
sys/dev/pci/ixgbe/ixgbe_api.h: revision 1.13
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.12
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.33
sys/dev/pci/ixgbe/if_fdir.c: revision 1.2
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.34
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.39
sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.13
sys/dev/pci/ixgbe/ixgbe_api.c: revision 1.20
sys/dev/pci/ixgbe/ixgbe_sriov.h: revision 1.3
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.21
sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.21
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.22
sys/dev/pci/ixgbe/ixgbe_82599.h: revision 1.7
sys/dev/pci/ixgbe/ixgbe.c: revision 1.144
sys/dev/pci/ixgbe/ixgbe.c: revision 1.145
sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.16
sys/dev/pci/ixgbe/ixgbe.c: revision 1.146
sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.17
sys/dev/pci/ixgbe/ixgbe_82598.h: revision 1.8
sys/dev/pci/ixgbe/ixgbe.h: revision 1.41
sys/dev/pci/ixgbe/ixgbe_mbx.c: revision 1.10
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.14
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.15
sys/dev/pci/ixgbe/ixgbe_phy.h: revision 1.11

Sync with the remaining part of FreeBSD r328265 except sfp_reinit stuff:
- Always schedule module intterrupt in ixgbe_config_link() when a device is
SFP+ based.
- Use not loop index but txr->me in ixv_initialize_{transmit,receive}_units().
It's required for VMDQ but NetBSD doesn't use it, so it's not a bug in
NetBSD.
- Simplify ixgbe_bp_wd_set(). No functional change.
- Whitespace.

Sync with FreeBSD r331224 except ixv_if_update_admin_status()'s change:
- Fix length of reading buffer when the command is Read Flash in
ixgbe_host_interface_command().
- Add missing start_hw() call in ixv_init_locked(). This is not a real bug
because start_hw just set hw->adapter_stopped to false and anyone refer it.
- Style change.
- Update comment.

Read sc_if_flags after taking core lock. Same as if_wm.c rev. 1.418.
 1.11.6.2  30-Mar-2018  martin Pull up following revision(s) (requested by msaitoh in ticket #673):

sys/dev/pci/ixgbe/if_sriov.c: revision 1.2
sys/dev/pci/ixgbe/ixgbe.c: revision 1.135
sys/dev/pci/ixgbe/ixgbe.c: revision 1.136
sys/dev/pci/ixgbe/ixgbe.c: revision 1.137
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.17
sys/dev/pci/ixgbe/if_bypass.c: revision 1.3
sys/dev/pci/ixgbe/ixgbe_common.c: revision 1.18
sys/dev/pci/ixgbe/ixgbe_common.h: revision 1.10
sys/dev/pci/ixgbe/ixgbe.h: revision 1.36
sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.3
sys/dev/pci/ixgbe/ixgbe.h: revision 1.37
sys/dev/pci/ixgbe/ix_txrx.c: revision 1.36
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.32
sys/dev/pci/ixgbe/ixgbe_vf.h: revision 1.12
sys/dev/pci/ixgbe/ixgbe_sriov.h: revision 1.2
sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.20
sys/dev/pci/ixgbe/ixv.c: revision 1.88
sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.15
sys/dev/pci/ixgbe/ixv.c: revision 1.89
sys/dev/pci/ixgbe/ixgbe_x540.c: revision 1.13
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.8
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.9

Add some changes from ix-3.2.17.tar.gz and r328265. Not fully synchronized.

Some others (e.g. sfp cage interrupt and bypass adapter stuff) will be merged
later:

- Initialize firmware command buffer correctly in ixgbe_read_ee_hostif_X550()
and ixgbe_read_ee_hostif_buffer_X550(). These functions are used when reading
NVM.
- Fix a bug that ixgbe_mng_present() misunderstand management capability on
X550 and newer on some environment. X550 changed FWSM bit definition.
See X540 document and X550's document and compare them.
- Fix checksum calculation in ixgbe_set_fw_drv_ver_generic(). This function is
not used in NetBSD.
- Add some unused funtions.
- Whitespace fix.
- Check offset correctly in ixgbe_get_oem_prod_version(). Note that this
function is not used.
- Set PHY correctly in ixgbe_setup_mac_link_sfp_x550a() if a device is a
C3000 KR SFP+.

Fix race about writing adapter->link_active for ixg(4).
adapter->link_active is updated by ixgbe_update_link_status() only.

The function is called from the following four functions.
- ixgbe_media_status()
- ixgbe_local_timer1()
- ixgbe_stop()
- ixgbe_handle_link()

The functions other than ixgbe_handle_link() call ixgbe_update_link_status()
with holding IXGBE_CORE_LOCK, however ixgbe_handle_link() calls it without
holding IXGBE_CORE_LOCK. That can cause race. So, add IXGBE_CORE_LOCK to
ixgbe_handle_link().

Tested by msaitoh@n.o and me.

Fix race about writing adapter->link_active for ixv(4).
adapter->link_active is updated by ixv_update_link_status() only.

The function is called from the following two functions.
- ixv_media_status()
- ixv_handle_link()

ixv_media_status() calls ixv_update_link_status() with holding
IXGBE_CORE_LOCK, however ixv_handle_link() calls it without
holding IXGBE_CORE_LOCK, the same as ixg(4).

ok by msaitoh@n.o.

- Add link related softint's counter.
- Fix indent.
 1.11.6.1  21-Dec-2017  snj Pull up following revision(s) (requested by msaitoh in ticket #441):
sys/dev/pci/files.pci: 1.390
sys/dev/pci/ixgbe/if_bypass.c: new
sys/dev/pci/ixgbe/if_fdir.c: new
sys/dev/pci/ixgbe/if_sriov.c: new
sys/dev/pci/ixgbe/ixgbe_bypass.h: new
sys/dev/pci/ixgbe/ixgbe_fdir.h: new
sys/dev/pci/ixgbe/ixgbe_features.h: new
sys/dev/pci/ixgbe/ixgbe_netmap.c: new
sys/dev/pci/ixgbe/ixgbe_netmap.h: new
sys/dev/pci/ixgbe/ixgbe_rss.h: new
sys/dev/pci/ixgbe/ixgbe_sriov.h: new
sys/dev/pci/ixgbe/ix_txrx.c: 1.28, 1.30 via patch
sys/dev/pci/ixgbe/ixgbe.c: 1.97-1.105, 1.107-1.111, 1.113-1.115
sys/dev/pci/ixgbe/ixgbe.h: 1.26-1.29 via patch
sys/dev/pci/ixgbe/ixv.c: 1.57-1.58, 1.60-1.61, 1.63-1.64, 1.66-1.72, 1.75 via patch
sys/dev/pci/ixgbe/ixgbe_api.c: 1.17-1.18 via patch
sys/dev/pci/ixgbe/ixgbe_type.h: 1.26-1.30 via patch
sys/dev/pci/ixgbe/ixgbe_82598.c: 1.9-1.10 via patch
sys/dev/pci/ixgbe/ixgbe_82598.h: 1.6-1.7
sys/dev/pci/ixgbe/ixgbe_82599.c: 1.15-1.16 via patch
sys/dev/pci/ixgbe/ixgbe_82599.h: 1.5-1.6
sys/dev/pci/ixgbe/ixgbe_api.h: 1.10-1.11 via patch
sys/dev/pci/ixgbe/ixgbe_common.c: 1.14-1.16 via patch
sys/dev/pci/ixgbe/ixgbe_common.h: 1.8-1.9 via patch
sys/dev/pci/ixgbe/ixgbe_dcb.c: 1.5-1.6
sys/dev/pci/ixgbe/ixgbe_dcb.h: 1.4-1.5
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c: 1.4-1.5
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h: 1.4-1.5
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c: 1.4-1.5
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h: 1.4-1.5
sys/dev/pci/ixgbe/ixgbe_mbx.c: 1.7-1.9 via patch
sys/dev/pci/ixgbe/ixgbe_mbx.h: 1.11-1.12 via patch
sys/dev/pci/ixgbe/ixgbe_osdep.c: 1.2
sys/dev/pci/ixgbe/ixgbe_osdep.h: 1.18-1.19 via patch
sys/dev/pci/ixgbe/ixgbe_phy.c: 1.12-1.14 via patch
sys/dev/pci/ixgbe/ixgbe_phy.h: 1.9-1.10 via patch
sys/dev/pci/ixgbe/ixgbe_vf.c: 1.13-1.15 via patch
sys/dev/pci/ixgbe/ixgbe_vf.h: 1.9-1.11 via patch
sys/dev/pci/ixgbe/ixgbe_x540.c: 1.10-1.12
sys/dev/pci/ixgbe/ixgbe_x540.h: 1.6-1.7
sys/dev/pci/ixgbe/ixgbe_x550.c: 1.6-1.7
sys/dev/pci/ixgbe/ixgbe_x550.h: 1.3
Sync with FreeBSD's up to r326022, fix bugs and some improvements:
- Don't limit number of queue pair to 8. Take chip's max TX queues and
max RX queues into account.
- Add C3000 (Denverton) support.
- Add bypass function support for bypass adapters.
- Change EEE sysctl.
- Remove thermal test sysctl.
- ixv(4): set RSS mapping.
- ixv(4): Add TSOv6.
- ixv(4): Fix hardware counter.
- ixv(4): Make TX/RX descriptors size the same as ixg(4).
- ixv(4): Print device name in ixv_attach().
- ixv(4): Make mailbox statistic counters evcnt(9).
- ixv(4): Fix a problem that mailbox interrupt never occurred.
- ixv(4): Don't check neither VTEICR nor VTEICS same as Linux. It
seems that both registers can't be used to check which MSI-X vector
is triggered.
- ixv(4): Print Mailbox API version.
- Print driver feature capabilities and enable bits when verbose boot.
- Fix a bug that X550EM_A (Denverton) can't force 10BaseT.
- Remove all half-duplex setting because of the chip specification.
- Add 2.5GBASE-T and 5GBASE-T support.
- Set ifm_baudrate correctly.
- Protect ec_multi* with mutex like other MP safe Ethernet drivers.
- On X550 and newer, print NVM Image Version with %u.%02x.
- On X540, print PHY FW Revision with %u.%x. 0x4030 will be printed
as "Revision 4.3 ID 0x0"
- Fix value check of OEM_NVM_IMAGE_VER.
- Print PHY ID only for copper PHY.
- Fix a bug that X550 and newer didn't linkup if it forces
100BaseTX-FDX or 10BaseT-FDX.
- Fix a bug that RX may accesses freed area. It also fixes a problem
that if_init() takes long time on many core machine.
- Check ETHERCAP_VLAN_HWTAGGING in ixgbe_setup_vlan_hw_support(). This
change has no influence to netbsd because it's enabled by default
and NetBSD has no API to disable it.
- Whitespace fix.
 1.14.2.3  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.14.2.2  07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.14.2.1  15-Mar-2018  pgoyette Synch with HEAD
 1.17.2.3  21-Apr-2020  martin Sync with HEAD
 1.17.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.17.2.1  10-Jun-2019  christos Sync with HEAD
 1.18.4.5  30-Jan-2022  martin Pull up the following revisions, requested by msaitoh in ticket #1414:

sys/dev/pci/ixgbe/if_sriov.c 1.12-1.16
sys/dev/pci/ixgbe/ixgbe.c 1.295-1.297,1.300,1.304 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.84
sys/dev/pci/ixgbe/ixgbe_82598.c 1.17-1.18
sys/dev/pci/ixgbe/ixgbe_82598.h 1.9
sys/dev/pci/ixgbe/ixgbe_82599.c 1.24-1.28
sys/dev/pci/ixgbe/ixgbe_82599.h 1.8
sys/dev/pci/ixgbe/ixgbe_api.c 1.26-1.27
sys/dev/pci/ixgbe/ixgbe_api.h 1.16
sys/dev/pci/ixgbe/ixgbe_bypass.h 1.3
sys/dev/pci/ixgbe/ixgbe_common.c 1.34-1.42
sys/dev/pci/ixgbe/ixgbe_common.h 1.15-1.16
sys/dev/pci/ixgbe/ixgbe_dcb.c 1.12-1.13
sys/dev/pci/ixgbe/ixgbe_dcb.h 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.10-1.12
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.8
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.8
sys/dev/pci/ixgbe/ixgbe_fdir.h 1.4
sys/dev/pci/ixgbe/ixgbe_features.h 1.4
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.13-1.15
sys/dev/pci/ixgbe/ixgbe_mbx.h 1.15-1.18
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.8
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.31
sys/dev/pci/ixgbe/ixgbe_phy.c 1.25-1.29
sys/dev/pci/ixgbe/ixgbe_phy.h 1.13
sys/dev/pci/ixgbe/ixgbe_rss.h 1.6
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.5
sys/dev/pci/ixgbe/ixgbe_type.h 1.51-1.54
sys/dev/pci/ixgbe/ixgbe_vf.c 1.28-1.29
sys/dev/pci/ixgbe/ixgbe_vf.h 1.15
sys/dev/pci/ixgbe/ixgbe_x540.c 1.20-1.22
sys/dev/pci/ixgbe/ixgbe_x540.h 1.10
sys/dev/pci/ixgbe/ixgbe_x550.c 1.21-1.25
sys/dev/pci/ixgbe/ixgbe_x550.h 1.7
sys/dev/pci/ixgbe/ixv.c 1.170, 1.174-1.175 via patch

- Add typecast for type mismatch.
- Fix retry count calculation of I2C read/write.
- Wait longer for link after fiber MAC setup.
- ixv(4): Use adapter->mta for the multicast array memory instead of
the on-stack array.
- Match X550_PHY_ID correctly on X550.
- Print NVM image version on 82598.
- Use 64bit for lxon + lxoff.
- Don't expose garbage data of hw.ixvN.debug.
- Some NetBSD unrelated changes:
- Fix infinite recursion on PCIe link down if VMDQ is used.
- Move PF mailbox initialization from ixgbe_attach() to
ixgbe_init_iov().
- Add IPv6 mask for flow director.
- Change error level in ixgbe_fc_autoneg().
- Check host interface return status when writing NVM.
- Change DCB credit parameters.
- Restore some mailbox related functions. Revert part of ixgbe_mbx.c
rev. 1.7 and ixgbe_mbx.h rev. 1.11. No functional change.
- Rename IXGBE_VT_MSGTYPE_{ACK,NACK} to
IXGBE_VT_MSGTYPE_{SUCCESS,FAILURE}. No functional change.
- Remove unused argument. Change argument.
- Remove unnecessary return value check.
- Remove debug error message.
- Remove dead code.
- Add some unused macros.
- Fix typo in comment.
- Rename some functions.
- Sort lines, modify comment.
- Whitespace fix.
 1.18.4.4  15-Sep-2021  martin Pull up the following (via patch), requested by msaitoh in ticket #1346:

sys/dev/pci/ixgbe/ixgbe.c 1.252, 1.280-1.283, 1.286-1.287, 1.289-1.290 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.73, 1.76-1.80 via patch
sys/dev/pci/ixgbe/ix_txrx.c 1.68-1.93
sys/dev/pci/ixgbe/ixv.c 1.153, 1.157-1.161, 1.163-1.166 via patch
sys/dev/pci/ixgbe/if_bypass.c 1.7-1.9
sys/dev/pci/ixgbe/if_fdir.c 1.4-1.5
sys/dev/pci/ixgbe/if_sriov.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_82598.c 1.16
sys/dev/pci/ixgbe/ixgbe_82599.c 1.23
sys/dev/pci/ixgbe/ixgbe_api.c 1.25
sys/dev/pci/ixgbe/ixgbe_bypass.h 1.2
sys/dev/pci/ixgbe/ixgbe_common.c 1.30-1.33
sys/dev/pci/ixgbe/ixgbe_dcb.c 1.10-1.11
sys/dev/pci/ixgbe/ixgbe_dcb.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82598.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82598.h 1.7
sys/dev/pci/ixgbe/ixgbe_dcb_82599.c 1.8-1.9
sys/dev/pci/ixgbe/ixgbe_dcb_82599.h 1.7
sys/dev/pci/ixgbe/ixgbe_fdir.h 1.3
sys/dev/pci/ixgbe/ixgbe_features.h 1.3
sys/dev/pci/ixgbe/ixgbe_mbx.c 1.12
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.13, 1.16-1.17
sys/dev/pci/ixgbe/ixgbe_netbsd.h 1.13-1.14
sys/dev/pci/ixgbe/ixgbe_netmap.c 1.3-1.4
sys/dev/pci/ixgbe/ixgbe_netmap.h 1.2
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.7
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.29-1.30
sys/dev/pci/ixgbe/ixgbe_phy.c 1.24
sys/dev/pci/ixgbe/ixgbe_rss.h 1.5
sys/dev/pci/ixgbe/ixgbe_sriov.h 1.4
sys/dev/pci/ixgbe/ixgbe_type.h 1.49
sys/dev/pci/ixgbe/ixgbe_vf.c 1.27
sys/dev/pci/ixgbe/ixgbe_x540.c 1.18-1.19
sys/dev/pci/ixgbe/ixgbe_x540.h 1.9
sys/dev/pci/ixgbe/ixgbe_x550.c 1.19-1.20
sys/dev/pci/ixgbe/ixgbe_x550.h 1.6
sys/dev/pci/files.pci 1.438
share/man/man4/ixg.4 1.15
share/man/man4/ixv.4 1.8

- Use MCLGET() instead of homegrown cluster (jcl) allocation mechanism.
Before this commit, resource shortage was easily occurred because
the total number of the clusters is small.
- Improve performance:
- Use m_adj(ETHER_ALIGN) more.
- Sprinkle __predict_false() in the RX path.
- Don't pre-allocate a cluster for RXCOPY case to improve short
packet's performance.
- Call bus_dmamap_unload(9) via ixgbe_dmamap_unload(), before freeing
DMA buffer. Also, when the buffer is already freed, do not call
bus_dmamap_unload(9) (no resource leaks with this change). This
change is required to make ixg(4) work on alpha.
- Keep m_len and m_pkthdr.len consistent to prevent panic on arm.
- Fix panic when bus_dmamap_load_mbuf() failed in
ixgbe_setup_receive_ring().
- Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability
on aarch64.
- Use uint64_t instead of bus_addr_t for the TX descriptor's buffer
address. At least, this change is required for macppc
(sizeof(bus_addr_t) == 4) to make TX work.
- Fix little-endian dependence.
- Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().
- Refresh unrefreshed descriptors' buffers correctly.
- Don't call bus_dmamap_sync with rx_mbuf_sz(== MCLBYTES) to prevent
panic.
- Save the discard_multidesc state to not to forget the state by
exiting rxeof().
- Add missing increment of no_mbuf error counter.
- Don't increment no_mbuf evcnt(9) when discarding multi-descriptor
packet.
- ixv: Modify error message to sync with ixgbe.c
- Print the error value of ixgbe_reset_hw() for debugging.
- Remove extra unlock/lock processing around if_percpuq_enqueue().
- Refactor rxr->next_to_check updating.
- Add new sysctl "rx_copy_len".
- Add a new sysctl to read rxr->next_to_refresh.
- Print error number when error occurred.
- Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional
change.
- Don't use fixed value.
- Comment out flow director processing in fast path.
- Add missing NetBSD RCS IDs and __KERNEL_RCSID()s.
- KNF.
- Fix typos.
 1.18.4.3  10-Jul-2020  martin Pull up the following revisions, requested by msaitoh in ticket #997:

sys/dev/pci/ixgbe/ix_txrx.c 1.62-1.63 via patch
sys/dev/pci/ixgbe/ixgbe.c 1.225, 1.228-1.229,
1.232 via patch
sys/dev/pci/ixgbe/ixgbe.h 1.64, 1.66
sys/dev/pci/ixgbe/ixv.c 1.146, 1.148-1.150
sys/dev/pci/ixgbe/ixgbe_common.c 1.27
sys/dev/pci/ixgbe/ixgbe_vf.c 1.23
sys/dev/pci/ixgbe/ixgbe_82598.c 1.15
sys/dev/pci/ixgbe/ixgbe_x550.c 1.18
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.14
sys/dev/pci/ixgbe/ixgbe_phy.c 1.21
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.26

- Fix IXGBE_LE32_TO_CPUS() macro for big endian machine. This problem
was only on X550*.
- Add debug printf()s.
- Use unsigned to avoid undefined behavior in
ixgbe_fc_enable_generic().
- Modify a little to reduce diff between ixgbe.c and ixv.c.
No functional change.
- Modify comment.
- Remove unused macros.
- Whitespace fix.
- Fix typos.
 1.18.4.2  28-Jan-2020  martin Pull up following revision(s) (requested by msaitoh in ticket #664):

sys/dev/pci/ixgbe/ixgbe_82598.c: revision 1.13
sys/dev/pci/ixgbe/ixgbe.c: revision 1.219
sys/dev/pci/ixgbe/ixgbe_phy.c: revision 1.20
sys/dev/pci/ixgbe/ixgbe_x550.c: revision 1.17
sys/dev/pci/ixgbe/ixgbe_82599.c: revision 1.22
sys/dev/pci/ixgbe/ixgbe_type.h: revision 1.44

Add recovery code for unsupported SFP+.

Before this commit:
If an unsupported SFP module is inserted before booting, the driver attach
failed and there was no way to recover form it without rebooting or
detaching/reattaching driver (drvctl -d && drvctl -r pciN).

After this commit:
We can automatically recover any time by replacing it with a supported
module.
 1.18.4.1  26-Jan-2020  martin Pull up the following (via patch), requested by msaitoh in ticket #648

sys/dev/pci/ixgbe/if_bypass.c 1.5
sys/dev/pci/ixgbe/ixgbe_osdep.c 1.5
sys/dev/pci/ixgbe/ix_txrx.c 1.58-1.60
sys/dev/pci/ixgbe/ixgbe.c 1.220-1.221
sys/dev/pci/ixgbe/ixgbe.h 1.60-1.2
sys/dev/pci/ixgbe/ixgbe_api.c 1.24
sys/dev/pci/ixgbe/ixgbe_common.c 1.26
sys/dev/pci/ixgbe/ixgbe_netbsd.c 1.11-1.12
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.24
sys/dev/pci/ixgbe/ixgbe_phy.c 1.19
sys/dev/pci/ixgbe/ixgbe_82598.c 1.14
sys/dev/pci/ixgbe/ixv.c 1.142,1.144

- Free RX structure correctly when detaching.
- Remove unused code.
- Fix some typos in comment.
- Remove extra spaces.
- KNF.
 1.20.6.1  20-Apr-2020  bouyer Sync with HEAD
 1.23.6.1  13-May-2021  thorpej Sync with HEAD.

RSS XML Feed