Re: CVS commit: src/usr.sbin/rpcbind

2011-03-14 Thread Christoph Egger

On 03/14/11 13:03, Antti Kantee wrote:

Module Name:src
Committed By:   pooka
Date:   Mon Mar 14 12:03:45 UTC 2011

Modified Files:
src/usr.sbin/rpcbind: rpcbind.c

Log Message:
remove unnecessary superuser check -- bind will fail if bind fails


the second part of this log message is irritating. What do you want to say?

Christoph


Re: CVS commit: src/sys/kern

2011-03-11 Thread Christoph Egger
On 12.03.11 08:16, YAMAMOTO Takashi wrote:
 Module Name:  src
 Committed By: yamt
 Date: Sat Mar 12 07:16:50 UTC 2011

Hi, nice to read/hear you're alive.

Christoph


Re: CVS commit: src/lib/librumphijack

2011-03-09 Thread Christoph Egger

On 03/09/11 16:03, Antti Kantee wrote:

Module Name:src
Committed By:   pooka
Date:   Wed Mar  9 15:03:18 UTC 2011

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
Add a bunch of process-wide hijack calls.  Among other things, it's
now possible to use unmodified userspace binaries (rpcbind, mountd,
nfsd) to start a rump nfs service and mount file systems from it.

pain-rustique:42:~  mount
rumpfs on / type rumpfs (local)
10.1.1.1:/export on /mnt type nfs


Cool. Is it possible to have anita booting NetBSD in qemu
with root on nfs?

Christoph


CVS commit: src/sys

2011-03-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Mar  7 11:25:44 UTC 2011

Modified Files:
src/sys/dev/ic: ath.c ath_netbsd.c athvar.h
src/sys/external/isc/atheros_hal/dist: ah.c ah.h ah_eeprom_v14.c
ah_eeprom_v3.c ah_internal.h
src/sys/external/isc/atheros_hal/dist/ar5210: ar5210.h ar5210_attach.c
ar5210_interrupts.c ar5210_misc.c ar5210_reset.c
src/sys/external/isc/atheros_hal/dist/ar5211: ar5211.h ar5211_attach.c
ar5211_misc.c ar5211_reset.c
src/sys/external/isc/atheros_hal/dist/ar5212: ar5212.h ar5212_ani.c
ar5212_attach.c ar5212_gpio.c ar5212_interrupts.c ar5212_misc.c
ar5212_power.c ar5212_recv.c ar5212_reset.c ar5212_xmit.c
ar5212reg.h
src/sys/external/isc/atheros_hal/dist/ar5312: ar5312.h ar5312_attach.c
ar5312_gpio.c ar5312_reset.c ar5315_gpio.c
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416.h ar5416_ani.c
ar5416_attach.c ar5416_cal.c ar5416_cal_iq.c ar5416_gpio.c
ar5416_interrupts.c ar5416_reset.c ar5416phy.h ar5416reg.h

Log Message:
Get improvements from FreeBSD-current (January 2011).
Successfully tested with WEP, WPA and WPA2 on AR9285.
Reviewed by jmcneill@


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/ic/ath.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/ic/ath_netbsd.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ic/athvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/isc/atheros_hal/dist/ah.c \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v3.c
cvs rdiff -u -r1.3 -r1.4 src/sys/external/isc/atheros_hal/dist/ah.h
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c
cvs rdiff -u -r1.5 -r1.6 src/sys/external/isc/atheros_hal/dist/ah_internal.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210.h \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_attach.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_interrupts.c \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_misc.c
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210_reset.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5211/ar5211.h \
src/sys/external/isc/atheros_hal/dist/ar5211/ar5211_attach.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5211/ar5211_misc.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ar5211/ar5211_reset.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212.h \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_attach.c \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_reset.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_ani.c \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_gpio.c \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_interrupts.c \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_misc.c \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_power.c \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_recv.c \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212reg.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5312/ar5312.h \
src/sys/external/isc/atheros_hal/dist/ar5312/ar5312_attach.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5312/ar5312_gpio.c \
src/sys/external/isc/atheros_hal/dist/ar5312/ar5312_reset.c \
src/sys/external/isc/atheros_hal/dist/ar5312/ar5315_gpio.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416.h \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_ani.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_cal.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_cal_iq.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_gpio.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_interrupts.c
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416phy.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/isc/atheros_hal/conf

2011-03-05 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Mar  5 14:42:12 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/conf: files.ath_hal

Log Message:
add defflag for AR9285.

Spotted by jmcneill@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/isc/atheros_hal/conf/files.ath_hal

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/conf/files.ath_hal
diff -u src/sys/external/isc/atheros_hal/conf/files.ath_hal:1.3 src/sys/external/isc/atheros_hal/conf/files.ath_hal:1.4
--- src/sys/external/isc/atheros_hal/conf/files.ath_hal:1.3	Mon Feb 21 11:06:37 2011
+++ src/sys/external/isc/atheros_hal/conf/files.ath_hal	Sat Mar  5 14:42:11 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ath_hal,v 1.3 2011/02/21 11:06:37 cegger Exp $
+#	$NetBSD: files.ath_hal,v 1.4 2011/03/05 14:42:11 cegger Exp $
 
 defflag opt_athhal.h	ATHHAL_ASSERT ATHHAL_DEBUG ATHHAL_DEBUG_ALQ
 defflag opt_athhal.h	ATHHAL_WRITE_EEPROM ATHHAL_WRITE_REGDOMAIN
@@ -113,6 +113,7 @@
 #
 defflag opt_athhal.h	ATHHAL_AR5416: athhal_eeprom_v14, athhal_eeprom_v4k, athhal_ar5212_subr
 defflag opt_athhal.h	ATHHAL_AR9280: ATHHAL_AR5416
+defflag opt_athhal.h	ATHHAL_AR9285: ATHHAL_AR5416
 
 file	external/isc/atheros_hal/dist/ar5416/ar2133.c		ath  athhal_ar5416
 file	external/isc/atheros_hal/dist/ar5416/ar5416_ani.c	ath  athhal_ar5416



CVS commit: src/sys/external/isc/atheros_hal/conf

2011-03-05 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Mar  5 14:42:12 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/conf: files.ath_hal

Log Message:
add defflag for AR9285.

Spotted by jmcneill@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/isc/atheros_hal/conf/files.ath_hal

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/net80211

2011-02-25 Thread Christoph Egger

On 02/25/11 11:45, Matthias Scheler wrote:

Module Name:src
Committed By:   tron
Date:   Fri Feb 25 10:45:57 UTC 2011

Modified Files:
src/sys/net80211: ieee80211_radiotap.h

Log Message:
Remove duplicate definitions which break the build.


Thanks. I was about testing a fix but your release build finished 
earlier than mine.


Christoph


Re: CVS commit: src/sys/arch

2011-02-25 Thread Christoph Egger

On 02/24/11 12:02, Jukka Ruohonen wrote:

On Thu, Feb 24, 2011 at 10:56:04AM +, Jukka Ruohonen wrote:

Log Message:
Move PowerNow! to the cpufeaturebus.


I tried to be very careful, but please test for any fall over.


acpicpu(4) work on both hp laptops.

powernow only tries to attach on my K8 machine where initialization 
fails as before = no regression.


Christoph



Re: CVS commit: src/sys/net80211

2011-02-25 Thread Christoph Egger
On 25.02.11 17:15, David Young wrote:
 On Fri, Feb 25, 2011 at 08:01:50AM +, Christoph Egger wrote:
 Module Name: src
 Committed By:cegger
 Date:Fri Feb 25 08:01:49 UTC 2011

 Modified Files:
  src/sys/net80211: ieee80211_radiotap.h

 Log Message:
 sync with FreeBSD rev 1.11. No binary changes.
 
 Careful:  NetBSD follows the standard,
 http://www.radiotap.net/defined-fields, and field 18 has not been
 standardized.  Please back out this change (and all of the subsequent
 changes) and send a patch for review to tech-net.

Do you mean that bit field or the whole revision ?

Christoph



CVS commit: src/sys/net80211

2011-02-25 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Feb 25 08:01:49 UTC 2011

Modified Files:
src/sys/net80211: ieee80211_radiotap.h

Log Message:
sync with FreeBSD rev 1.11. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/net80211/ieee80211_radiotap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/net80211

2011-02-25 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Feb 25 08:04:18 UTC 2011

Modified Files:
src/sys/net80211: ieee80211_radiotap.h

Log Message:
fix botched line break. How did this even compile for me?


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/net80211/ieee80211_radiotap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 11:08:21 UTC 2011

Modified Files:
src/share/man/man4: ath.4

Log Message:
add AR9285 support


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man4/ath.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/ath.4
diff -u src/share/man/man4/ath.4:1.29 src/share/man/man4/ath.4:1.30
--- src/share/man/man4/ath.4:1.29	Sun Feb 20 11:22:34 2011
+++ src/share/man/man4/ath.4	Mon Feb 21 11:08:21 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: ath.4,v 1.29 2011/02/20 11:22:34 jmcneill Exp $
+.\ $NetBSD: ath.4,v 1.30 2011/02/21 11:08:21 cegger Exp $
 .\
 .\ Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
 .\ All rights reserved.
@@ -41,7 +41,7 @@
 .\ $FreeBSD: /repoman/r/ncvs/src/share/man/man4/ath.4,v 1.16 2004/02/18 08:30:08 maxim Exp $
 .\ parts from $FreeBSD: /repoman/r/ncvs/src/share/man/man4/ath_hal.4,v 1.7 2004/01/07 20:49:51 blackend Exp $
 .\
-.Dd February 20, 2011
+.Dd February 21, 2011
 .Dt ATH 4
 .Os
 .Sh NAME
@@ -55,7 +55,7 @@
 .Nm
 driver provides support for wireless network adapters based on
 the Atheros AR2413, AR2417, AR5210, AR5211, AR5212, AR5213, AR5413,
-AR5416, AR5424, AR9160, and AR9280 chips.
+AR5416, AR5424, AR9160, AR9280, and AR9285 chips.
 Chip-specific support is provided by the Atheros Hardware Access Layer
 (HAL).
 .Pp



CVS commit: src/doc

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 11:09:16 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
ath(4): Add support for AR9285 devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1510 -r1.1511 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1510 src/doc/CHANGES:1.1511
--- src/doc/CHANGES:1.1510	Sun Feb 20 17:09:31 2011
+++ src/doc/CHANGES	Mon Feb 21 11:09:16 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1510 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1511 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -865,3 +865,4 @@
 		more efficient, added fast software interrupts and kernel
 		preemption.  Added support for RMI (NetLogic) XLS/XLR models.
 		Major clean up for MIPS port. [matt 20110220]
+	ath(4): Add support for AR9285 devices. [cegger 20110221]



CVS commit: src/sys/modules/ath_hal

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 11:16:47 UTC 2011

Modified Files:
src/sys/modules/ath_hal: Makefile Makefile.inc

Log Message:
catch up to AR9285 changes


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/ath_hal/Makefile \
src/sys/modules/ath_hal/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/modules/ath_hal/Makefile
diff -u src/sys/modules/ath_hal/Makefile:1.2 src/sys/modules/ath_hal/Makefile:1.3
--- src/sys/modules/ath_hal/Makefile:1.2	Sun Feb 20 11:26:33 2011
+++ src/sys/modules/ath_hal/Makefile	Mon Feb 21 11:16:47 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2011/02/20 11:26:33 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.3 2011/02/21 11:16:47 cegger Exp $
 
 .include ../Makefile.inc
 
@@ -89,7 +89,10 @@
 	ar5416_xmit.c \
 	ar9160_attach.c \
 	ar9280.c \
-	ar9280_attach.c
+	ar9280_attach.c \
+	ar9285.c \
+	ar9285_attach.c \
+	ar9285_reset.c
 
 WARNS=		3
 
Index: src/sys/modules/ath_hal/Makefile.inc
diff -u src/sys/modules/ath_hal/Makefile.inc:1.2 src/sys/modules/ath_hal/Makefile.inc:1.3
--- src/sys/modules/ath_hal/Makefile.inc:1.2	Sun Feb 20 11:26:34 2011
+++ src/sys/modules/ath_hal/Makefile.inc	Mon Feb 21 11:16:47 2011
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile.inc,v 1.2 2011/02/20 11:26:34 jmcneill Exp $
+#	$NetBSD: Makefile.inc,v 1.3 2011/02/21 11:16:47 cegger Exp $
 
 CPPFLAGS+=	-I${S}/external/isc/atheros_hal/dist
 CPPFLAGS+=	-I${S}/external/isc/atheros_hal/ic
 CPPFLAGS+=	-DATHHAL_AR5210 -DATHHAL_AR5211 -DATHHAL_AR5212 \
 		-DATHHAL_AR5311 -DATHHAL_AR5312 -DATHHAL_AR5416 \
-		-DATHHAL_AR9280
+		-DATHHAL_AR9280 -DATHHAL_AR9285
 CPPFLAGS+=	-DATHHAL_RF2316 -DATHHAL_RF2317 -DATHHAL_RF2413 \
 		-DATHHAL_RF2425 -DATHHAL_RF5111 -DATHHAL_RF5112 \
 		-DATHHAL_RF5413



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 13:04:22 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar9285_reset.c

Log Message:
make it compile with ATHHAL_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c
diff -u src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c:1.1 src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c:1.1	Mon Feb 21 11:06:38 2011
+++ src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c	Mon Feb 21 13:04:22 2011
@@ -119,7 +119,7 @@
 twiceMaxRegulatoryPower = AH_MIN(MAX_RATE_POWER, AH_PRIVATE(ah)-ah_powerLimit); 
 pModal = pEepData-modalHeader;
 HALDEBUG(ah, HAL_DEBUG_RESET, %s Channel=%u CfgCtl=%u\n,
-	__func__,chan-ic_freq, cfgCtl );  
+	__func__,chan-channel, cfgCtl );  
   
 if (IS_EEP_MINOR_V2(ah)) {
 ht40PowerIncForPdadc = pModal-ht40PowerIncForPdadc;



CVS commit: src/sys/external/isc/atheros_hal

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 11:06:38 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/conf: files.ath_hal std.ath_hal
src/sys/external/isc/atheros_hal/dist: ah.h ah_eeprom_v14.h
src/sys/external/isc/atheros_hal/dist/ar5212: ar5212.h ar5212_attach.c
ar5212_xmit.c
src/sys/external/isc/atheros_hal/dist/ar5416: ar5416.h ar5416_attach.c
ar5416_reset.c ar5416phy.h ar5416reg.h ar9280.h ar9280_attach.c
Added Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar9285.c ar9285.h
ar9285.ini ar9285_attach.c ar9285_reset.c ar9285v2.ini

Log Message:
add AR9285 support


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/isc/atheros_hal/conf/files.ath_hal \
src/sys/external/isc/atheros_hal/conf/std.ath_hal
cvs rdiff -u -r1.2 -r1.3 src/sys/external/isc/atheros_hal/dist/ah.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.h
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212.h \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_attach.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416.h \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_attach.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416reg.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416_reset.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar5416phy.h
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9280.h \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9280_attach.c
cvs rdiff -u -r0 -r1.1 src/sys/external/isc/atheros_hal/dist/ar5416/ar9285.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285.h \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285.ini \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_attach.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285v2.ini

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 11:08:21 UTC 2011

Modified Files:
src/share/man/man4: ath.4

Log Message:
add AR9285 support


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man4/ath.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/doc

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 11:09:16 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
ath(4): Add support for AR9285 devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1510 -r1.1511 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/modules/ath_hal

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 11:16:47 UTC 2011

Modified Files:
src/sys/modules/ath_hal: Makefile Makefile.inc

Log Message:
catch up to AR9285 changes


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/modules/ath_hal/Makefile \
src/sys/modules/ath_hal/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/isc/atheros_hal/dist/ar5416

2011-02-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Feb 21 13:04:22 UTC 2011

Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5416: ar9285_reset.c

Log Message:
make it compile with ATHHAL_DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5416/ar9285_reset.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/net

2011-02-20 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sun Feb 20 13:51:17 UTC 2011

Modified Files:
src/sys/net: if_media.h

Log Message:
add MBSS. From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/net/if_media.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_media.h
diff -u src/sys/net/if_media.h:1.54 src/sys/net/if_media.h:1.55
--- src/sys/net/if_media.h:1.54	Wed Jan 26 00:57:47 2011
+++ src/sys/net/if_media.h	Sun Feb 20 13:51:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_media.h,v 1.54 2011/01/26 00:57:47 dyoung Exp $	*/
+/*	$NetBSD: if_media.h,v 1.55 2011/02/20 13:51:17 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -244,6 +244,7 @@
 #define	IFM_IEEE80211_TURBO	0x0800	/* Operate in Turbo mode */
 #define	IFM_IEEE80211_IBSS	0x1000	/* Operate in IBSS mode */
 #define	IFM_IEEE80211_WDS 	0x2000	/* Operate as an WDS master */
+#define	IFM_IEEE80211_MBSS	0x4000	/* Operate in MBSS mode */
 
 /* operating mode for multi-mode devices */
 #define	IFM_IEEE80211_11A	0x0001	/* 5 GHz, OFDM mode */
@@ -535,6 +536,7 @@
 	{ IFM_IEEE80211 | IFM_IEEE80211_TURBO,	turbo },		\
 	{ IFM_IEEE80211 | IFM_IEEE80211_IBSS,	ibss },		\
 	{ IFM_IEEE80211 | IFM_IEEE80211_WDS, 	wds },		\
+	{ IFM_IEEE80211 | IFM_IEEE80211_MBSS,	mesh },		\
 	\
 	{ 0, NULL },			\
 }



