CVS commit: src/sys/dev/pci/ixgbe

2021-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug 18 09:17:17 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
 Refresh unrefreshed descriptors' buffers correctly.

- Update next_to_refresh at least before ixgbe_rx_unrefresed() to detect
  the unrefreshed status correctly in ixgbe_rxeof().
- next_to_refresh points to the previous entry of the first unrefreshed
  descriptor, so fix a loop variable to point to the correct one in
  ixgbe_refresh_mbufs().
- Without the above two fixes, RX ring may have some unrefreshed entries
  which have inconsistent state. On such state, "ifconfig down up" causes
  panic in bus_dmamap_sync() on aarch64.
- Tested on amd64 and aarch64. OK'd by knakahara.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-07-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jul 15 08:09:31 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Add a new sysctl to read rxr->next_to_refresh.


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.163 -r1.164 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-07-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul  7 08:58:20 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixv.c

Log Message:
Add new sysctl "rx_copy_len".

 ixgbe_rxeof() has an optimization "RX_COPY" to reduce costs of
bus_dmamap_load_mbuf() and bus_dmamap_unload() by copying a mbuf cluster's
memory to a newly allocated mbuf's MH_databuf[] and recycle the original map.
The optimization is used when a length of a packet is smaller than a specific
value. The value is calculated based on MHLEN. The size of MHLEN is
architecture specific. It's 256 or 512. Make the threshold controllable by
adding a new sysctl.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.285 -r1.286 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.162 -r1.163 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-07-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul  7 08:32:51 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Set rxr->next_to_refresh correctly in ixgbe_setup_receive_ring().

 ixgbe_setup_receive_ring() fully allocates rx buffers. When a
descriptor ring is full, rxr->next_to_refresh should point to
rxr_next_to_check -1. Before this change, rxr->next_to_refresh
is set to 0 and ixgbe_refresh_mbufs() wastefully loops in
ixgbe_refresh_mbufs() because it means the ring is empty.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu May 27 06:11:35 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
 Do no_jmbuf++ when ixgbe_getjcl() failed in ixgbe_setup_receive_ring(), too.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-20 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu May 20 22:36:09 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
fix little-endian dependence


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu May 20 10:39:32 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
 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.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-19 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Thu May 20 01:02:42 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Added BUS_DMA_COHERENT flag to bus_dmamem_map() to improve stability on aarch64.

In ixgbe, TX/RX descriptor rings are configured in 16-byte units.
If BUS_DMA_COHERENT is not specified, cpu cache (writeback/invalidate)
operations by bus_dmamap_sync() in aarch64 (arm/arm32/bus_dma.c) are done per
cache line size (usually 64 bytes). As a result, adjacent descriptors conflict
with the DMA operation, resulting in unstable operation.

To avoid this, descriptors area should be mapped as non-cache with 
BUS_DMA_COHERENT.

thanks to msaitoh@ for his help in debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 19 08:19:20 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_dcb_82598.h ixgbe_netbsd.h ixgbe_type.h
ixgbe_x540.c ixgbe_x550.c ixv.c

Log Message:
No functional change:

 - Add NetBSD RCS IDs.
 - KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.h
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ixgbe_netbsd.h
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.160 -r1.161 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue May 18 05:29:16 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixv.c

Log Message:
- Cleanup an rxbuf entry when bus_dmamap_load_mbuf() failed to prevent panic.
- Print error number when error occurred.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.282 -r1.283 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.159 -r1.160 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 14 05:15:17 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Keep m_len and m_pkthdr.len consistent to prevent panic on arm.

   Arm's bus_dmamap_load_mbuf() keeps a pointer to the original mbuf
  and bus_dmamap_sync() refers it. ixgbe_rxeof() modified mbuf's m_len
  inconsistently with m_pkthdr and dm_mapsize. "ifconfig down up" made
  panic by referring the inconsistent mbuf length.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-13 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri May 14 01:30:06 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Comment out flow director processing in fast path.

ixgbe_xmit() is per-queue fast path.  It should reduce access to
per-device data (adapter->feat_en).


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-10 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue May 11 01:30:30 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
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).

Otherwise, MMU fault occurs for some bus_dma(9) implementations.

With this fix, X550-T1 and X540-T1 work fine on alpha (at least
DS10 with PCI-PCIe reverse bridge).

