Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-8] src/sys/dev/pci



Module Name:    src
Committed By:   martin
Date:           Sat Dec  8 12:10:22 UTC 2018

Modified Files:
        src/sys/dev/pci [netbsd-8]: if_bge.c if_bgereg.h if_bgevar.h

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1130):

        sys/dev/pci/if_bge.c: revision 1.320
        sys/dev/pci/if_bgevar.h: revision 1.24
        sys/dev/pci/if_bge.c: revision 1.317
        sys/dev/pci/if_bgereg.h: revision 1.94

More TSO4 fixes, from the freebsd driver:
- the chip doens't want the lenght of options, but the complete lenght of
  ip headers (ip + tcp + options). Fix this for the BGE_IS_5717_PLUS()
  and BGE_IS_5705_PLUS() cases; FreeBSD doens't cover the last case so
  leave it as is for now. This fixes checksum failures for heavy transfers.
- It looks like the transmit engine hangs if the TCP segment crosses a 4GB
  boundary. FreeBSD fixes it by mapping everything below 4GB; instead
  try detect when this happens and do the bounce only when needed.

With these fixes I could transfers 3GB images over ftp at gigabit speed
(112MB/s with wget) without problems. Tested on a
bge0 at pci4 dev 0 function 0: Broadcom BCM5720 Gigabit Ethernet
bge0: APE firmware NCSI 1.4.22.0
bge0: interrupting at msi1 vec 0
bge0: HW config 002b1194, 00006014, 0002aa38, 00000000 0000000c
bge0: ASIC BCM5720 A0 (0x5720000), Ethernet address d0:94:66:8b:9c:18
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5720C 1000BASE-T media interface, rev. 0

 -

Don't destroy the dma maps if we're not disabling the adapter, avoids
a KASSERT() when bus_dmamap_destroy() is called from interrupt
context via bge_watchdog()

Set IFF_OACTIVE only when bge_encap() fails on adapter ressource shortage.
Otherwise we may set IFF_OACTIVE while no transmit is in progress, and
nothing will clear it.

If bus_dmamap_load_mbuf() fails with EFBIG, m_defrag() the chain and retry.
Refine the check for the 4GB boundary workaround (a fragment should also
not cross the boundary), and do it only for TSO.

If bge_encap() fails and didn't set IFF_OACTIVE, drop the packet.

Bring in more hardware bug workarounds from freebsd.

With these it seems that a BCM5720 A0 can survive a few hours of internet
load with TSO4 enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.310.2.3 -r1.310.2.4 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.93 -r1.93.4.1 src/sys/dev/pci/if_bgereg.h
cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/dev/pci/if_bgevar.h

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




Home | Main Index | Thread Index | Old Index