CVSROOT: /cvs Module name: src Changes by: jmatt...@cvs.openbsd.org 2016/05/05 21:26:38
Modified files: sys/dev/pci : Tag: OPENBSD_5_9 if_bnx.c Log message: r1.10 of if_bnx.c effectively removed the limit on the number of segments in the tx dma maps, apparently to allow heavily fragmented packets to be sent. The tx ring accounting in bnx_start assumed that the longest fragment chain we'd see was BNX_MAX_SEGMENTS, so sending a heavily fragmented packet when the ring was already full could cause it to overflow. In the 10 years since r1.10, we've started defragmenting packets if they won't fit in the dma map, so we can limit the maps to BNX_MAX_SEGMENTS again. While we're here, ensure there's always at least one slot on the tx ring free, for consistency between drivers. Fixes packet corruption seen by otto@ ok mpi@ dlg@