Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci set/clear IFF_OACTIVE flag only on txring 0



details:   https://anonhg.NetBSD.org/src/rev/fc3c5d695a20
branches:  trunk
changeset: 1006474:fc3c5d695a20
user:      ryo <ryo%NetBSD.org@localhost>
date:      Fri Jan 17 05:11:04 2020 +0000

description:
set/clear IFF_OACTIVE flag only on txring 0

diffstat:

 sys/dev/pci/if_aq.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 2632aab9fd23 -r fc3c5d695a20 sys/dev/pci/if_aq.c
--- a/sys/dev/pci/if_aq.c       Fri Jan 17 04:48:21 2020 +0000
+++ b/sys/dev/pci/if_aq.c       Fri Jan 17 05:11:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aq.c,v 1.1 2020/01/01 10:11:21 ryo Exp $    */
+/*     $NetBSD: if_aq.c,v 1.2 2020/01/17 05:11:04 ryo Exp $    */
 
 /**
  * aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.1 2020/01/01 10:11:21 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.2 2020/01/17 05:11:04 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_if_aq.h"
@@ -4362,7 +4362,7 @@
                        /* too many mbuf chains? or not enough descriptors? */
                        m_freem(m);
                        ifp->if_oerrors++;
-                       if (error == ENOBUFS)
+                       if (txring->txr_index == 0 && error == ENOBUFS)
                                ifp->if_flags |= IFF_OACTIVE;
                        break;
                }
@@ -4375,7 +4375,7 @@
                bpf_mtap(ifp, m, BPF_D_OUT);
        }
 
-       if (!is_transmit && txring->txr_nfree < AQ_TXD_MIN)
+       if (txring->txr_index == 0 && txring->txr_nfree < AQ_TXD_MIN)
                ifp->if_flags |= IFF_OACTIVE;
 
        if (npkt)



Home | Main Index | Thread Index | Old Index