From owner-p4-projects@FreeBSD.ORG Sun Jan 28 16:19:51 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8EDA916A405; Sun, 28 Jan 2007 16:19:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43ACF16A402 for ; Sun, 28 Jan 2007 16:19:51 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2F40013C4A3 for ; Sun, 28 Jan 2007 16:19:51 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0SGJpGo077321 for ; Sun, 28 Jan 2007 16:19:51 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0SGJoiE077318 for perforce@freebsd.org; Sun, 28 Jan 2007 16:19:50 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 28 Jan 2007 16:19:50 GMT Message-Id: <200701281619.l0SGJoiE077318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 113640 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jan 2007 16:19:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=113640 Change 113640 by rwatson@rwatson_peppercorn on 2007/01/28 16:19:49 Integrate zcopybuf in order to pick up minor BPF cleanups in CVS. Affected files ... .. //depot/projects/zcopybpf/src/sys/amd64/amd64/machdep.c#2 integrate .. //depot/projects/zcopybpf/src/sys/arm/xscale/ixp425/ixp425_mem.c#2 integrate .. //depot/projects/zcopybpf/src/sys/cam/scsi/scsi_da.c#2 integrate .. //depot/projects/zcopybpf/src/sys/conf/NOTES#2 integrate .. //depot/projects/zcopybpf/src/sys/conf/files#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/ata/ata-queue.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/bce/if_bce.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/mii/brgphy.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/mii/gentbi.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/mii/miidevs#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/mpt/mpt_cam.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/re/if_re.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/midi/midi.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/pci/hda/hdac.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/pci/maestro.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/pci/via8233.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/usb/uaudio.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/sound/usb/uaudio_pcm.c#2 integrate .. //depot/projects/zcopybpf/src/sys/dev/usb/uipaq.c#1 branch .. //depot/projects/zcopybpf/src/sys/dev/usb/usbdevs#2 integrate .. //depot/projects/zcopybpf/src/sys/i386/cpufreq/powernow.c#2 integrate .. //depot/projects/zcopybpf/src/sys/kern/kern_mbuf.c#2 integrate .. //depot/projects/zcopybpf/src/sys/kern/sched_ule.c#2 integrate .. //depot/projects/zcopybpf/src/sys/kern/subr_firmware.c#2 integrate .. //depot/projects/zcopybpf/src/sys/kern/uipc_syscalls.c#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/ath/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/ath_rate_sample/Makefile#2 integrate .. //depot/projects/zcopybpf/src/sys/modules/uipaq/Makefile#1 branch .. //depot/projects/zcopybpf/src/sys/net/bpf_compat.h#2 delete .. //depot/projects/zcopybpf/src/sys/net/bpfdesc.h#2 integrate .. //depot/projects/zcopybpf/src/sys/netgraph/ng_ppp.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet/ip_carp.c#2 integrate .. //depot/projects/zcopybpf/src/sys/netinet6/nd6.c#2 integrate .. //depot/projects/zcopybpf/src/sys/nfs4client/nfs4_vfs_subs.c#2 integrate .. //depot/projects/zcopybpf/src/sys/nfs4client/nfs4_vfsops.c#2 integrate .. //depot/projects/zcopybpf/src/sys/nfs4client/nfs4_vnops.c#2 integrate .. //depot/projects/zcopybpf/src/sys/nfsclient/nfs.h#2 integrate .. //depot/projects/zcopybpf/src/sys/nfsclient/nfs_vfsops.c#2 integrate .. //depot/projects/zcopybpf/src/sys/pc98/pc98/machdep.c#2 integrate .. //depot/projects/zcopybpf/src/sys/powerpc/include/ipl.h#2 delete .. //depot/projects/zcopybpf/src/sys/sys/ata.h#2 integrate .. //depot/projects/zcopybpf/src/sys/sys/mbuf.h#2 integrate .. //depot/projects/zcopybpf/src/sys/sys/param.h#2 integrate .. //depot/projects/zcopybpf/src/sys/vm/uma.h#2 integrate .. //depot/projects/zcopybpf/src/sys/vm/uma_core.c#2 integrate Differences ... ==== //depot/projects/zcopybpf/src/sys/amd64/amd64/machdep.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.668 2007/01/23 08:01:19 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.669 2007/01/27 18:13:24 jkoshy Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1183,7 +1183,7 @@ setidt(x, &IDTVEC(rsvd), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DE, &IDTVEC(div), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_DB, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL, 0); - setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 0); + setidt(IDT_NMI, &IDTVEC(nmi), SDT_SYSIGT, SEL_KPL, 1); setidt(IDT_BP, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL, 0); setidt(IDT_OF, &IDTVEC(ofl), SDT_SYSIGT, SEL_KPL, 0); setidt(IDT_BR, &IDTVEC(bnd), SDT_SYSIGT, SEL_KPL, 0); ==== //depot/projects/zcopybpf/src/sys/arm/xscale/ixp425/ixp425_mem.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_mem.c,v 1.1 2006/11/19 23:55:23 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/ixp425_mem.c,v 1.2 2007/01/26 01:37:32 kevlo Exp $"); #include #include @@ -47,8 +47,8 @@ static uint32_t sdram_64bit[] = { 0x00800000, /* 8M: One 2M x 32 chip */ 0x01000000, /* 16M: Two 2M x 32 chips */ - 0x01000000, /* 16M: One 4M x 32 chip */ - 0x02000000, /* 32M: Two 4M x 32 chips */ + 0x01000000, /* 16M: Two 4M x 16 chips */ + 0x02000000, /* 32M: Four 4M x 32 chips */ 0, 0, 0, 0 }; ==== //depot/projects/zcopybpf/src/sys/cam/scsi/scsi_da.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.201 2007/01/22 04:34:03 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.202 2007/01/23 17:29:31 imp Exp $"); #include @@ -471,7 +471,7 @@ * EasyMP3 EM732X USB 2.0 Flash MP3 Player * PR: usb/96546 */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "*", "MP3 Player*", + {T_DIRECT, SIP_MEDIA_REMOVABLE, "EM732X", "MP3 Player*", "1.0"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, }; ==== //depot/projects/zcopybpf/src/sys/conf/NOTES#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1406 2007/01/10 18:45:17 marius Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1407 2007/01/28 11:56:14 takawata Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2436,6 +2436,8 @@ device ubser # USB support for serial adapters based on the FT8U100AX and FT8U232AM device uftdi +# USB support for some Windows CE based serial communication. +device uipaq # USB support for Prolific PL-2303 serial adapters device uplcom # USB Visor and Palm devices ==== //depot/projects/zcopybpf/src/sys/conf/files#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1171 2007/01/05 01:46:26 ticso Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1172 2007/01/28 11:56:14 takawata Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1054,6 +1054,7 @@ dev/usb/uhci_pci.c optional uhci pci dev/usb/uhid.c optional uhid dev/usb/uhub.c optional usb +dev/usb/uipaq.c optional uipaq dev/usb/ukbd.c optional ukbd dev/usb/ulpt.c optional ulpt dev/usb/umass.c optional umass ==== //depot/projects/zcopybpf/src/sys/dev/ata/ata-queue.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.66 2006/12/23 12:40:54 remko Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.67 2007/01/27 21:15:58 remko Exp $"); #include "opt_ata.h" #include @@ -704,6 +704,7 @@ case 0xa0: return ("PACKET_CMD"); case 0xa1: return ("ATAPI_IDENTIFY"); case 0xa2: return ("SERVICE"); + case 0xb0: return ("SMART"); case 0xc0: return ("CFA ERASE"); case 0xc4: return ("READ_MUL"); case 0xc5: return ("WRITE_MUL"); ==== //depot/projects/zcopybpf/src/sys/dev/bce/if_bce.c#2 (text) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.26 2007/01/20 17:05:12 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.27 2007/01/26 17:03:51 dwhite Exp $"); /* * The following controllers are supported by this driver: @@ -531,13 +531,6 @@ goto bce_attach_fail; } - if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) { - BCE_PRINTF(sc, "%s(%d): SerDes controllers are not supported!\n", - __FILE__, __LINE__); - rc = ENODEV; - goto bce_attach_fail; - } - /* * The embedded PCIe to PCI-X bridge (EPB) * in the 5708 cannot address memory above @@ -742,20 +735,13 @@ IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); IFQ_SET_READY(&ifp->if_snd); - if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { - BCE_PRINTF(sc, "%s(%d): SerDes is not supported by this driver!\n", + /* Look for our PHY. */ + if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, + bce_ifmedia_sts)) { + BCE_PRINTF(sc, "%s(%d): PHY probe failed!\n", __FILE__, __LINE__); - rc = ENODEV; + rc = ENXIO; goto bce_attach_fail; - } else { - /* Look for our PHY. */ - if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, - bce_ifmedia_sts)) { - BCE_PRINTF(sc, "%s(%d): PHY probe failed!\n", - __FILE__, __LINE__); - rc = ENXIO; - goto bce_attach_fail; - } } /* Attach to the Ethernet interface list. */ @@ -836,12 +822,8 @@ ether_ifdetach(ifp); /* If we have a child device on the MII bus remove it too. */ - if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { - ifmedia_removeall(&sc->bce_ifmedia); - } else { - bus_generic_detach(dev); - device_delete_child(dev, sc->bce_miibus); - } + bus_generic_detach(dev); + device_delete_child(dev, sc->bce_miibus); /* Release all remaining resources. */ bce_release_resources(sc); @@ -1118,7 +1100,8 @@ BCE_CLRBIT(sc, BCE_EMAC_MODE, BCE_EMAC_MODE_PORT); /* Set MII or GMII inerface based on the speed negotiated by the PHY. */ - if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) { + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || + IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) { DBPRINT(sc, BCE_INFO, "Setting GMII interface.\n"); BCE_SETBIT(sc, BCE_EMAC_MODE, BCE_EMAC_MODE_PORT_GMII); } else { @@ -3832,8 +3815,6 @@ ifm = &sc->bce_ifmedia; BCE_LOCK_ASSERT(sc); - /* DRC - ToDo: Add SerDes support. */ - mii = device_get_softc(sc->bce_miibus); sc->bce_link = 0; if (mii->mii_instance) { @@ -3864,8 +3845,6 @@ mii = device_get_softc(sc->bce_miibus); - /* DRC - ToDo: Add SerDes support. */ - mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; @@ -4879,17 +4858,10 @@ DBPRINT(sc, BCE_VERBOSE, "bce_phy_flags = 0x%08X\n", sc->bce_phy_flags); - if (sc->bce_phy_flags & BCE_PHY_SERDES_FLAG) { - DBPRINT(sc, BCE_VERBOSE, "SerDes media set/get\n"); - - error = ifmedia_ioctl(ifp, ifr, - &sc->bce_ifmedia, command); - } else { - DBPRINT(sc, BCE_VERBOSE, "Copper media set/get\n"); - mii = device_get_softc(sc->bce_miibus); - error = ifmedia_ioctl(ifp, ifr, - &mii->mii_media, command); - } + DBPRINT(sc, BCE_VERBOSE, "Copper media set/get\n"); + mii = device_get_softc(sc->bce_miibus); + error = ifmedia_ioctl(ifp, ifr, + &mii->mii_media, command); break; /* Set interface capability */ @@ -5567,8 +5539,6 @@ if (sc->bce_link) goto bce_tick_locked_exit; - /* DRC - ToDo: Add SerDes support and check SerDes link here. */ - mii = device_get_softc(sc->bce_miibus); mii_tick(mii); ==== //depot/projects/zcopybpf/src/sys/dev/mii/brgphy.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mii/brgphy.c,v 1.56 2007/01/16 17:48:57 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mii/brgphy.c,v 1.57 2007/01/26 17:05:24 dwhite Exp $"); /* * Driver for the Broadcom BCR5400 1000baseTX PHY. @@ -115,7 +115,6 @@ MII_PHY_DESC(xxBROADCOM, BCM5704), MII_PHY_DESC(xxBROADCOM, BCM5705), MII_PHY_DESC(xxBROADCOM, BCM5706C), - MII_PHY_DESC(xxBROADCOM, BCM5708C), MII_PHY_DESC(xxBROADCOM, BCM5714), MII_PHY_DESC(xxBROADCOM, BCM5750), MII_PHY_DESC(xxBROADCOM, BCM5752), ==== //depot/projects/zcopybpf/src/sys/dev/mii/gentbi.c#2 (text+ko) ==== @@ -74,7 +74,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mii/gentbi.c,v 1.2 2006/11/27 23:50:19 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mii/gentbi.c,v 1.3 2007/01/26 17:06:02 dwhite Exp $"); /* * Driver for generic unknown ten-bit interfaces(1000BASE-{LX,SX} @@ -201,6 +201,7 @@ mii_phy_add_media(sc); printf("\n"); + MIIBUS_MEDIAINIT(sc->mii_dev); return (0); } ==== //depot/projects/zcopybpf/src/sys/dev/mii/miidevs#2 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/mii/miidevs,v 1.39 2007/01/15 21:43:43 jkim Exp $ +$FreeBSD: src/sys/dev/mii/miidevs,v 1.40 2007/01/26 17:05:24 dwhite Exp $ /*$NetBSD: miidevs,v 1.6 1999/05/14 11:37:30 drochner Exp $*/ /*- @@ -129,8 +129,7 @@ model xxBROADCOM BCM5750 0x0018 BCM5750 10/100/1000baseTX PHY model xxBROADCOM BCM5714 0x0034 BCM5714 10/100/1000baseTX PHY model xxBROADCOM BCM5780 0x0035 BCM5780 10/100/1000baseTX PHY -model xxBROADCOM BCM5706C 0x0015 BCM5706C 10/100/1000baseTX PHY -model xxBROADCOM BCM5708C 0x0036 BCM5708C 10/100/1000baseTX PHY +model xxBROADCOM BCM5706C 0x0036 BCM5706C/5708C 10/100/1000baseTX PHY model xxBROADCOM_ALT1 BCM5787 0x000e BCM5787 10/100/1000baseTX PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ ==== //depot/projects/zcopybpf/src/sys/dev/mpt/mpt_cam.c#2 (text+ko) ==== @@ -94,7 +94,7 @@ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.49 2007/01/05 22:49:05 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.50 2007/01/25 18:02:23 mjacob Exp $"); #include #include @@ -3226,7 +3226,7 @@ /* * The base speed is the speed of the underlying connection. */ -#ifdef CAM_NEW_TRAN +#ifdef CAM_NEW_TRAN_CODE cpi->protocol = PROTO_SCSI; if (mpt->is_fc) { cpi->hba_misc = PIM_NOBUSRESET; ==== //depot/projects/zcopybpf/src/sys/dev/re/if_re.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.83 2007/01/23 00:44:12 yongari Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.84 2007/01/25 17:30:30 wpaul Exp $"); /* * RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver @@ -2071,8 +2071,13 @@ * the mbuf chain has too many fragments so the coalescing code * below can assemble the packet into a single buffer that's * padded out to the mininum frame size. + * + * Note: this appears unnecessary for TCP, and doing it for TCP + * with PCIe adapters seems to result in bad checksums. */ - if (arg.rl_flags && (*m_head)->m_pkthdr.len < RL_MIN_FRAMELEN) + + if (arg.rl_flags && !(arg.rl_flags & RL_TDESC_CMD_TCPCSUM) && + (*m_head)->m_pkthdr.len < RL_MIN_FRAMELEN) error = EFBIG; else error = bus_dmamap_load_mbuf(sc->rl_ldata.rl_mtag, map, ==== //depot/projects/zcopybpf/src/sys/dev/sound/midi/midi.c#2 (text) ==== @@ -43,7 +43,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/sound/midi/midi.c,v 1.19 2006/06/18 14:14:41 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/sound/midi/midi.c,v 1.20 2007/01/27 15:55:59 ariff Exp $"); #include #include @@ -931,11 +931,15 @@ return EBUSY; } midistat_isopen = 1; + mtx_unlock(&midistat_lock); - if (sbuf_new(&midistat_sbuf, NULL, 4096, 0) == NULL) { + if (sbuf_new(&midistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { error = ENXIO; + mtx_lock(&midistat_lock); goto out; } + + mtx_lock(&midistat_lock); midistat_bufptr = 0; error = (midistat_prepare(&midistat_sbuf) > 0) ? 0 : ENOMEM; @@ -974,9 +978,11 @@ } l = min(buf->uio_resid, sbuf_len(&midistat_sbuf) - midistat_bufptr); err = 0; - if (l > 0) + if (l > 0) { + mtx_unlock(&midistat_lock); err = uiomove(sbuf_data(&midistat_sbuf) + midistat_bufptr, l, buf); - else + mtx_lock(&midistat_lock); + } else l = 0; midistat_bufptr += l; mtx_unlock(&midistat_lock); ==== //depot/projects/zcopybpf/src/sys/dev/sound/pci/hda/hdac.c#2 (text+ko) ==== @@ -80,10 +80,10 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20070105_0038" +#define HDA_DRV_TEST_REV "20070128_0039" #define HDA_WIDGET_PARSER_REV 1 -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.22 2007/01/13 00:24:44 ariff Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.23 2007/01/28 03:16:54 ariff Exp $"); #undef HDA_DEBUG_ENABLED #define HDA_DEBUG_ENABLED 1 @@ -172,6 +172,7 @@ #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) #define HP_NX6325_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b0) +#define HP_XW4300_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x3013) #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) /* What is wrong with XN 2563 anyway? (Got the picture ?) */ #define HP_NX6325_SUBVENDORX 0x103c30b0 @@ -529,8 +530,10 @@ 13, { 14, -1 }, -1 }, { LENOVO_ALL_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL, 1, 26, { 27, -1 }, -1 }, +#if 0 { ACER_ALL_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, 0, 20, { 21, -1 }, -1 }, +#endif }; #define HDAC_HP_SWITCH_LEN \ (sizeof(hdac_hp_switch) / sizeof(hdac_hp_switch[0])) @@ -3607,6 +3610,18 @@ if (w->nid != 5) w->enable = 0; } + if (subvendor == HP_XW4300_SUBVENDOR) { + ctl = hdac_audio_ctl_amp_get(devinfo, 16, 0, 1); + if (ctl != NULL && ctl->widget != NULL) { + ctl->ossmask = SOUND_MASK_SPEAKER; + ctl->widget->ctlflags |= SOUND_MASK_SPEAKER; + } + ctl = hdac_audio_ctl_amp_get(devinfo, 17, 0, 1); + if (ctl != NULL && ctl->widget != NULL) { + ctl->ossmask = SOUND_MASK_SPEAKER; + ctl->widget->ctlflags |= SOUND_MASK_SPEAKER; + } + } break; case HDA_CODEC_ALC861: ctl = hdac_audio_ctl_amp_get(devinfo, 28, 1, 1); @@ -4358,7 +4373,7 @@ printf(" childnid=%d", ctl->childwidget->nid); printf(" Bind to NONE\n"); - } + } ); if (ctl->step > 0) { ctl->ossval = (ctl->left * 100) / ctl->step; ==== //depot/projects/zcopybpf/src/sys/dev/sound/pci/maestro.c#2 (text+ko) ==== @@ -54,11 +54,8 @@ #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/maestro.c,v 1.32 2006/06/18 14:14:41 netchild Exp $"); - +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/maestro.c,v 1.33 2007/01/27 13:30:19 ariff Exp $"); -#define inline __inline - /* * PCI IDs of supported chips: * @@ -198,66 +195,71 @@ SYSCTL_UINT(_debug_maestro, OID_AUTO, powerstate_idle, CTLFLAG_RW, &powerstate_idle, 0, "The Dx power state when idle (0-2)"); SYSCTL_UINT(_debug_maestro, OID_AUTO, powerstate_init, CTLFLAG_RW, - &powerstate_init, 0, "The Dx power state prior to the first use (0-2)"); + &powerstate_init, 0, + "The Dx power state prior to the first use (0-2)"); /* ----------------------------- * Prototypes */ -static inline void agg_lock(struct agg_info*); -static inline void agg_unlock(struct agg_info*); -static inline void agg_sleep(struct agg_info*, const char *wmesg, int msec); +static void agg_sleep(struct agg_info*, const char *wmesg, int msec); -static inline u_int32_t agg_rd(struct agg_info*, int, int size); -static inline void agg_wr(struct agg_info*, int, u_int32_t data, int size); +static __inline u_int32_t agg_rd(struct agg_info*, int, int size); +static __inline void agg_wr(struct agg_info*, int, u_int32_t data, + int size); +static int agg_rdcodec(struct agg_info*, int); +static int agg_wrcodec(struct agg_info*, int, u_int32_t); -static inline int agg_rdcodec(struct agg_info*, int); -static inline int agg_wrcodec(struct agg_info*, int, u_int32_t); +static void ringbus_setdest(struct agg_info*, int, int); -static inline void ringbus_setdest(struct agg_info*, int, int); +static u_int16_t wp_rdreg(struct agg_info*, u_int16_t); +static void wp_wrreg(struct agg_info*, u_int16_t, u_int16_t); +static u_int16_t wp_rdapu(struct agg_info*, unsigned, u_int16_t); +static void wp_wrapu(struct agg_info*, unsigned, u_int16_t, u_int16_t); +static void wp_settimer(struct agg_info*, u_int); +static void wp_starttimer(struct agg_info*); +static void wp_stoptimer(struct agg_info*); -static inline u_int16_t wp_rdreg(struct agg_info*, u_int16_t); -static inline void wp_wrreg(struct agg_info*, u_int16_t, u_int16_t); -static inline u_int16_t wp_rdapu(struct agg_info*, unsigned, u_int16_t); -static inline void wp_wrapu(struct agg_info*, unsigned, u_int16_t, u_int16_t); -static inline void wp_settimer(struct agg_info*, u_int); -static inline void wp_starttimer(struct agg_info*); -static inline void wp_stoptimer(struct agg_info*); +#if 0 +static u_int16_t wc_rdreg(struct agg_info*, u_int16_t); +#endif +static void wc_wrreg(struct agg_info*, u_int16_t, u_int16_t); +#if 0 +static u_int16_t wc_rdchctl(struct agg_info*, int); +#endif +static void wc_wrchctl(struct agg_info*, int, u_int16_t); -static inline u_int16_t wc_rdreg(struct agg_info*, u_int16_t); -static inline void wc_wrreg(struct agg_info*, u_int16_t, u_int16_t); -static inline u_int16_t wc_rdchctl(struct agg_info*, int); -static inline void wc_wrchctl(struct agg_info*, int, u_int16_t); +static void agg_stopclock(struct agg_info*, int part, int st); -static inline void agg_stopclock(struct agg_info*, int part, int st); +static void agg_initcodec(struct agg_info*); +static void agg_init(struct agg_info*); +static void agg_power(struct agg_info*, int); -static inline void agg_initcodec(struct agg_info*); -static void agg_init(struct agg_info*); -static void agg_power(struct agg_info*, int); +static void aggch_start_dac(struct agg_chinfo*); +static void aggch_stop_dac(struct agg_chinfo*); +static void aggch_start_adc(struct agg_rchinfo*); +static void aggch_stop_adc(struct agg_rchinfo*); +static void aggch_feed_adc_stereo(struct agg_rchinfo*); +static void aggch_feed_adc_mono(struct agg_rchinfo*); -static void aggch_start_dac(struct agg_chinfo*); -static void aggch_stop_dac(struct agg_chinfo*); -static void aggch_start_adc(struct agg_rchinfo*); -static void aggch_stop_adc(struct agg_rchinfo*); -static void aggch_feed_adc_stereo(struct agg_rchinfo*); -static void aggch_feed_adc_mono(struct agg_rchinfo*); +#ifdef AGG_JITTER_CORRECTION +static void suppress_jitter(struct agg_chinfo*); +static void suppress_rec_jitter(struct agg_rchinfo*); +#endif -static inline void suppress_jitter(struct agg_chinfo*); -static inline void suppress_rec_jitter(struct agg_rchinfo*); +static void set_timer(struct agg_info*); -static void set_timer(struct agg_info*); - -static void agg_intr(void *); -static int agg_probe(device_t); -static int agg_attach(device_t); -static int agg_detach(device_t); -static int agg_suspend(device_t); -static int agg_resume(device_t); -static int agg_shutdown(device_t); +static void agg_intr(void *); +static int agg_probe(device_t); +static int agg_attach(device_t); +static int agg_detach(device_t); +static int agg_suspend(device_t); +static int agg_resume(device_t); +static int agg_shutdown(device_t); static void *dma_malloc(bus_dma_tag_t, u_int32_t, bus_addr_t*); -static void dma_free(bus_dma_tag_t, void *); +static void dma_free(bus_dma_tag_t, void *); /* ----------------------------- @@ -265,24 +267,10 @@ */ /* locking */ +#define agg_lock(sc) snd_mtxlock(&((sc)->lock)) +#define agg_unlock(sc) snd_mtxunlock(&((sc)->lock)) -static inline void -agg_lock(struct agg_info *sc) -{ -#ifdef USING_MUTEX - mtx_lock(&sc->lock); -#endif -} - -static inline void -agg_unlock(struct agg_info *sc) -{ -#ifdef USING_MUTEX - mtx_unlock(&sc->lock); -#endif -} - -static inline void +static void agg_sleep(struct agg_info *sc, const char *wmesg, int msec) { int timo; @@ -300,7 +288,7 @@ /* I/O port */ -static inline u_int32_t +static __inline u_int32_t agg_rd(struct agg_info *sc, int regno, int size) { switch (size) { @@ -320,7 +308,7 @@ ((struct agg_info*)(sc))->st, \ ((struct agg_info*)(sc))->sh, (regno)) -static inline void +static __inline void agg_wr(struct agg_info *sc, int regno, u_int32_t data, int size) { switch (size) { @@ -345,7 +333,7 @@ /* Codec/Ringbus */ -static inline int +static int agg_codec_wait4idle(struct agg_info *ess) { unsigned t = 26; @@ -359,7 +347,7 @@ } -static inline int +static int agg_rdcodec(struct agg_info *ess, int regno) { int ret; @@ -386,7 +374,7 @@ return ret; } -static inline int +static int agg_wrcodec(struct agg_info *ess, int regno, u_int32_t data) { /* We have to wait for a SAFE time to write addr/data */ @@ -409,7 +397,7 @@ return 0; } -static inline void +static void ringbus_setdest(struct agg_info *ess, int src, int dest) { u_int32_t data; @@ -424,21 +412,21 @@ /* Wave Processor */ -static inline u_int16_t +static u_int16_t wp_rdreg(struct agg_info *ess, u_int16_t reg) { AGG_WR(ess, PORT_DSP_INDEX, reg, 2); return AGG_RD(ess, PORT_DSP_DATA, 2); } -static inline void +static void wp_wrreg(struct agg_info *ess, u_int16_t reg, u_int16_t data) { AGG_WR(ess, PORT_DSP_INDEX, reg, 2); AGG_WR(ess, PORT_DSP_DATA, data, 2); } -static inline int +static int wp_wait_data(struct agg_info *ess, u_int16_t data) { unsigned t = 0; @@ -453,7 +441,7 @@ return 0; } -static inline u_int16_t +static u_int16_t wp_rdapu(struct agg_info *ess, unsigned ch, u_int16_t reg) { wp_wrreg(ess, WPREG_CRAM_PTR, reg | (ch << 4)); @@ -462,14 +450,15 @@ return wp_rdreg(ess, WPREG_DATA_PORT); } -static inline void +static void wp_wrapu(struct agg_info *ess, unsigned ch, u_int16_t reg, u_int16_t data) { wp_wrreg(ess, WPREG_CRAM_PTR, reg | (ch << 4)); if (wp_wait_data(ess, reg | (ch << 4)) == 0) { wp_wrreg(ess, WPREG_DATA_PORT, data); if (wp_wait_data(ess, data) != 0) - device_printf(ess->dev, "wp_wrapu() write timed out.\n"); + device_printf(ess->dev, + "wp_wrapu() write timed out.\n"); } else { device_printf(ess->dev, "wp_wrapu() indexing timed out.\n"); } @@ -493,7 +482,7 @@ wp_wrapu(ess, apuch, APUREG_FREQ_HIWORD, dv >> 8); } -static inline void +static void wp_settimer(struct agg_info *ess, u_int divide) { u_int prescale = 0; @@ -514,7 +503,7 @@ wp_wrreg(ess, WPREG_TIMER_ENABLE, 1); } -static inline void +static void wp_starttimer(struct agg_info *ess) { AGG_WR(ess, PORT_INT_STAT, 1, 2); @@ -523,7 +512,7 @@ wp_wrreg(ess, WPREG_TIMER_START, 1); } -static inline void +static void wp_stoptimer(struct agg_info *ess) { AGG_WR(ess, PORT_HOSTINT_CTRL, ~HOSTINT_CTRL_DSOUND_INT_ENABLED @@ -536,27 +525,31 @@ /* WaveCache */ -static inline u_int16_t +#if 0 +static u_int16_t wc_rdreg(struct agg_info *ess, u_int16_t reg) { AGG_WR(ess, PORT_WAVCACHE_INDEX, reg, 2); return AGG_RD(ess, PORT_WAVCACHE_DATA, 2); } +#endif -static inline void +static void wc_wrreg(struct agg_info *ess, u_int16_t reg, u_int16_t data) { AGG_WR(ess, PORT_WAVCACHE_INDEX, reg, 2); AGG_WR(ess, PORT_WAVCACHE_DATA, data, 2); } -static inline u_int16_t +#if 0 +static u_int16_t wc_rdchctl(struct agg_info *ess, int ch) { return wc_rdreg(ess, ch << 3); } +#endif -static inline void +static void wc_wrchctl(struct agg_info *ess, int ch, u_int16_t data) { wc_wrreg(ess, ch << 3, data); @@ -565,7 +558,7 @@ /* -------------------------------------------------------------------- */ /* Power management */ -static inline void +static void agg_stopclock(struct agg_info *ess, int part, int st) { u_int32_t data; @@ -589,7 +582,7 @@ * Controller. */ -static inline void +static void agg_initcodec(struct agg_info* ess) { u_int16_t data; @@ -773,7 +766,8 @@ DELAY(100); #if 0 if ((agg_rdcodec(ess, AC97_REG_POWER) & 3) != 3) - device_printf(ess->dev, "warning: codec not ready.\n"); + device_printf(ess->dev, + "warning: codec not ready.\n"); #endif AGG_WR(ess, PORT_RINGBUS_CTRL, (AGG_RD(ess, PORT_RINGBUS_CTRL, 4) @@ -1068,7 +1062,7 @@ * * XXX - this function works in 16bit stereo format only. */ -static inline void +static void interleave(int16_t *l, int16_t *r, int16_t *p, unsigned n) { int16_t *end; @@ -1110,7 +1104,7 @@ * * XXX - this function works in 16bit monoral format only. */ -static inline void +static void mixdown(int16_t *src, int16_t *dest, unsigned n) { int16_t *end; @@ -1138,12 +1132,13 @@ ch->hwptr = cur; } +#ifdef AGG_JITTER_CORRECTION /* * Stereo jitter suppressor. * Sometimes playback pointers differ in stereo-paired channels. * Calling this routine within intr fixes the problem. */ -static inline void +static void suppress_jitter(struct agg_chinfo *ch) { if (ch->stereo) { @@ -1160,7 +1155,7 @@ } } -static inline void +static void suppress_rec_jitter(struct agg_rchinfo *ch) { int cp1, cp2, diff /*, halfsize*/ ; @@ -1175,8 +1170,9 @@ AGG_WR(ch->parent, PORT_DSP_DATA, cp1, 2); } } +#endif -static inline u_int +static u_int calc_timer_div(struct agg_chinfo *ch) { u_int speed; @@ -1193,7 +1189,7 @@ + speed - 1) / speed; } -static inline u_int +static u_int calc_timer_div_rch(struct agg_rchinfo *ch) { u_int speed; @@ -1280,7 +1276,8 @@ /* Playback channel. */ static void * -aggpch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) +aggpch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, + struct pcm_channel *c, int dir) { struct agg_info *ess = devinfo; struct agg_chinfo *ch; @@ -1485,7 +1482,8 @@ /* Recording channel. */ static void * -aggrch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) +aggrch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, + struct pcm_channel *c, int dir) { struct agg_info *ess = devinfo; struct agg_rchinfo *ch; ==== //depot/projects/zcopybpf/src/sys/dev/sound/pci/via8233.c#2 (text+ko) ==== @@ -44,7 +44,7 @@ #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/via8233.c,v 1.26 2006/11/26 12:24:05 ariff Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/via8233.c,v 1.28 2007/01/27 07:35:05 ariff Exp $"); #define VIA8233_PCI_ID 0x30591106 @@ -63,7 +63,7 @@ #define NCHANS (NWRCHANS + NDXSCHANS + NMSGDCHANS) #define NSEGS NCHANS * SEGS_PER_CHAN /* Segments in SGD table */ #define VIA_SEGS_MIN 2 -#define VIA_SEGS_MAX 128 +#define VIA_SEGS_MAX 64 #define VIA_SEGS_DEFAULT 2 #define VIA_DEFAULT_BUFSZ 0x1000 @@ -1234,7 +1234,7 @@ else via->dxs_src = 0; - nsegs = (via_dxs_chnum + via_sgd_chnum) * via->blkcnt; + nsegs = (via_dxs_chnum + via_sgd_chnum + NWRCHANS) * via->blkcnt; /* DMA tag for buffers */ if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0, ==== //depot/projects/zcopybpf/src/sys/dev/sound/usb/uaudio.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: uaudio.c,v 1.91 2004/11/05 17:46:14 kent Exp $ */ -/* $FreeBSD: src/sys/dev/sound/usb/uaudio.c,v 1.24 2007/01/06 19:08:39 netchild Exp $ */ +/* $FreeBSD: src/sys/dev/sound/usb/uaudio.c,v 1.25 2007/01/26 19:06:17 ariff Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -4490,11 +4490,19 @@ sbuf_printf(s, "interrupts %d, ", c->interrupts); if (c->direction == PCMDIR_REC) - sbuf_printf(s, "overruns %d, hfree %d, sfree %d", - c->xruns, sndbuf_getfree(c->bufhard), sndbuf_getfree(c->bufsoft)); + sbuf_printf(s, "overruns %d, feed %u, hfree %d, sfree %d [b:%d/%d/%d|bs:%d/%d/%d]", + c->xruns, c->feedcount, sndbuf_getfree(c->bufhard), sndbuf_getfree(c->bufsoft), + sndbuf_getsize(c->bufhard), sndbuf_getblksz(c->bufhard), + sndbuf_getblkcnt(c->bufhard), + sndbuf_getsize(c->bufsoft), sndbuf_getblksz(c->bufsoft), >>> TRUNCATED FOR MAIL (1000 lines) <<<