Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/dwc2/dist Fixup previous to not break ping ...



details:   https://anonhg.NetBSD.org/src/rev/379aa8ead10a
branches:  trunk
changeset: 363785:379aa8ead10a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Aug 12 09:59:30 2018 +0000

description:
Fixup previous to not break ping protocol.  My bad.

diffstat:

 sys/external/bsd/dwc2/dist/dwc2_hcdintr.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 1e6f77dbffeb -r 379aa8ead10a sys/external/bsd/dwc2/dist/dwc2_hcdintr.c
--- a/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Sun Aug 12 09:29:16 2018 +0000
+++ b/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Sun Aug 12 09:59:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2_hcdintr.c,v 1.14 2018/08/08 07:20:44 simonb Exp $ */
+/*     $NetBSD: dwc2_hcdintr.c,v 1.15 2018/08/12 09:59:30 skrll Exp $  */
 
 /*
  * hcd_intr.c - DesignWare HS OTG Controller host-mode interrupt handling
@@ -40,7 +40,7 @@
  * This file contains the interrupt handlers for Host mode
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdintr.c,v 1.14 2018/08/08 07:20:44 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdintr.c,v 1.15 2018/08/12 09:59:30 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/pool.h>
@@ -67,6 +67,9 @@
 #define DWC2_NAKS_BEFORE_DELAY         3
 int dwc2_naks_before_delay = DWC2_NAKS_BEFORE_DELAY;
 
+#define DWC2_OUT_NAKS_BEFORE_DELAY     1
+int dwc2_out_naks_before_delay = DWC2_OUT_NAKS_BEFORE_DELAY;
+
 /* This function is for debug only */
 static void dwc2_track_missed_sofs(struct dwc2_hsotg *hsotg)
 {
@@ -1320,8 +1323,10 @@
                        /*
                         * Avoid interrupt storms.
                         */
-                       qtd->qh->want_wait = 1;
-               } else if (!chan->qh->ping_state) {
+                       qtd->num_naks++;
+                       qtd->qh->want_wait = qtd->num_naks >= dwc2_out_naks_before_delay;
+               }
+               if (!chan->qh->ping_state) {
                        dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb,
                                                  qtd, DWC2_HC_XFER_NAK);
                        dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);



Home | Main Index | Thread Index | Old Index