CVS commit: src/sys/net

2011-02-20 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sun Feb 20 13:51:17 UTC 2011

Modified Files:
src/sys/net: if_media.h

Log Message:
add MBSS. From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/net/if_media.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2011-02-17 Thread Christoph Egger
On 18.02.11 00:21, Jonathan A. Kollasch wrote:
 Module Name:  src
 Committed By: jakllsch
 Date: Thu Feb 17 23:21:54 UTC 2011
 
 Modified Files:
   src/sys/external/bsd/drm/dist/bsd-core: drm_pciids.h
 
 Log Message:
 Add the RS880 device IDs to radeondrm(4).
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 
 
 
 
 Modified files:
 
 Index: src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h
 diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.5 
 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.6
 --- src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.5   Thu Jan  6 
 11:07:48 2011
 +++ src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h   Thu Feb 17 
 23:21:53 2011
 @@ -393,7 +393,12 @@
   {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI 
 Mobility Radeon 4300 Series}, \
   {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI 
 Mobility Radeon 4500 Series}, \
   {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI 
 Mobility Radeon 4500 Series}, \
 - {0x1002, 0x9712, 
 CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon 
 Mobility HD 4200}, \
 + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon HD 4200}, \
 + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon RS880}, \
 + {0x1002, 0x9712, 
 CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon 
 Mobility HD 4200}, \
 + {0x1002, 0x9713, 
 CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon 
 Mobility RS880}, \
 + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon HD 4290}, \
 + {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon HD 4250}, \
   {0, 0, 0, NULL}

Are you sure some of them aren't actually RS780 chips ?

Christoph


  
  #define r128_PCI_IDS \
 



Re: CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2011-02-17 Thread Christoph Egger
On 18.02.11 07:00, matthew green wrote:
 -   {0x1002, 0x9712, 
 CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon 
 Mobility HD 4200}, \
 +   {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon HD 4200}, \
 +   {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon RS880}, \
 +   {0x1002, 0x9712, 
 CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon 
 Mobility HD 4200}, \
 +   {0x1002, 0x9713, 
 CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon 
 Mobility RS880}, \
 +   {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon HD 4290}, \
 +   {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI 
 Radeon HD 4250}, \
 {0, 0, 0, NULL}

 Are you sure some of them aren't actually RS780 chips ?
 
 the new code matches the linux drm driver.

ok. IIRC there is a PR with a patch that adds an entry for HD4250
which can be closed now.

Christoph


CVS commit: src/sys/arch/x86/include

2011-02-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Feb 15 10:11:25 UTC 2011

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
update cpuid bits


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x86/include/specialreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.49 src/sys/arch/x86/include/specialreg.h:1.50
--- src/sys/arch/x86/include/specialreg.h:1.49	Tue Oct 12 00:39:08 2010
+++ src/sys/arch/x86/include/specialreg.h	Tue Feb 15 10:11:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.49 2010/10/12 00:39:08 jakllsch Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.50 2011/02/15 10:11:25 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -158,7 +158,7 @@
 /* Intel Fn8001 extended features - %ecx */
 #define	CPUID_LAHF	0x0001	/* LAHF/SAHF in IA-32e mode, 64bit sub*/
 
-#define	CPUID_INTEL_FLAGS4	\20\1LAHF
+#define	CPUID_INTEL_FLAGS4	\20\1LAHF\02B02\03B03
 
 
 /* AMD/VIA Fn8001 extended features - %edx */
@@ -173,8 +173,9 @@
 #define CPUID_3DNOW2	0x4000	/* 3DNow! Instruction Extension */
 #define CPUID_3DNOW	0x8000	/* 3DNow! Instructions */
 
-#define CPUID_EXT_FLAGS	\20\14SYSCALL/SYSRET\24MPC\25NOX\27MXX\32FFXSR \
-			\33P1GB\34RDTSCP\36LONG\0373DNOW2\0403DNOW
+#define CPUID_EXT_FLAGS	\20\14SYSCALL/SYSRET\24MPC\25NOX \
+			\27MXX\32FFXSR\33P1GB\34RDTSCP \
+			\36LONG\0373DNOW2\0403DNOW \
 
 /* AMD Fn8001 extended features - %ecx */
 #define CPUID_LAHF	0x0001	/* LAHF/SAHF instruction */
@@ -188,24 +189,40 @@
 #define CPUID_3DNOWPF	0x0100	/* 3DNow Prefetch */
 #define CPUID_OSVW	0x0200	/* OS visible workarounds */
 #define CPUID_IBS	0x0400	/* Instruction Based Sampling */
-#define CPUID_SSE5	0x0800	/* SSE5 instruction set */
+#define CPUID_XOP	0x0800	/* XOP instruction set */
 #define CPUID_SKINIT	0x1000	/* SKINIT */
 #define CPUID_WDT	0x2000	/* watchdog timer support */
+#define CPUID_LWP	0x8000	/* Light Weight Profiling */
+#define CPUID_FMA4	0x0001	/* FMA4 instructions */
+#define CPUID_NODEID	0x0008	/* NodeID MSR available*/
+#define CPUID_TBM	0x0020	/* TBM instructions */
+#define CPUID_TOPOEXT	0x0040	/* cpuid Topology Extension */
 
 #define CPUID_AMD_FLAGS4	\20\1LAHF\2CMPLEGACY\3SVM\4EAPIC\5ALTMOVCR0 \
 \6LZCNT\7SSE4A\10MISALIGNSSE \
 \0113DNOWPREFETCH\12OSVW\13IBS \
-\14SSE5\15SKINIT\16WDT
+\14XOP\15SKINIT\16WDT\20LWP \
+\21FMA4\22B17\23B18\24NodeID\25B20\26TBM \
+\27TopoExt\30B23\31B24 \
+\32B25\33B25\34B26 \
+\35B27\36B28\37B29\40B30\41B31\42B32
 
 /* AMD Fn800a %edx features (SVM features) */
 #define	CPUID_AMD_SVM_NP		0x0001
 #define	CPUID_AMD_SVM_LbrVirt		0x0002
 #define	CPUID_AMD_SVM_SVML		0x0004
 #define	CPUID_AMD_SVM_NRIPS		0x0008
-#define	CPUID_AMD_SVM_Ssse3Sse5Dis	0x0200
+#define	CPUID_AMD_SVM_TSCRateCtrl	0x0010
+#define	CPUID_AMD_SVM_VMCBCleanBits	0x0020
+#define	CPUID_AMD_SVM_FlushByASID	0x0040
+#define	CPUID_AMD_SVM_DecodeAssist	0x0080
 #define	CPUID_AMD_SVM_PauseFilter	0x0400
 #define	CPUID_AMD_SVM_FLAGS	 \20\1NP\2LbrVirt\3SVML\4NRIPS \
-\12Ssse3Sse5Dis\13PauseFilter
+\5TSCRate\6VMCBCleanBits\7FlushByASID \
+\10DecodeAssist\11B08 \
+\12B09\13PauseFilter \
+\14B11\15B12 \
+\16B13\17B17\20B18\21B19
 
 /*
  * AMD Advanced Power Management
@@ -221,9 +238,10 @@
 #define CPUID_APM_HWP	0x0080	/* HW P-State control */
 #define CPUID_APM_TSC	0x0100	/* TSC invariant */
 #define CPUID_APM_CPB	0x0200	/* Core performance boost */
+#define CPUID_APM_EFF	0x0400	/* Effective Frequency (read-only) */
 
 #define CPUID_APM_FLAGS		\20\1TS\2FID\3VID\4TTP\5HTC\6STC\007100 \
-\10HWP\11TSC\12CPB
+\10HWP\11TSC\12CPB\13EffFreq\14B11\15B12
 
 /*
  * Centaur Extended Feature flags
@@ -246,6 +264,7 @@
  */
 
 #define	CPUID2_SSE3	0x0001	/* Streaming SIMD Extensions 3 */
+#define	CPUID2_PCLMUL	0x0002	/* PCLMULQDQ instructions */
 #define	CPUID2_DTES64	0x0004	/* 64-bit Debug Trace */
 #define	CPUID2_MONITOR	0x0008	/* MONITOR/MWAIT instructions */
 #define	CPUID2_DS_CPL	0x0010	/* CPL Qualified Debug Store */
@@ -263,13 +282,18 @@
 #define	CPUID2_SSE42	0x0010	/* Streaming SIMD Extensions 4.2 */
 #define	CPUID2_X2APIC	0x0020	/* xAPIC Extensions */
 #define	CPUID2_POPCNT	0x0080	/* popcount instruction available */
+#define	CPUID2_AES	0x0200	/* AES instructions */
+#define	CPUID2_XSAVE	0x0400	/* XSAVE instructions */
+#define	CPUID2_OSXSAVE	0x0800	/* XGETBV/XSETBV instructions */
+#define	CPUID2_AVX	0x1000	/* AVX instructions */
+#define	CPUID2_F16C	0x2000	/* half precision conversion */
 #define	CPUID2_RAZ	0x8000	/* 

CVS commit: src/sys/arch/x86/include

2011-02-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Feb 15 10:11:25 UTC 2011

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
update cpuid bits


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/x86/include/specialreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pckbport

2011-02-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Feb  8 07:32:47 UTC 2011

Modified Files:
src/sys/dev/pckbport: pmsreg.h

Log Message:
add PS/2 registers from synaptics spec:
PMS_RESET_WRAP_MODE, PMS_SET_WRAP_MODE, PMS_ACK, PMS_ERROR and PMS_RESEND

while here use #definetab consistently.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pckbport/pmsreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pckbport/pmsreg.h
diff -u src/sys/dev/pckbport/pmsreg.h:1.2 src/sys/dev/pckbport/pmsreg.h:1.3
--- src/sys/dev/pckbport/pmsreg.h:1.2	Sun Dec 11 12:23:22 2005
+++ src/sys/dev/pckbport/pmsreg.h	Tue Feb  8 07:32:47 2011
@@ -1,19 +1,24 @@
-/* $NetBSD: pmsreg.h,v 1.2 2005/12/11 12:23:22 christos Exp $ */
+/* $NetBSD: pmsreg.h,v 1.3 2011/02/08 07:32:47 cegger Exp $ */
 
 /* mouse commands */
-#define	PMS_SET_SCALE11	0xe6	/* set scaling 1:1 */
-#define	PMS_SET_SCALE21 0xe7	/* set scaling 2:1 */
-#define	PMS_SET_RES	0xe8	/* set resolution (0..3) */
-#define	PMS_GET_SCALE	0xe9	/* get scaling factor */
-#define PMS_SEND_DEV_STATUS	0xe9
-#define	PMS_SET_STREAM	0xea	/* set streaming mode */
-#define PMS_SEND_DEV_DATA	0xeb
-#define PMS_SET_REMOTE_MODE	0xf0
-#define PMS_SEND_DEV_ID	0xf2
-#define	PMS_SET_SAMPLE	0xf3	/* set sampling rate */
-#define	PMS_DEV_ENABLE	0xf4	/* mouse on */
-#define	PMS_DEV_DISABLE	0xf5	/* mouse off */
-#define PMS_SET_DEFAULTS	0xf6
-#define	PMS_RESET	0xff	/* reset */
+#define	PMS_SET_SCALE11		0xe6	/* set scaling 1:1 */
+#define	PMS_SET_SCALE21		0xe7	/* set scaling 2:1 */
+#define	PMS_SET_RES		0xe8	/* set resolution (0..3) */
+#define	PMS_GET_SCALE		0xe9	/* get scaling factor */
+#define	PMS_SEND_DEV_STATUS	0xe9	/* status request */
+#define	PMS_SET_STREAM		0xea	/* set streaming mode */
+#define	PMS_SEND_DEV_DATA	0xeb	/* read data */
+#define	PMS_RESET_WRAP_MODE	0xec
+#define	PMS_SET_WRAP_MODE	0xed
+#define	PMS_SET_REMOTE_MODE	0xf0
+#define	PMS_SEND_DEV_ID		0xf2	/* read device type */
+#define	PMS_SET_SAMPLE		0xf3	/* set sampling rate */
+#define	PMS_DEV_ENABLE		0xf4	/* mouse on */
+#define	PMS_DEV_DISABLE		0xf5	/* mouse off */
+#define	PMS_SET_DEFAULTS	0xf6
+#define	PMS_ACK			0xfa
+#define	PMS_ERROR		0xfc
+#define	PMS_RESEND		0xfe
+#define	PMS_RESET		0xff	/* reset */
 
-#define	PMS_RSTDONE	0xaa
+#define	PMS_RSTDONE		0xaa



CVS commit: src/sys/dev/pckbport

2011-02-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Feb  8 07:32:47 UTC 2011

Modified Files:
src/sys/dev/pckbport: pmsreg.h

Log Message:
add PS/2 registers from synaptics spec:
PMS_RESET_WRAP_MODE, PMS_SET_WRAP_MODE, PMS_ACK, PMS_ERROR and PMS_RESEND

while here use #definetab consistently.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pckbport/pmsreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pckbport