Discussed with msaitoh. Thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-05-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May  7 09:15:52 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Print the error value of ixgbe_reset_hw() for debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.281 -r1.282 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-04-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 30 06:55:32 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: if_bypass.c if_fdir.c if_sriov.c ix_txrx.c
ixgbe.c ixgbe_82598.c ixgbe_82599.c ixgbe_api.c ixgbe_common.c
ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c ixgbe_mbx.c
ixgbe_netbsd.c ixgbe_netmap.c ixgbe_osdep.c ixgbe_phy.c ixgbe_vf.c
ixgbe_x540.c ixgbe_x550.c ixv.c

Log Message:
 Add missing __KERNEL_RCSID().


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ixgbe/if_bypass.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/if_fdir.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/ixgbe/if_sriov.c \
src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.280 -r1.281 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/ixgbe/ixgbe_82598.c \
src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/ixgbe/ixgbe_api.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c \
src/sys/dev/pci/ixgbe/ixgbe_dcb_82599.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/ixgbe/ixgbe_mbx.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ixgbe/ixgbe_netmap.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_x540.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/ixgbe/ixgbe_x550.c
cvs rdiff -u -r1.158 -r1.159 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-04-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 30 06:41:36 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: if_bypass.c if_fdir.c if_sriov.c ixgbe_bypass.h
ixgbe_dcb.c ixgbe_dcb.h ixgbe_dcb_82598.c ixgbe_dcb_82599.c
ixgbe_dcb_82599.h ixgbe_fdir.h ixgbe_features.h ixgbe_netmap.c
ixgbe_netmap.h ixgbe_rss.h ixgbe_sriov.h ixgbe_x540.h ixgbe_x550.h

Log Message:
 Add NetBSD RCS IDs. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/if_bypass.c \
src/sys/dev/pci/ixgbe/ixgbe_dcb.h src/sys/dev/pci/ixgbe/ixgbe_dcb_82599.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ixgbe/if_fdir.c \
src/sys/dev/pci/ixgbe/ixgbe_sriov.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/ixgbe/if_sriov.c \
src/sys/dev/pci/ixgbe/ixgbe_dcb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe_bypass.h \
src/sys/dev/pci/ixgbe/ixgbe_netmap.h
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ixgbe/ixgbe_dcb_82598.c \
src/sys/dev/pci/ixgbe/ixgbe_dcb_82599.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/ixgbe/ixgbe_fdir.h \
src/sys/dev/pci/ixgbe/ixgbe_features.h \
src/sys/dev/pci/ixgbe/ixgbe_netmap.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/ixgbe_rss.h
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_x540.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/ixgbe/ixgbe_x550.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-03-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Mar 31 07:53:53 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixv.c

Log Message:
KNF a bit. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.279 -r1.280 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.157 -r1.158 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-03-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Mar 31 07:52:15 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
Modify error message to sync with ixgbe.c


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-03-11 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Mar 12 01:54:29 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Refactor rxr->next_to_check updating.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-03-11 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Fri Mar 12 01:53:36 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Remove extra unlock/lock processing around if_percpuq_enqueue().

same as if_wm.c:r1.700


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-03-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Mar 11 02:30:47 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
Add "TX " to "Queue No Descriptor Available" to make it more understandable.
Same as ixgbe.c rev. 1.278.


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-03-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Mar  8 07:10:45 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
 Use no_jmbuf evcnt for the failure case of ixgbe_getjcl().


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-03-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Mar  2 11:10:53 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Fix jcl's starvation case in ixgbe_rxeof() again.

 ix_txrx.c rev.1.64 preallocates jcl to prevent starvation but it's not
perfect. Don't use ixgbe_rx_discard() and just update the old descriptor
for reuse. It's also required for multiple descriptors case to refresh
subsequent descriptor(s). Reviewed by knakahara@.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-01-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan 20 06:53:17 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_vf.c

Log Message:
 The max number of queue(pair) is not 7 but 8. Inspired by DPDK.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ixgbe_vf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-01-18 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Jan 18 09:09:04 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
Fix ixg(4) Rx interrupt stall when Rx buffers are exhausted.

