freebsd-skq/sys/pci
Marius Strobl b4b958792b o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping
operation as it ran out of free descriptors or if there are too many
  segments in the first place, call bus_dmamap_unload() in order to
  unload the already loaded segments.
  For trying to map the defragmented mbuf (chain) in re_encap() this
  introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new
  failure mode. Previously we just ignored this case, corrupting our
  view of the TX ring.
o In re_txeof():
  - Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX
    descriptors. Further down the road re_encap() will bail if there
    aren't at least 4 free TX descriptors, causing re_start() to
    abort and prepend the dequeued mbuf again so it makes no sense
    to pretend we could process mbufs again when in fact we won't.
    While at it replace this magic 4 with a macro RL_TX_DESC_THLD
    throughout this driver.
  - Don't cancel the watchdog timeout as soon as there's at least one
    free TX descriptor but instead only if all descriptors have been
    handled. It's perfectly normal, especially in the DEVICE_POLLING
    case, that re_txeof() is called when only a part of the enqueued
    TX descriptors have been handled, causing the watchdog to be
    disarmed prematurely.
o In re_encap():
  - If m_defrag() fails just drop the packet like other NIC drivers
    do. This should only happen when there's a mbuf shortage, in which
    case it was possible to end up with an IFQ full of packets which
    couldn't be processed as they couldn't be defragmented as they
    were taking up all the mbufs themselves. This includes adjusting
    re_start() to not trying to prepend the mbuf (chain) if re_encap()
    has freed it.
  - Remove dupe initialization of members of struct rl_dmaload_arg to
    values that didn't change since trying to process the fragmented
    mbuf chain.
    While at it remove an unused member from struct rl_dmaload_arg.
o In re_start() remove a abandoned, banal comment. The corresponding
  code was moved to re_attach() some time ago.

With these changes re(4) now survives one day (until stopped) of
hammering out packets here.

Reviewed by:	yongari
MFC after:	2 weeks
2007-01-16 20:35:23 +00:00
..
agp_ali.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp_amd64.c Fix style(9) nits. 2006-10-09 20:26:32 +00:00
agp_amd.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp_ati.c Add support for another ATI IGP 340M (RS200M) AGP bridge. 2006-09-01 02:22:17 +00:00
agp_i810.c Add support for 945G/GM AGP chipsets. 2006-09-27 06:38:54 +00:00
agp_if.m /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
agp_intel.c Restore agp aperture size after resume, in case it is modified after boot. 2007-01-06 08:31:31 +00:00
agp_nvidia.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp_sis.c Move SiS 760 to where it belongs. 2006-05-30 18:41:26 +00:00
agp_via.c Change the various AGP drivers that attach to the Host-PCI bridge device to 2005-12-20 21:12:26 +00:00
agp.c The page queues lock is no longer required by vm_page_busy() or 2006-10-22 21:18:48 +00:00
agppriv.h
agpreg.h - Clean up Aperture Access Global Enable (APEN) bit access. 2007-01-05 22:55:19 +00:00
agpvar.h Don't map the AGP aperture into contiguous KVA. The various graphics 2005-12-20 20:05:21 +00:00
alpm.c Various updates to most of the smbus(4) drivers: 2007-01-11 19:56:24 +00:00
amdpm.c Various updates to most of the smbus(4) drivers: 2007-01-11 19:56:24 +00:00
amdsmb.c Various updates to most of the smbus(4) drivers: 2007-01-11 19:56:24 +00:00
if_mn.c Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
if_pcn.c - Allow multiple (external) PHYs with Am79C97{2,6}, which actually 2007-01-13 17:18:44 +00:00
if_pcnreg.h - Clear the PCN_MISC_ASEL bit so the media port can be actually set 2006-11-28 01:33:17 +00:00
if_rl.c Don't assume IF_LLADDR returns aligned memory address. 2006-12-18 01:38:10 +00:00
if_rlreg.h o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping 2007-01-16 20:35:23 +00:00
if_sf.c Consistently use if_printf() only in interface methods: if_start, 2006-09-15 10:40:54 +00:00
if_sfreg.h Whitespace nits. 2006-09-15 11:01:23 +00:00
if_sis.c Remove <sys/types.h>; including both <sys/param.h> and <sys/types.h> 2006-11-02 00:05:15 +00:00
if_sisreg.h Consistently use if_printf() only in interface methods: if_start, 2006-09-15 10:40:54 +00:00
if_ste.c Consistently use if_printf() only in interface methods: if_start, 2006-09-15 10:40:54 +00:00
if_stereg.h Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
if_tl.c Consistently use if_printf() only in interface methods: if_start, 2006-09-15 10:40:54 +00:00
if_tlreg.h Whitespace nits. 2006-09-15 11:01:23 +00:00
if_vr.c Consistently use if_printf() only in interface methods: if_start, 2006-09-15 10:40:54 +00:00
if_vrreg.h Whitespace nits. 2006-09-15 11:01:23 +00:00
if_wb.c Consistently use if_printf() only in interface methods: if_start, 2006-09-15 10:40:54 +00:00
if_wbreg.h Whitespace nits. 2006-09-15 11:01:23 +00:00
if_xl.c - Revert the parts of the previous revision which reloaded the watchdog 2006-12-08 03:18:16 +00:00
if_xlreg.h - Use the xl_stats_update() callout instead of if_slowtimo() for 2006-12-06 02:18:41 +00:00
intpm.c Remove duplicate variable initialization. 2007-01-16 17:01:42 +00:00
intpmreg.h Various updates to most of the smbus(4) drivers: 2007-01-11 19:56:24 +00:00
locate.pl
ncr.c 2nd and final commit that moves us to CAM_NEW_TRAN_CODE 2006-11-02 00:54:38 +00:00
ncrreg.h Fix typos from previous commit. 2005-01-07 05:01:24 +00:00
nfsmb.c Various updates to most of the smbus(4) drivers: 2007-01-11 19:56:24 +00:00
viapm.c Various updates to most of the smbus(4) drivers: 2007-01-11 19:56:24 +00:00
xrpu.c Return BUS_PROBE_DEFAULT instead of 0. 2005-02-24 21:32:56 +00:00