Date: Thu, 30 Dec 2004 19:11:34 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 67913 for review Message-ID: <200412301911.iBUJBYoQ034628@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=67913 Change 67913 by jhb@jhb_slimer on 2004/12/30 19:10:39 IFC @67912. Affected files ... .. //depot/projects/smpng/sys/alpha/conf/GENERIC#45 integrate .. //depot/projects/smpng/sys/amd64/conf/GENERIC#26 integrate .. //depot/projects/smpng/sys/conf/NOTES#88 integrate .. //depot/projects/smpng/sys/dev/usb/ehci.c#16 integrate .. //depot/projects/smpng/sys/dev/usb/ehci_pci.c#13 integrate .. //depot/projects/smpng/sys/dev/usb/ehcivar.h#4 integrate .. //depot/projects/smpng/sys/dev/usb/ohci_pci.c#11 integrate .. //depot/projects/smpng/sys/dev/usb/ugen.c#33 integrate .. //depot/projects/smpng/sys/dev/usb/uhci_pci.c#12 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#69 integrate .. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#11 integrate .. //depot/projects/smpng/sys/i386/conf/GENERIC#59 integrate .. //depot/projects/smpng/sys/kern/kern_umtx.c#15 integrate .. //depot/projects/smpng/sys/kern/subr_witness.c#125 integrate .. //depot/projects/smpng/sys/kern/sysv_msg.c#24 integrate .. //depot/projects/smpng/sys/kern/vfs_cluster.c#36 integrate .. //depot/projects/smpng/sys/modules/bktr/bktr/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/if_ppp/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/if_tun/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/io/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/mac_portacl/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/mem/Makefile#3 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/ubt/Makefile#6 integrate .. //depot/projects/smpng/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/snp/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/sound/driver/uaudio/Makefile#3 integrate .. //depot/projects/smpng/sys/modules/ti/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ubsa/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ubser/Makefile#3 integrate .. //depot/projects/smpng/sys/modules/ucom/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ucycom/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/uftdi/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ugen/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/uhid/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ukbd/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/ulpt/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/umct/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/umodem/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/ums/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/uplcom/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/urio/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/usb/Makefile#7 integrate .. //depot/projects/smpng/sys/modules/uscanner/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/uvisor/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/uvscom/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/vkbd/Makefile#2 integrate .. //depot/projects/smpng/sys/netgraph/ng_ether.c#19 integrate .. //depot/projects/smpng/sys/netipx/ipx_input.c#10 integrate .. //depot/projects/smpng/sys/netipx/ipx_pcb.c#13 integrate .. //depot/projects/smpng/sys/netipx/ipx_pcb.h#5 integrate .. //depot/projects/smpng/sys/netipx/ipx_usrreq.c#17 integrate .. //depot/projects/smpng/sys/netipx/ipx_var.h#5 integrate .. //depot/projects/smpng/sys/netipx/spx_usrreq.c#16 integrate .. //depot/projects/smpng/sys/pci/agp_ali.c#11 integrate .. //depot/projects/smpng/sys/pci/agp_intel.c#18 integrate .. //depot/projects/smpng/sys/pci/agp_sis.c#11 integrate .. //depot/projects/smpng/sys/pci/agp_via.c#14 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/pmap.c#50 integrate .. //depot/projects/smpng/sys/sparc64/conf/GENERIC#51 integrate .. //depot/projects/smpng/sys/sys/umtx.h#7 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#60 integrate Differences ... ==== //depot/projects/smpng/sys/alpha/conf/GENERIC#45 (text+ko) ==== @@ -18,17 +18,17 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.181 2004/11/09 22:23:34 wilko Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.182 2004/12/30 15:32:31 jhb Exp $ machine alpha cpu EV4 cpu EV5 ident GENERIC -#To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" +# To statically compile in device wiring instead of /boot/device.hints +#hints "GENERIC.hints" # Default places to look for devices. -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols # Platforms supported options API_UP1000 # UP1000, UP1100 (Nautilus) @@ -43,41 +43,44 @@ options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) -#options SCHED_ULE #ULE scheduler -options SCHED_4BSD #4BSD scheduler -options PREEMPTION #Enable kernel thread preemption -options INET #InterNETworking -options INET6 #IPv6 communications protocols -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES #Enable FFS soft updates support -options UFS_ACL #Support for access control lists -options UFS_DIRHASH #Improve performance on big directories -options MD_ROOT #MD is a potential root device -options NFSCLIENT #Network Filesystem Client -options NFSSERVER #Network Filesystem Server -options NFS_ROOT #NFS usable as root device -options MSDOSFS #MSDOS Filesystem -options CD9660 #ISO 9660 Filesystem -options PROCFS #Process filesystem (requires PSEUDOFS) -options PSEUDOFS #Pseudo-filesystem framework -options GEOM_GPT #GUID Partition Tables. -options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] -options COMPAT_FREEBSD4 #Compatible with FreeBSD4 -options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI -options KTRACE #ktrace(1) syscall trace support -options SYSVSHM #SYSV-style shared memory -options SYSVMSG #SYSV-style message queues -options SYSVSEM #SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +#options SCHED_ULE # ULE scheduler +options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options MD_ROOT # MD is a potential root device +options NFSCLIENT # Network Filesystem Client +options NFSSERVER # Network Filesystem Server +options NFS_ROOT # NFS usable as /, requires NFSCLIENT +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_GPT # GUID Partition Tables. +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options COMPAT_FREEBSD4 # Compatible with FreeBSD4 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options AHC_REG_PRETTY_PRINT # Print register bitfields in debug + # output. Adds ~128k to driver. +options ADAPTIVE_GIANT # Giant mutex is adaptive. # Debugging for use in -current -options KDB #Enable kernel debugger support -options DDB #Support DDB -options GDB #Support remote GDB -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options KDB # Enable kernel debugger support. +options DDB # Support DDB. +options GDB # Support remote GDB. +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed # To make an SMP kernel, the next line is needed options SMP # Symmetric MultiProcessor Kernel @@ -157,8 +160,9 @@ device vx # 3Com 3c590, 3c595 (``Vortex'') # PCI Ethernet NICs that use the common MII bus controller code. +# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support -device dc # DEC/Intel 21143 and workalikes +device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) device nge # NatSemi DP83820 gigabit ethernet device pcn # AMD Am79C97x PCI 10/100 NICs @@ -182,11 +186,11 @@ device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying/(translation) +device faith # IPv6-to-IPv4 relaying (translation) # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! -device bpf #Berkeley packet filter +device bpf # Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface @@ -196,13 +200,14 @@ device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer -device umass # Disks/Mass storage - Requires scbus and da0 +device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse -# USB Ethernet +# USB Ethernet, requires miibus device aue # ADMtek USB Ethernet device axe # ASIX Electronics USB Ethernet device cue # CATC USB Ethernet device kue # Kawasaki LSI USB Ethernet +device rue # RealTek RTL8150 USB Ethernet # FireWire support device firewire # FireWire bus code ==== //depot/projects/smpng/sys/amd64/conf/GENERIC#26 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.426 2004/11/02 20:57:19 andre Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.427 2004/12/30 18:51:23 jhb Exp $ machine amd64 cpu HAMMER @@ -53,7 +53,7 @@ options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. @@ -72,6 +72,7 @@ # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel + # Workarounds for some known-to-be-broken chipsets (nVidia nForce3-Pro150) device atpic # 8259A compatability options NO_MIXED_MODE # Don't penalize working chipsets @@ -98,7 +99,7 @@ device ahd # AHA39320/29320 and onboard AIC79xx devices device amd # AMD 53C974 (Tekram DC-390(T)) device isp # Qlogic family -#device ispfw # Firmware for QLogic HBAs- normally a module +#device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') ==== //depot/projects/smpng/sys/conf/NOTES#88 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1290 2004/12/20 04:22:41 sam Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1291 2004/12/30 16:53:20 rwatson Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -423,7 +423,7 @@ options IPX #IPX/SPX communications protocols options IPXIP #IPX in IP encapsulation (not available) -#options NCP #NetWare Core protocol +options NCP #NetWare Core protocol options NETATALK #Appletalk communications protocols options NETATALKDEBUG #Appletalk debugging ==== //depot/projects/smpng/sys/dev/usb/ehci.c#16 (text+ko) ==== @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/ehci.c,v 1.25 2004/12/18 01:20:18 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ehci.c,v 1.26 2004/12/29 01:21:18 julian Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -478,7 +478,8 @@ sqh->qh.qh_link = htole32(sqh->physaddr | EHCI_LINK_QH); sqh->qh.qh_curqtd = EHCI_NULL; - sqh->next = NULL; + sqh->prev = sqh; /*It's a circular list.. */ + sqh->next = sqh; /* Fill the overlay qTD */ sqh->qh.qh_qtd.qtd_next = EHCI_NULL; sqh->qh.qh_qtd.qtd_altnext = EHCI_NULL; @@ -1490,6 +1491,8 @@ /* * Add an ED to the schedule. Called at splusb(). + * If in the async schedule, it will always have a next. + * If in the intr schedule it may not. */ void ehci_add_qh(ehci_soft_qh_t *sqh, ehci_soft_qh_t *head) @@ -1497,8 +1500,11 @@ SPLUSBCHECK; sqh->next = head->next; + sqh->prev = head; sqh->qh.qh_link = head->qh.qh_link; head->next = sqh; + if (sqh->next) + sqh->next->prev = sqh; head->qh.qh_link = htole32(sqh->physaddr | EHCI_LINK_QH); #ifdef EHCI_DEBUG @@ -1511,21 +1517,17 @@ /* * Remove an ED from the schedule. Called at splusb(). + * Will always have a 'next' if it's in the async list as it's circular. */ void ehci_rem_qh(ehci_softc_t *sc, ehci_soft_qh_t *sqh, ehci_soft_qh_t *head) { - ehci_soft_qh_t *p; - SPLUSBCHECK; /* XXX */ - for (p = head; p != NULL && p->next != sqh; p = p->next) - ; - if (p == NULL) - panic("ehci_rem_qh: ED not found"); - p->next = sqh->next; - p->qh.qh_link = sqh->qh.qh_link; - + sqh->prev->qh.qh_link = sqh->qh.qh_link; + sqh->prev->next = sqh->next; + if (sqh->next) + sqh->next->prev = sqh->prev; ehci_sync_hc(sc); } @@ -2226,6 +2228,7 @@ sc->sc_freeqhs = sqh->next; memset(&sqh->qh, 0, sizeof(ehci_qh_t)); sqh->next = NULL; + sqh->prev = NULL; return (sqh); } @@ -2484,7 +2487,6 @@ * have happened since the hardware runs concurrently. * If the transaction has already happened we rely on the ordinary * interrupt processing to process it. - * XXX This is most probably wrong. */ void ehci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) @@ -2493,11 +2495,12 @@ struct ehci_pipe *epipe = (struct ehci_pipe *)xfer->pipe; ehci_softc_t *sc = (ehci_softc_t *)epipe->pipe.device->bus; ehci_soft_qh_t *sqh = epipe->sqh; - ehci_soft_qtd_t *sqtd; - ehci_physaddr_t cur; - u_int32_t qhstatus; + ehci_soft_qtd_t *sqtd, *snext, **psqtd; + ehci_physaddr_t cur, us, next; int s; int hit; + /* int count = 0; */ + ehci_soft_qh_t *psqh; DPRINTF(("ehci_abort_xfer: xfer=%p pipe=%p\n", xfer, epipe)); @@ -2516,27 +2519,29 @@ panic("ehci_abort_xfer: not in process context"); /* - * Step 1: Make interrupt routine and hardware ignore xfer. + * Step 1: Make interrupt routine and timeouts ignore xfer. */ s = splusb(); xfer->status = status; /* make software ignore it */ usb_uncallout(xfer->timeout_handle, ehci_timeout, xfer); usb_rem_task(epipe->pipe.device, &exfer->abort_task); - qhstatus = sqh->qh.qh_qtd.qtd_status; - sqh->qh.qh_qtd.qtd_status = qhstatus | htole32(EHCI_QTD_HALTED); - for (sqtd = exfer->sqtdstart; ; sqtd = sqtd->nextqtd) { - sqtd->qtd.qtd_status |= htole32(EHCI_QTD_HALTED); - if (sqtd == exfer->sqtdend) - break; - } splx(s); /* * Step 2: Wait until we know hardware has finished any possible - * use of the xfer. Also make sure the soft interrupt routine - * has run. + * use of the xfer. We do this by removing the entire + * queue from the async schedule and waiting for the doorbell. + * Nothing else should be touching the queue now. + */ + psqh = sqh->prev; + ehci_rem_qh(sc, sqh, psqh); + + /* + * Step 3: make sure the soft interrupt routine + * has run. This should remove any completed items off the queue. + * The hardware has no reference to completed items (TDs). + * It's safe to remove them at any time. */ - ehci_sync_hc(sc); s = splusb(); #ifdef USB_USE_SOFTINTR sc->sc_softwake = 1; @@ -2545,33 +2550,89 @@ #ifdef USB_USE_SOFTINTR tsleep(&sc->sc_softwake, PZERO, "ehciab", 0); #endif /* USB_USE_SOFTINTR */ - splx(s); /* - * Step 3: Remove any vestiges of the xfer from the hardware. + * Step 4: Remove any vestiges of the xfer from the hardware. * The complication here is that the hardware may have executed - * beyond the xfer we're trying to abort. So as we're scanning - * the TDs of this xfer we check if the hardware points to - * any of them. + * into or even beyond the xfer we're trying to abort. + * So as we're scanning the TDs of this xfer we check if + * the hardware points to any of them. + * + * first we need to see if there are any transfers + * on this queue before the xfer we are aborting.. we need + * to update any pointers that point to us to point past + * the aborting xfer. (If there is something past us). + * Hardware and software. */ - s = splusb(); /* XXX why? */ cur = EHCI_LINK_ADDR(le32toh(sqh->qh.qh_curqtd)); hit = 0; - for (sqtd = exfer->sqtdstart; ; sqtd = sqtd->nextqtd) { - hit |= cur == sqtd->physaddr; - if (sqtd == exfer->sqtdend) - break; + + /* If they initially point here. */ + us = exfer->sqtdstart->physaddr; + + /* We will change them to point here */ + snext = exfer->sqtdend->nextqtd; + next = snext ? snext->physaddr : htole32(EHCI_NULL); + + /* + * Now loop through any qTDs before us and keep track of the pointer + * that points to us for the end. + */ + psqtd = &sqh->sqtd; + sqtd = sqh->sqtd; + while (sqtd && sqtd != exfer->sqtdstart) { + hit |= (cur == sqtd->physaddr); + if (EHCI_LINK_ADDR(le32toh(sqtd->qtd.qtd_next)) == us) + sqtd->qtd.qtd_next = next; + if (EHCI_LINK_ADDR(le32toh(sqtd->qtd.qtd_altnext)) == us) + sqtd->qtd.qtd_altnext = next; + psqtd = &sqtd->nextqtd; + sqtd = sqtd->nextqtd; } - sqtd = sqtd->nextqtd; - /* Zap curqtd register if hardware pointed inside the xfer. */ - if (hit && sqtd != NULL) { - DPRINTFN(1,("ehci_abort_xfer: cur=0x%08x\n", sqtd->physaddr)); - sqh->qh.qh_curqtd = htole32(sqtd->physaddr); /* unlink qTDs */ - sqh->qh.qh_qtd.qtd_status = qhstatus; - } else { - DPRINTFN(1,("ehci_abort_xfer: no hit\n")); + /* make the software pointer bypass us too */ + *psqtd = exfer->sqtdend->nextqtd; + + /* + * If we already saw the active one then we are pretty much done. + * We've done all the relinking we need to do. + */ + if (!hit) { + + /* + * Now reinitialise the QH to point to the next qTD + * (if there is one). We only need to do this if + * it was previously pointing to us. + * XXX Not quite sure what to do about the data toggle. + */ + sqtd = exfer->sqtdstart; + for (sqtd = exfer->sqtdstart; ; sqtd = sqtd->nextqtd) { + if (cur == sqtd->physaddr) { + hit++; + } + /* count++; */ + if (sqtd == exfer->sqtdend) + break; + } + sqtd = sqtd->nextqtd; + /* + * Only need to alter the QH if it was pointing at a qTD + * that we are removing. + */ + if (hit) { + if (snext) { + ehci_set_qh_qtd(sqh, snext); + } else { + + sqh->qh.qh_curqtd = 0; /* unlink qTDs */ + sqh->qh.qh_qtd.qtd_status = 0; + sqh->qh.qh_qtd.qtd_next = + sqh->qh.qh_qtd.qtd_altnext + = htole32(EHCI_NULL); + DPRINTFN(1,("ehci_abort_xfer: no hit\n")); + } + } } - + ehci_add_qh(sqh, psqh); /* * Step 4: Execute callback. */ @@ -2580,6 +2641,7 @@ #endif usb_transfer_complete(xfer); + /* printf("%s: %d TDs aborted\n", __func__, count); */ splx(s); #undef exfer } ==== //depot/projects/smpng/sys/dev/usb/ehci_pci.c#13 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.14 2004/08/02 15:37:34 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.15 2004/12/28 22:17:10 jb Exp $"); /* * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller. @@ -239,7 +239,7 @@ ehci_pci_detach(self); return ENOMEM; } - device_set_ivars(sc->sc_bus.bdev, sc); + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); /* ehci_pci_match will never return NULL if ehci_pci_probe succeeded */ device_set_desc(sc->sc_bus.bdev, ehci_pci_match(self)); ==== //depot/projects/smpng/sys/dev/usb/ehcivar.h#4 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: ehcivar.h,v 1.12 2001/12/31 12:16:57 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.5 2004/10/30 15:13:09 iedowse Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.6 2004/12/29 01:21:18 julian Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -51,6 +51,7 @@ typedef struct ehci_soft_qh { ehci_qh_t qh; struct ehci_soft_qh *next; + struct ehci_soft_qh *prev; struct ehci_soft_qtd *sqtd; ehci_physaddr_t physaddr; int islot; /* Interrupt list slot. */ ==== //depot/projects/smpng/sys/dev/usb/ohci_pci.c#11 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/ohci_pci.c,v 1.40 2004/08/02 15:37:35 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ohci_pci.c,v 1.41 2004/12/28 22:17:10 jb Exp $"); /* * USB Open Host Controller driver. @@ -244,7 +244,7 @@ ohci_pci_detach(self); return ENOMEM; } - device_set_ivars(sc->sc_bus.bdev, sc); + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); /* ohci_pci_match will never return NULL if ohci_pci_probe succeeded */ device_set_desc(sc->sc_bus.bdev, ohci_pci_match(self)); ==== //depot/projects/smpng/sys/dev/usb/ugen.c#33 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/ugen.c,v 1.101 2004/12/22 17:31:44 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ugen.c,v 1.102 2004/12/29 21:36:43 julian Exp $"); /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1329,9 +1329,6 @@ case USB_SET_CONFIG: if (!(flag & FWRITE)) return (EPERM); -#if defined(__FreeBSD__) - ugen_destroy_devnodes(sc); -#endif err = ugen_set_config(sc, *(int *)addr); switch (err) { case USBD_NORMAL_COMPLETION: ==== //depot/projects/smpng/sys/dev/usb/uhci_pci.c#12 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.55 2004/10/13 14:51:42 le Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.56 2004/12/28 22:17:10 jb Exp $"); /* Universal Host Controller Interface * @@ -297,7 +297,7 @@ uhci_pci_detach(self); return ENOMEM; } - device_set_ivars(sc->sc_bus.bdev, sc); + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); /* uhci_pci_match must never return NULL if uhci_pci_probe succeeded */ device_set_desc(sc->sc_bus.bdev, uhci_pci_match(self)); ==== //depot/projects/smpng/sys/dev/usb/usbdevs#69 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.218 2004/12/27 06:58:05 imp Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.220 2004/12/29 06:21:41 imp Exp $ /* $NetBSD: usbdevs,v 1.388 2004/11/05 13:51:16 scw Exp $ */ /* @@ -41,6 +41,11 @@ /* * List of known USB vendors * + * USB.org publishes a VID list of USB-IF member companies at + * http://www.usb.org/developers/tools + * Note that it does not show companies that have obtained a Vendor ID + * without becoming full members. + * * Please note that these IDs do not do anything. Adding an ID here and * regenerating the usbdevs.h and usbdevs_data.h only makes a symbolic name * available to the source code and does not change any functionality, nor @@ -1477,6 +1482,9 @@ product WESTERN EXTHDD 0x0400 External HDD product WESTERN HUB 0x0500 USB HUB +/* Windbond Electronics */ +product WINBOND UH104 0x5518 4-port USB Hub + /* Xirlink products */ product XIRLINK PCCAM 0x8080 IBM PC Camera ==== //depot/projects/smpng/sys/geom/raid3/g_raid3.c#11 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/raid3/g_raid3.c,v 1.32 2004/12/25 19:17:47 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/raid3/g_raid3.c,v 1.33 2004/12/28 21:52:45 pjd Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1778,14 +1778,6 @@ G_RAID3_DEBUG(5, "%s: I'm here 1.", __func__); continue; } -#if 1 - if (ep != NULL) { - printf("The topology lock is already held.\n"); -#if 0 - tsleep(&ep, PRIBIO, "r3:hmm", hz * 3); -#endif - } -#endif /* * Now I/O requests. */ @@ -1799,7 +1791,7 @@ * already held? Try again. */ mtx_unlock(&sc->sc_queue_mtx); - tsleep(ep, PRIBIO, "r3:hmm1", hz / 5); + tsleep(ep, PRIBIO, "r3:top1", hz / 5); continue; } if ((sc->sc_flags & @@ -1879,7 +1871,7 @@ * We have some pending events, don't sleep now. */ G_RAID3_DEBUG(5, "%s: I'm here 7.", __func__); - tsleep(ep, PRIBIO, "r3:hmm2", hz / 5); + tsleep(ep, PRIBIO, "r3:top2", hz / 5); continue; } mtx_lock(&sc->sc_queue_mtx); ==== //depot/projects/smpng/sys/i386/conf/GENERIC#59 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.420 2004/11/02 20:57:19 andre Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.421 2004/12/30 15:30:23 jhb Exp $ machine i386 cpu I486_CPU @@ -71,9 +71,9 @@ options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -# To make an SMP kernel, the next two are needed -options SMP # Symmetric MultiProcessor Kernel -device apic # I/O APIC +# To make an SMP kernel, the next two lines are needed +options SMP # Symmetric MultiProcessor Kernel +device apic # I/O APIC # Bus support. Do not remove isa, even if you have no isa slots device isa @@ -275,7 +275,7 @@ device ums # Mouse device urio # Diamond Rio 500 MP3 player device uscanner # Scanners -# USB Ethernet, requires mii +# USB Ethernet, requires miibus device aue # ADMtek USB Ethernet device axe # ASIX Electronics USB Ethernet device cue # CATC USB Ethernet ==== //depot/projects/smpng/sys/kern/kern_umtx.c#15 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.24 2004/12/25 13:02:50 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_umtx.c,v 1.25 2004/12/30 02:56:17 davidxu Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -608,53 +608,22 @@ } static int -do_unlock_and_wait(struct thread *td, struct umtx *umtx, long id, void *uaddr, - struct timespec *abstime) +do_wait(struct thread *td, struct umtx *umtx, long id, struct timespec *abstime) { struct umtx_q uq; - intptr_t owner; - intptr_t old; struct timespec ts1, ts2; struct timeval tv; + long tmp; int timo, error = 0; - if (umtx == uaddr) - return (EINVAL); - - /* - * Make sure we own this mtx. - * - * XXX Need a {fu,su}ptr this is not correct on arch where - * sizeof(intptr_t) != sizeof(long). - */ - if ((owner = fuword(&umtx->u_owner)) == -1) - return (EFAULT); - - if ((owner & ~UMTX_CONTESTED) != id) - return (EPERM); - - if ((error = umtxq_queue_me(td, uaddr, &uq)) != 0) + if ((error = umtxq_queue_me(td, umtx, &uq)) != 0) return (error); - - old = casuptr((intptr_t *)&umtx->u_owner, id, UMTX_UNOWNED); - if (old == -1) { + tmp = fuword(&umtx->u_owner); + if (tmp != id) { umtxq_lock(&uq.uq_key); umtxq_remove(&uq); umtxq_unlock(&uq.uq_key); - umtx_key_release(&uq.uq_key); - return (EFAULT); - } - if (old != id) { - error = do_unlock(td, umtx, id); - if (error) { - umtxq_lock(&uq.uq_key); - umtxq_remove(&uq); - umtxq_unlock(&uq.uq_key); - umtx_key_release(&uq.uq_key); - return (error); - } - } - if (abstime == NULL) { + } else if (abstime == NULL) { umtxq_lock(&uq.uq_key); if (td->td_flags & TDF_UMTXQ) error = umtxq_sleep(td, &uq.uq_key, @@ -750,7 +719,7 @@ return do_lock(td, uap->umtx, uap->id, ts); case UMTX_OP_UNLOCK: return do_unlock(td, uap->umtx, uap->id); - case UMTX_OP_UNLOCK_AND_WAIT: + case UMTX_OP_WAIT: /* Allow a null timespec (wait forever). */ if (uap->uaddr2 == NULL) ts = NULL; @@ -763,10 +732,9 @@ return (EINVAL); ts = &abstime; } - return do_unlock_and_wait(td, uap->umtx, uap->id, - uap->uaddr, ts); + return do_wait(td, uap->umtx, uap->id, ts); case UMTX_OP_WAKE: - return do_wake(td, uap->uaddr, uap->id); + return do_wake(td, uap->umtx, uap->id); default: return (EINVAL); } ==== //depot/projects/smpng/sys/kern/subr_witness.c#125 (text+ko) ==== @@ -82,7 +82,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.185 2004/12/27 10:47:08 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.186 2004/12/28 21:21:27 jhb Exp $"); #include "opt_ddb.h" #include "opt_witness.h" @@ -106,7 +106,7 @@ /* Define this to check for blessed mutexes */ #undef BLESSING -#define WITNESS_COUNT 200 +#define WITNESS_COUNT 1024 #define WITNESS_CHILDCOUNT (WITNESS_COUNT * 4) /* * XXX: This is somewhat bogus, as we assume here that at most 1024 threads @@ -191,7 +191,6 @@ static void witness_display(void(*)(const char *fmt, ...)); #endif -MALLOC_DEFINE(M_WITNESS, "witness", "witness structure"); SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW, 0, "Witness Locking"); /* ==== //depot/projects/smpng/sys/kern/sysv_msg.c#24 (text+ko) ==== @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/sysv_msg.c,v 1.54 2004/11/12 13:23:47 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sysv_msg.c,v 1.55 2004/12/30 13:56:34 rwatson Exp $"); #include "opt_sysvipc.h" @@ -132,6 +132,8 @@ TUNABLE_INT_FETCH("kern.ipc.msgssz", &msginfo.msgssz); msginfo.msgmax = msginfo.msgseg * msginfo.msgssz; TUNABLE_INT_FETCH("kern.ipc.msgmni", &msginfo.msgmni); + TUNABLE_INT_FETCH("kern.ipc.msgmnb", &msginfo.msgmnb); + TUNABLE_INT_FETCH("kern.ipc.msgtql", &msginfo.msgtql); msgpool = malloc(msginfo.msgmax, M_MSG, M_WAITOK); if (msgpool == NULL) @@ -1136,8 +1138,8 @@ SYSCTL_DECL(_kern_ipc); SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, ""); SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RD, &msginfo.msgmnb, 0, ""); -SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RD, &msginfo.msgtql, 0, ""); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RDTUN, &msginfo.msgmnb, 0, ""); +SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RDTUN, &msginfo.msgtql, 0, ""); SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RDTUN, &msginfo.msgssz, 0, ""); SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RDTUN, &msginfo.msgseg, 0, ""); SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD, ==== //depot/projects/smpng/sys/kern/vfs_cluster.c#36 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_cluster.c,v 1.160 2004/11/15 08:38:50 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_cluster.c,v 1.161 2004/12/29 04:49:10 alc Exp $"); #include "opt_debug_cluster.h" @@ -453,7 +453,6 @@ TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head, tbp, b_cluster.cluster_entry); VM_OBJECT_LOCK(tbp->b_bufobj->bo_object); - vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { vm_page_t m; m = tbp->b_pages[j]; @@ -467,7 +466,6 @@ if ((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) tbp->b_pages[j] = bogus_page; } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(tbp->b_bufobj->bo_object); /* * XXX shouldn't this be += size for both, like in @@ -938,7 +936,6 @@ } } } - vm_page_lock_queues(); for (j = 0; j < tbp->b_npages; j += 1) { m = tbp->b_pages[j]; vm_page_io_start(m); @@ -949,7 +946,6 @@ bp->b_npages++; } } - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(tbp->b_bufobj->bo_object); } bp->b_bcount += size; ==== //depot/projects/smpng/sys/modules/bktr/bktr/Makefile#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/bktr/bktr/Makefile,v 1.6 2003/08/12 09:45:34 alex Exp $ +# $FreeBSD: src/sys/modules/bktr/bktr/Makefile,v 1.7 2004/12/29 08:43:14 imp Exp $ # Makefile for the bktr Brooktree Bt848/Bt878 PCI video capture device @@ -7,7 +7,7 @@ KMOD= bktr SRCS= bktr_core.c bktr_os.c bktr_audio.c bktr_tuner.c bktr_card.c msp34xx.c \ opt_devfs.h opt_bktr.h bus_if.h device_if.h \ - pci_if.h vnode_if.h + pci_if.h opt_bktr.h: echo "#define BKTR_FREEBSD_MODULE 1" > opt_bktr.h ==== //depot/projects/smpng/sys/modules/if_ppp/Makefile#5 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/sys/modules/if_ppp/Makefile,v 1.32 2004/09/01 07:12:24 ru Exp $ +# $FreeBSD: src/sys/modules/if_ppp/Makefile,v 1.33 2004/12/29 08:45:48 imp Exp $ .PATH: ${.CURDIR}/../../net KMOD= if_ppp SRCS= if_ppp.c ppp_tty.c slcompress.c \ - opt_inet.h opt_ipx.h opt_mac.h opt_ppp.h vnode_if.h + opt_inet.h opt_ipx.h opt_mac.h opt_ppp.h PPP_BSDCOMP?= 1 # 0/1 PPP_DEFLATE?= 1 # 0/1 ==== //depot/projects/smpng/sys/modules/if_tun/Makefile#5 (text+ko) ==== @@ -1,10 +1,9 @@ -# $FreeBSD: src/sys/modules/if_tun/Makefile,v 1.27 2003/03/08 21:54:32 jlemon Exp $ +# $FreeBSD: src/sys/modules/if_tun/Makefile,v 1.28 2004/12/29 08:45:48 imp Exp $ .PATH: ${.CURDIR}/../../net KMOD= if_tun -SRCS= if_tun.c opt_atalk.h opt_inet.h opt_inet6.h opt_ipx.h opt_mac.h \ - vnode_if.h +SRCS= if_tun.c opt_atalk.h opt_inet.h opt_inet6.h opt_ipx.h opt_mac.h opt_atalk.h: echo "#define NETATALK 1" > ${.TARGET} ==== //depot/projects/smpng/sys/modules/io/Makefile#2 (text+ko) ==== @@ -1,10 +1,10 @@ -# $FreeBSD: src/sys/modules/io/Makefile,v 1.1 2004/08/01 11:40:53 markm Exp $ +# $FreeBSD: src/sys/modules/io/Makefile,v 1.2 2004/12/29 08:44:03 imp Exp $ .PATH: ${.CURDIR}/../../dev/io >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412301911.iBUJBYoQ034628>