Current ixgbe_rxeof() implementation calls ixgbe_refresh_mbufs()(and
ixgbe_getjcl()) after ixgbe_rx_input()(and if_percpuq_enqueue()).
And ixg(4) uses its own m_ext structure.  That causes Rx interrupt
stall when Rx buffers are exhausted.  e.g. TCP iperf3 with large
windows size.  Furthermore, Rx descriptor problem has occurred
after stoppping the load.

To fix that problem, ixgbe_rxeof() must call ixgbe_getjcl() before
ixgbe_rx_input(), and must discard the new packet when ixgbe_getjcl()
fails.

By the way, ixg(4) should use MCLGET() instead of own m_ext structure.

ok'ed by msaitoh@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2021-01-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jan 14 05:47:35 UTC 2021

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Add "TX " to "Queue No Descriptor Available" to make it more understandable.


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 31 12:34:33 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
Reduce code duplication. No functional change.

   Add new ixgbe_intr_admin_common() and use it in both ixgbe_msix_admin()
  and ixgbe_legacy_irq().


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 26 06:27:38 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Copy & paste some missing part (flow director, ECC and temp sensor) from
ixgbe_msix_admin() to ixgbe_legacy_irq(). Now it's ready to make a new
function to share the common part. It'll be done in near future.


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 26 06:17:55 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Don't return in the middle of ixgbe_msix_admin() when an flow director reinit
failed. NetBSD currently doesn't support flow director, so this is not a real
bug.


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 26 06:10:17 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_type.h

Log Message:
Disable some interrupt in ixgbe_{legacy_irq,msix_admin}() to prevent log spam.


To generate a diff of this commit:
cvs rdiff -u -r1.273 -r1.274 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/ixgbe/ixgbe_type.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 26 06:07:16 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h ixgbe_type.h

Log Message:
Disable/enable the OTHER interrupts correctly.

 The OTHER interrupt was not blocked correctly when MSI-X is used.
ixgbe.c rev. 1.260 added new mutex to avoid the race but it didn't
disable the interrupt itself.

 Calling ixgbe_enable_intr() enables all interrupts, so it's not good to
call it when some interrupt sources should not be enabled (e.g.:
calling ixgbe_enable_intr() in ixgbe_handle_admin() enables queue
interrupt).

 IXGBE_REQUEST_TASK_NEED_ACKINTR doesn't work as expected because
ixgbe_handle_admin() can't know which task is enqueued from the
interrupt context and can't re-enable a specific EIMS bit.

 Solve the above three problems by the following two changes:

  - MSI-X: Disable the OTHER interrupts in the biginning of
ixgbe_msix_admin().

  - Set mask bits correctly at the end of ixgbe_legacy_irq() and
ixgbe_msix_admin() using with eim_orig, eims_enable and eims_disable.

  - Remove IXGBE_REQUEST_TASK_NEED_ACKINTR and add
IXGBE_REQUEST_TASK_{MOD,MSF}_WOI.


To generate a diff of this commit:
cvs rdiff -u -r1.272 -r1.273 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/ixgbe/ixgbe_type.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 26 06:02:42 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Check EICR's queue bit instead of IFF_RUNNING. This change fixes a bug that
it might incorrectly enable interrupt when IFF_RUNNING is not set. It also
changes that the TX/RX is not processed if a queue interrupt isn't occurred.


To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 26 06:01:22 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Don't use "more" flag for simplify in ixgbe_legacy_irq().
No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 24 22:36:43 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Simplify setting of EIAC register. No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 24 18:32:53 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix a bug that INTx is disabled if the INTx line is shared with other device.
ixgbe.c rev. 1.264 was not correct.

 Restore EIMS before return. To read ECIR, clearing EIMC is required for
an errata, so
0) save the original EIMS value
1) clear EIMS
2) read EICR
3) restore with the saved value.


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 24 15:51:33 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 The EICR register are cleared in the beginning of the ixgbe_legacy_irq(),
so it's not required to clear each bit later in the function.


To generate a diff of this commit:
cvs rdiff -u -r1.267 -r1.268 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 24 15:51:04 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 The EICR register's all OTHER interrupt bits are cleared in the beginning of
the ixgbe_msix_admin(), so it's not required to clear each bit later in the
function.


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 24 10:37:47 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Reorder some code to reduce diff between ixgbe_legacy_irq() and
ixgbe_msix_admin. No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.265 -r1.266 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 24 10:00:36 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
Add some debug printf()s and modify comments.


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 24 06:14:42 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Remove strange ixgbe_enable_intr() in ixgbe_legacy_irq().

 If the interface is UP and the INTx line is shared with other devices,
