Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb let the bus driver override fifo size
details: https://anonhg.NetBSD.org/src/rev/5b59ef81faa9
branches: trunk
changeset: 332280:5b59ef81faa9
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Sep 13 18:36:39 2014 +0000
description:
let the bus driver override fifo size
diffstat:
sys/dev/usb/motg.c | 14 +++++++++-----
sys/dev/usb/motgvar.h | 3 ++-
2 files changed, 11 insertions(+), 6 deletions(-)
diffs (52 lines):
diff -r 0f32b50d9639 -r 5b59ef81faa9 sys/dev/usb/motg.c
--- a/sys/dev/usb/motg.c Sat Sep 13 18:35:57 2014 +0000
+++ b/sys/dev/usb/motg.c Sat Sep 13 18:36:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: motg.c,v 1.10 2014/09/13 17:42:48 jmcneill Exp $ */
+/* $NetBSD: motg.c,v 1.11 2014/09/13 18:36:39 jmcneill Exp $ */
/*
* Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
#include "opt_motg.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.10 2014/09/13 17:42:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.11 2014/09/13 18:36:39 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -353,9 +353,13 @@
/* select endpoint */
UWRITE1(sc, MUSB2_REG_EPINDEX, i);
- val = UREAD1(sc, MUSB2_REG_FSIZE);
- fiforx_size = (val & MUSB2_MASK_RX_FSIZE) >> 4;
- fifotx_size = (val & MUSB2_MASK_TX_FSIZE);
+ if (sc->sc_ep_fifosize) {
+ fiforx_size = fifotx_size = sc->sc_ep_fifosize;
+ } else {
+ val = UREAD1(sc, MUSB2_REG_FSIZE);
+ fiforx_size = (val & MUSB2_MASK_RX_FSIZE) >> 4;
+ fifotx_size = (val & MUSB2_MASK_TX_FSIZE);
+ }
DPRINTF(("Endpoint %u FIFO size: IN=%u, OUT=%u, DYN=%d\n",
i, fifotx_size, fiforx_size, dynfifo));
diff -r 0f32b50d9639 -r 5b59ef81faa9 sys/dev/usb/motgvar.h
--- a/sys/dev/usb/motgvar.h Sat Sep 13 18:35:57 2014 +0000
+++ b/sys/dev/usb/motgvar.h Sat Sep 13 18:36:39 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: motgvar.h,v 1.3 2014/09/13 14:46:50 jmcneill Exp $ */
+/* $NetBSD: motgvar.h,v 1.4 2014/09/13 18:36:39 jmcneill Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,6 +76,7 @@
void (*sc_intr_poll)(void *);
void *sc_intr_poll_arg;
int sc_ep_max;
+ u_int sc_ep_fifosize;
uint16_t sc_intr_tx_ep;
uint16_t sc_intr_rx_ep;
Home |
Main Index |
Thread Index |
Old Index