PERFORCE change 87311 for review
Robert Watson
rwatson at FreeBSD.org
Sun Nov 27 10:32:39 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=87311
Change 87311 by rwatson at rwatson_zoo on 2005/11/27 10:31:47
Integrate netsmp branch.
Affected files ...
.. //depot/projects/netsmp/src/sys/conf/files#14 integrate
.. //depot/projects/netsmp/src/sys/dev/sound/driver.c#2 integrate
.. //depot/projects/netsmp/src/sys/dev/sound/pci/atiixp.c#1 branch
.. //depot/projects/netsmp/src/sys/dev/sound/pci/atiixp.h#1 branch
.. //depot/projects/netsmp/src/sys/dev/usb/ohci.c#2 integrate
.. //depot/projects/netsmp/src/sys/dev/usb/ohcivar.h#2 integrate
.. //depot/projects/netsmp/src/sys/kern/uipc_mqueue.c#2 integrate
.. //depot/projects/netsmp/src/sys/modules/mqueue/Makefile#2 integrate
.. //depot/projects/netsmp/src/sys/modules/sound/driver/Makefile#3 integrate
.. //depot/projects/netsmp/src/sys/modules/sound/driver/atiixp/Makefile#1 branch
.. //depot/projects/netsmp/src/sys/netgraph/netflow/netflow.c#3 integrate
Differences ...
==== //depot/projects/netsmp/src/sys/conf/files#14 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1068 2005/11/26 12:42:35 davidxu Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1069 2005/11/27 03:29:58 ariff Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -859,6 +859,7 @@
dev/sound/isa/sbc.c optional snd_sbc isa
dev/sound/isa/sndbuf_dma.c optional sound isa
dev/sound/pci/als4000.c optional snd_als4000 pci
+dev/sound/pci/atiixp.c optional snd_atiixp pci
#dev/sound/pci/au88x0.c optional snd_au88x0 pci
dev/sound/pci/cmi.c optional snd_cmi pci
dev/sound/pci/cs4281.c optional snd_cs4281 pci
==== //depot/projects/netsmp/src/sys/dev/sound/driver.c#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/sound/driver.c,v 1.13 2005/01/06 01:43:17 imp Exp $
+ * $FreeBSD: src/sys/dev/sound/driver.c,v 1.14 2005/11/27 03:29:59 ariff Exp $
*/
#include <dev/sound/pcm/sound.h>
@@ -54,6 +54,7 @@
MODULE_DEPEND(snd_driver, snd_ad1816, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_als4000, 1, 1, 1);
+MODULE_DEPEND(snd_driver, snd_atiixp, 1, 1, 1);
/* MODULE_DEPEND(snd_driver, snd_aureal, 1, 1, 1); */
MODULE_DEPEND(snd_driver, snd_cmi, 1, 1, 1);
MODULE_DEPEND(snd_driver, snd_cs4281, 1, 1, 1);
==== //depot/projects/netsmp/src/sys/dev/usb/ohci.c#2 (text+ko) ====
@@ -13,7 +13,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ohci.c,v 1.154 2005/05/29 04:42:27 nyan Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ohci.c,v 1.155 2005/11/27 09:05:36 iedowse Exp $");
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -524,7 +524,7 @@
tdflags = htole32(
(rd ? OHCI_TD_IN : OHCI_TD_OUT) |
(flags & USBD_SHORT_XFER_OK ? OHCI_TD_R : 0) |
- OHCI_TD_NOCC | OHCI_TD_TOGGLE_CARRY | OHCI_TD_NOINTR);
+ OHCI_TD_NOCC | OHCI_TD_TOGGLE_CARRY | OHCI_TD_SET_DI(6));
for (;;) {
next = ohci_alloc_std(sc);
@@ -1355,7 +1355,7 @@
{
ohci_softc_t *sc = v;
ohci_soft_itd_t *sitd, *sidone, *sitdnext;
- ohci_soft_td_t *std, *sdone, *stdnext;
+ ohci_soft_td_t *std, *sdone, *stdnext, *p, *n;
usbd_xfer_handle xfer;
struct ohci_pipe *opipe;
int len, cc, s;
@@ -1386,14 +1386,11 @@
stdnext = std->dnext;
DPRINTFN(10, ("ohci_process_done: std=%p xfer=%p hcpriv=%p\n",
std, xfer, (xfer ? xfer->hcpriv : NULL)));
- if (xfer == NULL || (std->flags & OHCI_TD_HANDLED)) {
+ if (xfer == NULL) {
/*
* xfer == NULL: There seems to be no xfer associated
* with this TD. It is tailp that happened to end up on
* the done queue.
- * flags & OHCI_TD_HANDLED: The TD has already been
- * handled by process_done and should not be done again.
- * Shouldn't happen, but some chips are broken(?).
*/
continue;
}
@@ -1404,9 +1401,6 @@
/* Handled by abort routine. */
continue;
}
- usb_uncallout(xfer->timeout_handle, ohci_timeout, xfer);
- usb_rem_task(OXFER(xfer)->xfer.pipe->device,
- &OXFER(xfer)->abort_task);
len = std->len;
if (std->td.td_cbp != 0)
@@ -1418,38 +1412,32 @@
xfer->actlen += len;
cc = OHCI_TD_GET_CC(le32toh(std->td.td_flags));
- if (cc == OHCI_CC_NO_ERROR) {
- if (std->flags & OHCI_CALL_DONE) {
- xfer->status = USBD_NORMAL_COMPLETION;
- s = splusb();
- usb_transfer_complete(xfer);
- splx(s);
- }
- ohci_free_std(sc, std);
- } else {
+ if (cc != OHCI_CC_NO_ERROR) {
/*
* Endpoint is halted. First unlink all the TDs
* belonging to the failed transfer, and then restart
* the endpoint.
*/
- ohci_soft_td_t *p, *n;
opipe = (struct ohci_pipe *)xfer->pipe;
DPRINTFN(15,("ohci_process_done: error cc=%d (%s)\n",
OHCI_TD_GET_CC(le32toh(std->td.td_flags)),
ohci_cc_strs[OHCI_TD_GET_CC(le32toh(std->td.td_flags))]));
+ usb_uncallout(xfer->timeout_handle, ohci_timeout, xfer);
+ usb_rem_task(OXFER(xfer)->xfer.pipe->device,
+ &OXFER(xfer)->abort_task);
-
- /* Mark all the TDs in the done queue for the current
- * xfer as handled
- */
- for (p = stdnext; p; p = p->dnext) {
- if (p->xfer == xfer)
- p->flags |= OHCI_TD_HANDLED;
+ /* Remove all this xfer's TDs from the done queue. */
+ for (p = std; p->dnext != NULL; p = p->dnext) {
+ if (p->dnext->xfer != xfer)
+ continue;
+ p->dnext = p->dnext->dnext;
}
+ /* The next TD may have been removed. */
+ stdnext = std->dnext;
- /* remove TDs */
- for (p = std; p->xfer == xfer; p = n) {
+ /* Remove all TDs belonging to this xfer. */
+ for (p = xfer->hcpriv; p->xfer == xfer; p = n) {
n = p->nexttd;
ohci_free_std(sc, p);
}
@@ -1465,7 +1453,27 @@
s = splusb();
usb_transfer_complete(xfer);
splx(s);
+ continue;
+ }
+ /*
+ * Skip intermediate TDs. They remain linked from
+ * xfer->hcpriv and we free them when the transfer completes.
+ */
+ if ((std->flags & OHCI_CALL_DONE) == 0)
+ continue;
+
+ /* Normal transfer completion */
+ usb_uncallout(xfer->timeout_handle, ohci_timeout, xfer);
+ usb_rem_task(OXFER(xfer)->xfer.pipe->device,
+ &OXFER(xfer)->abort_task);
+ for (p = xfer->hcpriv; p->xfer == xfer; p = n) {
+ n = p->nexttd;
+ ohci_free_std(sc, p);
}
+ xfer->status = USBD_NORMAL_COMPLETION;
+ s = splusb();
+ usb_transfer_complete(xfer);
+ splx(s);
}
#ifdef USB_DEBUG
@@ -1779,7 +1787,7 @@
memcpy(KERNADDR(&opipe->u.ctl.reqdma, 0), req, sizeof *req);
setup->td.td_flags = htole32(OHCI_TD_SETUP | OHCI_TD_NOCC |
- OHCI_TD_TOGGLE_0 | OHCI_TD_NOINTR);
+ OHCI_TD_TOGGLE_0 | OHCI_TD_SET_DI(6));
setup->td.td_cbp = htole32(DMAADDR(&opipe->u.ctl.reqdma, 0));
setup->nexttd = next;
setup->td.td_nexttd = htole32(next->physaddr);
==== //depot/projects/netsmp/src/sys/dev/usb/ohcivar.h#2 (text+ko) ====
@@ -1,5 +1,5 @@
/* $NetBSD: ohcivar.h,v 1.30 2001/12/31 12:20:35 augustss Exp $ */
-/* $FreeBSD: src/sys/dev/usb/ohcivar.h,v 1.40 2005/03/19 19:08:46 iedowse Exp $ */
+/* $FreeBSD: src/sys/dev/usb/ohcivar.h,v 1.41 2005/11/27 09:05:37 iedowse Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -57,7 +57,6 @@
u_int16_t flags;
#define OHCI_CALL_DONE 0x0001
#define OHCI_ADD_LEN 0x0002
-#define OHCI_TD_HANDLED 0x0004 /* signal process_done has seen it */
} ohci_soft_td_t;
#define OHCI_STD_SIZE ((sizeof (struct ohci_soft_td) + OHCI_TD_ALIGN - 1) / OHCI_TD_ALIGN * OHCI_TD_ALIGN)
#define OHCI_STD_CHUNK (PAGE_SIZE / OHCI_STD_SIZE)
==== //depot/projects/netsmp/src/sys/kern/uipc_mqueue.c#2 (text+ko) ====
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_mqueue.c,v 1.1 2005/11/26 12:42:35 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_mqueue.c,v 1.2 2005/11/27 08:30:12 davidxu Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -2354,5 +2354,5 @@
SYSCALL_MODULE_HELPER(mq_notify);
SYSCALL_MODULE_HELPER(mq_unlink);
-VFS_SET(mqfs_vfsops, mqueue, VFCF_SYNTHETIC);
-MODULE_VERSION(mqueue, 1);
+VFS_SET(mqfs_vfsops, mqueuefs, VFCF_SYNTHETIC);
+MODULE_VERSION(mqueuefs, 1);
==== //depot/projects/netsmp/src/sys/modules/mqueue/Makefile#2 (text+ko) ====
@@ -1,8 +1,8 @@
-# $FreeBSD: src/sys/modules/mqueue/Makefile,v 1.1 2005/11/26 12:46:01 davidxu Exp $
+# $FreeBSD: src/sys/modules/mqueue/Makefile,v 1.2 2005/11/27 08:30:12 davidxu Exp $
.PATH: ${.CURDIR}/../../kern
-KMOD= mqueue
+KMOD= mqueuefs
SRCS= uipc_mqueue.c \
vnode_if.h \
opt_posix.h
==== //depot/projects/netsmp/src/sys/modules/sound/driver/Makefile#3 (text+ko) ====
@@ -1,9 +1,9 @@
-# $FreeBSD: src/sys/modules/sound/driver/Makefile,v 1.17 2005/10/25 04:01:41 yongari Exp $
+# $FreeBSD: src/sys/modules/sound/driver/Makefile,v 1.18 2005/11/27 03:29:59 ariff Exp $
.if ${MACHINE_ARCH} == "sparc64"
SUBDIR = audiocs es137x
.else
-SUBDIR = als4000 ad1816 cmi cs4281 csa ds1 emu10k1 es137x ess
+SUBDIR = als4000 ad1816 atiixp cmi cs4281 csa ds1 emu10k1 es137x ess
SUBDIR += fm801 ich maestro maestro3 mss neomagic sb16 sb8 sbc solo
SUBDIR += t4dwave via8233 via82c686 vibes
SUBDIR += driver uaudio
==== //depot/projects/netsmp/src/sys/netgraph/netflow/netflow.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
static const char rcs_id[] =
- "@(#) $FreeBSD: src/sys/netgraph/netflow/netflow.c,v 1.16 2005/10/31 15:41:26 rwatson Exp $";
+ "@(#) $FreeBSD: src/sys/netgraph/netflow/netflow.c,v 1.17 2005/11/27 02:43:08 glebius Exp $";
#include <sys/param.h>
#include <sys/kernel.h>
@@ -621,12 +621,9 @@
getnanotime(&ts);
header->unix_secs = htonl(ts.tv_sec);
header->unix_nsecs = htonl(ts.tv_nsec);
+ header->flow_seq = htonl(atomic_fetchadd_32(&priv->flow_seq,
+ header->count));
header->count = htons(header->count);
- header->flow_seq = htonl(atomic_load_acq_32(&priv->flow_seq));
-
- /* Flow sequence contains number of first record, so it
- is updated after being put in header. */
- atomic_add_32(&priv->flow_seq, header->count);
if (priv->export != NULL)
/* Should also NET_LOCK_GIANT(). */
More information about the p4-projects
mailing list