2011-01-29 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 29 20:37:25 UTC 2011

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
use aprint_debug_dev and get rid of SYNAPTICSDEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pckbport/synaptics.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.25 src/sys/dev/pckbport/synaptics.c:1.26
--- src/sys/dev/pckbport/synaptics.c:1.25	Mon Nov 15 05:58:18 2010
+++ src/sys/dev/pckbport/synaptics.c	Sat Jan 29 20:37:24 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.25 2010/11/15 05:58:18 uebayasi Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.26 2011/01/29 20:37:24 cegger Exp $	*/
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include opt_pms.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: synaptics.c,v 1.25 2010/11/15 05:58:18 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: synaptics.c,v 1.26 2011/01/29 20:37:24 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -147,10 +147,8 @@
 	res |= pckbport_poll_cmd(psc-sc_kbctag, psc-sc_kbcslot, cmd, 1, 3,
 	resp, 0);
 	if (res) {
-#ifdef SYNAPTICSDEBUG
-		aprint_normal_dev(psc-sc_dev,
+		aprint_debug_dev(psc-sc_dev,
 		synaptics_probe: Identify Touchpad error.\n);
-#endif
 		/*
 		 * Reset device in case the probe confused it.
 		 */
@@ -162,10 +160,8 @@
 	}
 
 	if (resp[1] != SYNAPTICS_MAGIC_BYTE) {
-#ifdef SYNAPTICSDEBUG
-		aprint_normal_dev(psc-sc_dev,
+		aprint_debug_dev(psc-sc_dev,
 		synaptics_probe: Not synaptics.\n);
-#endif
 		res = 1;
 		goto doreset;
 	}
@@ -205,10 +201,8 @@
 		sc-flags |= SYN_FLAG_HAS_BUTTONS_4_5;
 
 	if (sc-caps  SYNAPTICS_CAP_EXTENDED) {
-#ifdef SYNAPTICSDEBUG
-		aprint_normal_dev(psc-sc_dev,
+		aprint_debug_dev(psc-sc_dev,
 		synaptics_probe: Capabilities 0x%04x.\n, sc-caps);
-#endif
 		if (sc-caps  SYNAPTICS_CAP_PASSTHROUGH)
 			sc-flags |= SYN_FLAG_HAS_PASSTHROUGH;
 
@@ -225,12 +219,10 @@
 			cmd[0] = PMS_SEND_DEV_STATUS;
 			res |= pckbport_poll_cmd(psc-sc_kbctag,
 			psc-sc_kbcslot, cmd, 1, 3, resp, 0);
-#ifdef SYNAPTICSDEBUG
 			if (res == 0)
-aprint_normal_dev(psc-sc_dev,
+aprint_debug_dev(psc-sc_dev,
 synaptics_probe: Extended 
 Capabilities 0x%02x.\n, resp[1]);
-#endif
 			if (!res  (resp[1]  4) = 2) {
 /* Yes. */
 sc-flags |= SYN_FLAG_HAS_UP_DOWN_BUTTONS;
@@ -790,20 +782,16 @@
 	switch (psc-inputstate) {
 	case 0:
 		if ((data  0xc8) != 0x80) {
-#ifdef SYNAPTICSDEBUG
-			aprint_normal_dev(psc-sc_dev,
+			aprint_debug_dev(psc-sc_dev,
 			pms_input: 0x%02x out of sync\n, data);
-#endif
 			return;	/* not in sync yet, discard input */
 		}
 		/*FALLTHROUGH*/
 
 	case 3:
 		if ((data  8) == 8) {
-#ifdef SYNAPTICSDEBUG
-			aprint_normal_dev(psc-sc_dev,
+			aprint_debug_dev(psc-sc_dev,
 			pms_input: dropped in relative mode, reset\n);
-#endif
 			psc-inputstate = 0;
 			psc-sc_enabled = 0;
 			wakeup(psc-sc_enabled);



CVS commit: src/sys/dev/pckbport

2011-01-29 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 29 20:37:25 UTC 2011

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
use aprint_debug_dev and get rid of SYNAPTICSDEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pckbport/synaptics.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2011-01-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 22 08:13:47 UTC 2011

Modified Files:
src/sys/dev/mii: atphy.c
src/sys/dev/pci: if_ale.c

Log Message:
Fixes from PR kern/44395 Masanori Kanaoka:
- Fix register address in ale_phy_reset(). from linux
- Fix mask value in ale_stop_mac().
- Fix multicast handling. from openbsd
- Fix phy reset handling.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_ale.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.7 src/sys/dev/mii/atphy.c:1.8
--- src/sys/dev/mii/atphy.c:1.7	Sat Dec 11 18:10:16 2010
+++ src/sys/dev/mii/atphy.c	Sat Jan 22 08:13:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.7 2010/12/11 18:10:16 matt Exp $ */
+/*	$NetBSD: atphy.c,v 1.8 2011/01/22 08:13:47 cegger Exp $ */
 /*	$OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.7 2010/12/11 18:10:16 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.8 2011/01/22 08:13:47 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -118,6 +118,7 @@
 	struct mii_attach_args *ma = aux;
 	struct mii_data *mii = ma-mii_data;
 	const struct mii_phydesc *mpd;
+	uint16_t bmsr;
 
 	mpd = mii_phy_match(ma, etphys);
 	aprint_naive(: Media interface\n);
@@ -135,7 +136,8 @@
 
 	PHY_RESET(sc);
 
-	sc-mii_capabilities = PHY_READ(sc, MII_BMSR)  ma-mii_capmask;
+	bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR);
+	sc-mii_capabilities = bmsr  ma-mii_capmask;
 	if (sc-mii_capabilities  BMSR_EXTSTAT)
 		sc-mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
 
@@ -220,8 +222,7 @@
 		/*
 		 * Reset the PHY so all changes take effect.
 		 */
-		PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET | BMCR_AUTOEN |
-		BMCR_STARTNEG);
+		PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_AUTOEN | BMCR_STARTNEG);
 done:
 		break;
 
@@ -364,9 +365,12 @@
 	reg |= ATPHY_SCR_POLARITY_REVERSAL;
 	PHY_WRITE(sc, ATPHY_SCR, reg);
 
-	/* Workaround F1 bug to reset phy. */
 	atphy_mii_phy_auto(sc);
 
+	/* Workaround F1 bug to reset phy. */
+	reg = PHY_READ(sc, MII_BMCR) | BMCR_RESET;
+	PHY_WRITE(sc, MII_BMCR, reg);
+
 	for (i = 0; i  1000; i++) {
 		DELAY(1);
 		if ((PHY_READ(sc, MII_BMCR)  BMCR_RESET) == 0)
@@ -386,7 +390,7 @@
 	if (sc-mii_extcapabilities  (EXTSR_1000TFDX | EXTSR_1000THDX))
 		PHY_WRITE(sc, MII_100T2CR, GTCR_ADV_1000TFDX |
 		GTCR_ADV_1000THDX);
-	PHY_WRITE(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
+	PHY_WRITE(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
 
 	return EJUSTRETURN;
 }

Index: src/sys/dev/pci/if_ale.c
diff -u src/sys/dev/pci/if_ale.c:1.12 src/sys/dev/pci/if_ale.c:1.13
--- src/sys/dev/pci/if_ale.c:1.12	Tue Jul 20 09:17:24 2010
+++ src/sys/dev/pci/if_ale.c	Sat Jan 22 08:13:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ale.c,v 1.12 2010/07/20 09:17:24 cegger Exp $	*/
+/*	$NetBSD: if_ale.c,v 1.13 2011/01/22 08:13:47 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2008, Pyun YongHyeon yong...@freebsd.org
@@ -32,7 +32,7 @@
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_ale.c,v 1.12 2010/07/20 09:17:24 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_ale.c,v 1.13 2011/01/22 08:13:47 cegger Exp $);
 
 #include vlan.h
 
@@ -367,12 +367,12 @@
 	ale_miibus_writereg(sc-sc_dev, sc-ale_phyaddr,
 	ATPHY_DBG_ADDR, 0x04);
 	ale_miibus_writereg(sc-sc_dev, sc-ale_phyaddr,
-	ATPHY_DBG_ADDR, 0x8BBB);
+	ATPHY_DBG_DATA, 0x8BBB);
 	/* 10BT center tap voltage. */
 	ale_miibus_writereg(sc-sc_dev, sc-ale_phyaddr,
 	ATPHY_DBG_ADDR, 0x05);
 	ale_miibus_writereg(sc-sc_dev, sc-ale_phyaddr,
-	ATPHY_DBG_ADDR, 0x2C46);
+	ATPHY_DBG_DATA, 0x2C46);
 
 #undef	ATPHY_DBG_ADDR
 #undef	ATPHY_DBG_DATA
@@ -1910,7 +1910,7 @@
 
 	reg = CSR_READ_4(sc, ALE_MAC_CFG);
 	if ((reg  (MAC_CFG_TX_ENB | MAC_CFG_RX_ENB)) != 0) {
-		reg = ~MAC_CFG_TX_ENB | MAC_CFG_RX_ENB;
+		reg = ~(MAC_CFG_TX_ENB | MAC_CFG_RX_ENB);
 		CSR_WRITE_4(sc, ALE_MAC_CFG, reg);
 	}
 
@@ -2015,7 +2015,7 @@
 
 		ETHER_FIRST_MULTI(step, ec, enm);
 		while (enm != NULL) {
-			crc = ether_crc32_le(enm-enm_addrlo, ETHER_ADDR_LEN);
+			crc = ether_crc32_be(enm-enm_addrlo, ETHER_ADDR_LEN);
 			mchash[crc  31] |= 1  ((crc  26)  0x1f);
 			ETHER_NEXT_MULTI(step, enm);
 		}



CVS commit: src/sys/dev

2011-01-22 Thread Christoph Egger
 $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -51,6 +51,7 @@
 
 #include dev/wscons/wsconsio.h
 #include dev/wscons/wsdisplayvar.h
+#include dev/pci/wsdisplay_pci.h
 
 #include opt_vga.h
 
@@ -313,6 +314,10 @@
 		return pci_devioctl(psc-sc_pc, psc-sc_pcitag,
 		cmd, data, flag, l);
 
+	case WSDISPLAYIO_GET_BUSID:
+		return wsdisplayio_busid_pci(vc-softc-sc_dev,
+		psc-sc_pc, psc-sc_pcitag, data);
+
 	default:
 		return EPASSTHROUGH;
 	}

Index: src/sys/dev/pci/wcfb.c
diff -u src/sys/dev/pci/wcfb.c:1.7 src/sys/dev/pci/wcfb.c:1.8
--- src/sys/dev/pci/wcfb.c:1.7	Thu Dec 16 06:45:51 2010
+++ src/sys/dev/pci/wcfb.c	Sat Jan 22 15:14:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wcfb.c,v 1.7 2010/12/16 06:45:51 cegger Exp $ */
+/*	$NetBSD: wcfb.c,v 1.8 2011/01/22 15:14:28 cegger Exp $ */
 
 /*-
  * Copyright (c) 2010 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wcfb.c,v 1.7 2010/12/16 06:45:51 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: wcfb.c,v 1.8 2011/01/22 15:14:28 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -52,6 +52,7 @@
 #include dev/wsfont/wsfont.h
 #include dev/rasops/rasops.h
 #include dev/wscons/wsdisplay_vconsvar.h
+#include dev/pci/wsdisplay_pci.h
 
 #include opt_wsfb.h
 #include opt_wsdisplay_compat.h
@@ -318,6 +319,11 @@
 	case PCI_IOC_CFGWRITE:
 		return pci_devioctl(sc-sc_pc, sc-sc_pcitag,
 		cmd, data, flag, l);
+
+	case WSDISPLAYIO_GET_BUSID:
+		return wsdisplayio_busid_pci(sc-sc_dev, sc-sc_pc,
+		sc-sc_pcitag, data);
+
 	case WSDISPLAYIO_SMODE: {
 		/*int new_mode = *(int*)data, i;*/
 		}

Index: src/sys/dev/wscons/wsconsio.h
diff -u src/sys/dev/wscons/wsconsio.h:1.93 src/sys/dev/wscons/wsconsio.h:1.94
--- src/sys/dev/wscons/wsconsio.h:1.93	Sat Oct  2 00:52:02 2010
+++ src/sys/dev/wscons/wsconsio.h	Sat Jan 22 15:14:28 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: wsconsio.h,v 1.93 2010/10/02 00:52:02 macallan Exp $ */
+/* $NetBSD: wsconsio.h,v 1.94 2011/01/22 15:14:28 cegger Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -542,4 +542,26 @@
 #define	WSMUXIO_INJECTEVENT	_IOW('W', 100, struct wscons_event)
 #define	WSMUX_INJECTEVENT	WSMUXIO_INJECTEVENT /* XXX compat */
 
+/* Mapping information retrieval. */
+struct wsdisplayio_bus_id {
+u_int bus_type;
+#define WSDISPLAYIO_BUS_PCI	0
+#define WSDISPLAYIO_BUS_SBUS	1
+union bus_data {
+struct bus_pci {
+uint32_t domain;
+uint32_t bus;
+uint32_t device;
+uint32_t function;
+} pci;
+struct bus_sbus {
+uint32_t fb_instance;
+} sbus;
+/* so the size doesn't change if we add more bus types */
+char pad[32];
+} ubus;
+};
+
+#define WSDISPLAYIO_GET_BUSID	_IOR('W', 101, struct wsdisplayio_bus_id)
+
 #endif /* _DEV_WSCONS_WSCONSIO_H_ */

Added files:

Index: src/sys/dev/pci/wsdisplay_pci.c
diff -u /dev/null src/sys/dev/pci/wsdisplay_pci.c:1.1
--- /dev/null	Sat Jan 22 15:14:28 2011
+++ src/sys/dev/pci/wsdisplay_pci.c	Sat Jan 22 15:14:28 2011
@@ -0,0 +1,53 @@
+/*	$NetBSD: wsdisplay_pci.c,v 1.1 2011/01/22 15:14:28 cegger Exp $ */
+/*
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christoph Egger.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: wsdisplay_pci.c,v 1.1 2011/01/22 15:14:28 cegger Exp $);
+
+#include sys/param.h
+#include sys/bus.h
+#include dev/pci/pcivar.h
+#include dev/wscons/wsconsio.h
+#include dev/pci/wsdisplay_pci.h
+
+int
+wsdisplayio_busid_pci(device_t self, pci_chipset_tag_t pc,
+pcitag_t tag

CVS commit: xsrc/external/mit/libpciaccess/dist/src

2011-01-22 Thread Christoph Egger
Module Name:xsrc
Committed By:   cegger
Date:   Sat Jan 22 15:18:57 UTC 2011

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c

Log Message:
Implement pci_device_is_boot_vga() for NetBSD using new WSDISPLAYIO_GET_BUSID 
ioctl.
This lets Xorg start on machines with more than one PCI display device
instead of exiting with 'Primary device is not PCI'.

First discussed with macallan@ then public on tech-kern@ and tech-x11@.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.8 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.9
--- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.8	Wed Jan 12 19:03:50 2011
+++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c	Sat Jan 22 15:18:57 2011
@@ -40,6 +40,7 @@
 
 
 #include pci.h
+#include dev/wscons/wsconsio.h
 
 #include pciaccess.h
 #include pciaccess_private.h
@@ -247,6 +248,43 @@
 	return 0;
 }
 
+static int
+pci_device_netbsd_boot_vga(struct pci_device *dev)
+{
+	int ret;
+	struct wsdisplayio_bus_id busid;
+	int fd;
+
+	fd = open(/dev/ttyE0, O_RDONLY);
+	if (fd == -1) {
+		fprintf(stderr, failed to open /dev/ttyE0: %s\n,
+		strerror(errno));
+		return 0;
+	}
+
+	ret = ioctl(fd, WSDISPLAYIO_GET_BUSID, busid);
+	close(fd);
+	if (ret == -1) {
+		fprintf(stderr, ioctl WSDISPLAYIO_GET_BUSID failed: %s\n,
+		strerror(errno));
+		return 0;
+	}
+
+	if (busid.bus_type != WSDISPLAYIO_BUS_PCI)
+		return 0;
+
+	if (busid.ubus.pci.domain != dev-domain)
+		return 0;
+	if (busid.ubus.pci.bus != dev-bus)
+		return 0;
+	if (busid.ubus.pci.device != dev-dev)
+		return 0;
+	if (busid.ubus.pci.function != dev-func)
+		return 0;
+
+	return 1;
+}
+
 static void
 pci_system_netbsd_destroy(void)
 {
@@ -479,7 +517,8 @@
 	.unmap_range = pci_device_netbsd_unmap_range,
 	.read = pci_device_netbsd_read,
 	.write = pci_device_netbsd_write,
-	.fill_capabilities = pci_fill_capabilities_generic
+	.fill_capabilities = pci_fill_capabilities_generic,
+	.boot_vga = pci_device_netbsd_boot_vga,
 };
 
 int



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86/common

2011-01-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 22 15:21:37 UTC 2011

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86/common: Makefile

Log Message:
Define HAVE_PCI_DEVICE_IS_BOOT_VGA.
Makes Xorg use of pci_device_is_boot_vga.

First discussed with macallan@ then public on tech-kern@ and tech-x11@


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.15 src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.16
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile:1.15	Mon Nov 29 09:34:41 2010
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile	Sat Jan 22 15:21:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2010/11/29 09:34:41 skrll Exp $
+#	$NetBSD: Makefile,v 1.16 2011/01/22 15:21:37 cegger Exp $
 
 .include bsd.sys.mk # for HOST_SH
 
@@ -83,7 +83,8 @@
 		-D__XSERVERNAME__='Xorg' -D__XCONFIGFILE__='xorg.conf' \
 		-D__VENDORDWEBSUPPORT__='http://wiki.X.Org;' \
 		-DXVENDORNAME='The X.Org Foundation' \
-		-DHAVE_XORG_CONFIG_H
+		-DHAVE_XORG_CONFIG_H \
+		-DHAVE_PCI_DEVICE_IS_BOOT_VGA
 
 .if ${MACHINE_ARCH} == i386
 CPPFLAGS+=	-DPCCONS_SUPPORT -DPCVT_SUPPORT



CVS commit: src/sys/dev/mii

2011-01-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 22 18:26:12 UTC 2011

Modified Files:
src/sys/dev/mii: atphy.c

Log Message:
fix comment. from PR kern/44395


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/mii/atphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/mii/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.8 src/sys/dev/mii/atphy.c:1.9
--- src/sys/dev/mii/atphy.c:1.8	Sat Jan 22 08:13:47 2011
+++ src/sys/dev/mii/atphy.c	Sat Jan 22 18:26:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.8 2011/01/22 08:13:47 cegger Exp $ */
+/*	$NetBSD: atphy.c,v 1.9 2011/01/22 18:26:12 cegger Exp $ */
 /*	$OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.8 2011/01/22 08:13:47 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.9 2011/01/22 18:26:12 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -220,7 +220,7 @@
 		PHY_WRITE(sc, MII_ANAR, anar);
 
 		/*
-		 * Reset the PHY so all changes take effect.
+		 * Start autonegotiation.
 		 */
 		PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_AUTOEN | BMCR_STARTNEG);
 done:



CVS commit: src/sys/dev

2011-01-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 22 08:13:47 UTC 2011

Modified Files:
src/sys/dev/mii: atphy.c
src/sys/dev/pci: if_ale.c

Log Message:
Fixes from PR kern/44395 Masanori Kanaoka:
- Fix register address in ale_phy_reset(). from linux
- Fix mask value in ale_stop_mac().
- Fix multicast handling. from openbsd
- Fix phy reset handling.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/mii/atphy.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_ale.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev

2011-01-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 22 15:14:28 UTC 2011

Modified Files:
src/sys/dev/pci: chipsfb.c files.pci genfb_pci.c machfb.c pm2fb.c
r128fb.c radeonfb.c tga.c unichromefb.c vga_pci.c voodoofb.c
voyagerfb.c wcfb.c
src/sys/dev/wscons: wsconsio.h
Added Files:
src/sys/dev/pci: wsdisplay_pci.c wsdisplay_pci.h

Log Message:
Implement new WSDISPLAYIO_GET_BUSID ioctl.
It returns the bus id and allows userland (like Xorg) to create mapping
of ttyE? and bus id. For now only PCI is implemented.

First discussed with macallan@ then public on tech-kern@ and tech-x11@


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/chipsfb.c
cvs rdiff -u -r1.335 -r1.336 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/pci/genfb_pci.c \
src/sys/dev/pci/voodoofb.c
cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/machfb.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/pm2fb.c src/sys/dev/pci/voyagerfb.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/r128fb.c
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/pci/tga.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/unichromefb.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/vga_pci.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/wcfb.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/wsdisplay_pci.c \
src/sys/dev/pci/wsdisplay_pci.h
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/wscons/wsconsio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/libpciaccess/dist/src

2011-01-22 Thread Christoph Egger
Module Name:xsrc
Committed By:   cegger
Date:   Sat Jan 22 15:18:57 UTC 2011

Modified Files:
xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c

Log Message:
Implement pci_device_is_boot_vga() for NetBSD using new WSDISPLAYIO_GET_BUSID 
ioctl.
This lets Xorg start on machines with more than one PCI display device
instead of exiting with 'Primary device is not PCI'.

First discussed with macallan@ then public on tech-kern@ and tech-x11@.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86/common

2011-01-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 22 15:21:37 UTC 2011

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86/common: Makefile

Log Message:
Define HAVE_PCI_DEVICE_IS_BOOT_VGA.
Makes Xorg use of pci_device_is_boot_vga.

First discussed with macallan@ then public on tech-kern@ and tech-x11@


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/common/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/mii

2011-01-22 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jan 22 18:26:12 UTC 2011

Modified Files:
src/sys/dev/mii: atphy.c

Log Message:
fix comment. from PR kern/44395


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/mii/atphy.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2011-01-21 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Jan 21 16:56:38 UTC 2011

Modified Files:
src/sys/uvm: uvm_pglist.c

Log Message:
buildfix: use PRIxPADDR for type paddr_t


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/uvm/uvm_pglist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.52 src/sys/uvm/uvm_pglist.c:1.53
--- src/sys/uvm/uvm_pglist.c:1.52	Tue Jan 18 21:43:29 2011
+++ src/sys/uvm/uvm_pglist.c	Fri Jan 21 16:56:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.52 2011/01/18 21:43:29 matt Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.53 2011/01/21 16:56:38 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.52 2011/01/18 21:43:29 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.53 2011/01/21 16:56:38 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -205,7 +205,7 @@
 		 * Found a suitable starting page.  See if the range is free.
 		 */
 #ifdef PGALLOC_VERBOSE
-		printf(%s: ps=%p try=%#x end=%#x skip=%#x, align=%#x,
+		printf(%s: ps=%p try=%#x end=%#x skip=%#x, align=0x%PRIxPADDR,
 		__func__, ps, tryidx, end, skip, alignment);
 #endif
 		/*



CVS commit: src/sys/kern

2011-01-19 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Jan 19 09:02:53 UTC 2011

Modified Files:
src/sys/kern: kern_malloc_debug.c

Log Message:
buildfix: uvm_extern.h - uvm.h


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/kern/kern_malloc_debug.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_malloc_debug.c
diff -u src/sys/kern/kern_malloc_debug.c:1.24 src/sys/kern/kern_malloc_debug.c:1.25
--- src/sys/kern/kern_malloc_debug.c:1.24	Mon Jan 17 07:13:31 2011
+++ src/sys/kern/kern_malloc_debug.c	Wed Jan 19 09:02:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_malloc_debug.c,v 1.24 2011/01/17 07:13:31 uebayasi Exp $	*/
+/*	$NetBSD: kern_malloc_debug.c,v 1.25 2011/01/19 09:02:52 cegger Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Artur Grabowski a...@openbsd.org
@@ -56,7 +56,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_malloc_debug.c,v 1.24 2011/01/17 07:13:31 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_malloc_debug.c,v 1.25 2011/01/19 09:02:52 cegger Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -65,7 +65,7 @@
 #include sys/systm.h
 #include sys/pool.h
 
-#include uvm/uvm_extern.h
+#include uvm/uvm.h
 
 /*
  * debug_malloc_type and debug_malloc_size define the type and size of



CVS commit: src/sys/arch/xen/include

2011-01-10 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Jan 10 11:13:03 UTC 2011

Modified Files:
src/sys/arch/xen/include: xenio.h

Log Message:
fix typo in ioctl definition


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/xen/include/xenio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/include/xenio.h
diff -u src/sys/arch/xen/include/xenio.h:1.8 src/sys/arch/xen/include/xenio.h:1.9
--- src/sys/arch/xen/include/xenio.h:1.8	Wed Dec 15 14:45:47 2010
+++ src/sys/arch/xen/include/xenio.h	Mon Jan 10 11:13:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: xenio.h,v 1.8 2010/12/15 14:45:47 cegger Exp $	*/
+/*	$NetBSD: xenio.h,v 1.9 2011/01/10 11:13:03 cegger Exp $	*/
 
 /**
  * privcmd.h
@@ -112,7 +112,7 @@
 #define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
 _IOR('P', 5, int)
 #define IOCTL_PRIVCMD_MMAPBATCH_V2  \
-_IOW('P, 6, privcmd_mmapbatch_v2_t)
+_IOW('P', 6, privcmd_mmapbatch_v2_t)
 
 /* Interface to /dev/xenevt */
 /* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */



CVS commit: src/sys/dev/pci

2011-01-10 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Jan 10 14:19:36 UTC 2011

Modified Files:
src/sys/dev/pci: ppb.c

Log Message:
add missing break


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/ppb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ppb.c
diff -u src/sys/dev/pci/ppb.c:1.44 src/sys/dev/pci/ppb.c:1.45
--- src/sys/dev/pci/ppb.c:1.44	Mon Jan 10 12:23:21 2011
+++ src/sys/dev/pci/ppb.c	Mon Jan 10 14:19:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppb.c,v 1.44 2011/01/10 12:23:21 jmcneill Exp $	*/
+/*	$NetBSD: ppb.c,v 1.45 2011/01/10 14:19:36 cegger Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.44 2011/01/10 12:23:21 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.45 2011/01/10 14:19:36 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -101,6 +101,7 @@
 	switch (reg  PCI_PCIE_XCAP_VER_MASK) {
 	case PCI_PCIE_XCAP_VER_1_0:
 		aprint_normal(1.0);
+		break;
 	case PCI_PCIE_XCAP_VER_2_0:
 		aprint_normal(2.0);
 		break;



CVS commit: src/sys/arch/xen/include

2011-01-10 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Jan 10 11:13:03 UTC 2011

Modified Files:
src/sys/arch/xen/include: xenio.h

Log Message:
fix typo in ioctl definition


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/xen/include/xenio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2011-01-10 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Jan 10 14:19:36 UTC 2011

Modified Files:
src/sys/dev/pci: ppb.c

Log Message:
add missing break


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/pci/ppb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/acpi

2011-01-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Jan  7 14:08:29 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_ec.c

Log Message:
use aprint_error_dev


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/acpi/acpi_ec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_ec.c
diff -u src/sys/dev/acpi/acpi_ec.c:1.67 src/sys/dev/acpi/acpi_ec.c:1.68
--- src/sys/dev/acpi/acpi_ec.c:1.67	Sun Jun  6 18:56:10 2010
+++ src/sys/dev/acpi/acpi_ec.c	Fri Jan  7 14:08:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_ec.c,v 1.67 2010/06/06 18:56:10 jruoho Exp $	*/
+/*	$NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger jo...@netbsd.org.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.67 2010/06/06 18:56:10 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $);
 
 #include sys/param.h
 #include sys/callout.h
@@ -735,8 +735,8 @@
 	snprintf(qxx, sizeof(qxx), _Q%02X, (unsigned int)reg);
 	rv = AcpiEvaluateObject(sc-sc_ech, qxx, NULL, NULL);
 	if (rv != AE_OK  rv != AE_NOT_FOUND) {
-		aprint_error(%s: GPE query method %s failed: %s,
-		device_xname(dv), qxx, AcpiFormatException(rv));
+		aprint_error_dev(dv, GPE query method %s failed: %s,
+		qxx, AcpiFormatException(rv));
 	}
 
 	goto loop;



CVS commit: src/sys/dev/acpi

2011-01-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Fri Jan  7 14:08:29 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_ec.c

Log Message:
use aprint_error_dev


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/acpi/acpi_ec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2011-01-06 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Jan  6 11:07:49 UTC 2011

Modified Files:
src/sys/external/bsd/drm/dist/bsd-core: drm_pciids.h

Log Message:
recognize Radeon HD 4200. This lets radeondrm(4) attach.
go ahead macallan@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h
diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.4 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.5
--- src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.4	Sat Jun 26 23:00:19 2010
+++ src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h	Thu Jan  6 11:07:48 2011
@@ -393,6 +393,7 @@
 	{0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI Mobility Radeon 4300 Series}, \
 	{0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI Mobility Radeon 4500 Series}, \
 	{0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI Mobility Radeon 4500 Series}, \
+	{0x1002, 0x9712, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon Mobility HD 4200}, \
 	{0, 0, 0, NULL}
 
 #define r128_PCI_IDS \



CVS commit: src/sys/external/bsd/drm/dist/bsd-core

2011-01-06 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Jan  6 11:07:49 UTC 2011

Modified Files:
src/sys/external/bsd/drm/dist/bsd-core: drm_pciids.h

Log Message:
recognize Radeon HD 4200. This lets radeondrm(4) attach.
go ahead macallan@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/dev/pci

2010-12-24 Thread Christoph Egger
On 24.12.10 00:56, Michael wrote:
 Hello,
 
 On Dec 23, 2010, at 4:34 PM, Christoph Egger wrote:
 
 Module Name:src
 Committed By:cegger
 Date:Thu Dec 23 21:34:02 UTC 2010
 
 Modified Files:
 src/sys/dev/pci: voyagerfb.c
 
 Log Message:
 read 32bits instead of 64bits and truncate the upper 32bits
 
 Please stop making unnecessary changes to drivers you can't test on
 actual hardware.

Sorry, should have mentioned this makes the i386 ALL kernel linking.

Christoph


Re: CVS commit: src/sys/dev/pci

2010-12-24 Thread Christoph Egger
On 24.12.10 11:07, Izumi Tsutsui wrote:
 Modified Files:
 src/sys/dev/pci: voyagerfb.c

 Log Message:
 read 32bits instead of 64bits and truncate the upper 32bits

 Please stop making unnecessary changes to drivers you can't test on
 actual hardware.

 Sorry, should have mentioned this makes the i386 ALL kernel linking.
 
 Adding a bogus fix to make ALL buildable is quite silly.
 
 bus_space_read_8(9) is a documented MI API and
 MD implementation should provide bus_space_read_8()
 if the machine really needs the driver in its kernel,
 or don't enable the device on i386.

The 'reg' variable is of type 'uint32_t'.
So why using bus_space_read_8() when
bus_space_read_4() gives the same result?

Christoph


Re: CVS commit: src/sys/dev/pci

2010-12-24 Thread Christoph Egger
On 24.12.10 14:11, Michael wrote:
 Hello,
 
 On Dec 24, 2010, at 4:13 AM, Christoph Egger wrote:
 
 On 24.12.10 00:56, Michael wrote:
 Hello,

 On Dec 23, 2010, at 4:34 PM, Christoph Egger wrote:

 Module Name:src
 Committed By:cegger
 Date:Thu Dec 23 21:34:02 UTC 2010

 Modified Files:
src/sys/dev/pci: voyagerfb.c

 Log Message:
 read 32bits instead of 64bits and truncate the upper 32bits

 Please stop making unnecessary changes to drivers you can't test on
 actual hardware.
 
 Sorry, should have mentioned this makes the i386 ALL kernel linking.
 
 Are you trying to tell me that i386 doesn't have bus_space_*_8()
 methods? I'd call that a bug.

It is declared but not implemented. I got an 'undefined reference'
linking error.

Christoph


CVS commit: src/sys/dev/pci

2010-12-23 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 23 21:34:02 UTC 2010

Modified Files:
src/sys/dev/pci: voyagerfb.c

Log Message:
read 32bits instead of 64bits and truncate the upper 32bits


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/voyagerfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/voyagerfb.c
diff -u src/sys/dev/pci/voyagerfb.c:1.5 src/sys/dev/pci/voyagerfb.c:1.6
--- src/sys/dev/pci/voyagerfb.c:1.5	Thu Dec 16 06:45:51 2010
+++ src/sys/dev/pci/voyagerfb.c	Thu Dec 23 21:34:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: voyagerfb.c,v 1.5 2010/12/16 06:45:51 cegger Exp $	*/
+/*	$NetBSD: voyagerfb.c,v 1.6 2010/12/23 21:34:02 cegger Exp $	*/
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v 1.5 2010/12/16 06:45:51 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: voyagerfb.c,v 1.6 2010/12/23 21:34:02 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -207,7 +207,7 @@
 	sc-sc_dataport = bus_space_vaddr(sc-sc_memt, sc-sc_regh);
 	sc-sc_dataport += SM502_DATAPORT;
 
-	reg = bus_space_read_8(sc-sc_memt, sc-sc_regh, SM502_PANEL_DISP_CRTL);
+	reg = bus_space_read_4(sc-sc_memt, sc-sc_regh, SM502_PANEL_DISP_CRTL);
 	switch (reg  SM502_PDC_DEPTH_MASK) {
 		case SM502_PDC_8BIT:
 			sc-sc_depth = 8;



Re: CVS commit: src/tests/usr.sbin/traceroute

2010-12-15 Thread Christoph Egger

 Module Name:  src
 Committed By: pooka
 Date: Wed Dec 15 00:13:52 UTC 2010
 
 Added Files:
   src/tests/usr.sbin/traceroute: Makefile t_traceroute.sh
 
 Log Message:
 Add simple tests for traceroute.  The test bootstraps a three-node
 network with one router in the middle and checks traceroute from
 one endpoint to another with both UDP and ICMP.
 
 (i guess these test networking at least as much as traceroute
 itself, but then again that's not a bad thing)

This breaks release build:

==  2 missing files in DESTDIR  
Files in flist but missing from DESTDIR.
File wasn't installed ?  
--
./usr/tests/usr.sbin/traceroute/Atffile   
./usr/tests/usr.sbin/traceroute/t_traceroute  
  end of 2 missing files  ==  
*** [checkflist] Error code 1

Christoph


Re: CVS commit: src/tests/usr.sbin/traceroute

2010-12-15 Thread Christoph Egger
 
 On Dec,Wednesday 15 2010, at 11:27 AM, Christoph Egger wrote:
 
  
  Module Name:   src
  Committed By:  pooka
  Date:  Wed Dec 15 00:13:52 UTC 2010
  
  Added Files:
 src/tests/usr.sbin/traceroute: Makefile t_traceroute.sh
  
  Log Message:
  Add simple tests for traceroute.  The test bootstraps a three-node
  network with one router in the middle and checks traceroute from
  one endpoint to another with both UDP and ICMP.
  
  (i guess these test networking at least as much as traceroute
  itself, but then again that's not a bad thing)
  
  This breaks release build:
  
  ==  2 missing files in DESTDIR  
  Files in flist but missing from DESTDIR.
  File wasn't installed ?  
  --
  ./usr/tests/usr.sbin/traceroute/Atffile   
  ./usr/tests/usr.sbin/traceroute/t_traceroute  
    end of 2 missing files  ==  
  *** [checkflist] Error code 1
 
 Update src/tests and re run your build should be fixed now.
 
 Regards
 
 Adam.

Confirmed. Thanks.

Christoph

 


CVS commit: src/sys/arch/xen/include

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 14:28:22 UTC 2010

Added Files:
src/sys/arch/xen/include: xenio_gntdev.h

Log Message:
add gnttab ioctl definitions to implement


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/xen/include/xenio_gntdev.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/arch/xen/include/xenio_gntdev.h
diff -u /dev/null src/sys/arch/xen/include/xenio_gntdev.h:1.1
--- /dev/null	Wed Dec 15 14:28:22 2010
+++ src/sys/arch/xen/include/xenio_gntdev.h	Wed Dec 15 14:28:22 2010
@@ -0,0 +1,119 @@
+/**
+ * gntdev.h
+ * 
+ * Interface to /dev/xen/gntdev.
+ * 
+ * Copyright (c) 2007, D G Murray
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation; or, when distributed
+ * separately from the Linux kernel or incorporated into other
+ * software packages, subject to the following license:
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the Software), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __XEN_GNTDEV_H__
+#define __XEN_GNTDEV_H__
+
+struct ioctl_gntdev_grant_ref {
+	/* The domain ID of the grant to be mapped. */
+	uint32_t domid;
+	/* The grant reference of the grant to be mapped. */
+	uint32_t ref;
+};
+
+/*
+ * Inserts the grant references into the mapping table of an instance
+ * of gntdev. N.B. This does not perform the mapping, which is deferred
+ * until mmap() is called with @index as the offset.
+ */
+#define IOCTL_GNTDEV_MAP_GRANT_REF\
+	_IOWR('G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
+struct ioctl_gntdev_map_grant_ref {
+	/* IN parameters */
+	/* The number of grants to be mapped. */
+	uint32_t count;
+	uint32_t pad;
+	/* OUT parameters */
+	/* The offset to be used on a subsequent call to mmap(). */
+	uint64_t index;
+	/* Variable IN parameter. */
+	/* Array of grant references, of size @count. */
+	struct ioctl_gntdev_grant_ref refs[1];
+};
+
+/*
+ * Removes the grant references from the mapping table of an instance of
+ * of gntdev. N.B. munmap() must be called on the relevant virtual address(es)
+ * before this ioctl is called, or an error will result.
+ */
+#define IOCTL_GNTDEV_UNMAP_GRANT_REF\
+	_IOW('G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))   
+struct ioctl_gntdev_unmap_grant_ref {
+	/* IN parameters */
+	/* The offset was returned by the corresponding map operation. */
+	uint64_t index;
+	/* The number of pages to be unmapped. */
+	uint32_t count;
+	uint32_t pad;
+};
+
+/*
+ * Returns the offset in the driver's address space that corresponds
+ * to @vaddr. This can be used to perform a munmap(), followed by an
+ * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by
+ * the caller. The number of pages that were allocated at the same time as
+ * @vaddr is returned in @count.
+ *
+ * N.B. Where more than one page has been mapped into a contiguous range, the
+ *  supplied @vaddr must correspond to the start of the range; otherwise
+ *  an error will result. It is only possible to munmap() the entire
+ *  contiguously-allocated range at once, and not any subrange thereof.
+ */
+#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR			\
+	_IOWR('G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
+struct ioctl_gntdev_get_offset_for_vaddr {
+	/* IN parameters */
+	/* The virtual address of the first mapped page in a range. */
+	uint64_t vaddr;
+	/* OUT parameters */
+	/* The offset that was used in the initial mmap() operation. */
+	uint64_t offset;
+	/* The number of pages mapped in the VM area that begins at @vaddr. */
+	uint32_t count;
+	uint32_t pad;
+};
+
+/*
+ * Sets the maximum number of grants that may mapped at once by this gntdev
+ * instance.
+ *
+ * N.B. This must be called before any other ioctl is 

CVS commit: src/sys/arch/xen/include

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 14:45:47 UTC 2010

Modified Files:
src/sys/arch/xen/include: xenio.h

Log Message:
add privcmd ioctl that got introduced with Xen 4


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/xen/include/xenio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/include/xenio.h
diff -u src/sys/arch/xen/include/xenio.h:1.7 src/sys/arch/xen/include/xenio.h:1.8
--- src/sys/arch/xen/include/xenio.h:1.7	Fri Sep  3 06:07:24 2010
+++ src/sys/arch/xen/include/xenio.h	Wed Dec 15 14:45:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xenio.h,v 1.7 2010/09/03 06:07:24 cegger Exp $	*/
+/*	$NetBSD: xenio.h,v 1.8 2010/12/15 14:45:47 cegger Exp $	*/
 
 /**
  * privcmd.h
@@ -58,6 +58,14 @@
 unsigned long *arr; /* array of mfns - top nibble set on err */
 } privcmd_mmapbatch_t; 
 
+typedef struct privcmd_mmapbatch_v2 {
+int num; /* number of pages to populate */
+domid_t dom; /* target domain */
+uint64_t addr;  /* virtual address */
+const xen_pfn_t *arr; /* array of mfns */
+int *err; /* array of error codes */
+} privcmd_mmapbatch_v2_t; 
+
 typedef struct privcmd_blkmsg
 {
 unsigned long op;
@@ -103,6 +111,8 @@
  */
 #define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
 _IOR('P', 5, int)
+#define IOCTL_PRIVCMD_MMAPBATCH_V2  \
+_IOW('P, 6, privcmd_mmapbatch_v2_t)
 
 /* Interface to /dev/xenevt */
 /* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */



CVS commit: src/usr.sbin/cpuctl/arch

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 17:09:07 UTC 2010

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
beautify printing of SVM features across multiple lines


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/cpuctl/arch/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.22 src/usr.sbin/cpuctl/arch/i386.c:1.23
--- src/usr.sbin/cpuctl/arch/i386.c:1.22	Tue Feb 23 08:46:33 2010
+++ src/usr.sbin/cpuctl/arch/i386.c	Wed Dec 15 17:09:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.22 2010/02/23 08:46:33 cegger Exp $	*/
+/*	$NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: i386.c,v 1.22 2010/02/23 08:46:33 cegger Exp $);
+__RCSID($NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -1491,9 +1491,14 @@
 			aprint_verbose(%s: SVM Rev. %d\n, cpuname,
 			data[0]  0xf);
 			aprint_verbose(%s: SVM NASID %d\n, cpuname, data[1]);
-			snprintb(buf, sizeof(buf), CPUID_AMD_SVM_FLAGS,
-			data[3]);
-			aprint_verbose(%s: SVM features %s\n, cpuname, buf);
+			snprintb_m(buf, sizeof(buf), CPUID_AMD_SVM_FLAGS,
+   data[3], MAX_FEATURE_LEN);
+			bp = buf;
+			while (*bp != '\0') {
+aprint_verbose(%s: SVM features %s\n,
+cpuname, bp);
+bp += strlen(bp) + 1;
+			}
 		}
 	}
 



CVS commit: src/sys/dev/pci

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 06:19:01 UTC 2010

Modified Files:
src/sys/dev/pci: chipsfb.c

Log Message:
ioctl: KNF switch-case


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/chipsfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/chipsfb.c
diff -u src/sys/dev/pci/chipsfb.c:1.22 src/sys/dev/pci/chipsfb.c:1.23
--- src/sys/dev/pci/chipsfb.c:1.22	Sat Nov 13 13:52:05 2010
+++ src/sys/dev/pci/chipsfb.c	Thu Dec 16 06:19:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: chipsfb.c,v 1.22 2010/11/13 13:52:05 uebayasi Exp $	*/
+/*	$NetBSD: chipsfb.c,v 1.23 2010/12/16 06:19:01 cegger Exp $	*/
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: chipsfb.c,v 1.22 2010/11/13 13:52:05 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: chipsfb.c,v 1.23 2010/12/16 06:19:01 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -820,44 +820,43 @@
 	struct vcons_screen *ms = vd-active;
 
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
-			return 0;
-
-		case WSDISPLAYIO_GINFO:
-			wdf = (void *)data;
-			wdf-height = ms-scr_ri.ri_height;
-			wdf-width = ms-scr_ri.ri_width;
-			wdf-depth = ms-scr_ri.ri_depth;
-			wdf-cmsize = 256;
-			return 0;
-
-		case WSDISPLAYIO_GETCMAP:
-			return chipsfb_getcmap(sc,
-			(struct wsdisplay_cmap *)data);
-
-		case WSDISPLAYIO_PUTCMAP:
-			return chipsfb_putcmap(sc,
-			(struct wsdisplay_cmap *)data);
-
-		/* PCI config read/write passthrough. */
-		case PCI_IOC_CFGREAD:
-		case PCI_IOC_CFGWRITE:
-			return (pci_devioctl(sc-sc_pc, sc-sc_pcitag,
-			cmd, data, flag, l));
-
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int*)data;
-if (new_mode != sc-sc_mode) {
-	sc-sc_mode = new_mode;
-	if(new_mode == WSDISPLAYIO_MODE_EMUL) {
-		chipsfb_restore_palette(sc);
-		vcons_redraw_screen(ms);
-	}
-}
+	case WSDISPLAYIO_GTYPE:
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
+		return 0;
+
+	case WSDISPLAYIO_GINFO:
+		wdf = (void *)data;
+		wdf-height = ms-scr_ri.ri_height;
+		wdf-width = ms-scr_ri.ri_width;
+		wdf-depth = ms-scr_ri.ri_depth;
+		wdf-cmsize = 256;
+		return 0;
+
+	case WSDISPLAYIO_GETCMAP:
+		return chipsfb_getcmap(sc,
+		(struct wsdisplay_cmap *)data);
+
+	case WSDISPLAYIO_PUTCMAP:
+		return chipsfb_putcmap(sc,
+		(struct wsdisplay_cmap *)data);
+
+	/* PCI config read/write passthrough. */
+	case PCI_IOC_CFGREAD:
+	case PCI_IOC_CFGWRITE:
+		return pci_devioctl(sc-sc_pc, sc-sc_pcitag,
+		cmd, data, flag, l);
+
+	case WSDISPLAYIO_SMODE: {
+		int new_mode = *(int*)data;
+		if (new_mode != sc-sc_mode) {
+			sc-sc_mode = new_mode;
+			if(new_mode == WSDISPLAYIO_MODE_EMUL) {
+chipsfb_restore_palette(sc);
+vcons_redraw_screen(ms);
 			}
-			return 0;
+		}
+		}
+		return 0;
 	}
 	return EPASSTHROUGH;
 }



CVS commit: src/sys/dev/pci

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 06:45:51 UTC 2010

Modified Files:
src/sys/dev/pci: genfb_pci.c machfb.c pm2fb.c r128fb.c radeonfb.c
unichromefb.c vga_pci.c voodoofb.c voyagerfb.c wcfb.c

Log Message:
ioctl: KNF switch-case, remove useless brackets


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/genfb_pci.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/machfb.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/pm2fb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/r128fb.c \
src/sys/dev/pci/unichromefb.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/vga_pci.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/voodoofb.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/voyagerfb.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/wcfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/genfb_pci.c
diff -u src/sys/dev/pci/genfb_pci.c:1.25 src/sys/dev/pci/genfb_pci.c:1.26
--- src/sys/dev/pci/genfb_pci.c:1.25	Thu Oct  7 07:53:54 2010
+++ src/sys/dev/pci/genfb_pci.c	Thu Dec 16 06:45:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb_pci.c,v 1.25 2010/10/07 07:53:54 macallan Exp $ */
+/*	$NetBSD: genfb_pci.c,v 1.26 2010/12/16 06:45:50 cegger Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: genfb_pci.c,v 1.25 2010/10/07 07:53:54 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: genfb_pci.c,v 1.26 2010/12/16 06:45:50 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -188,27 +188,26 @@
 	struct pci_genfb_softc *sc = v;
 
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
-			return 0;
-
-		/* PCI config read/write passthrough. */
-		case PCI_IOC_CFGREAD:
-		case PCI_IOC_CFGWRITE:
-			return (pci_devioctl(sc-sc_pc, sc-sc_pcitag,
-			cmd, data, flag, l));
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int*)data, i;
-if (new_mode == WSDISPLAYIO_MODE_EMUL) {
-	for (i = 0; i  9; i++)
-		pci_conf_write(sc-sc_pc,
-		 sc-sc_pcitag,
-		 0x10 + (i  2),
-		 sc-sc_bars[i]);
-}
-			}
-			return 0;
+	case WSDISPLAYIO_GTYPE:
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
+		return 0;
+
+	/* PCI config read/write passthrough. */
+	case PCI_IOC_CFGREAD:
+	case PCI_IOC_CFGWRITE:
+		return pci_devioctl(sc-sc_pc, sc-sc_pcitag,
+		cmd, data, flag, l);
+	case WSDISPLAYIO_SMODE: {
+		int new_mode = *(int*)data, i;
+		if (new_mode == WSDISPLAYIO_MODE_EMUL) {
+			for (i = 0; i  9; i++)
+pci_conf_write(sc-sc_pc,
+ sc-sc_pcitag,
+ 0x10 + (i  2),
+ sc-sc_bars[i]);
+		}
+		}
+		return 0;
 	}
 
 	return EPASSTHROUGH;

Index: src/sys/dev/pci/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.61 src/sys/dev/pci/machfb.c:1.62
--- src/sys/dev/pci/machfb.c:1.61	Sat Oct  2 23:54:03 2010
+++ src/sys/dev/pci/machfb.c	Thu Dec 16 06:45:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.61 2010/10/02 23:54:03 macallan Exp $	*/
+/*	$NetBSD: machfb.c,v 1.62 2010/12/16 06:45:50 cegger Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 __KERNEL_RCSID(0, 
-	$NetBSD: machfb.c,v 1.61 2010/10/02 23:54:03 macallan Exp $);
+	$NetBSD: machfb.c,v 1.62 2010/12/16 06:45:50 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1679,58 +1679,55 @@
 	struct vcons_screen *ms = vd-active;
 	
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			/* XXX is this the right type to return? */
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;	
-			return 0;
-
-		case WSDISPLAYIO_LINEBYTES:
-			*(u_int *)data = sc-virt_x * sc-bits_per_pixel / 8;
-			return 0;
-
-		case WSDISPLAYIO_GINFO:
-			wdf = (void *)data;
-			wdf-height = sc-virt_y;
-			wdf-width = sc-virt_x;
-			wdf-depth = sc-bits_per_pixel;
-			wdf-cmsize = 256;
-			return 0;
-			
-		case WSDISPLAYIO_GETCMAP:
-			return mach64_getcmap(sc, 
-			(struct wsdisplay_cmap *)data);
-
-		case WSDISPLAYIO_PUTCMAP:
-			return mach64_putcmap(sc, 
-			(struct wsdisplay_cmap *)data);
-			
-		/* PCI config read/write passthrough. */
-		case PCI_IOC_CFGREAD:
-		case PCI_IOC_CFGWRITE:
-			return (pci_devioctl(sc-sc_pc, sc-sc_pcitag,
-			cmd, data, flag, l));
-			
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int*)data;
+	case WSDISPLAYIO_GTYPE:
+		/* XXX is this the right type to return? */
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;	
+		return 0;
 
-if (new_mode != sc-sc_mode)
-{
-	sc-sc_mode = new_mode;
-	if ((new_mode == WSDISPLAYIO_MODE_EMUL)
-	 (ms != NULL))
-	{
-		/* restore initial video mode */
-		mach64_init(sc);
-		mach64_init_engine(sc);
-		mach64_init_lut(sc);
-		mach64_modeswitch(sc, sc-sc_my_mode);
-		vcons_redraw_screen(ms);
-	}
-}
+	case WSDISPLAYIO_LINEBYTES:
+		*(u_int *)data = sc-virt_x * 

CVS commit: src/sys/dev/pci

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 07:02:07 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Brdige - Bridge


To generate a diff of this commit:
cvs rdiff -u -r1.1053 -r1.1054 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1053 src/sys/dev/pci/pcidevs:1.1054
--- src/sys/dev/pci/pcidevs:1.1053	Sat Dec 11 17:45:38 2010
+++ src/sys/dev/pci/pcidevs	Thu Dec 16 07:02:07 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1053 2010/12/11 17:45:38 matt Exp $
+$NetBSD: pcidevs,v 1.1054 2010/12/16 07:02:07 cegger Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -990,7 +990,7 @@
 product AMD RS780_PPB_GFX	0x9602	RS780 PCI-PCI Bridge (int gfx)
 product AMD RS780_PPB_GFX0	0x9603	RS780 PCI-PCI Bridge (ext gfx port 0)
 product AMD RS780_PPB0		0x9604	RS780 PCI-PCIE Bridge (port 0)
-product AMD RS780_PPB1		0x9605	RS780 PCI-PCIE Brdige (port 1)
+product AMD RS780_PPB1		0x9605	RS780 PCI-PCIE Bridge (port 1)
 product AMD RS780_PPB2		0x9606	RS780 PCI-PCIE Bridge (port 2)
 
 /* American Megatrends products */



CVS commit: src/sys/arch/i386/conf

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 07:51:22 UTC 2010

Modified Files:
src/sys/arch/i386/conf: ALL

Log Message:
add PCI VGA drivers


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/sys/arch/i386/conf/ALL

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.280 src/sys/arch/i386/conf/ALL:1.281
--- src/sys/arch/i386/conf/ALL:1.280	Sat Nov 27 20:18:46 2010
+++ src/sys/arch/i386/conf/ALL	Thu Dec 16 07:51:21 2010
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.280 2010/11/27 20:18:46 christos Exp $
+# $NetBSD: ALL,v 1.281 2010/12/16 07:51:21 cegger Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ALL-$Revision: 1.280 $
+#ident 		ALL-$Revision: 1.281 $
 
 maxusers	64		# estimated number of users
 
@@ -576,8 +576,16 @@
 wskbd*		at pckbd? console ?
 wsmouse*	at pms? mux 0
 
-# VIA Unichrome framebuffer console
-unichromefb*	at pci? dev ? function ?
+chipsfb*	at pci? dev ? function ?
+genfb*		at pci? dev ? function ?
+machfb*		at pci? dev ? function ?
+pm2fb*		at pci? dev ? function ?
+r128fb*		at pci? dev ? function ?
+radeonfb*	at pci? dev ? function ?
+unichromefb*	at pci? dev ? function ?  # VIA Unichrome framebuffer console
+voodoofb*	at pci? dev ? function ?
+voyagerfb*	at pci? dev ? function ?
+wcfb*	at pci? dev ? function ?
 wsdisplay*	at unichromefb?
 
 # XBOX framebuffer console



CVS commit: src/sys/arch/i386/xbox

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Dec 16 07:59:10 UTC 2010

Modified Files:
src/sys/arch/i386/xbox: xboxfb.c

Log Message:
ioctl: KNF switch-case


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/xbox/xboxfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/xbox/xboxfb.c
diff -u src/sys/arch/i386/xbox/xboxfb.c:1.13 src/sys/arch/i386/xbox/xboxfb.c:1.14
--- src/sys/arch/i386/xbox/xboxfb.c:1.13	Wed Apr 28 19:17:04 2010
+++ src/sys/arch/i386/xbox/xboxfb.c	Thu Dec 16 07:59:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xboxfb.c,v 1.13 2010/04/28 19:17:04 dyoung Exp $	*/
+/*	$NetBSD: xboxfb.c,v 1.14 2010/12/16 07:59:10 cegger Exp $	*/
 
 /*
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xboxfb.c,v 1.13 2010/04/28 19:17:04 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: xboxfb.c,v 1.14 2010/12/16 07:59:10 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -244,40 +244,39 @@
 	struct vcons_screen *ms = vd-active;
 
 	switch (cmd) {
-		case WSDISPLAYIO_GTYPE:
-			*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
-			return 0;
-
-		case WSDISPLAYIO_GINFO:
-			wdf = (void *)data;
-			wdf-height = xboxfb_console_height;
-			wdf-width = xboxfb_console_width;
-			wdf-depth = ms-scr_ri.ri_depth;
-			wdf-cmsize = 256;
-			return 0;
-
-		case WSDISPLAYIO_GETCMAP:
-			return EINVAL;
-
-		case WSDISPLAYIO_PUTCMAP:
-			return EINVAL;
-
-		case WSDISPLAYIO_LINEBYTES:
-			*(u_int *)data = ms-scr_ri.ri_stride;
-			return 0;
-
-		case WSDISPLAYIO_SMODE:
-			{
-int new_mode = *(int *)data;
-if (new_mode != sc-sc_mode) {
-	sc-sc_mode = new_mode;
-	if (new_mode == WSDISPLAYIO_MODE_EMUL) {
-		xboxfb_clear_fb(sc);
-		vcons_redraw_screen(vd-active);
-	}
+	case WSDISPLAYIO_GTYPE:
+		*(u_int *)data = WSDISPLAY_TYPE_PCIMISC;
+		return 0;
+
+	case WSDISPLAYIO_GINFO:
+		wdf = (void *)data;
+		wdf-height = xboxfb_console_height;
+		wdf-width = xboxfb_console_width;
+		wdf-depth = ms-scr_ri.ri_depth;
+		wdf-cmsize = 256;
+		return 0;
+
+	case WSDISPLAYIO_GETCMAP:
+		return EINVAL;
+
+	case WSDISPLAYIO_PUTCMAP:
+		return EINVAL;
+
+	case WSDISPLAYIO_LINEBYTES:
+		*(u_int *)data = ms-scr_ri.ri_stride;
+		return 0;
+
+	case WSDISPLAYIO_SMODE: {
+			int new_mode = *(int *)data;
+			if (new_mode != sc-sc_mode) {
+sc-sc_mode = new_mode;
+if (new_mode == WSDISPLAYIO_MODE_EMUL) {
+	xboxfb_clear_fb(sc);
+	vcons_redraw_screen(vd-active);
 }
 			}
-			return 0;
+		}
+		return 0;
 	}
 	return EPASSTHROUGH;
 }



CVS commit: src/sys/arch/xen/include

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 14:45:47 UTC 2010

Modified Files:
src/sys/arch/xen/include: xenio.h

Log Message:
add privcmd ioctl that got introduced with Xen 4


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/xen/include/xenio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/cpuctl/arch

2010-12-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Dec 15 17:09:07 UTC 2010

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
beautify printing of SVM features across multiple lines


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/cpuctl/arch/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/nfs

2010-12-14 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Dec 14 16:25:19 UTC 2010

Modified Files:
src/sys/nfs: nfs_vnops.c

Log Message:
back out rev. 1.285. The problem I try to hunt down
in PR 42455 is not in the network stack as shown by PR 44206.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/nfs/nfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/nfs/nfs_vnops.c
diff -u src/sys/nfs/nfs_vnops.c:1.287 src/sys/nfs/nfs_vnops.c:1.288
--- src/sys/nfs/nfs_vnops.c:1.287	Tue Nov 30 10:43:05 2010
+++ src/sys/nfs/nfs_vnops.c	Tue Dec 14 16:25:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vnops.c,v 1.287 2010/11/30 10:43:05 dholland Exp $	*/
+/*	$NetBSD: nfs_vnops.c,v 1.288 2010/12/14 16:25:18 cegger Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.287 2010/11/30 10:43:05 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.288 2010/12/14 16:25:18 cegger Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -1369,14 +1369,6 @@
 		if (v3) {
 			wccflag = NFSV3_WCCCHK;
 			nfsm_wcc_data(vp, wccflag, NAC_NOTRUNC, !error);
-
-			/* Diagnostic check: The KASSERT hits when PR 42455
-			 * is reproduced.
-			 */
-			if (ctx.nwc_mbufcount = 2) {
-KASSERT(mb-m_next != NULL);
-			}
-
 			if (!error) {
 nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED
 	+ NFSX_V3WRITEVERF);



CVS commit: src/sys/nfs

2010-12-14 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Dec 14 16:58:59 UTC 2010

Modified Files:
src/sys/nfs: nfs_vnops.c

Log Message:
Initialize mutex and cv after sanity checks


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/nfs/nfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/nfs/nfs_vnops.c
diff -u src/sys/nfs/nfs_vnops.c:1.288 src/sys/nfs/nfs_vnops.c:1.289
--- src/sys/nfs/nfs_vnops.c:1.288	Tue Dec 14 16:25:18 2010
+++ src/sys/nfs/nfs_vnops.c	Tue Dec 14 16:58:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vnops.c,v 1.288 2010/12/14 16:25:18 cegger Exp $	*/
+/*	$NetBSD: nfs_vnops.c,v 1.289 2010/12/14 16:58:58 cegger Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.288 2010/12/14 16:25:18 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.289 2010/12/14 16:58:58 cegger Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -1278,10 +1278,6 @@
 	int rlen, commit;
 #endif
 
-	mutex_init(ctx.nwc_lock, MUTEX_DRIVER, IPL_VM);
-	cv_init(ctx.nwc_cv, nfsmblk);
-	ctx.nwc_mbufcount = 1;
-
 	if (vp-v_mount-mnt_flag  MNT_RDONLY) {
 		panic(writerpc readonly vp %p, vp);
 	}
@@ -1292,7 +1288,12 @@
 #endif
 	tsiz = uiop-uio_resid;
 	if (uiop-uio_offset + tsiz  nmp-nm_maxfilesize)
-		return (EFBIG);
+		return EFBIG;
+
+	mutex_init(ctx.nwc_lock, MUTEX_DRIVER, IPL_VM);
+	cv_init(ctx.nwc_cv, nfsmblk);
+	ctx.nwc_mbufcount = 1;
+
 retry:
 	origresid = uiop-uio_resid;
 	KASSERT(origresid == uiop-uio_iov-iov_len);



CVS commit: src/sys/nfs

2010-12-14 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Dec 14 16:25:19 UTC 2010

Modified Files:
src/sys/nfs: nfs_vnops.c

Log Message:
back out rev. 1.285. The problem I try to hunt down
in PR 42455 is not in the network stack as shown by PR 44206.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/nfs/nfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/nfs

2010-12-14 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Dec 14 16:58:59 UTC 2010

Modified Files:
src/sys/nfs: nfs_vnops.c

Log Message:
Initialize mutex and cv after sanity checks


To generate a diff of this commit:
cvs rdiff -u -r1.288 -r1.289 src/sys/nfs/nfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src

2010-12-13 Thread Christoph Egger
On 13.12.10 22:15, Antti Kantee wrote:
 Module Name:  src
 Committed By: pooka
 Date: Mon Dec 13 21:15:31 UTC 2010
 
 Modified Files:
   src/distrib/sets/lists/base: mi
   src/distrib/sets/lists/comp: mi
   src/usr.bin/netstat: Makefile bpf.c if.c inet.c inet6.c main.c mbuf.c
   show.c unix.c
 Added Files:
   src/usr.bin/netstat: netstat_hostops.c netstat_rumpops.c prog_ops.h
 
 Log Message:
 Add netstat rump client.  For now, it always sets -X, i.e. will
 use only sysctl and no kvm (implementing /dev/mem for a rump kernel
 would probably not be hard, but still a non-zero effort).
 
 Note: since there is absolutely no network activity in a fresh rump
 kernel, rump.netstat usually displays exactly nothing when invoked
 without parameters.  Arguments like -r, -bi, -p icmp etc. produce
 more stuff.
 

Does that allow to remove the suid bit from netstat?

Christoph


CVS commit: src/usr.sbin/fwctl

2010-12-13 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Dec 13 11:51:23 UTC 2010

Modified Files:
src/usr.sbin/fwctl: fwcontrol.c

Log Message:
PR bin/44230: Missing close.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/fwctl/fwcontrol.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/fwctl/fwcontrol.c
diff -u src/usr.sbin/fwctl/fwcontrol.c:1.10 src/usr.sbin/fwctl/fwcontrol.c:1.11
--- src/usr.sbin/fwctl/fwcontrol.c:1.10	Thu Aug 26 07:04:04 2010
+++ src/usr.sbin/fwctl/fwcontrol.c	Mon Dec 13 11:51:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwcontrol.c,v 1.10 2010/08/26 07:04:04 cegger Exp $	*/
+/*	$NetBSD: fwcontrol.c,v 1.11 2010/12/13 11:51:23 cegger Exp $	*/
 /*
  * Copyright (C) 2002
  * 	Hidetoshi Shimokawa. All rights reserved.
@@ -34,7 +34,7 @@
  */
 #include sys/cdefs.h
 //__FBSDID($FreeBSD: src/usr.sbin/fwcontrol/fwcontrol.c,v 1.23 2006/10/26 22:33:38 imp Exp $);
-__RCSID($NetBSD: fwcontrol.c,v 1.10 2010/08/26 07:04:04 cegger Exp $);
+__RCSID($NetBSD: fwcontrol.c,v 1.11 2010/12/13 11:51:23 cegger Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -492,6 +492,7 @@
 		fscanf(file, DUMP_FORMAT, p, p+1, p+2, p+3, p+4, p+5, p+6, p+7);
 		p += 8;
 	}
+	fclose(file);
 }
 
 static void



CVS commit: src/share/man/man9

2010-12-11 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Dec 11 17:15:03 UTC 2010

Modified Files:
src/share/man/man9: ioctl.9

Log Message:
add pci(4) and ossaudio(3)

yes, be careful. They can easily conflict. Actually when this happens kdump
fails compiling due to 'duplicate case value'


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/man/man9/ioctl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/ioctl.9
diff -u src/share/man/man9/ioctl.9:1.28 src/share/man/man9/ioctl.9:1.29
--- src/share/man/man9/ioctl.9:1.28	Fri May 14 18:39:05 2010
+++ src/share/man/man9/ioctl.9	Sat Dec 11 17:15:03 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: ioctl.9,v 1.28 2010/05/14 18:39:05 joerg Exp $
+.\ $NetBSD: ioctl.9,v 1.29 2010/12/11 17:15:03 cegger Exp $
 .\
 .\ Copyright (c) 1999  The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd December 7, 2001
+.Dd December 11, 2010
 .Dt IOCTL 9
 .Os
 .Sh NAME
@@ -168,6 +168,10 @@
 .It 'P'
 printer/plotter interface (hp300)
 .It 'P'
+pci(4)
+.It 'P'
+ossaudio(3)
+.It 'P'
 .Xr magma 4
 bpp (sparc)
 .It 'q'



CVS commit: src/share/man/man9

2010-12-11 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Dec 11 17:32:15 UTC 2010

Modified Files:
src/share/man/man9: ioctl.9

Log Message:
ossaudio(3) - compat/ossaudio and soundcard.h

suggested by Ian Hibbert


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/ioctl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/ioctl.9
diff -u src/share/man/man9/ioctl.9:1.29 src/share/man/man9/ioctl.9:1.30
--- src/share/man/man9/ioctl.9:1.29	Sat Dec 11 17:15:03 2010
+++ src/share/man/man9/ioctl.9	Sat Dec 11 17:32:14 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: ioctl.9,v 1.29 2010/12/11 17:15:03 cegger Exp $
+.\ $NetBSD: ioctl.9,v 1.30 2010/12/11 17:32:14 cegger Exp $
 .\
 .\ Copyright (c) 1999  The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -170,7 +170,7 @@
 .It 'P'
 pci(4)
 .It 'P'
-ossaudio(3)
+compat/ossaudio and soundcard.h
 .It 'P'
 .Xr magma 4
 bpp (sparc)



CVS commit: src/share/man/man9

2010-12-11 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Dec 11 17:32:15 UTC 2010

Modified Files:
src/share/man/man9: ioctl.9

Log Message:
ossaudio(3) - compat/ossaudio and soundcard.h

suggested by Ian Hibbert


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/ioctl.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys

2010-11-29 Thread Christoph Egger
On 30.11.10 05:31, Jukka Ruohonen wrote:
 Module Name:  src
 Committed By: jruoho
 Date: Tue Nov 30 04:31:00 UTC 2010
 
 Modified Files:
   src/sys/arch/x86/acpi: acpi_cpu_md.c
   src/sys/dev/acpi: acpi_cpu.h acpi_cpu_cstate.c
 
 Log Message:
 Add AMD C1E quirk. Tested by ceg...@.
 
   (a) This should be removed once C-states are supported.
 
   (b) As there seems to be no reliable way to detect whether C1E is present,
   the quirk blindly assumes that C1E is used on families 10h and 11h.

On family 10h there is a reliable way to detect C1E via OSVW.
Anyway, thanks for doing this.

Christoph


Re: CVS commit: src/usr.bin/make

2010-11-26 Thread Christoph Egger

 Original-Nachricht 
 Datum: Fri, 26 Nov 2010 13:56:22 + (UTC)
 Von: chris...@astron.com
 An: source-changes-d@NetBSD.org
 Betreff: Re: CVS commit: src/usr.bin/make

 In article 20101126105706.ga18...@homeworld.netbsd.org,
 Martin Husemann  mar...@homeworld.netbsd.org wrote:
 On Thu, Nov 25, 2010 at 04:31:10PM -0500, Christos Zoulas wrote:
  Module Name:   src
  Committed By:  christos
  Date:  Thu Nov 25 21:31:09 UTC 2010
  
  Modified Files:
 src/usr.bin/make: arch.c compat.c make.c make.h targ.c
  
  Log Message:
  Instead of keeping around the mtime of the youngest child, keep a
 pointer
  to it, so that we can print it when we do the out of date
 determination.
 
 This makes -current fail on amd64:
 
 --- dependall-gnu ---
 [1]   Segmentation fault (core dumped) /usr/tools/bin/n...
 *** [dependall-host-libiberty] Error code 139

BTW: It works on a clean build.

 I must have forgotten to test for cmgn NULL somewhere; where
 does gdb say that it dies?

Core was generated by `nbmake'.
Program terminated with signal 11, Segmentation fault.
#0  0x0040261b in Arch_LibOODate ()
(gdb) bt
#0  0x0040261b in Arch_LibOODate ()
#1  0x0040f919 in Make_OODate ()
#2  0x0040fcde in MakeStartJobs ()
#3  0x0040ff6c in Make_Run ()
#4  0x0040e7b3 in main ()
(gdb) 


Re: CVS commit: src/usr.bin/make

2010-11-26 Thread Christoph Egger

 On Nov 26,  3:34pm, christoph_eg...@gmx.de (Christoph Egger) wrote:
 -- Subject: Re: CVS commit: src/usr.bin/make
 
 | BTW: It works on a clean build.
 | 
 |  I must have forgotten to test for cmgn NULL somewhere; where
 |  does gdb say that it dies?
 | 
 | Core was generated by `nbmake'.
 | Program terminated with signal 11, Segmentation fault.
 | #0  0x0040261b in Arch_LibOODate ()
 | (gdb) bt
 | #0  0x0040261b in Arch_LibOODate ()
 | #1  0x0040f919 in Make_OODate ()
 | #2  0x0040fcde in MakeStartJobs ()
 | #3  0x0040ff6c in Make_Run ()
 | #4  0x0040e7b3 in main ()
 | (gdb) 
 
 Thanks, try now!

Works for me. Tnx for fixing.

Christoph


CVS commit: src/sys/kern

2010-11-24 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Nov 24 14:49:18 UTC 2010

Modified Files:
src/sys/kern: uipc_mbuf.c

Log Message:
No need to print '0x' twice in the printing of
the mbuf flags via 'show mbuf'


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/kern/uipc_mbuf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/uipc_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.137 src/sys/kern/uipc_mbuf.c:1.138
--- src/sys/kern/uipc_mbuf.c:1.137	Thu Oct 28 14:21:50 2010
+++ src/sys/kern/uipc_mbuf.c	Wed Nov 24 14:49:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.137 2010/10/28 14:21:50 seanb Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.138 2010/11/24 14:49:18 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.137 2010/10/28 14:21:50 seanb Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.138 2010/11/24 14:49:18 cegger Exp $);
 
 #include opt_mbuftrace.h
 #include opt_nmbclusters.h
@@ -1600,7 +1600,7 @@
 nextchain:
 	(*pr)(MBUF %p\n, m);
 	snprintb(buf, sizeof(buf), M_FLAGS_BITS, (u_int)m-m_flags);
-	(*pr)(  data=%p, len=%d, type=%d, flags=0x%s\n,
+	(*pr)(  data=%p, len=%d, type=%d, flags=%s\n,
 	m-m_data, m-m_len, m-m_type, buf);
 	(*pr)(  owner=%p, next=%p, nextpkt=%p\n, m-m_owner, m-m_next,
 	m-m_nextpkt);



CVS commit: src/sys/arch/x86/x86

2010-11-24 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Nov 24 14:56:18 UTC 2010

Modified Files:
src/sys/arch/x86/x86: intr.c

Log Message:
when DDB is enabled then use 'db_printf'
for 'call intr_printconfig' to respect the 25 lines on vga output


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/x86/x86/intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.68 src/sys/arch/x86/x86/intr.c:1.69
--- src/sys/arch/x86/x86/intr.c:1.68	Thu Jun 17 06:40:28 2010
+++ src/sys/arch/x86/x86/intr.c	Wed Nov 24 14:56:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.68 2010/06/17 06:40:28 mrg Exp $	*/
+/*	$NetBSD: intr.c,v 1.69 2010/11/24 14:56:18 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.68 2010/06/17 06:40:28 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.69 2010/11/24 14:56:18 cegger Exp $);
 
 #include opt_intrdebug.h
 #include opt_multiprocessor.h
@@ -176,6 +176,10 @@
 #include dev/pci/ppbreg.h
 #endif
 
+#ifdef DDB
+#include ddb/db_output.h
+#endif
+
 struct pic softintr_pic = {
 	.pic_name = softintr_fakepic,
 	.pic_type = PIC_SOFT,
@@ -1057,6 +1061,11 @@
 }
 
 #if defined(INTRDEBUG) || defined(DDB)
+
+#ifdef DDB
+#define printf db_printf
+#endif
+
 void
 intr_printconfig(void)
 {
@@ -1086,6 +1095,9 @@
 		}
 	}
 }
+#ifdef DDB
+#undef printf
+#endif
 #endif
 
 void



CVS commit: src/sys/kern

2010-11-24 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Nov 24 14:49:18 UTC 2010

Modified Files:
src/sys/kern: uipc_mbuf.c

Log Message:
No need to print '0x' twice in the printing of
the mbuf flags via 'show mbuf'


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/kern/uipc_mbuf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/x86

2010-11-24 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Wed Nov 24 14:56:18 UTC 2010

Modified Files:
src/sys/arch/x86/x86: intr.c

Log Message:
when DDB is enabled then use 'db_printf'
for 'call intr_printconfig' to respect the 25 lines on vga output


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/x86/x86/intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/uvm

2010-11-18 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 18 11:49:42 UTC 2010

Modified Files:
src/sys/uvm: uvm_pglist.c

Log Message:
build fix: vm_physmem_index is only used with DEBUG.
Fix build when DIAGNOSTIC is enabled but not DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/uvm/uvm_pglist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_pglist.c
diff -u src/sys/uvm/uvm_pglist.c:1.49 src/sys/uvm/uvm_pglist.c:1.50
--- src/sys/uvm/uvm_pglist.c:1.49	Thu Nov 18 08:41:11 2010
+++ src/sys/uvm/uvm_pglist.c	Thu Nov 18 11:49:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.c,v 1.49 2010/11/18 08:41:11 uebayasi Exp $	*/
+/*	$NetBSD: uvm_pglist.c,v 1.50 2010/11/18 11:49:41 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.49 2010/11/18 08:41:11 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_pglist.c,v 1.50 2010/11/18 11:49:41 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -59,7 +59,7 @@
 #define	STAT_DECR(v)
 #endif
 
-#ifdef DIAGNOSTIC
+#ifdef DEBUG
 static int
 vm_physmem_index(struct vm_physseg *ps)
 {



CVS commit: src/sys/external/intel-public/acpica/dist/events

2010-11-18 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 18 14:40:32 UTC 2010

Modified Files:
src/sys/external/intel-public/acpica/dist/events: evxface.c

Log Message:
fix AcpiEnableGpe:
GPEs get enabled at ACPI initialization. AcpiInstallGpeHandler() disables
GPEs using AcpiEvDisableGpe() w/o decrementing RuntimeCount.
So when acpiec(4) enables the GPE after installing the GPE Handler then
AcpiEnableGpe() does not call AcpiEvEnableGpe() because RuntimeCount
says it is already enabled which is wrong.
So decrement the RuntimeCount in AcpiInstallGpeHandler() right
before calling AcpiEvDisableGpe().


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/sys/external/intel-public/acpica/dist/events/evxface.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/intel-public/acpica/dist/events/evxface.c
diff -u src/sys/external/intel-public/acpica/dist/events/evxface.c:1.1.1.3 src/sys/external/intel-public/acpica/dist/events/evxface.c:1.2
--- src/sys/external/intel-public/acpica/dist/events/evxface.c:1.1.1.3	Sun Jun  6 18:17:09 2010
+++ src/sys/external/intel-public/acpica/dist/events/evxface.c	Thu Nov 18 14:40:31 2010
@@ -749,6 +749,7 @@
 
 /* Disable the GPE before installing the handler */
 
+GpeEventInfo-RuntimeCount--;
 Status = AcpiEvDisableGpe (GpeEventInfo);
 if (ACPI_FAILURE (Status))
 {



CVS commit: src/sys/external/intel-public/acpica/dist/events

2010-11-18 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 18 18:16:15 UTC 2010

Modified Files:
src/sys/external/intel-public/acpica/dist/events: evxface.c

Log Message:
previous fixed one HP laptop and broke an other HP laptop.
The one which got fixed RuntimeCount is 1. The one which broke RuntimeCount is 
0.
So only decrement RuntimeCount when RuntimeCount is non-zero.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/intel-public/acpica/dist/events/evxface.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/intel-public/acpica/dist/events/evxface.c
diff -u src/sys/external/intel-public/acpica/dist/events/evxface.c:1.2 src/sys/external/intel-public/acpica/dist/events/evxface.c:1.3
--- src/sys/external/intel-public/acpica/dist/events/evxface.c:1.2	Thu Nov 18 14:40:31 2010
+++ src/sys/external/intel-public/acpica/dist/events/evxface.c	Thu Nov 18 18:16:15 2010
@@ -749,7 +749,8 @@
 
 /* Disable the GPE before installing the handler */
 
-GpeEventInfo-RuntimeCount--;
+if (GpeEventInfo-RuntimeCount)
+GpeEventInfo-RuntimeCount--;
 Status = AcpiEvDisableGpe (GpeEventInfo);
 if (ACPI_FAILURE (Status))
 {



CVS commit: src/sys/uvm

2010-11-18 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 18 11:49:42 UTC 2010

Modified Files:
src/sys/uvm: uvm_pglist.c

Log Message:
build fix: vm_physmem_index is only used with DEBUG.
Fix build when DIAGNOSTIC is enabled but not DEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/uvm/uvm_pglist.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/intel-public/acpica/dist/events

2010-11-18 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 18 14:40:32 UTC 2010

Modified Files:
src/sys/external/intel-public/acpica/dist/events: evxface.c

Log Message:
fix AcpiEnableGpe:
GPEs get enabled at ACPI initialization. AcpiInstallGpeHandler() disables
GPEs using AcpiEvDisableGpe() w/o decrementing RuntimeCount.
So when acpiec(4) enables the GPE after installing the GPE Handler then
AcpiEnableGpe() does not call AcpiEvEnableGpe() because RuntimeCount
says it is already enabled which is wrong.
So decrement the RuntimeCount in AcpiInstallGpeHandler() right
before calling AcpiEvDisableGpe().


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/sys/external/intel-public/acpica/dist/events/evxface.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/intel-public/acpica/dist/events

2010-11-18 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 18 18:16:15 UTC 2010

Modified Files:
src/sys/external/intel-public/acpica/dist/events: evxface.c

Log Message:
previous fixed one HP laptop and broke an other HP laptop.
The one which got fixed RuntimeCount is 1. The one which broke RuntimeCount is 
0.
So only decrement RuntimeCount when RuntimeCount is non-zero.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/intel-public/acpica/dist/events/evxface.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/x86/include

2010-11-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Nov 15 11:58:10 UTC 2010

Modified Files:
src/sys/arch/x86/include: i82489reg.h

Log Message:
add interrupt EAPIC register definitions


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x86/include/i82489reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/include/i82489reg.h
diff -u src/sys/arch/x86/include/i82489reg.h:1.9 src/sys/arch/x86/include/i82489reg.h:1.10
--- src/sys/arch/x86/include/i82489reg.h:1.9	Sat Jan  9 20:50:11 2010
+++ src/sys/arch/x86/include/i82489reg.h	Mon Nov 15 11:58:09 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: i82489reg.h,v 1.9 2010/01/09 20:50:11 cegger Exp $	*/
+/*	$NetBSD: i82489reg.h,v 1.10 2010/11/15 11:58:09 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -143,6 +143,48 @@
 
 #define LAPIC_IRQ_MASK(i)	(1  ((i) + 1))
 
+/* Extended APIC registers, valid when CPUID features4 EAPIC is present */
+#define LEAPIC_FR	0x400/* Feature register */
+#	define LEAPIC_FR_ELC		__BITS(23,16)	/* Ext. Lvt Count RO */
+#	define LEAPIC_FR_EIDCAP		__BIT(2)	/* Ext. Apic ID Cap. RO */
+#	define LEAPIC_FR_SEIOCAP	__BIT(1)	/* Specific EOI Cap. RO */
+#	define LEAPIC_FR_IERCAP		__BIT(0)	/* Intr. Enable Reg. RO */
+
+#define LEAPIC_CR	0x410	/* Control Register */
+#	define LEAPIC_CR_EID_ENABLE	__BIT(2)	/* Ext. Apic ID enable */
+#	define LEAPIC_CR_SEOI_ENABLE	__BIT(1)	/* Specific EOI enable */
+#	define LEAPIC_CR_IER_ENABLE	__BIT(0)	/* Enable writes to IER */
+
+#define LEAPIC_SEOIR	0x420	/* Specific EOI Register */
+#	define LEAPIC_SEOI_VEC	__BITS(7,0)
+
+#define LEAPIC_IER_480	0x480	/* Interrupts 0-31 */
+#define LEAPIC_IER_490	0x490	/* Interrupts 32-63 */
+#define LEAPIC_IER_4B0	0x4B0	/* Interrupts 64-95 */
+#define LEAPIC_IER_4C0	0x4C0	/* Interrupts 96-127 */
+#define LEAPIC_IER_4D0	0x4D0	/* Interrupts 128-159 */
+#define LEAPIC_IER_4E0	0x4E0	/* Interrupts 160-191 */
+#define LEAPIC_IER_4F0	0x4F0	/* Interrupts 192-255 */
+
+/* Extended Local Vector Table Entries */
+#define LEAPIC_LVTR_500	0x500
+#define LEAPIC_LVTR_504	0x504
+#define LEAPIC_LVTR_508	0x508
+#define LEAPIC_LVTR_50C	0x50C
+#define LEAPIC_LVTR_510	0x510
+#define LEAPIC_LVTR_514	0x514
+#define LEAPIC_LVTR_518	0x518
+#define LEAPIC_LVTR_51C	0x51C
+#define LEAPIC_LVTR_520	0x520
+#define LEAPIC_LVTR_524	0x524
+#define LEAPIC_LVTR_528	0x528
+#define LEAPIC_LVTR_52C	0x52C
+#define LEAPIC_LVTR_530	0x530
+#	define LEAPIC_LVTR_MASK		__BIT(16)	/* interrupt masked RW */
+#	define LEAPIC_LVTR_DSTAT	__BIT(12)	/* delivery state RO */
+#	define LEAPIC_LVTR_MSGTYPE	__BITS(10,8)	/* Message type */
+#	define LEAPIC_LVTR_VEC		__BITS(7,0)	/* the intr. vector */
+
 /*
  * Model specific registers
  */



CVS commit: src/sys/arch/x86/include

2010-11-15 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Nov 15 11:58:10 UTC 2010

Modified Files:
src/sys/arch/x86/include: i82489reg.h

Log Message:
add interrupt EAPIC register definitions


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x86/include/i82489reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2010-11-11 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 11 14:37:41 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add AMD RD880, ATI Radeon HD5600, ATI Radeon HD4200 and Atheros AR9285


To generate a diff of this commit:
cvs rdiff -u -r1.1051 -r1.1052 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1051 src/sys/dev/pci/pcidevs:1.1052
--- src/sys/dev/pci/pcidevs:1.1051	Sat Nov  6 14:20:34 2010
+++ src/sys/dev/pci/pcidevs	Thu Nov 11 14:37:41 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1051 2010/11/06 14:20:34 jakllsch Exp $
+$NetBSD: pcidevs,v 1.1052 2010/11/11 14:37:41 cegger Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -984,6 +984,12 @@
 product AMD PBC8111_AC_756b	0x756b	AMD8111 756b ACPI Controller
 product AMD HUDSON2_IDE		0x780c	HUDSON-2 IDE Controller
 product AMD HUDSON2_SATA	0x7800	HUDSON-2 SATA Controller
+product AMD RS880_HB		0x9601	RS880 Host Bridge
+product AMD RS780_PPB_GFX	0x9602	RS780 PCI-PCI Bridge (int gfx)
+product AMD RS780_PPB_GFX0	0x9603	RS780 PCI-PCI Bridge (ext gfx port 0)
+product AMD RS780_PPB0		0x9604	RS780 PCI-PCIE Bridge (port 0)
+product AMD RS780_PPB1		0x9605	RS780 PCI-PCIE Brdige (port 1)
+product AMD RS780_PPB2		0x9606	RS780 PCI-PCIE Bridge (port 2)
 
 /* American Megatrends products */
 product AMI MEGARAID		0x9010	MegaRAID
@@ -1377,6 +1383,7 @@
 product ATI RADEON_X850XT_S	0x5d72	Radeon X850 XT Secondary
 product ATI RADEON_X700		0x5e4b	Radeon X700 Pro
 product ATI RADEON_X700_S	0x5e6b	Radeon X700 Pro Secondary
+product ATI RADEON_HD5600_RD	0x68c1	Redwood
 product ATI RADEON_X1300	0x7146	Radeon X1300 Series (RV515)
 product ATI RADEON_X1300_S	0x7166	Radeon X1300 Series (RV515) Secondary
 product ATI RADEON_X1600	0x71c5	Radeon Mobility X1600
@@ -1389,9 +1396,11 @@
 product ATI RS690_PPB_7916	0x7916	RS690 PCI to PCI-Express Port 2 Bridge
 product ATI RS690_PPB_7917	0x7917	RS690 PCI to PCI-Express Port 3 Bridge
 product ATI RADEON_HD4250_S	0x95C5	Radeon HD4250 GPU (RV610) Secondary
+product ATI RADEON_HD4200	0x9712	Radeon HD4200 Mobility
 product ATI RADEON_HD4250	0x9715	Radeon HD4250 GPU (RS880)
 product ATI RADEON_HD2600_XT	0x9588 	Radeon HD2600 XT GDDR3
 product ATI RADEON_HD2600_HD	0xaa08	Radeon HD2600 HD Audio Controller
+product ATI RADEON_HD5600_HDMI	0xaa60	Redwood HDMI Audio
 
 /* Auravision products */
 product AURAVISION VXP524	0x01f7	VxP524 PCI Video Processor
@@ -1413,6 +1422,7 @@
 product ATHEROS AR5311		0x0011 AR5211 Wireless LAN
 product ATHEROS AR5211		0x0012 AR5211 Wireless LAN
 product ATHEROS AR5212		0x0013 AR5212 Wireless LAN
+product ATHEROS AR9285		0x002b AR9285 Wireless LAN
 product ATHEROS AR5201_AP	0x0207 AR5201 Wireless LAN Reference Card (Early AP11)
 product ATHEROS AR5201_DEFAULT	0x1107 AR5201 Wireless LAN (no eeprom)
 product ATHEROS AR5212_DEFAULT	0x1113 AR5212 Wireless LAN (no eeprom)



CVS commit: src/sys/dev/pci

2010-11-11 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 11 14:37:41 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
add AMD RD880, ATI Radeon HD5600, ATI Radeon HD4200 and Atheros AR9285


To generate a diff of this commit:
cvs rdiff -u -r1.1051 -r1.1052 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2010-11-11 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Thu Nov 11 14:38:37 UTC 2010

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1048 -r1.1049 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1047 -r1.1048 src/sys/dev/pci/pcidevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys

2010-11-05 Thread Christoph Egger
On 05.11.10 02:35, Mindaugas Rasiukevicius wrote:
 Module Name:  src
 Committed By: rmind
 Date: Fri Nov  5 01:35:58 UTC 2010
 
 Modified Files:
   src/sys/dist/pf/net: if_pfsync.c pf_norm.c
   src/sys/netinet: in_var.h ip_id.c ip_input.c
 
 Log Message:
 ip_randomid: make mechanism MP-safe and more modular.
 
 OK matt@

Where is ip_id_fini() called? If we don't we leak
kernel memory.

Christoph




CVS commit: src/sys/nfs

2010-10-26 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Oct 26 11:44:53 UTC 2010

Modified Files:
src/sys/nfs: nfs_vnops.c

Log Message:
Add diagnostic check which hits when PR 42455 is reproduced.
Idea from hans@


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 src/sys/nfs/nfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/nfs/nfs_vnops.c
diff -u src/sys/nfs/nfs_vnops.c:1.284 src/sys/nfs/nfs_vnops.c:1.285
--- src/sys/nfs/nfs_vnops.c:1.284	Thu Jun 24 13:03:17 2010
+++ src/sys/nfs/nfs_vnops.c	Tue Oct 26 11:44:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vnops.c,v 1.284 2010/06/24 13:03:17 hannken Exp $	*/
+/*	$NetBSD: nfs_vnops.c,v 1.285 2010/10/26 11:44:53 cegger Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.284 2010/06/24 13:03:17 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.285 2010/10/26 11:44:53 cegger Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -1378,6 +1378,14 @@
 		if (v3) {
 			wccflag = NFSV3_WCCCHK;
 			nfsm_wcc_data(vp, wccflag, NAC_NOTRUNC, !error);
+
+			/* Diagnostic check: The KASSERT hits when PR 42455
+			 * is reproduced.
+			 */
+			if (ctx.nwc_mbufcount = 2) {
+KASSERT(mb-m_next != NULL);
+			}
+
 			if (!error) {
 nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED
 	+ NFSX_V3WRITEVERF);



CVS commit: src/sys/nfs

2010-10-26 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Oct 26 11:44:53 UTC 2010

Modified Files:
src/sys/nfs: nfs_vnops.c

Log Message:
Add diagnostic check which hits when PR 42455 is reproduced.
Idea from hans@


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 src/sys/nfs/nfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/netinet

2010-10-06 Thread Christoph Egger

   Can you try with a LOCKDEBUG + DEBUG/DIAGNOSTIC kernel?
  
  The kernel has all three options.
 
 Hm, if you have DEBUG enabled, kern_free() might fill free'ed
 area with WEIRD_ADDR.

Yes, this patch makes boot with root on nfs work again.
Please commit.

Christoph


 enami.
 
 Index: sys/netinet/ip_reass.c
 ===
 RCS file: /cvsroot/src/sys/netinet/ip_reass.c,v
 retrieving revision 1.4
 diff -u -r1.4 ip_reass.c
 --- sys/netinet/ip_reass.c3 Oct 2010 19:44:47 -   1.4
 +++ sys/netinet/ip_reass.c6 Oct 2010 01:52:14 -
 @@ -390,7 +390,6 @@
   pool_cache_put(ipfren_cache, q);
   m_cat(m, t);
   }
 - free(fp, M_FTABLE);
  
   /*
* Create header for new packet by modifying header of first
 @@ -400,6 +399,7 @@
   ip-ip_len = htons((ip-ip_hl  2) + next);
   ip-ip_src = fp-ipq_src;
   ip-ip_dst = fp-ipq_dst;
 + free(fp, M_FTABLE);
  
   m-m_len += (ip-ip_hl  2);
   m-m_data -= (ip-ip_hl  2);
 


Re: CVS commit: src/sys/netinet

2010-10-05 Thread Christoph Egger

 Christoph Egger christoph_eg...@gmx.de wrote:
   Re-structure IPv4 reassembly code to make it more MP-friendly and
   simplify some code fragments while here.  Also, use pool_cache(9) and
   mutex(9).
   
   IPv4 reassembly mechanism is MP-safe now.
   
   
   To generate a diff of this commit:
   cvs rdiff -u -r1.3 -r1.4 src/sys/netinet/ip_reass.c
  
  This breaks boot with root on nfs.
  
  The last boot message I see is:
  
  root file system type: nfs
  init: copying out path `/sbin/init' 11
  
  then the kernel hangs forever, even with
  an UP kernel.
 
 Can you try with a LOCKDEBUG + DEBUG/DIAGNOSTIC kernel?

The kernel has all three options.

Christoph


CVS commit: src/sys/dev/ieee1394

2010-09-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Sep  7 07:19:46 UTC 2010

Modified Files:
src/sys/dev/ieee1394: fwohci.c

Log Message:
convert tsleep to kpause


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/dev/ieee1394/fwohci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ieee1394/fwohci.c
diff -u src/sys/dev/ieee1394/fwohci.c:1.129 src/sys/dev/ieee1394/fwohci.c:1.130
--- src/sys/dev/ieee1394/fwohci.c:1.129	Sun Aug 29 21:15:26 2010
+++ src/sys/dev/ieee1394/fwohci.c	Tue Sep  7 07:19:45 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwohci.c,v 1.129 2010/08/29 21:15:26 cegger Exp $	*/
+/*	$NetBSD: fwohci.c,v 1.130 2010/09/07 07:19:45 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  *
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fwohci.c,v 1.129 2010/08/29 21:15:26 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: fwohci.c,v 1.130 2010/09/07 07:19:45 cegger Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -882,13 +882,12 @@
 fwohci_irx_disable(struct firewire_comm *fc, int dmach)
 {
 	struct fwohci_softc *sc = (struct fwohci_softc *)fc;
-	int sleepch;
 
 	OWRITE(sc, OHCI_IRCTLCLR(dmach), OHCI_CNTL_DMA_RUN);
 	OWRITE(sc, OHCI_IR_MASKCLR, 1  dmach);
 	OWRITE(sc, OHCI_IR_STATCLR, 1  dmach);
 	/* XXX we cannot free buffers until the DMA really stops */
-	tsleep((void *)sleepch, FWPRI, fwirxd, hz);
+	kpause(fwirxd, true, hz, NULL);
 	fwohci_db_free(sc, sc-ir[dmach]);
 	sc-ir[dmach].xferq.flag = ~FWXFERQ_RUNNING;
 	return 0;
@@ -1016,14 +1015,13 @@
 fwohci_itx_disable(struct firewire_comm *fc, int dmach)
 {
 	struct fwohci_softc *sc = (struct fwohci_softc *)fc;
-	int sleepch;
 
 	OWRITE(sc, OHCI_ITCTLCLR(dmach),
 	OHCI_CNTL_DMA_RUN | OHCI_CNTL_CYCMATCH_S);
 	OWRITE(sc, OHCI_IT_MASKCLR, 1  dmach);
 	OWRITE(sc, OHCI_IT_STATCLR, 1  dmach);
 	/* XXX we cannot free buffers until the DMA really stops */
-	tsleep((void *)sleepch, FWPRI, fwitxd, hz);
+	kpause(fwitxd, true, hz, NULL);
 	fwohci_db_free(sc, sc-it[dmach]);
 	sc-it[dmach].xferq.flag = ~FWXFERQ_RUNNING;
 	return 0;



CVS commit: src/sys/dev/ieee1394

2010-09-07 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Sep  7 07:26:54 UTC 2010

Modified Files:
src/sys/dev/ieee1394: firewire.c firewirereg.h

Log Message:
do not assume all fw devices speak sbp.
teach the fw attach code to deal with different fw device classes.
this allows other fw drivers than sbp to attach


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ieee1394/firewire.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/ieee1394/firewirereg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ieee1394/firewire.c
diff -u src/sys/dev/ieee1394/firewire.c:1.37 src/sys/dev/ieee1394/firewire.c:1.38
--- src/sys/dev/ieee1394/firewire.c:1.37	Thu Aug 26 08:56:15 2010
+++ src/sys/dev/ieee1394/firewire.c	Tue Sep  7 07:26:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: firewire.c,v 1.37 2010/08/26 08:56:15 cegger Exp $	*/
+/*	$NetBSD: firewire.c,v 1.38 2010/09/07 07:26:54 cegger Exp $	*/
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: firewire.c,v 1.37 2010/08/26 08:56:15 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: firewire.c,v 1.38 2010/09/07 07:26:54 cegger Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -1959,6 +1959,45 @@
 	/* NOTREACHED */
 }
 
+static const char *
+fw_get_devclass(struct fw_device *fwdev)
+{
+	struct crom_context cc;
+	struct csrreg *reg;
+
+	crom_init_context(cc, fwdev-csrrom);
+	reg = crom_search_key(cc, CSRKEY_VER);
+	if (reg == NULL)
+		return null;
+
+	switch (reg-val) {
+	case CSR_PROTAVC:
+		return av/c;
+	case CSR_PROTCAL:
+		return cal;
+	case CSR_PROTEHS:
+		return ehs;
+	case CSR_PROTHAVI:
+		return havi;
+	case CSR_PROTCAM104:
+		return cam104;
+	case CSR_PROTCAM120:
+		return cam120;
+	case CSR_PROTCAM130:
+		return cam130;
+	case CSR_PROTDPP:
+		return printer;
+	case CSR_PROTIICP:
+		return iicp;
+	case CSRVAL_T10SBP2:
+		return sbp;
+	default:
+		if (firewire_debug)
+			printf(%s: reg-val 0x%x\n,
+__func__, reg-val);
+		return sbp;
+	}
+}
 
 /*
  * To attach sub-devices layer onto IEEE1394 bus.
@@ -1973,7 +2012,7 @@
 	struct fw_attach_args fwa;
 	int locs[IEEE1394IFCF_NLOCS];
 
-	fwa.name = sbp;
+	fwa.name = null;
 	fwa.fc = fc;
 
 	mutex_enter(fc-fc_mtx);
@@ -1993,16 +2032,17 @@
 			locs[IEEE1394IFCF_EUIHI] = fwdev-eui.hi;
 			locs[IEEE1394IFCF_EUILO] = fwdev-eui.lo;
 
+			fwa.name = fw_get_devclass(fwdev);
 			fwa.fwdev = fwdev;
-			fwdev-sbp = config_found_sm_loc(sc-dev, ieee1394if,
+			fwdev-dev = config_found_sm_loc(sc-dev, ieee1394if,
 			locs, fwa, firewire_print, config_stdsubmatch);
-			if (fwdev-sbp == NULL) {
+			if (fwdev-dev == NULL) {
 free(devlist, M_DEVBUF);
 break;
 			}
 
 			devlist-fwdev = fwdev;
-			devlist-dev = fwdev-sbp;
+			devlist-dev = fwdev-dev;
 
 			mutex_enter(fc-fc_mtx);
 			if (SLIST_EMPTY(sc-devlist))
@@ -2064,7 +2104,7 @@
 			link);
 			free(devlist, M_DEVBUF);
 
-			if (config_detach(fwdev-sbp, DETACH_FORCE) != 0)
+			if (config_detach(fwdev-dev, DETACH_FORCE) != 0)
 return;
 
 			STAILQ_REMOVE(fc-devices, fwdev, fw_device, link);

Index: src/sys/dev/ieee1394/firewirereg.h
diff -u src/sys/dev/ieee1394/firewirereg.h:1.13 src/sys/dev/ieee1394/firewirereg.h:1.14
--- src/sys/dev/ieee1394/firewirereg.h:1.13	Sun May 23 18:56:58 2010
+++ src/sys/dev/ieee1394/firewirereg.h	Tue Sep  7 07:26:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: firewirereg.h,v 1.13 2010/05/23 18:56:58 christos Exp $	*/
+/*	$NetBSD: firewirereg.h,v 1.14 2010/09/07 07:26:54 cegger Exp $	*/
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -63,7 +63,7 @@
 #define FWDEVATTACHED	2
 #define FWDEVINVAL	3
 	STAILQ_ENTRY(fw_device) link;
-	device_t sbp;
+	device_t dev;
 };
 
 struct firewire_softc {



<    1   2   3   4   5   6   >