From owner-p4-projects@FreeBSD.ORG Tue Jun 28 19:56:24 2005 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 EF24D16A420; Tue, 28 Jun 2005 19:56:23 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C21E016A41C for ; Tue, 28 Jun 2005 19:56:23 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 963DF43D53 for ; Tue, 28 Jun 2005 19:56:23 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j5SJuN57098899 for ; Tue, 28 Jun 2005 19:56:23 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j5SJuN2F098896 for perforce@freebsd.org; Tue, 28 Jun 2005 19:56:23 GMT (envelope-from peter@freebsd.org) Date: Tue, 28 Jun 2005 19:56:23 GMT Message-Id: <200506281956.j5SJuN2F098896@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 79104 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: Tue, 28 Jun 2005 19:56:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=79104 Change 79104 by peter@peter_daintree on 2005/06/28 19:55:52 IFC @79084 Affected files ... .. //depot/projects/hammer/contrib/netcat/nc.1#2 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#78 integrate .. //depot/projects/hammer/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml#4 integrate .. //depot/projects/hammer/release/doc/ja_JP.eucJP/hardware/common/dev.sgml#17 integrate .. //depot/projects/hammer/release/doc/ja_JP.eucJP/share/sgml/dev-auto-ja.sgml#2 integrate .. //depot/projects/hammer/share/man/man4/if_bridge.4#3 integrate .. //depot/projects/hammer/sys/conf/Makefile.arm#9 integrate .. //depot/projects/hammer/sys/contrib/pf/net/if_pfsync.c#15 integrate .. //depot/projects/hammer/sys/dev/ata/ata-disk.c#34 integrate .. //depot/projects/hammer/sys/dev/ata/ata-queue.c#26 integrate .. //depot/projects/hammer/sys/dev/sound/pci/csa.c#8 integrate .. //depot/projects/hammer/sys/dev/sound/pci/csapcm.c#11 integrate .. //depot/projects/hammer/sys/dev/sound/pci/csareg.h#2 integrate .. //depot/projects/hammer/sys/dev/sound/pci/csavar.h#2 integrate .. //depot/projects/hammer/sys/ia64/ia64/trap.c#33 integrate .. //depot/projects/hammer/sys/net/if_bridge.c#2 integrate .. //depot/projects/hammer/sys/net/if_gre.c#23 integrate .. //depot/projects/hammer/sys/netgraph/ng_nat.c#2 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias.c#3 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias_ftp.c#3 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias_irc.c#3 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias_local.h#3 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias_proxy.c#3 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias_skinny.c#3 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias_smedia.c#3 integrate .. //depot/projects/hammer/sys/netinet/libalias/alias_util.c#4 integrate .. //depot/projects/hammer/sys/netinet/tcp_input.c#51 integrate .. //depot/projects/hammer/sys/netinet/tcp_sack.c#20 integrate .. //depot/projects/hammer/sys/netinet/tcp_var.h#32 integrate .. //depot/projects/hammer/sys/sys/ucred.h#8 integrate .. //depot/projects/hammer/sys/vm/uma_dbg.c#13 integrate .. //depot/projects/hammer/usr.bin/tar/bsdtar.1#19 integrate .. //depot/projects/hammer/usr.sbin/pkg_install/create/pkg_create.1#10 integrate .. //depot/projects/hammer/usr.sbin/pkg_install/lib/plist.c#7 integrate .. //depot/projects/hammer/usr.sbin/wpa/hostapd/hostapd.8#2 integrate .. //depot/projects/hammer/usr.sbin/wpa/hostapd/hostapd.conf.5#2 integrate .. //depot/projects/hammer/usr.sbin/wpa/hostapd_cli/hostapd_cli.8#2 integrate .. //depot/projects/hammer/usr.sbin/wpa/wpa_cli/wpa_cli.8#2 integrate .. //depot/projects/hammer/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8#2 integrate .. //depot/projects/hammer/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5#3 integrate Differences ... ==== //depot/projects/hammer/contrib/netcat/nc.1#2 (text+ko) ==== @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/contrib/netcat/nc.1,v 1.3 2005/02/07 05:34:34 delphij Exp $ +.\" $FreeBSD: src/contrib/netcat/nc.1,v 1.4 2005/06/27 07:07:55 ru Exp $ .\" .Dd January 30, 2005 .Dt NC 1 @@ -37,7 +37,7 @@ .Nm nc .Bk -words .Op Fl 46DEdhklnorStUuvz -.Op Fl e Ar IPsec policy +.Op Fl e Ar IPsec_policy .Op Fl i Ar interval .Op Fl p Ar source_port .Op Fl s Ar source_ip_address @@ -103,8 +103,12 @@ .Nm help. .It Fl E -Shortcut for "-e 'in ipsec esp/transport//require' -e 'out ipsec -esp/transport//require'", which enables IPsec ESP transport mode in both +Shortcut for +.Qo +.Li "-e 'in ipsec esp/transport//require'" +.Li "-e 'out ipsec esp/transport//require'" +.Qc , +which enables IPsec ESP transport mode in both directions. .It Fl e If IPsec support is available, then one can specify the IPsec policies @@ -384,10 +388,14 @@ .Pp Open a TCP connection to port 42 of example.host using 10.1.2.3 as the IP for the local end of the connection: -.It Li "nc -E example.host 42" +.Pp +.Dl "nc -E example.host 42" +.Pp Open a TCP connection to port 42 of example.host using IPsec ESP for incoming and outgoing traffic. -.It Li "nc -e 'out ipsec esp/transport//require' example.host 42" +.Pp +.Dl "nc -e 'out ipsec esp/transport//require' example.host 42" +.Pp Open a TCP connection to port 42 of example.host using IPsec ESP for outgoing traffic only. .Pp ==== //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#78 (text+ko) ==== @@ -29,7 +29,7 @@ - $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.281 2005/05/22 17:12:42 brueffer Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.282 2005/06/27 14:54:49 rushani Exp $ Supported Devices @@ -78,57 +78,6 @@ &hwlist.ct; - NEC PC-9801-55, 92 and their compatible C-Bus SCSI interfaces (bs driver) - - - NEC PC-9801-55, 92 and their compatibles - ICM IF-2660 - Midori-Denshi MDC-554NA - Logitec LHA-N151 - - "flags 0x00000" is necessary in kernel configuration - for DMA transfer mode. - - - - I-O DATA SC-98II - - "flags 0x10000" is necessary in kernel configuration - for DMA transfer mode. - - - - TEXA HA-55BS2 and later - Midori-Denshi MDC-926Rs - - "flags 0x20000" is necessary in kernel configuration - for Bus-master transfer mode. - - - - ELECOM Bus-master SCSI interfaces - - "flags 0x30000" is necessary in kernel configuration - for Bus-master transfer mode. - - - - All SMIT transfer type SCSI interfaces - - "flags 0x40000" is necessary in kernel configuration - for SMIT transfer mode. - - - - Logitec LHA-20x series - ICM IF-2766, IF-2766ET, IF-2767 and IF-2769 - - "flags 0x50000" is necessary in kernel configuration - for Bus-master transfer mode. - - - - &hwlist.adv; &hwlist.adw; ==== //depot/projects/hammer/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml#4 (text+ko) ==== @@ -1,12 +1,12 @@ &os;/&arch; &release.current; ハードウェアノート - The FreeBSD Documentation Project + The &os; Documentation Project 2000 @@ -14,6 +14,7 @@ 2002 2003 2004 - The FreeBSD Documentation Project + 2005 + The &os; Documentation Project ==== //depot/projects/hammer/release/doc/ja_JP.eucJP/hardware/common/dev.sgml#17 (text+ko) ==== @@ -26,13 +26,13 @@ this file to fix "missed" conversions are likely to break the build. - $FreeBSD: src/release/doc/ja_JP.eucJP/hardware/common/dev.sgml,v 1.27 2005/03/06 14:50:42 rushani Exp $ - Original revision: 1.269 + $FreeBSD: src/release/doc/ja_JP.eucJP/hardware/common/dev.sgml,v 1.28 2005/06/27 17:48:19 rushani Exp $ + Original revision: 1.282 --> - $FreeBSD: src/release/doc/ja_JP.eucJP/hardware/common/dev.sgml,v 1.27 2005/03/06 14:50:42 rushani Exp $ + $FreeBSD: src/release/doc/ja_JP.eucJP/hardware/common/dev.sgml,v 1.28 2005/06/27 17:48:19 rushani Exp $ 対応ハードウェア @@ -85,112 +85,6 @@ &hwlist.ct; - NEC PC-9801-55, 92 およびその互換 C-Bus SCSI インタフェース (ct ドライバ) - - - NEC PC-9801-55, 92 およびその互換機器 - ICM IF-2660 - Midori-Denshi MDC-554NA - Logitec LHA-N151 - - DMA 転送モードにはカーネル設定に - flags 0x00000 が必要. - - - - - I-O DATA SC-98II - - DMA 転送モードにはカーネル設定に - flags 0x10000 が必要. - - - - TEXA HA-55BS2 および後継機 - Midori-Denshi MDC-926Rs - - バスマスタ転送モードにはカーネル設定に - flags 0x20000 が必要. - - - - ELECOM Bus-master SCSI インタフェース - - バスマスタ転送モードにはカーネル設定に - flags 0x30000 が必要. - - - - すべての SMIT 転送式 SCSI インタフェース - - SMIT 転送モードにはカーネル設定に - flags 0x40000 が必要. - - - - Logitec LHA-20x シリーズ - ICM IF-2766, IF-2766ET, IF-2767, IF-2769 - - バスマスタ転送モードにはカーネル設定に - flags 0x50000 が必要. - - - - - - NEC PC-9801-55, 92 およびその互換 C-Bus SCSI インタフェース (bs ドライバ) - - - NEC PC-9801-55, 92 およびその互換機器 - ICM IF-2660 - Midori-Denshi MDC-554NA - Logitec LHA-N151 - - DMA 転送モードにはカーネル設定に "flags 0x00000" が必要. - - - - - I-O DATA SC-98II - - DMA 転送モードにはカーネル設定に "flags 0x10000" が必要. - - - - - TEXA HA-55BS2 および後継機 - Midori-Denshi MDC-926Rs - - バスマスタ転送モードにはカーネル設定に "flags 0x20000" - が必要. - - - - ELECOM Bus-master SCSI インタフェース - - バスマスタ転送モードにはカーネル設定に "flags 0x30000" - が必要. - - - - すべての SMIT 転送式 SCSI インタフェース - - SMIT 転送モードにはカーネル設定に "flags 0x40000" が必要. - - - - - Logitec LHA-20x シリーズ - ICM IF-2766, IF-2766ET, IF-2767, IF-2769 - - バスマスタ転送モードにはカーネル設定に "flags 0x50000" - が必要. - - - - - - &hwlist.adv; &hwlist.adw; @@ -211,6 +105,8 @@ これらのコントローラからの起動には対応していません。 + &hwlist.arcmsr; + &hwlist.mlx; @@ -407,8 +303,17 @@ &hwlist.vge; + &hwlist.nve; + + + トークンリングインターフェース + + &hwlist.oltr; + + + FDDI インタフェース DEC DEFPA PCI (&man.fpa.4; ドライバ) @@ -697,17 +602,9 @@ - SDL Communication シリアルボード - - - SDL Communications Riscom/8 シリアルボード (rc ドライバ) - - - SDL Communications RISCom/N2 および N2pci - 高速同期式シリアルカード (&man.sr.4; ドライバ) - - - + &hwlist.rc; + + &hwlist.sr; Specialix SI/XIO/SX マルチポートシリアルカード。 @@ -770,96 +667,53 @@ - - オーディオデバイス + + サウンドデバイス + + &hwlist.sound; &hwlist.snd.ad1816; - &hwlist.snd.cs4281; + &hwlist.snd.als4000; - &hwlist.snd.solo; + &hwlist.snd.audiocs; - Advance (&man.sbc.4; ドライバ) - - - Asound 100 および 110 - - - Logic ALS120 および ALS4000 - - - + &hwlist.snd.cmi; - &hwlist.snd.cmi; + &hwlist.snd.cs4281; &hwlist.snd.csa; + &hwlist.snd.ds1; + + &hwlist.snd.emu10k1; + &hwlist.snd.es137x; &hwlist.snd.ess; - ESS - - - ES1868, ES1869, ES1879, ES1888 (&man.sbc.4; ドライバ) - - - + &hwlist.snd.fm801; - &hwlist.snd.maestro; - - &hwlist.snd.maestro3; - - ForteMedia fm801 - &hwlist.snd.gusc; - Intel 443MX, 810, 815, 815E 内蔵のサウンドデバイス - (&man.pcm.4; ドライバ) + &hwlist.snd.ich; - MSS/WSS 互換 DSP (&man.pcm.4; ドライバ) + &hwlist.snd.maestro; - NeoMagic 256AV/ZX (&man.pcm.4; ドライバ) + &hwlist.snd.maestro3; - OPTi 931/82C931 (&man.pcm.4; ドライバ) + &hwlist.snd.neomagic; - S3 Sonicvibes + &hwlist.snd.sbc; - Creative Technologies SoundBlaster シリーズ (&man.sbc.4; ドライバ) - - - SoundBlaster - - - SoundBlaster Pro - - - SoundBlaster AWE-32 - - - SoundBlaster AWE-64 - - - SoundBlaster AWE-64 GOLD - - - SoundBlaster ViBRA-16 - - - + &hwlist.snd.solo; - &hwlist.snd.emu10k1; + &hwlist.snd.via8233; - Trident 4DWave DX/NX (&man.pcm.4; ドライバ) + &hwlist.snd.via82c686; - VIA Technologies VT82C686A + &hwlist.snd.vibes; - &hwlist.snd.ds1; - - &hwlist.snd.ich; - - &hwlist.snd.audiocs; - NEC PC-9801-73, 86 およびその互換品 (nss ドライバ) @@ -885,16 +739,13 @@ - - SoundBlaster(98) のジョイスティックポート (&man.joy.4 - ドライバ) カメラおよびビデオキャプチャデバイス - Brooktree Bt848/849/878/879 ベースのフレームグラバ - (&man.bktr.4; ドライバ) + &hwlist.bktr; + Connectix QuickCam @@ -1028,8 +879,8 @@ 特定のビデオカードについての情報と - XFree86 との互換性は をご覧ください。 + Xorg との互換性は をご覧ください。 @@ -1070,8 +921,8 @@ &os; でポインティングデバイスを利用する際の詳しい情報は マニュアルページ &man.moused.8; に記載されています。 - XFree86 で利用する際の情報は - をご覧ください。 + Xorg で利用する際の情報は + をご覧ください。 ==== //depot/projects/hammer/release/doc/ja_JP.eucJP/share/sgml/dev-auto-ja.sgml#2 (text+ko) ==== @@ -1,4 +1,4 @@ - + @@ -12,7 +12,8 @@ - + + </ulink> をご覧ください。'> @@ -24,10 +25,11 @@ + W</quote>, C</quote>, S</quote> および A</quote> シリーズとその互換 SCSI ホストアダプタに対応しています。'> - + @@ -40,15 +42,16 @@ - - + + - + + @@ -61,17 +64,23 @@ + - + + + + + + @@ -80,20 +89,29 @@ - - - - - + + + + + - - + + - - - + + + + + + + + + + + + @@ -105,16 +123,19 @@ - - + + - + + + + @@ -123,6 +144,7 @@ + @@ -142,6 +164,12 @@ + + + + + + ==== //depot/projects/hammer/share/man/man4/if_bridge.4#3 (text+ko) ==== @@ -33,7 +33,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/if_bridge.4,v 1.4 2005/06/16 18:46:16 ru Exp $ +.\" $FreeBSD: src/share/man/man4/if_bridge.4,v 1.5 2005/06/27 10:58:22 thompsa Exp $ .\" .Dd June 10, 2005 .Dt IF_BRIDGE 4 @@ -155,7 +155,7 @@ The following will cause a bridge consisting of all 8 ports with Spanning Tree enabled to be created: .Bd -literal -offset indent -iconfig bridge0 create +ifconfig bridge0 create ifconfig bridge0 \e addm fxp0 stp fxp0 \e addm fxp1 stp fxp1 \e ==== //depot/projects/hammer/sys/conf/Makefile.arm#9 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.arm,v 1.9 2005/04/13 14:49:57 imp Exp $ +# $FreeBSD: src/sys/conf/Makefile.arm,v 1.10 2005/06/27 14:33:32 cognet Exp $ # # Makefile for FreeBSD # @@ -41,6 +41,9 @@ SYSTEM_LD += -EB .endif +.if !defined(DEBUG) +CFLAGS += -mno-apcs-frame +.endif %BEFORE_DEPEND %OBJS ==== //depot/projects/hammer/sys/contrib/pf/net/if_pfsync.c#15 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.18 2005/06/12 16:46:20 mlaier Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.19 2005/06/26 21:00:52 mlaier Exp $ */ /* $OpenBSD: if_pfsync.c,v 1.46 2005/02/20 15:58:38 mcbride Exp $ */ /* @@ -224,6 +224,7 @@ callout_init(&sc->sc_bulk_tmo, NET_CALLOUT_MPSAFE); callout_init(&sc->sc_bulkfail_tmo, NET_CALLOUT_MPSAFE); callout_init(&sc->sc_send_tmo, NET_CALLOUT_MPSAFE); + sc->sc_ifq.ifq_maxlen = ifqmaxlen; mtx_init(&sc->sc_ifq.ifq_mtx, ifp->if_xname, "pfsync send queue", MTX_DEF); if_attach(ifp); @@ -1797,7 +1798,7 @@ pfsyncstats.pfsyncs_opackets++; #ifdef __FreeBSD__ - if (IF_HANDOFF(&sc->sc_ifq, m, NULL)) + if (!IF_HANDOFF(&sc->sc_ifq, m, NULL)) pfsyncstats.pfsyncs_oerrors++; callout_reset(&sc->sc_send_tmo, 1, pfsync_senddef, sc); #else ==== //depot/projects/hammer/sys/dev/ata/ata-disk.c#34 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.188 2005/05/16 13:07:26 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.189 2005/06/27 09:12:11 sos Exp $"); #include "opt_ata.h" #include @@ -203,8 +203,7 @@ struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); - /* if detach pending flag set, return error */ - + /* if detach pending, return error */ if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATA_MASTER)) || ((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATA_SLAVE))) { return 1; @@ -340,14 +339,17 @@ ATA_SETMODE(device_get_parent(dev), dev); - /* enable read caching */ - ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_RCACHE, 0, 0); + /* enable readahead caching */ + if (atadev->param.support.command1 & ATA_SUPPORT_LOOKAHEAD) + ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_RCACHE, 0, 0); - /* enable write caching if enabled */ - if (ata_wc) - ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_WCACHE, 0, 0); - else - ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_DIS_WCACHE, 0, 0); + /* enable write caching if supported and configured */ + if (atadev->param.support.command1 & ATA_SUPPORT_WRITECACHE) { + if (ata_wc) + ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_ENAB_WCACHE, 0, 0); + else + ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_DIS_WCACHE, 0, 0); + } /* use multiple sectors/interrupt if device supports it */ if (ad_version(atadev->param.version_major)) { ==== //depot/projects/hammer/sys/dev/ata/ata-queue.c#26 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.49 2005/05/11 14:36:26 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.50 2005/06/28 09:06:52 sos Exp $"); #include "opt_ata.h" #include @@ -355,6 +355,7 @@ bcopy(ccb, request->u.atapi.ccb, 16); request->data = (caddr_t)&request->u.atapi.sense_data; request->bytecount = sizeof(struct atapi_sense); + request->donecount = 0; request->transfersize = sizeof(struct atapi_sense); request->timeout = 5; request->flags &= (ATA_R_ATAPI | ATA_R_QUIET); ==== //depot/projects/hammer/sys/dev/sound/pci/csa.c#8 (text+ko) ==== @@ -48,7 +48,7 @@ #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/csa.c,v 1.32 2005/03/01 08:58:05 imp Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/csa.c,v 1.33 2005/06/27 07:43:57 glebius Exp $"); /* This is the pci device id. */ #define CS4610_PCI_ID 0x60011013 @@ -87,7 +87,6 @@ struct resource *irq, void *cookie); static driver_intr_t csa_intr; static int csa_initialize(sc_p scp); -static void csa_resetdsp(csa_res *resp); static int csa_downloadimage(csa_res *resp); static devclass_t csa_devclass; @@ -366,15 +365,24 @@ static int csa_resume(device_t dev) { -#if 0 - /* - * XXX: this cannot possibly work - * needs to be properly implemented - */ - csa_detach(dev); - csa_attach(dev); -#endif - return 0; + csa_res *resp; + sc_p scp; + + scp = device_get_softc(dev); + resp = &scp->res; + + /* Initialize the chip. */ + if (csa_initialize(scp)) + return (ENXIO); + + /* Reset the Processor. */ + csa_resetdsp(resp); + + /* Download the Processor Image to the processor. */ + if (csa_downloadimage(resp)) + return (ENXIO); + + return (bus_generic_resume(dev)); } static struct resource * @@ -794,7 +802,7 @@ csa_writeio(resp, BA0_CLKCR1, clkcr1); } -static void +void csa_resetdsp(csa_res *resp) { int i; ==== //depot/projects/hammer/sys/dev/sound/pci/csapcm.c#11 (text+ko) ==== @@ -38,7 +38,7 @@ #include #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/csapcm.c,v 1.33 2005/01/06 01:43:19 imp Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/csapcm.c,v 1.34 2005/06/27 07:43:57 glebius Exp $"); /* Buffer size on dma transfer. Fixed for CS416x. */ #define CS461x_BUFFSIZE (4 * 1024) @@ -70,6 +70,9 @@ u_long pctl; u_long cctl; struct csa_chinfo pch, rch; + u_int32_t ac97[CS461x_AC97_NUMBER_RESTORE_REGS]; + u_int32_t ac97_powerdown; + u_int32_t ac97_general_purpose; }; /* -------------------------------------------------------------------- */ @@ -84,8 +87,11 @@ static void csa_stopplaydma(struct csa_info *csa); static void csa_stopcapturedma(struct csa_info *csa); static int csa_startdsp(csa_res *resp); +static int csa_stopdsp(csa_res *resp); static int csa_allocres(struct csa_info *scp, device_t dev); static void csa_releaseres(struct csa_info *scp, device_t dev); +static void csa_ac97_suspend(struct csa_info *csa); +static void csa_ac97_resume(struct csa_info *csa); static u_int32_t csa_playfmt[] = { AFMT_U8, @@ -112,16 +118,16 @@ static int csa_active(struct csa_info *csa, int run) { - int old, go; + int old; old = csa->active; csa->active += run; - if ((csa->active == 0 && old == 1) || (csa->active == 1 && old == 0)) { - go = csa->active; - if (csa->card->active) - return csa->card->active(go); - } + if ((csa->active > 1) || (csa->active < -1)) + csa->active = 0; + if (csa->card->active) + return (csa->card->active(!(csa->active && old))); + return 0; } @@ -455,6 +461,18 @@ } static int +csa_stopdsp(csa_res *resp) +{ + /* + * Turn off the run, run at frame, and DMA enable bits in + * the local copy of the SP control register. + */ + csa_writemem(resp, BA1_SPCR, 0); + + return (0); +} + +static int csa_setupchan(struct csa_chinfo *ch) { struct csa_info *csa = ch->parent; @@ -833,11 +851,169 @@ return 0; } +static void +csa_ac97_suspend(struct csa_info *csa) +{ + int count, i; + uint32_t tmp; + + for (count = 0x2, i=0; + (count <= CS461x_AC97_HIGHESTREGTORESTORE) && + (i < CS461x_AC97_NUMBER_RESTORE_REGS); + count += 2, i++) + csa_readcodec(&csa->res, BA0_AC97_RESET + count, &csa->ac97[i]); + + /* mute the outputs */ + csa_writecodec(&csa->res, BA0_AC97_MASTER_VOLUME, 0x8000); + csa_writecodec(&csa->res, BA0_AC97_HEADPHONE_VOLUME, 0x8000); + csa_writecodec(&csa->res, BA0_AC97_MASTER_VOLUME_MONO, 0x8000); + csa_writecodec(&csa->res, BA0_AC97_PCM_OUT_VOLUME, 0x8000); + /* save the registers that cause pops */ + csa_readcodec(&csa->res, BA0_AC97_POWERDOWN, &csa->ac97_powerdown); + csa_readcodec(&csa->res, BA0_AC97_GENERAL_PURPOSE, >>> TRUNCATED FOR MAIL (1000 lines) <<<