Module Name: src Committed By: skrll Date: Mon Nov 24 10:14:15 UTC 2014
Modified Files: src/sys/external/bsd/dwc2/dist: dwc2_hcd.c dwc2_hcdintr.c Log Message: Simplify the NAK holdoff change. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/dwc2/dist/dwc2_hcd.c cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/dwc2/dist/dwc2_hcd.c diff -u src/sys/external/bsd/dwc2/dist/dwc2_hcd.c:1.14 src/sys/external/bsd/dwc2/dist/dwc2_hcd.c:1.15 --- src/sys/external/bsd/dwc2/dist/dwc2_hcd.c:1.14 Wed Sep 3 10:00:08 2014 +++ src/sys/external/bsd/dwc2/dist/dwc2_hcd.c Mon Nov 24 10:14:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2_hcd.c,v 1.14 2014/09/03 10:00:08 skrll Exp $ */ +/* $NetBSD: dwc2_hcd.c,v 1.15 2014/11/24 10:14:14 skrll Exp $ */ /* * hcd.c - DesignWare HS OTG Controller host-mode routines @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.14 2014/09/03 10:00:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.15 2014/11/24 10:14:14 skrll Exp $"); #include <sys/types.h> #include <sys/kmem.h> @@ -894,8 +894,7 @@ enum dwc2_transaction_type dwc2_hcd_sele * retransmissions to reduce NAK interrupt overhead for * cheeky devices that just hold off using NAKs. */ - if (qh->do_split && - qh->nak_frame != 0xffff && + if (qh->nak_frame != 0xffff && dwc2_full_frame_num(qh->nak_frame) == dwc2_full_frame_num(dwc2_hcd_get_frame_number(hsotg))) { qh_ptr = qh_ptr->next; Index: src/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c diff -u src/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c:1.10 src/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c:1.11 --- src/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c:1.10 Wed Sep 3 10:00:08 2014 +++ src/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Mon Nov 24 10:14:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2_hcdintr.c,v 1.10 2014/09/03 10:00:08 skrll Exp $ */ +/* $NetBSD: dwc2_hcdintr.c,v 1.11 2014/11/24 10:14:14 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.10 2014/09/03 10:00:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdintr.c,v 1.11 2014/11/24 10:14:14 skrll Exp $"); #include <sys/types.h> #include <sys/pool.h> @@ -1211,21 +1211,21 @@ static void dwc2_hc_nak_intr(struct dwc2 chnum); /* - * When we get control/bulk NAKs then remember this so we holdoff on - * this qh until the beginning of the next frame - */ - switch (dwc2_hcd_get_pipe_type(&qtd->urb->pipe_info)) { - case USB_ENDPOINT_XFER_CONTROL: - case USB_ENDPOINT_XFER_BULK: - chan->qh->nak_frame = dwc2_hcd_get_frame_number(hsotg); - break; - } - - /* * Handle NAK for IN/OUT SSPLIT/CSPLIT transfers, bulk, control, and * interrupt. Re-start the SSPLIT transfer. */ if (chan->do_split) { + /* + * When we get control/bulk NAKs then remember this so we holdoff on + * this qh until the beginning of the next frame + */ + switch (dwc2_hcd_get_pipe_type(&qtd->urb->pipe_info)) { + case USB_ENDPOINT_XFER_CONTROL: + case USB_ENDPOINT_XFER_BULK: + chan->qh->nak_frame = dwc2_hcd_get_frame_number(hsotg); + break; + } + if (chan->complete_split) qtd->error_count = 0; qtd->complete_split = 0;