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 Resolve conflicts.
details: https://anonhg.NetBSD.org/src/rev/c75e9ed88b65
branches: trunk
changeset: 791585:c75e9ed88b65
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Nov 24 12:25:19 2013 +0000
description:
Resolve conflicts.
diffstat:
sys/external/bsd/dwc2/dist/dwc2_hcd.c | 8 +-
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c | 21 +++---
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c | 92 ++++++++++-------------------
3 files changed, 45 insertions(+), 76 deletions(-)
diffs (225 lines):
diff -r 5ece894d5abc -r c75e9ed88b65 sys/external/bsd/dwc2/dist/dwc2_hcd.c
--- a/sys/external/bsd/dwc2/dist/dwc2_hcd.c Sun Nov 24 08:17:50 2013 +0000
+++ b/sys/external/bsd/dwc2/dist/dwc2_hcd.c Sun Nov 24 12:25:19 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2_hcd.c,v 1.8 2013/11/14 12:41:46 skrll Exp $ */
+/* $NetBSD: dwc2_hcd.c,v 1.9 2013/11/24 12:25:19 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.8 2013/11/14 12:41:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.9 2013/11/24 12:25:19 skrll Exp $");
#include <sys/types.h>
#include <sys/kmem.h>
@@ -778,8 +778,8 @@
chan->data_pid_start = qh->data_toggle;
chan->multi_count = 1;
- if ((urb->actual_length < 0 || urb->actual_length > urb->length) &&
- !dwc2_hcd_is_pipe_in(&urb->pipe_info))
+ if (urb->actual_length > urb->length &&
+ !dwc2_hcd_is_pipe_in(&urb->pipe_info))
urb->actual_length = urb->length;
chan->xfer_len = urb->length - urb->actual_length;
diff -r 5ece894d5abc -r c75e9ed88b65 sys/external/bsd/dwc2/dist/dwc2_hcdintr.c
--- a/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Sun Nov 24 08:17:50 2013 +0000
+++ b/sys/external/bsd/dwc2/dist/dwc2_hcdintr.c Sun Nov 24 12:25:19 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2_hcdintr.c,v 1.5 2013/10/05 06:51:43 skrll Exp $ */
+/* $NetBSD: dwc2_hcdintr.c,v 1.6 2013/11/24 12:25:19 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.5 2013/10/05 06:51:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdintr.c,v 1.6 2013/11/24 12:25:19 skrll Exp $");
#include <sys/types.h>
#include <sys/pool.h>
@@ -1938,23 +1938,22 @@
chan = hsotg->hc_ptr_array[chnum];
- if (dbg_hc(chan))
- dev_vdbg(hsotg->dev, "--Host Channel Interrupt--, Channel %d\n",
- chnum);
-
hcint = DWC2_READ_4(hsotg, HCINT(chnum));
hcintmsk = DWC2_READ_4(hsotg, HCINTMSK(chnum));
- if (dbg_hc(chan))
- dev_vdbg(hsotg->dev,
- " hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x\n",
- hcint, hcintmsk, hcint & hcintmsk);
-
if (!chan) {
dev_err(hsotg->dev, "## hc_ptr_array for channel is NULL ##\n");
DWC2_WRITE_4(hsotg, HCINT(chnum), hcint);
return;
}
+ if (dbg_hc(chan)) {
+ dev_vdbg(hsotg->dev, "--Host Channel Interrupt--, Channel %d\n",
+ chnum);
+ dev_vdbg(hsotg->dev,
+ " hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x\n",
+ hcint, hcintmsk, hcint & hcintmsk);
+ }
+
DWC2_WRITE_4(hsotg, HCINT(chnum), hcint);
chan->hcint = hcint;
hcint &= hcintmsk;
diff -r 5ece894d5abc -r c75e9ed88b65 sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c
--- a/sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c Sun Nov 24 08:17:50 2013 +0000
+++ b/sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c Sun Nov 24 12:25:19 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2_hcdqueue.c,v 1.5 2013/11/14 12:40:51 skrll Exp $ */
+/* $NetBSD: dwc2_hcdqueue.c,v 1.6 2013/11/24 12:25:19 skrll Exp $ */
/*
* hcd_queue.c - DesignWare HS OTG Controller host queuing routines
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdqueue.c,v 1.5 2013/11/14 12:40:51 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_hcdqueue.c,v 1.6 2013/11/24 12:25:19 skrll Exp $");
#include <sys/types.h>
#include <sys/kmem.h>
@@ -354,25 +354,17 @@
static int dwc2_find_single_uframe(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
{
unsigned short utime = qh->usecs;
- int done = 0;
- int i = 0;
- int ret = -1;
+ int i;
- while (!done) {
+ for (i = 0; i < 8; i++) {
/* At the start hsotg->frame_usecs[i] = max_uframe_usecs[i] */
if (utime <= hsotg->frame_usecs[i]) {
hsotg->frame_usecs[i] -= utime;
qh->frame_usecs[i] += utime;
- ret = i;
- done = 1;
- } else {
- i++;
- if (i == 8)
- done = 1;
+ return i;
}
}
-
- return ret;
+ return -1;
}
/*
@@ -382,21 +374,14 @@
{
unsigned short utime = qh->usecs;
unsigned short xtime;
- int t_left = utime;
- int done = 0;
- int i = 0;
+ int t_left;
+ int i;
int j;
- int ret = -1;
+ int k;
- while (!done) {
- if (hsotg->frame_usecs[i] <= 0) {
- i++;
- if (i == 8) {
- ret = -1;
- done = 1;
- }
+ for (i = 0; i < 8; i++) {
+ if (hsotg->frame_usecs[i] <= 0)
continue;
- }
/*
* we need n consecutive slots so use j as a start slot
@@ -410,50 +395,35 @@
*/
if (xtime + hsotg->frame_usecs[j] < utime) {
if (hsotg->frame_usecs[j] <
- max_uframe_usecs[j]) {
- ret = -1;
- break;
- }
+ max_uframe_usecs[j])
+ continue;
}
if (xtime >= utime) {
- ret = i;
- break;
+ t_left = utime;
+ for (k = i; k < 8; k++) {
+ t_left -= hsotg->frame_usecs[k];
+ if (t_left <= 0) {
+ qh->frame_usecs[k] +=
+ hsotg->frame_usecs[k]
+ + t_left;
+ hsotg->frame_usecs[k] = -t_left;
+ return i;
+ } else {
+ qh->frame_usecs[k] +=
+ hsotg->frame_usecs[k];
+ hsotg->frame_usecs[k] = 0;
+ }
+ }
}
/* add the frame time to x time */
xtime += hsotg->frame_usecs[j];
/* we must have a fully available next frame or break */
if (xtime < utime &&
- hsotg->frame_usecs[j] == max_uframe_usecs[j]) {
- ret = -1;
- break;
- }
- }
- if (ret >= 0) {
- t_left = utime;
- for (j = i; t_left > 0 && j < 8; j++) {
- t_left -= hsotg->frame_usecs[j];
- if (t_left <= 0) {
- qh->frame_usecs[j] +=
- hsotg->frame_usecs[j] + t_left;
- hsotg->frame_usecs[j] = -t_left;
- ret = i;
- done = 1;
- } else {
- qh->frame_usecs[j] +=
- hsotg->frame_usecs[j];
- hsotg->frame_usecs[j] = 0;
- }
- }
- } else {
- i++;
- if (i == 8) {
- ret = -1;
- done = 1;
- }
+ hsotg->frame_usecs[j] == max_uframe_usecs[j])
+ continue;
}
}
-
- return ret;
+ return -1;
}
static int dwc2_find_uframe(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
Home |
Main Index |
Thread Index |
Old Index