it result in enabling all interrupt sources even if some of them are
disabled for the workqueue. Delete ixgbe_enable_intr() in ixgbe_legacy_irq().


To generate a diff of this commit:
cvs rdiff -u -r1.263 -r1.264 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Dec 22 07:16:23 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Correctly ACK the fan failure interrupt in ixgbe_legacy_irq().


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-12-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Dec 11 05:01:19 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_type.h

Log Message:
 Don't use EIMC_OTHER bit because it's read only other than 82598.

 Documents say:

  82598:
 All of bit 31(OTHER bit) of EIxx are reserved. In reality, at least
EIMS_OTHER and EIMC_OTHER exist and the OTHER interrupt doesn't work
without EIMS_OTHER.

  Other than 82598:
 EIMS_OTHER is read only and EIMC_OTHER doesn't exist. If one of
bit 29..16 is set, EIMS_OTHER is set to 1 (Note that bit 30(TCP timer
isn't included)). Even if write bit 31 of EIMC to 1, it's ignored
(EIMS_OTHER doesn't set).

 We introduced new spin mutex in ixgbe.c rev. 1.260, so it's OK to remove
EIMC_OTHER stuff. We already set EIMS_OTHER in if_init(), so keep it for
82598. No functional change other than 82598.

 Another solution is to control bit 30..16 directly to mask/unmask interrupt
instead of the mutex.

TODO:
  Some MSI-X interrupt(LSC, module insertion/removal etc.)'s mask/unmask
  code between ixgbe_msix_admin() and ixgbe_handle_admin() may be wrong.
  It'll be fixed later.


To generate a diff of this commit:
cvs rdiff -u -r1.261 -r1.262 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/ixgbe/ixgbe_type.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Nov 30 07:53:42 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Apply ixgbe.c rev. 1.204 which was for ixgbe_msix_admin() to
ixgbe_legacy_irq(), too.

 >  An interrupt might not arrive when a module is inserted. When an link
 > status change interrupt occurred and the driver still regard SFP as
 > unplugged, issue the module softint before issuing LSC interrupt.

TODO: Reduce duplicated code.


To generate a diff of this commit:
cvs rdiff -u -r1.260 -r1.261 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-11-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Nov 30 05:30:56 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_vf.c

Log Message:
s/ we we / we /


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/ixgbe/ixgbe_vf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-11-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 19 02:23:24 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
 Add comment.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-11-16 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Nov 17 04:50:29 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
Add new spin mutex to avoid race between ixgbe_msix_admin() and 
ixgbe_handle_admin().

At first, it seems "IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_OTHER)"
cannot stop interrupts, because 31th bit is reserved for 82598, 82599,
X540 and X550.  So, the current following design
(1) ixgbe_msix_admin() disables interrupts
(2) ixgbe_msix_admin() calls workqueue_enqueue() for ixgbe_handle_admin()
(3) ixgbe_handle_admin() does interrupt processing
(4) after ixgbe_handle_admin() has done all interrupt processings,
ixgbe_handle_admin() enables interrupts
does not work correctly, that is, interrupts can be lost while
ixgbe_handle_admin() is running.

To fix that, add new spin mutex(adapter->admmin_mtx) which protects
atomically the following two members.
- adapter->admin_pending
- adapter->task_requests

The unnecessary "IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_OTHER)"
code will be removed later.

Reviewed and tested by hikaru@n.o and msaitoh@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Nov 13 05:53:36 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix a bug that some advertise speeds can't be set with hw.ixgN.advertise_speed
if both 2.5G and 5G are set. Fix the error message, too.


To generate a diff of this commit:
cvs rdiff -u -r1.258 -r1.259 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-11-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Nov 13 04:12:38 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_x540.c

Log Message:
Fix typo in a debug message.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/ixgbe/ixgbe_x540.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-09-07 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Sep  7 09:14:54 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
Fix race between ixgbe_msix_admin() and ixgbe_handle_admin(), pointed out by 
ozaki-r@n.o.

The race is caused by the following.
CPU#A processes workqueue, CPU#B processes admin interrupt.
(0) one of CPUs already calls ixgbe_schedule_admin_tasklet()
such as ixgbe_handle_timer()
(1) CPU#A: read adapter->task_requests
(2) CPU#B: set adapter->task_requests
(3) CPU#B: read(and try to set) adapter->admin_pending
   but adapter->admin_pending is set, so does not
   call workqueue_enqueue()
(4) CPU#A: clear adapter->admin_pending
that is, the tasks set by (2) is not processed as missfire workqueue by (3).


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-09-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Sep  7 05:50:58 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: if_fdir.c if_sriov.c ixgbe.c ixv.c

Log Message:
- Remove extra callout_stop() in ixgbe_detach(). Found by knakahara@.
- Rename ix{gbe,v}_free_workqueue() to ix{gbe,v}_free_deferred_handlers().
- Add KASSERT() to functions who are called from ixgbe_handle_admin().


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/ixgbe/if_fdir.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/ixgbe/if_sriov.c
cvs rdiff -u -r1.256 -r1.257 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.153 -r1.154 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-09-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Sep  7 04:15:12 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
__predict_false() should be __predict_true() for adapter->osdep.detaching
== false check.


To generate a diff of this commit:
cvs rdiff -u -r1.255 -r1.256 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-09-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Sep  7 03:57:28 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Don't schedule admin work while shutdown like the recovery mode timer.

 The admin workqueue also runs while !IFF_UP like the recovery mode timer.
Apply the same change of ixgbe.c 1.254 to ixgbe_schedule_admin_tasklet()
to prevent panic. Found by ozaki-r@.


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep  1 04:19:16 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_osdep.h

Log Message:
 Fix a panic on shutdown on a machine which use the recovery mode timer.

 The recovery mode timer is first issued by the callout and it schedule
the workqueue. The workqueue then reschedule the callout. It's hard to
stop both of them without race only with callout_stop() and workqueue_wait.
To solve this problem. add new "detaching" flag and use it.

 The situation is almost the same as schedule_wqs_ok for the local_timer's
callout and workqueue, but the difference is that the local_timer isn't
required to run if the interface is not up. If it's not important to prevent
running timer while !IFF_UP, the flag can be integrated into one.


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/ixgbe/ixgbe_osdep.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Sep  1 04:06:56 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Call ixgbe_ifstop() instead of ixgbe_stop_locked() in
ixgbe_setup_low_power_mode() to stop the timer workqueue.


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.253 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 31 14:12:50 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_common.c ixv.c

Log Message:
 Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.152 -r1.153 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 31 11:19:54 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h ixgbe_common.c ixgbe_phy.c
ixgbe_phy.h ixgbe_type.h

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/ixgbe/ixgbe_phy.h
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/ixgbe/ixgbe_type.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 31 06:23:19 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-30 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 31 06:20:06 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_phy.c

Log Message:
 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.


To generate a diff of this commit:
cvs rdiff -u -r1.248 -r1.249 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/ixgbe/ixgbe_phy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 27 04:54:43 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
Limit MA10-ST0's quirk only for on-chip devices.


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 27 04:49:52 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix compile error.


To generate a diff of this commit:
cvs rdiff -u -r1.246 -r1.247 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 27 03:57:52 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_common.c

Log Message:
Minor change.

 - Print "X550EM X" instead of "X550EM" for Xeon D devices.
 - Fix typo in comment. Same as FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/ixgbe/ixgbe_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-26 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 27 00:07:56 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
 ADD SFP+ MOD_ABS inversion quirk.

 On X550 EM, GPIO(SDP) and SFP+'s MOD_ABS is directly connected. It has
no inverter. GIGABYTE MA10-ST0 has a inverter, so add new quirk for it.


To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 19:03:28 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix handling of IXGBE_REQUEST_TASK_NEED_ACKINTR again...


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:42:17 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 The admin workqueue can be used even if the interface is not up.
OK'd by thorpej@. Will fixes PR#55534 reported by Shinichi Doyashiki


To generate a diff of this commit:
cvs rdiff -u -r1.242 -r1.243 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:31:15 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix ixgbe_sfp_cage_full() on X550EM_A.

In ixgbe_handle_mod():

switch (hw->mac.type) {
case ixgbe_mac_82599EB:
cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &
IXGBE_ESDP_SDP2;
break;
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
cage_full = IXGBE_READ_REG(hw, IXGBE_ESDP) &
IXGBE_ESDP_SDP0;
break;
default:
break;
}

so I had thought that IXGBE_ESDP_SDP0 bit is 1 on cage is full.
In reality, at least, X550EM_A's SFP+ cage is 0 on cage is full.
So invert the logic of ixgbe_sfp_cage_full() on X550EM_A


To generate a diff of this commit:
cvs rdiff -u -r1.241 -r1.242 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:21:59 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix race in ixgbe_detach() to prevent panic on shutdown.


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 24 18:16:04 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix handling of IXGBE_REQUEST_TASK_NEED_ACKINTR in ixgbe_handle_admin().


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 17 08:23:30 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Simplify SFP+ check. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.238 -r1.239 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 17 07:59:06 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
 Re-enabling interrupt is required only when a work is scheduled form the
interrput context.


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.238 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 17 07:26:55 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
Fix a bug that the driver sometimes missed module insertion.

 The ixgbe_sfp_probe() function was only for 82598 and other chips had no
way to poll SFP+ cage. The ixgbe_handle_mod() already has function to treat
module insertion/removal for all chips, so enqueue the work if the cage
status changed. All of ixgbe chips' SFP+ module interrupt is only on the
inserstion. This change also detect the removal by the timer.


To generate a diff of this commit:
cvs rdiff -u -r1.236 -r1.237 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-16 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Aug 17 06:30:25 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Add missing workqueue_wait() for the recovery_mode_timer workqueue.


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 13 08:42:18 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Set recovery_mode_timer workqueue's name correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Aug 13 08:38:50 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Use atomic_cas_uint() and atomic_store_relaxed(). Advised by thorpej@.
Tested by me. OK'd by knakahara.


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.151 -r1.152 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-08-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug 12 09:13:46 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: if_bypass.c

Log Message:
Fix checking return value of atomic_cas_uint().

This change fixes a bug that extra delay() is called only once even if
atomic_cas_uint() isn't failed or delay() isn't called when atomic_cas_uint()
failed.

The reason of this bug was that I simply converted FreeBSD' atomic_cmpset_int()
to atomic_cas_uint(). The return value's semantics is different.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/ixgbe/if_bypass.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-25 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 25 07:53:02 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: if_sriov.c ixgbe.c ixgbe.h ixgbe_netbsd.c
ixgbe_osdep.h ixv.c

Log Message:
Reduce ixgbe's busy loop using with workqueue and kpause.

- Use workqueue instead of softint to make some functions sleepable.
- Use new workqueue and enqueue it in ixgbe_local_timer() and
  ixgbe_recovery_mode_timer() to make them sleepable.
- Make new ixgbe_delay() and use it. This functions sleeps if the time is
  more than equals 1 tick. If it's not, do delay().


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/ixgbe/if_sriov.c
cvs rdiff -u -r1.232 -r1.233 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.150 -r1.151 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-24 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 25 06:45:10 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_82598.c

Log Message:
 Use unsigned to avoid undefined behavior in ixgbe_fc_enable_generic().
Same as ixgbe_common.c rev. 1.24. Found by KUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe_82598.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-22 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jun 23 05:50:01 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
 KNF. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 18 09:00:11 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
Modify a liitle to reduce diff between ixgbe.c and ixv.c. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.231 -r1.232 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.149 -r1.150 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jun 17 09:11:13 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
Add missing callout_stop() for recovery_mode_timer.

NOTE: One of the difference between the local_timer and recovery_mode_timer
is that local_timer runs only when IFF_UP and recovery_mode_timer always runs
(it's enabled on attach).


To generate a diff of this commit:
cvs rdiff -u -r1.230 -r1.231 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Jun 12 09:28:48 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
-  Remove extra kpreempt_disable() -> kpreempt_enable() because
  ixgbe_handle_msf() was changed from softint to workqueue.
- Set schedule_wqs_ok before enabling interrupt to prevent the race.
- Fix comment.


To generate a diff of this commit:
cvs rdiff -u -r1.229 -r1.230 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 11 09:16:05 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Fix typo. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.229 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.148 -r1.149 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-06-10 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Jun 11 05:16:22 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_osdep.h

Log Message:
 Fix IXGBE_LE32_TO_CPUS() macro for big endian machine. This problem was
only on X550*. Not tested on big endian machine.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ixgbe_osdep.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-04-16 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 17 02:21:25 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe_netbsd.c ixgbe_phy.c
ixv.c

Log Message:
No functional change:
 - modify comment
 - whitespace fix


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.227 -r1.228 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.147 -r1.148 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-02-05 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Feb  6 06:28:49 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
Ensure we don't call workqueue_enqueue() if the pluggable optics
handler is already pending.


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  5 10:07:47 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
 Modify note in ixv_update_stats(). VF doesn't count errors by hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-02-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  5 09:47:16 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_vf.c ixgbe_x550.c

Log Message:
No functional change:

 - Fix typos.
 - Remove extra newline.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/ixgbe/ixgbe_vf.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_x550.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-02-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  5 07:45:46 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_common.c

Log Message:
No functional change:

 - Add debug printf()s.
 - Remove unused macros.
 - Remove extra newline.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.224 -r1.225 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/ixgbe/ixgbe_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-02-04 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb  5 01:44:53 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Update comment in ixgbe_update_stats_counters() to clarify why we update
if_iqdrops and if_ierrors only. No functional change.
OK'd by knakahara and thorpej.


To generate a diff of this commit:
cvs rdiff -u -r1.223 -r1.224 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-02-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Feb  4 19:42:56 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
- Fix locking problem with optics module interrupts: ifmedia_add()
  may block on memory allocation, and so it cannot be safely done from
  a softint nor can it be done while holding a spin lock.  Fix this by
  using a workqueue rather than a softint, and hold the IFNET_LOCK
  across the entire handler, and the CORE_LOCK only across the code that
  needs to serialize access to the hardware state.
- Use ifmedia_fini().

Tested in a variety of devices by msaitoh@.  (Thanks!)


To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-02-01 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Feb  1 12:55:23 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
Adopt .

XXX This driver needs some work in this regard (practually no
stats are reported).


To generate a diff of this commit:
cvs rdiff -u -r1.221 -r1.222 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-01-31 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Feb  1 02:33:09 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_netbsd.c

Log Message:
Use atomic_load_acquire for FreeBSDish atomic_load_acq_uint shim.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-01-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Jan 21 14:55:55 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixgbe_netbsd.c ixv.c

Log Message:
 Fix the freeing code for some error paths. Found and tested by Patrick Welche.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.220 -r1.221 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c
cvs rdiff -u -r1.143 -r1.144 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-01-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jan 20 07:19:04 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.h ixgbe_netbsd.c

Log Message:
 Free jumbo mem structure correctly. Found by yamaguchi@ using with LOCKDEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2020-01-03 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Jan  3 12:59:46 UTC 2020

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_82598.c ixgbe_api.c

Log Message:
Fix some typos in comments.

>From vezhlys on freenode IRC.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_82598.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_api.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2019-12-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 23 09:36:18 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_82598.c ixgbe_82599.c ixgbe_phy.c
ixgbe_type.h ixgbe_x550.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ixgbe_82598.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/ixgbe/ixgbe_82599.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/ixgbe/ixgbe_x550.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2019-12-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 23 09:19:40 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Add missing core lock in ixgbe_handle_mod().


To generate a diff of this commit:
cvs rdiff -u -r1.217 -r1.218 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2019-12-16 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Tue Dec 17 05:49:01 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_osdep.c ixgbe_osdep.h ixv.c

Log Message:
 Use bus_space_barrier() instead of x86 specific *fence instruction.
Written by riastradh@.


To generate a diff of this commit:
cvs rdiff -u -r1.216 -r1.217 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.142 -r1.143 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2019-12-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 16 02:50:54 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: if_bypass.c ix_txrx.c ixgbe.h ixgbe_common.c
ixgbe_osdep.c ixgbe_osdep.h ixgbe_phy.c ixv.c

Log Message:
No functional change:

 - Remove unused code.
 - Remove extra spaces.
 - KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/if_bypass.c \
src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.141 -r1.142 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2019-05-09 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri May 10 02:56:08 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix typo. This code is not used yet.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2019-03-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Mar 15 02:38:20 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
- Simplily. Suggested by knakahara.
- Modify comment. Per queue VLAN enable flags is on 82599 and later.
- Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/pci/ixgbe/ixv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   3   4   >