diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2024-08-12 06:47:12 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2024-08-12 06:47:12 +0000 |
commit | c53119f1f03b13288f37692bd176b6273dfae713 (patch) | |
tree | 229ad25a57d6e5365c403b4dbc559b0b95ad291f /sys/dev/ic | |
parent | 2cf697b5925f6e50d70bc0cb4d044dfb2c0ff085 (diff) |
try harder to leave a gap on the tx ring.
i think before this change we could overwrite entries on the ring,
which can confuse the chip and the tx completion code. i think.
it's funny how much a comparison hurts my brain.
ok patrick@
tested by and ok kevlo@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/re.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 29074188922..a8967f686df 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.217 2024/01/19 03:46:14 dlg Exp $ */ +/* $OpenBSD: re.c,v 1.218 2024/08/12 06:47:11 dlg Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1834,7 +1834,7 @@ re_start(struct ifqueue *ifq) free -= idx; for (;;) { - if (sc->rl_ldata.rl_tx_ndescs >= free + 2) { + if (free < sc->rl_ldata.rl_tx_ndescs + 2) { ifq_set_oactive(ifq); break; } |