CVS commit: [netbsd-5] src/doc

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 12:38:41 UTC 2015

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
Ticket #1983


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.127 -r1.1.2.128 src/doc/CHANGES-5.3

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-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.127 src/doc/CHANGES-5.3:1.1.2.128
--- src/doc/CHANGES-5.3:1.1.2.127	Mon Nov  9 10:36:46 2015
+++ src/doc/CHANGES-5.3	Mon Nov  9 12:38:41 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.127 2015/11/09 10:36:46 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.128 2015/11/09 12:38:41 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -4101,3 +4101,131 @@ sys/dev/mii/miidevs_data.h			regen
 	- Update comment.
 	[msaitoh, ticket #1982]
 
+sys/dev/pci/pcidevs			1.1079, 1.1134, 1.1148-1.1149, 1.1151
+sys/dev/pci/pcidevs.h			regen
+sys/dev/pci/pcidevs_data.h		regen
+sys/dev/pci/if_bge.c			1.183-1.185, 1.187, 1.189-1.193, 1.195-1.199, 1.202-1.226, 1.228-1.237, 1.240-1.264, 1.267-1.276, 1.278-1.280, 1.283-1.287 via patch
+sys/dev/pci/if_bgereg.h			1.57-1.74, 1.76-1.90 via patch
+sys/dev/pci/if_bgevar.h			1.6, 1.10-1.13, 1.15-1.17 via patch
+sys/dev/pci/if_bnx.c			1.32, 1.34-1.43, 1.48-1.49, 1.52
+sys/dev/pci/if_bnxreg.h			1.8, 1.11-1.14
+sys/dev/pci/if_bnxvar.h			1.1-1.3
+sys/dev/mii/brgphy.c			1.53-1.63, 1.65-69, 1.72-1.74 via patch
+sys/dev/mii/brgphyreg.h			1.5-1.8
+sys/dev/mii/miivar.h			1.61
+sys/dev/pci/pcireg.h			patch
+
+	Sync bge(4) up to if_bge.c rev. 1.287. Sync brgphy(4) up to 1.74.
+	Fix some bugs on bnx(4). Details as follows:
+	Common:
+	- Add device IDs for Broadcom BCM57710, BCM57711(E), BCM57712(E) and
+	  BCM57766 (pcidevs only).
+	- Fix BCM5709 PHY detection.
+	- Fix detection of BGEPHYF_FIBER_{MII|TBI}
+	- Add BCM5708S support in brgphy(4).
+	- Don't use the WIRESPEED function for fiber devices.
+	bge(4):
+	- Add some Fujitsu's device support from Michael Moll.
+	- Add BCM57762 support (PR#46961 from Ryo Onodera).
+	- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F. BCM5785G,
+	  BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
+	- Fix DMA setting for read/write on conventional PCI bus devices.
+	- Fix printing "discarding oversize frame (len=-4)" message and crash
+	  by NULL pointer dereferencing.
+	- The BCM5785 is a PCIe chip but does not report PCIe capabilities.
+	  Check for this chip explicitly and enable PCIe. Fixes
+	  'firmware handshake timeout'.
+	- Allow disabling interrupt mitigation.
+	- Workaround for BCM5906 silicon bug. When auto-negotiation results in
+	  half-duplex operation, excess collision on the ethernet link may
+	  cause internal chip delays that may result in subsequent valid
+	  frames being dropped due to insufficient receive buffer resources.
+	  (FreeBSD: r214219, r214251, r214292).
+	- Allow write DMA to request larger DMA burst size to get better
+	  performance on BCM5785. (FreeBSD r21: OpenBSD 1.294)
+	- Enable TX MAC state machine lockup fix for both BCM5755 or higher
+	  and BCM5906. Publicly available data sheet just says it may happen
+	  due to corrupted TxMbuf. (FreeBSD r214216)
+	- Follow Broadcom datasheet:
+	  Delay 100 microseconds after enabling transmit MAC.
+	  Delay 10 microseconds after enabling receive MAC. (FreeBSD r241220)
+	- Insert the completion barrier between register write and the
+	  consecutive delay(). It will fix some device timeout problems we have
+	  seen before.
+	- Add DELAY(40) after turning on write DMA state machine.
+	- Add some workarounds for 5717 A0 and 5776[56] to be stable.
+	- Check BGE_RXBDFLAG_IPV6 flag for 5717_PLUS case. Note that
+	  {tcp,udp}6csum flag is currently not added in the capability.
+	- Add delay after clearing BGE_MACMODE_TBI_SEND_CFGS for the link
+	  checking.
+	- Do not touch the jumbo replenish threshold register on chips that do
+	  not have jumbo support.
+	- Wait for the bootcode to complete initialization for 5717 and newer
+	  devices.
+	- 5718 and 57785 document say we should wait 100us in init.
+	- Fix a bug that chips which have BCM5906 ASIC touch GPIO wrongly.
+	- Fix the setting of Tx Random Backoff Register.
+	- Check the hardware config words and print them.
+	- Set BGE_MISC_CTL's byte/word swap options before using
+	  bge_readmem_ind(). Fixes PR#47716.
+	- For BGE_IS_575X_PLUS() devices, don't set
+	  BGE_RXLPSTATCONTROL_DACK_FIX bits because these bits are reserved.
+	- Document says 5717 and newer chips have no
+	  BGE_PCISTATE_INTR_NOT_ACTIVE bit, so don't use the bit on those
+	  chips. Same as OpenBSD.
+	- Fix a bug that the PHY address bits in MI_MODE register is wrongly
+	  cleared. Set the PHY address correctly.
+	- Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL
+	  register to not to modify some GPIO bits.
+	- Set DMA 

CVS commit: [netbsd-5] src/sys/dev/pci

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 12:35:32 UTC 2015

Added Files:
src/sys/dev/pci [netbsd-5]: if_bnxvar.h

Log Message:
Pull up the following revisions(s) (requested by msaitoh in ticket #1983):
sys/dev/pci/pcidevs:revisions 1.1079, 1.1134, 
1.1148-1.1149, 1.1151
sys/dev/pci/pcidevs.h:  regen
sys/dev/pci/pcidevs_data.h: regen
sys/dev/pci/if_bge.c:   revisions 1.183-1.185, 1.187, 
1.189-1.193, 1.195-1.199, 1.202-1.226, 1.228-1.237, 1.240-1.264, 1.267-1.276, 
1.278-1.280, 1.283-1.287 via patch
sys/dev/pci/if_bgereg.h:revisions 1.57-1.74, 1.76-1.90 via patch
sys/dev/pci/if_bgevar.h:revisions 1.6, 1.10-1.13, 1.15-1.17 via 
patch
sys/dev/pci/if_bnx.c:   revisions 1.32, 1.34-1.43, 1.48-1.49, 
1.52
sys/dev/pci/if_bnxreg.h:revisions 1.8, 1.11-1.14
sys/dev/pci/if_bnxvar.h:revisions 1.1-1.3
sys/dev/mii/brgphy.c:   revisions 1.53-1.63, 1.65-69, 1.72-1.74 
via patch
sys/dev/mii/brgphyreg.h:revisions 1.5-1.8
sys/dev/mii/miivar.h:   revisions 1.61
sys/dev/pci/pcireg.h:   patch

Sync bge(4) up to if_bge.c rev. 1.287. Sync brgphy(4) up to 1.74.
Fix some bugs on bnx(4).

Common:
- Add device IDs for Broadcom BCM57710, BCM57711(E), BCM57712(E) and
  BCM57766 (pcidevs only).
- Fix BCM5709 PHY detection.
- Fix detection of BGEPHYF_FIBER_{MII|TBI}
- Add BCM5708S support in brgphy(4).
- Don't use the WIRESPEED function for fiber devices.
bge(4):
- Add some Fujitsu's device support from Michael Moll.
- Add BCM57762 support (PR#46961 from Ryo Onodera).
- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F. BCM5785G,
  BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
- Fix DMA setting for read/write on conventional PCI bus devices.
  This bug was added in rev. 1.166.
- Fix printing "discarding oversize frame (len=-4)" message and
  crash by NULL pointer dereferencing.
- The BCM5785 is a PCIe chip but does not report PCIe capabilities.
  Check for this chip explicitely and enable PCIe. Fixes
  'firmware handshake timeout'.
- Allow disabling interrupt mitigation.
- Workaround for BCM5906 silicon bug. When auto-negotiation results
  in half-duplex operation, excess collision on the ethernet link may
  cause internal chip delays that may result in subsequent valid
  frames being dropped due to insufficient receive buffer resources.
  (FreeBSD: r214219, r214251, r214292).
- Allow write DMA to request larger DMA burst size to get better
  performance on BCM5785. (FreeBSD r21: OpenBSD 1.294)
- Enable TX MAC state machine lockup fix for both BCM5755 or higher
  and BCM5906. Publicly available data sheet just says it may happen
  due to corrupted TxMbuf. (FreeBSD r214216)
- Follow Broadcom datasheet:
  Delay 100 microseconds after enabling transmit MAC.
  Delay 10 microseconds after enabling receive MAC. (FreeBSD
  r241220)
- Insert the completion barrier between register write and the
  consecutive delay(). It will fix some device timeout problems we have
  seen before.
- Add DELAY(40) after turning on write DMA state machine.
- Add some workarounds for 5717 A0 and 5776[56] to be stable.
- Check BGE_RXBDFLAG_IPV6 flag for 5717_PLUS case. Note that
  {tcp,udp}6csum flag is currently not added in the capability.
- Add delay after clearing BGE_MACMODE_TBI_SEND_CFGS for the link
  checking.
- Do not touch the jumbo replenish threshold register on chips that do
  not have jumbo support.
- Wait for the bootcode to complete initialization for 5717 and newer
  devices.
- 5718 and 57785 document say we should wait 100us in init.
- Fix a bug that chips which have BCM5906 ASIC touch GPIO wrongly.
- Fix the setting of Tx Random Backoff Register.
- Check the hardware config words and print them.
- Set BGE_MISC_CTL's byte/word swap options before using
  bge_readmem_ind(). Fixes PR#47716.
- For BGE_IS_575X_PLUS() devices, don't set
  BGE_RXLPSTATCONTROL_DACK_FIX bits because these bits are reserved.
- Document says 5717 and newer chips have no
  BGE_PCISTATE_INTR_NOT_ACTIVE bit, so don't use the bit on those
  chips. Same as OpenBSD.
- Fix a bug that the PHY address bits in MI_MODE register is wrongly
  cleard. Set the PHY address correctly.
- Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL
  register to not to modify some GPIO bits.
- Set DMA watermark depend on the PCI max payload size.
- Set BGE_JUMBO_CAPABLE correctly.
- Fix a link detect bug on non-autopoll systems.
- Change the TX ring size for 5717 series and 57764 series.
- Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
- For PCI-X BCM5704, set maximum outstanding split transactions to 0.
- Add 40bit DMA bug workaround(BGEF_40BIT_BUG) from FreeBSD.
  This workaround is for 5714/5715 controllers and is not actually a
  MAC controller bug but an issue with the embedded PCIe to PCI-X
  

CVS commit: [netbsd-5] src/sys/dev/pci

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 12:33:51 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-5]: pcidevs.h pcidevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.20 -r1.963.4.21 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.20 -r1.962.4.21 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.

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.963.4.20 src/sys/dev/pci/pcidevs.h:1.963.4.21
--- src/sys/dev/pci/pcidevs.h:1.963.4.20	Thu Apr 30 20:01:45 2015
+++ src/sys/dev/pci/pcidevs.h	Mon Nov  9 12:33:32 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.20 2015/04/30 20:01:45 snj Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.21 2015/11/09 12:33:32 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.20 2015/04/30 20:00:27 snj Exp
+ *	NetBSD: pcidevs,v 1.962.4.21 2015/11/09 12:33:02 sborrill Exp
  */
 
 /*
@@ -261,7 +261,8 @@
 #define	PCI_VENDOR_ADVSYS	0x10cd		/* Advanced System Products */
 #define	PCI_VENDOR_RADIUS	0x10ce		/* Radius */
 #define	PCI_VENDOR_CITICORP	0x10cf		/* Citicorp TTI */
-#define	PCI_VENDOR_FUJITSU2	0x10d0		/* Fujitsu Limited (2nd PCI Vendor ID) */
+#define	PCI_VENDOR_FUJITSU4	0x10cf		/* Fujitsu (4th PCI Vendor ID) */
+#define	PCI_VENDOR_FUJITSU2	0x10d0		/* Fujitsu (2nd PCI Vendor ID) */
 #define	PCI_VENDOR_FUTUREPLUS	0x10d1		/* Future+ Systems */
 #define	PCI_VENDOR_MOLEX	0x10d2		/* Molex */
 #define	PCI_VENDOR_JABIL	0x10d3		/* Jabil Circuit */
@@ -885,6 +886,7 @@
 #define	PCI_PRODUCT_ALTIMA_AC1000	0x03e8		/* AC1000 Gigabit Ethernet */
 #define	PCI_PRODUCT_ALTIMA_AC1001	0x03e9		/* AC1001 Gigabit Ethernet */
 #define	PCI_PRODUCT_ALTIMA_AC9100	0x03ea		/* AC9100 Gigabit Ethernet */
+#define	PCI_PRODUCT_ALTIMA_AC1003	0x03eb		/* AC1003 Gigabit Ethernet */
 
 /* AMD products */
 #define	PCI_PRODUCT_AMD_AMD64_HT	0x1100		/* K8 AMD64 HyperTransport configuration */
@@ -1034,6 +1036,7 @@
 #define	PCI_PRODUCT_APPLE_INTREPID2_ATA	0x0069		/* Intrepid 2 ATA */
 #define	PCI_PRODUCT_APPLE_INTREPID2_FW	0x006a		/* Intrepid 2 FireWire */
 #define	PCI_PRODUCT_APPLE_INTREPID2_GMAC	0x006b		/* Intrepid 2 GMAC */
+#define	PCI_PRODUCT_APPLE_BCM5701	0x1645		/* BCM5701 */
 
 /* ARC Logic products */
 #define	PCI_PRODUCT_ARC_1000PV	0xa091		/* 1000PV */
@@ -1426,17 +1429,23 @@
 #define	PCI_PRODUCT_BROADCOM_BCM5706	0x164a		/* BCM5706 NetXtreme II 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5708	0x164c		/* BCM5708 NetXtreme II 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5702FE	0x164d		/* BCM5702FE 10/100 Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57710	0x164e		/* BCM57710 NetXtreme II 10Gb Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57711	0x164f		/* BCM57711 NetXtreme II 10Gb Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57711E	0x1650		/* BCM57711E NetXtreme II 10Gb Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705	0x1653		/* BCM5705 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705K	0x1654		/* BCM5705K 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5717	0x1655		/* BCM5717 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5718	0x1656		/* BCM5718 10/100/1000 Ethernet */
-#define	PCI_PRODUCT_BROADCOM_BCM5720	0x1658		/* BCM5720 NetXtreme 1000baseT Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM5719	0x1657		/* BCM5719 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5721	0x1659		/* BCM5721 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5722	0x165a		/* BCM5722 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5723	0x165b		/* BCM5723 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5724	0x165c		/* BCM5724 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705M	0x165d		/* BCM5705M 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705M_ALT	0x165e		/* BCM5705M 10/100/1000 Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM5720	0x165f		/* BCM5720 NetXtreme 1000baseT Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57712	0x1662		/* BCM57712 NetXtreme II 10Gb Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57712E	0x1663		/* BCM57712E NetXtreme II 10Gb Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5714	0x1668		/* BCM5714 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5714S	0x1669		/* BCM5714S 1000baseSX Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5780	0x166a		/* BCM5780 NetXtreme 1000baseT Ethernet */
@@ -1457,7 +1466,9 @@
 #define	PCI_PRODUCT_BROADCOM_BCM5787F	0x167f		/* BCM5787F 10/100 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5761E	0x1680		/* BCM5761E 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5761	0x1681		/* BCM5761 10/100/1000 Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57762	0x1682		/* BCM57762 Gigabit Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5764	0x1684		/* BCM5764 NetXtreme 1000baseT 

CVS commit: src/sys/external/bsd/drm2/drm

2015-11-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Nov  9 22:04:53 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/drm: drm_drv.c

Log Message:
only clear agp hook on last close when agp is in use, from riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/drm/drm_drv.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/bsd/drm2/drm/drm_drv.c
diff -u src/sys/external/bsd/drm2/drm/drm_drv.c:1.16 src/sys/external/bsd/drm2/drm/drm_drv.c:1.17
--- src/sys/external/bsd/drm2/drm/drm_drv.c:1.16	Sat Oct 17 16:19:38 2015
+++ src/sys/external/bsd/drm2/drm/drm_drv.c	Mon Nov  9 22:04:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_drv.c,v 1.16 2015/10/17 16:19:38 jmcneill Exp $	*/
+/*	$NetBSD: drm_drv.c,v 1.17 2015/11/09 22:04:53 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.16 2015/10/17 16:19:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.17 2015/11/09 22:04:53 jmcneill Exp $");
 
 #include 
 #include 
@@ -394,7 +394,8 @@ drm_lastclose(struct drm_device *dev)
 		drm_irq_uninstall(dev);
 
 	mutex_lock(>struct_mutex);
-	drm_agp_clear_hook(dev);
+	if (dev->agp)
+		drm_agp_clear_hook(dev);
 	drm_legacy_sg_cleanup(dev);
 	list_for_each_entry_safe(vma, vma_temp, >vmalist, head) {
 		list_del(>head);



CVS commit: src/sys/dev

2015-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  9 17:52:59 UTC 2015

Modified Files:
src/sys/dev: vnd.c

Log Message:
explain why the int cast works (suggested by kre)


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/dev/vnd.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/vnd.c
diff -u src/sys/dev/vnd.c:1.251 src/sys/dev/vnd.c:1.252
--- src/sys/dev/vnd.c:1.251	Mon Nov  9 12:41:24 2015
+++ src/sys/dev/vnd.c	Mon Nov  9 12:52:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $	*/
+/*	$NetBSD: vnd.c,v 1.252 2015/11/09 17:52:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.252 2015/11/09 17:52:59 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -1068,6 +1068,7 @@ vndioctl_get(struct lwp *l, void *data, 
 
 	KASSERT(l);
 
+	/* the first member is always int vnd_unit in all the versions */
 	if (*(int *)data >= vnd_cd.cd_ndevs)
 		return ENXIO;
 



CVS commit: src/sys/dev

2015-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  9 17:41:24 UTC 2015

Modified Files:
src/sys/dev: vnd.c

Log Message:
Return ENXIO if the get ioctl exceeds the number of configured devices.
XXX: pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.250 -r1.251 src/sys/dev/vnd.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/vnd.c
diff -u src/sys/dev/vnd.c:1.250 src/sys/dev/vnd.c:1.251
--- src/sys/dev/vnd.c:1.250	Mon Nov  9 11:54:26 2015
+++ src/sys/dev/vnd.c	Mon Nov  9 12:41:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.250 2015/11/09 16:54:26 christos Exp $	*/
+/*	$NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.250 2015/11/09 16:54:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -1067,11 +1067,9 @@ vndioctl_get(struct lwp *l, void *data, 
 	int error;
 
 	KASSERT(l);
-#ifdef notyet
-	/* Current userland code does not handle this */
+
 	if (*(int *)data >= vnd_cd.cd_ndevs)
 		return ENXIO;
-#endif
 
 	switch (error = vnd_cget(l, unit, (int *)data, va)) {
 	case -1:



CVS commit: src/usr.sbin/vnconfig

2015-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  9 17:39:20 UTC 2015

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

Log Message:
Since now the kernel returns ENXIO again for devices exceeding the
number of devices configured in the kernel, use that instead of
scanning /dev.
XXX: pullup to 7 together with the kernel change.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/vnconfig/vnconfig.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/vnconfig/vnconfig.c
diff -u src/usr.sbin/vnconfig/vnconfig.c:1.42 src/usr.sbin/vnconfig/vnconfig.c:1.43
--- src/usr.sbin/vnconfig/vnconfig.c:1.42	Fri May 23 16:50:16 2014
+++ src/usr.sbin/vnconfig/vnconfig.c	Mon Nov  9 12:39:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnconfig.c,v 1.42 2014/05/23 20:50:16 dholland Exp $	*/
+/*	$NetBSD: vnconfig.c,v 1.43 2015/11/09 17:39:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -73,13 +73,11 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -100,7 +98,7 @@ static int	force = 0;
 static int	compressed = 0;
 static char	*tabname;
 
-static void	show(int, int);
+static int	show(int, int);
 static int	config(char *, char *, char *, int);
 static int	getgeom(struct vndgeom *, char *);
 __dead static void	usage(void);
@@ -177,26 +175,8 @@ main(int argc, char *argv[])
 		if (argc)
 			show(v, -1);
 		else {
-			DIR *dirp;
-			struct dirent *dp;
-			__BITMAP_TYPE(, uint32_t, 65536) bm;
-
-			__BITMAP_ZERO();
-
-			if ((dirp = opendir(_PATH_DEV)) == NULL)
-err(1, "opendir: %s", _PATH_DEV);
-
-			while ((dp = readdir(dirp)) != NULL) {
-if (strncmp(dp->d_name, "rvnd", 4) != 0)
-	continue;
-n = atoi(dp->d_name + 4);
-if (__BITMAP_ISSET(n, ))
-	continue;
-__BITMAP_SET(n, );
-show(v, n);
-			}
-
-			closedir(dirp);
+			for (n = 0; show(v, n); n++)
+continue;
 		}
 		close(v);
 		rv = 0;
@@ -204,7 +184,7 @@ main(int argc, char *argv[])
 	return rv;
 }
 
-static void
+static int
 show(int v, int n)
 {
 	struct vnd_user vnu;
@@ -213,12 +193,15 @@ show(int v, int n)
 	int i, nmount;
 
 	vnu.vnu_unit = n;
-	if (ioctl(v, VNDIOCGET, ) == -1)
-		err(1, "VNDIOCGET");
+	if (ioctl(v, VNDIOCGET, ) == -1) {
+		if (errno != ENXIO)
+			err(1, "VNDIOCGET");
+		return 0;
+	}
 
 	if (vnu.vnu_ino == 0) {
 		printf("vnd%d: not in use\n", vnu.vnu_unit);
-		return;
+		return 1;
 	}
 
 	printf("vnd%d: ", vnu.vnu_unit);
@@ -251,6 +234,7 @@ show(int v, int n)
 		(unsigned long long)minor(vnu.vnu_dev));
 
 	printf("inode %llu\n", (unsigned long long)vnu.vnu_ino);
+	return 1;
 }
 
 static int



CVS commit: src/lib/libpuffs

2015-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  9 15:12:12 UTC 2015

Modified Files:
src/lib/libpuffs: puffs_ops.3

Log Message:
fix return type


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libpuffs/puffs_ops.3

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

Modified files:

Index: src/lib/libpuffs/puffs_ops.3
diff -u src/lib/libpuffs/puffs_ops.3:1.42 src/lib/libpuffs/puffs_ops.3:1.43
--- src/lib/libpuffs/puffs_ops.3:1.42	Mon Feb 16 05:48:56 2015
+++ src/lib/libpuffs/puffs_ops.3	Mon Nov  9 10:12:12 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: puffs_ops.3,v 1.42 2015/02/16 10:48:56 wiz Exp $
+.\"	$NetBSD: puffs_ops.3,v 1.43 2015/11/09 15:12:12 christos Exp $
 .\"
 .\" Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\"
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 31, 2014
+.Dd November 9, 2015
 .Dt PUFFS_OPS 3
 .Os
 .Sh NAME
@@ -51,7 +51,7 @@
 .Fa "struct puffs_usermount *pu" "puffs_cookie_t cookie" "void *fid"
 .Fa "size_t *fidsize"
 .Fc
-.Ft void
+.Ft int
 .Fo puffs_fs_extattrctl
 .Fa "struct puffs_usermount *pu" "int cmd" "puffs_cookie_t cookie" "int flags"
 .Fa "int attrnamespace" "const char *attrname"



CVS commit: src/sys/dev

2015-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  9 16:54:27 UTC 2015

Modified Files:
src/sys/dev: vnd.c

Log Message:
disable debugging


To generate a diff of this commit:
cvs rdiff -u -r1.249 -r1.250 src/sys/dev/vnd.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/vnd.c
diff -u src/sys/dev/vnd.c:1.249 src/sys/dev/vnd.c:1.250
--- src/sys/dev/vnd.c:1.249	Mon Nov  9 11:52:09 2015
+++ src/sys/dev/vnd.c	Mon Nov  9 11:54:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.249 2015/11/09 16:52:09 christos Exp $	*/
+/*	$NetBSD: vnd.c,v 1.250 2015/11/09 16:54:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,14 +91,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.249 2015/11/09 16:52:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.250 2015/11/09 16:54:26 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
 #include "opt_compat_netbsd.h"
 #endif
 
-#define DEBUG
 #include 
 #include 
 #include 
@@ -140,7 +139,7 @@ int dovndcluster = 1;
 #define VDB_INIT	0x02
 #define VDB_IO		0x04
 #define VDB_LABEL	0x08
-int vnddebug = 0xff;
+int vnddebug = 0;
 #endif
 
 #define vndunit(x)	DISKUNIT(x)



CVS commit: src/sys/arch/sparc64/sparc64

2015-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  9 20:26:15 UTC 2015

Modified Files:
src/sys/arch/sparc64/sparc64: syscall.c

Log Message:
Use PRIx64 and %# requested by phone@


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/sparc64/sparc64/syscall.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/sparc64/sparc64/syscall.c
diff -u src/sys/arch/sparc64/sparc64/syscall.c:1.45 src/sys/arch/sparc64/sparc64/syscall.c:1.46
--- src/sys/arch/sparc64/sparc64/syscall.c:1.45	Sun Nov  8 21:13:41 2015
+++ src/sys/arch/sparc64/sparc64/syscall.c	Mon Nov  9 15:26:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.45 2015/11/09 02:13:41 christos Exp $ */
+/*	$NetBSD: syscall.c,v 1.46 2015/11/09 20:26:15 christos Exp $ */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.45 2015/11/09 02:13:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.46 2015/11/09 20:26:15 christos Exp $");
 
 #include 
 #include 
@@ -312,15 +312,14 @@ syscall(struct trapframe64 *tf, register
 #ifdef DIAGNOSTIC
 	KASSERT(p->p_pid != 0);
 	KASSERTMSG(!(tf->tf_tstate & TSTATE_PRIV),
-	"syscall %ld, pid %d trap frame %p tstate 0x%jx is privileged %s\n",
-	code, p->p_pid, tf, (uintmax_t)tf->tf_tstate,
-	(tf->tf_tstate & TSTATE_PRIV)?"yes":"no");
+	"syscall %ld, pid %d trap frame %p tstate %#" PRIx64
+	" is privileged %s\n", code, p->p_pid, tf, tf->tf_tstate,
+	(tf->tf_tstate & TSTATE_PRIV) ? "yes" : "no");
 	if (p->p_flag & PK_32) {
 		KASSERTMSG(tf->tf_tstate & TSTATE_AM,
-		"32bit syscall %ld, pid %d trap frame %p tstate 0x%jx "
-			"has AM %s\n",
-		code, p->p_pid, tf, (uintmax_t)tf->tf_tstate,
-		(tf->tf_tstate & TSTATE_AM)?"yes":"no");
+		"32bit syscall %ld, pid %d trap frame %p tstate %#" PRIx64
+		" has AM %s\n", code, p->p_pid, tf, tf->tf_tstate,
+		(tf->tf_tstate & TSTATE_AM) ? "yes" : "no");
 	}
 #endif
 



CVS commit: [netbsd-5-2] src/sys/ufs/lfs

2015-11-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Nov  9 22:50:18 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5-2]: lfs_segment.c

Log Message:
Fix ticket #1974 fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.213.22.1 -r1.213.22.2 src/sys/ufs/lfs/lfs_segment.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/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.213.22.1 src/sys/ufs/lfs/lfs_segment.c:1.213.22.2
--- src/sys/ufs/lfs/lfs_segment.c:1.213.22.1	Sat Nov  7 20:31:22 2015
+++ src/sys/ufs/lfs/lfs_segment.c	Mon Nov  9 22:50:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213.22.1 2015/11/07 20:31:22 snj Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.22.2 2015/11/09 22:50:18 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.22.1 2015/11/07 20:31:22 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.22.2 2015/11/09 22:50:18 snj Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1700,7 +1700,7 @@ lfs_rewind(struct lfs *fs, int newsn)
 		panic("lfs_rewind: no clean segments");
 	if (newsn >= 0 && sn >= newsn)
 		return ENOENT;
-	fs->lfs_nextseg = lfs_sntod(fs, sn);
+	fs->lfs_nextseg = sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: [netbsd-5-1] src/sys/ufs/lfs

2015-11-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Nov  9 22:49:50 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5-1]: lfs_segment.c

Log Message:
Fix ticket #1974 fallout.


To generate a diff of this commit:
cvs rdiff -u -r1.213.18.1 -r1.213.18.2 src/sys/ufs/lfs/lfs_segment.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/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.213.18.1 src/sys/ufs/lfs/lfs_segment.c:1.213.18.2
--- src/sys/ufs/lfs/lfs_segment.c:1.213.18.1	Sat Nov  7 20:30:56 2015
+++ src/sys/ufs/lfs/lfs_segment.c	Mon Nov  9 22:49:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213.18.1 2015/11/07 20:30:56 snj Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.18.2 2015/11/09 22:49:50 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.18.1 2015/11/07 20:30:56 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.18.2 2015/11/09 22:49:50 snj Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1700,7 +1700,7 @@ lfs_rewind(struct lfs *fs, int newsn)
 		panic("lfs_rewind: no clean segments");
 	if (newsn >= 0 && sn >= newsn)
 		return ENOENT;
-	fs->lfs_nextseg = lfs_sntod(fs, sn);
+	fs->lfs_nextseg = sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: src/sys/external/bsd/drm2/drm

2015-11-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Nov  9 23:11:18 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/drm: drmfb.c

Log Message:
If the "is_console" property is already specified, do not overwrite it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/drm/drmfb.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/bsd/drm2/drm/drmfb.c
diff -u src/sys/external/bsd/drm2/drm/drmfb.c:1.1 src/sys/external/bsd/drm2/drm/drmfb.c:1.2
--- src/sys/external/bsd/drm2/drm/drmfb.c:1.1	Thu Mar  5 17:50:41 2015
+++ src/sys/external/bsd/drm2/drm/drmfb.c	Mon Nov  9 23:11:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmfb.c,v 1.1 2015/03/05 17:50:41 riastradh Exp $	*/
+/*	$NetBSD: drmfb.c,v 1.2 2015/11/09 23:11:18 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.1 2015/03/05 17:50:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.2 2015/11/09 23:11:18 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -91,6 +91,7 @@ drmfb_attach(struct drmfb_softc *sc, con
 	static const struct genfb_ops zero_genfb_ops;
 	struct genfb_ops genfb_ops = zero_genfb_ops;
 	enum { CONS_VGA, CONS_GENFB, CONS_NONE } what_was_cons;
+	bool is_console;
 	int error;
 
 	/* genfb requires this.  */
@@ -113,23 +114,27 @@ drmfb_attach(struct drmfb_softc *sc, con
 	prop_dictionary_set_uint64(dict, "mode_callback",
 	(uint64_t)(uintptr_t)_genfb_mode_callback);
 
-	/* XXX Whattakludge!  */
+	if (!prop_dictionary_get_bool(dict, "is_console", _console)) {
+		/* XXX Whattakludge!  */
 #if NVGA > 0
-	if ((da->da_params->dp_is_vga_console != NULL) &&
-	(*da->da_params->dp_is_vga_console)(dev)) {
-		what_was_cons = CONS_VGA;
-		prop_dictionary_set_bool(dict, "is_console", true);
-		vga_cndetach();
-		if (da->da_params->dp_disable_vga)
-			(*da->da_params->dp_disable_vga)(dev);
-	} else
+		if ((da->da_params->dp_is_vga_console != NULL) &&
+		(*da->da_params->dp_is_vga_console)(dev)) {
+			what_was_cons = CONS_VGA;
+			prop_dictionary_set_bool(dict, "is_console", true);
+			vga_cndetach();
+			if (da->da_params->dp_disable_vga)
+(*da->da_params->dp_disable_vga)(dev);
+		} else
 #endif
-	if (genfb_is_console() && genfb_is_enabled()) {
-		what_was_cons = CONS_GENFB;
-		prop_dictionary_set_bool(dict, "is_console", true);
+		if (genfb_is_console() && genfb_is_enabled()) {
+			what_was_cons = CONS_GENFB;
+			prop_dictionary_set_bool(dict, "is_console", true);
+		} else {
+			what_was_cons = CONS_NONE;
+			prop_dictionary_set_bool(dict, "is_console", false);
+		}
 	} else {
 		what_was_cons = CONS_NONE;
-		prop_dictionary_set_bool(dict, "is_console", false);
 	}
 
 	sc->sc_genfb.sc_dev = sc->sc_da.da_dev;



CVS commit: [netbsd-5] src/sys/dev/mii

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 10:31:26 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5]: miidevs.h miidevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.81.4.5 -r1.81.4.6 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.71.4.5 -r1.71.4.6 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.81.4.5 src/sys/dev/mii/miidevs.h:1.81.4.6
--- src/sys/dev/mii/miidevs.h:1.81.4.5	Wed Jun 19 07:51:45 2013
+++ src/sys/dev/mii/miidevs.h	Mon Nov  9 10:31:26 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.81.4.5 2013/06/19 07:51:45 bouyer Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.81.4.6 2015/11/09 10:31:26 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.78.4.5 2013/06/19 07:50:15 bouyer Exp
+ *	NetBSD: miidevs,v 1.78.4.6 2015/11/09 10:31:06 sborrill Exp
  */
 
 /*-
@@ -47,7 +47,7 @@
  * mapping; the bit positions are defined in IEEE 802-1990, figure 5.2.
  * (There is a formal 802.3 interpretation, number 1-07/98 of July 09 1998,
  * about this.)
- * The MII_OUI() macro in "mii.h" reflects this.
+ * The MII_OUI() macro in "miivar.h" reflects this.
  * If a vendor uses a different mapping, an "xx" prefixed OUI is defined here
  * which is mangled accordingly to compensate.
  */
@@ -56,12 +56,14 @@
 * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h
 */
 
+#define	MII_OUI_AGERE	0x00053d	/* Agere */
 #define	MII_OUI_ALTIMA	0x0010a9	/* Altima Communications */
 #define	MII_OUI_AMD	0x1a	/* Advanced Micro Devices */
 #define	MII_OUI_ATHEROS	0x001374	/* Atheros */
 #define	MII_OUI_ATTANSIC	0x00c82e	/* Attansic Technology */
 #define	MII_OUI_BROADCOM	0x001018	/* Broadcom Corporation */
 #define	MII_OUI_BROADCOM2	0x000af7	/* Broadcom Corporation */
+#define	MII_OUI_BROADCOM3	0x001be9	/* Broadcom Corporation */
 #define	MII_OUI_CICADA	0x0003F1	/* Cicada Semiconductor */
 #define	MII_OUI_DAVICOM	0x00606e	/* Davicom Semiconductor */
 #define	MII_OUI_ENABLESEMI	0x0010dd	/* Enable Semiconductor */
@@ -71,13 +73,16 @@
 #define	MII_OUI_JMICRON	0x00d831	/* JMicron */
 #define	MII_OUI_LEVEL1	0x00207b	/* Level 1 */
 #define	MII_OUI_MARVELL	0x005043	/* Marvell Semiconductor */
+#define	MII_OUI_MICREL	0x0010a1	/* Micrel */
 #define	MII_OUI_MYSON	0x00c0b4	/* Myson Technology */
 #define	MII_OUI_NATSEMI	0x080017	/* National Semiconductor */
 #define	MII_OUI_PMCSIERRA	0x00e004	/* PMC-Sierra */
+#define	MII_OUI_RDC	0x00d02d	/* RDC Semiconductor */
 #define	MII_OUI_REALTEK	0x00e04c	/* RealTek */
 #define	MII_OUI_QUALSEMI	0x006051	/* Quality Semiconductor */
 #define	MII_OUI_SEEQ	0x00a07d	/* Seeq */
 #define	MII_OUI_SIS	0x00e006	/* Silicon Integrated Systems */
+#define	MII_OUI_SMSC	0x00800f	/* SMSC */
 #define	MII_OUI_TI	0x080028	/* Texas Instruments */
 #define	MII_OUI_TSC	0x00c039	/* TDK Semiconductor */
 #define	MII_OUI_XAQTI	0x00e0ae	/* XaQti Corp. */
@@ -125,6 +130,16 @@
 #define	MII_STR_ATTANSIC_L1	"L1 10/100/1000 PHY"
 #define	MII_MODEL_ATTANSIC_L2	0x0002
 #define	MII_STR_ATTANSIC_L2	"L2 10/100 PHY"
+#define	MII_MODEL_ATTANSIC_AR8021	0x0004
+#define	MII_STR_ATTANSIC_AR8021	"Atheros AR8021 10/100/1000 PHY"
+#define	MII_MODEL_ATTANSIC_AR8035	0x0007
+#define	MII_STR_ATTANSIC_AR8035	"Atheros AR8035 10/100/1000 PHY"
+
+/*
+ * Agere PHYs
+ */
+#define	MII_MODEL_AGERE_ET1011	0x0004
+#define	MII_STR_AGERE_ET1011	"Agere ET1011 10/100/1000baseT PHY"
 
 /* Altima Communications PHYs */
 /* Don't know the model for ACXXX */
@@ -166,6 +181,8 @@
 #define	MII_STR_xxBROADCOM_BCM5222	"BCM5222 Dual 10/100 media interface"
 #define	MII_MODEL_xxBROADCOM_BCM4401	0x0036
 #define	MII_STR_xxBROADCOM_BCM4401	"BCM4401 10/100 media interface"
+#define	MII_MODEL_xxBROADCOM_BCM5365	0x0037
+#define	MII_STR_xxBROADCOM_BCM5365	"BCM5365 10/100 5-port PHY switch"
 #define	MII_MODEL_BROADCOM_BCM5400	0x0004
 #define	MII_STR_BROADCOM_BCM5400	"BCM5400 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5401	0x0005
@@ -184,6 +201,8 @@
 #define	MII_STR_BROADCOM_BCM5752	"BCM5752 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5701	0x0011
 #define	MII_STR_BROADCOM_BCM5701	"BCM5701 1000BASE-T media interface"
+#define	MII_MODEL_BROADCOM_BCM5706	0x0015
+#define	MII_STR_BROADCOM_BCM5706	"BCM5706 1000BASE-T/SX media interface"
 #define	MII_MODEL_BROADCOM_BCM5703	0x0016
 #define	MII_STR_BROADCOM_BCM5703	"BCM5703 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5750	0x0018
@@ -195,17 +214,29 @@
 #define	MII_MODEL_BROADCOM_BCM54K2	0x002e
 #define	MII_STR_BROADCOM_BCM54K2	"BCM54K2 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5714	0x0034
-#define	MII_STR_BROADCOM_BCM5714	"BCM5714 1000BASE-T media interface"
+#define	MII_STR_BROADCOM_BCM5714	"BCM5714 1000BASE-T/X media interface"
 #define	

CVS commit: [netbsd-5] src/sys/dev/mii

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 10:31:06 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5]: miidevs

Log Message:
Pull up the following revisions(s) (requested by msaitoh in ticket #1982):
sys/dev/mii/miidevs:revisions 1.79-1.80, 1.84, 1.86-1.88,
1.91-1.92, 1.94-1.96, 1.98-1.99, 1.101-1.112 via patch

Sync miidevs up to rev. 1.112:
- Add Agere ET1101 (PR#39094)
- Add some CICADA PHYs.
- AddMarvell 88E1000[S], 88E1116R, 88E1118, 88E1145, 88E1149[R],
- 88E1543, 88E3016, PHYG65G
- Add NS DP83849(PR#41256), DP83865.
- Add Broadcom BCM5325, BCM5365, BCM548[12], BCM5706, BCM570[89]S,
- BCM571[79]C, BCM5720C, BCM5756, BCM5785, BCM57765, BCM57780
- Add Atheros AR8021, AR8035
- Add RDC Semiconductor R6040 10/100 integrated PHY
- Add Vitesse VSC8221
- Add SMSC LAN 87[012]0
- Add Intel I21[07].
- Add IC Plus IP100, IP1000A and IP1001
- Add Micrel KSZ9021RN
- Add Relatek RTL8251
- Update comment.


To generate a diff of this commit:
cvs rdiff -u -r1.78.4.5 -r1.78.4.6 src/sys/dev/mii/miidevs

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/miidevs
diff -u src/sys/dev/mii/miidevs:1.78.4.5 src/sys/dev/mii/miidevs:1.78.4.6
--- src/sys/dev/mii/miidevs:1.78.4.5	Wed Jun 19 07:50:15 2013
+++ src/sys/dev/mii/miidevs	Mon Nov  9 10:31:06 2015
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.78.4.5 2013/06/19 07:50:15 bouyer Exp $
+$NetBSD: miidevs,v 1.78.4.6 2015/11/09 10:31:06 sborrill Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@ $NetBSD: miidevs,v 1.78.4.5 2013/06/19 0
  * mapping; the bit positions are defined in IEEE 802-1990, figure 5.2.
  * (There is a formal 802.3 interpretation, number 1-07/98 of July 09 1998,
  * about this.)
- * The MII_OUI() macro in "mii.h" reflects this.
+ * The MII_OUI() macro in "miivar.h" reflects this.
  * If a vendor uses a different mapping, an "xx" prefixed OUI is defined here
  * which is mangled accordingly to compensate.
  */
@@ -49,12 +49,14 @@ $NetBSD: miidevs,v 1.78.4.5 2013/06/19 0
 * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h
 */
 
+oui AGERE			0x00053d	Agere
 oui ALTIMA			0x0010a9	Altima Communications
 oui AMD0x1a	Advanced Micro Devices
 oui ATHEROS			0x001374	Atheros
 oui ATTANSIC			0x00c82e	Attansic Technology
 oui BROADCOM			0x001018	Broadcom Corporation
 oui BROADCOM2			0x000af7	Broadcom Corporation
+oui BROADCOM3			0x001be9	Broadcom Corporation
 oui CICADA			0x0003F1	Cicada Semiconductor
 oui DAVICOM			0x00606e	Davicom Semiconductor
 oui ENABLESEMI			0x0010dd	Enable Semiconductor
@@ -64,13 +66,16 @@ oui INTEL			0x00aa00	Intel
 oui JMICRON			0x00d831	JMicron
 oui LEVEL1			0x00207b	Level 1
 oui MARVELL			0x005043	Marvell Semiconductor
+oui MICREL			0x0010a1	Micrel
 oui MYSON			0x00c0b4	Myson Technology
 oui NATSEMI			0x080017	National Semiconductor
 oui PMCSIERRA			0x00e004	PMC-Sierra
+oui RDC0x00d02d	RDC Semiconductor
 oui REALTEK			0x00e04c	RealTek
 oui QUALSEMI			0x006051	Quality Semiconductor
 oui SEEQ			0x00a07d	Seeq
 oui SIS0x00e006	Silicon Integrated Systems
+oui SMSC			0x00800f	SMSC
 oui TI0x080028	Texas Instruments
 oui TSC0x00c039	TDK Semiconductor
 oui XAQTI			0x00e0ae	XaQti Corp.
@@ -114,6 +119,13 @@ model ATHEROS F2		0x0002 F2 10/100 PHY
 /* Attansic PHYs */
 model ATTANSIC L1		0x0001 L1 10/100/1000 PHY
 model ATTANSIC L2		0x0002 L2 10/100 PHY
+model ATTANSIC AR8021		0x0004 Atheros AR8021 10/100/1000 PHY
+model ATTANSIC AR8035		0x0007 Atheros AR8035 10/100/1000 PHY
+
+/*
+ * Agere PHYs
+ */
+model AGERE ET1011		0x0004 Agere ET1011 10/100/1000baseT PHY
 
 /* Altima Communications PHYs */
 /* Don't know the model for ACXXX */
@@ -139,6 +151,7 @@ model xxBROADCOM BCM5214	0x0028 BCM5214 
 model xxBROADCOM BCM5221	0x001e BCM5221 10/100 media interface
 model xxBROADCOM BCM5222	0x0032 BCM5222 Dual 10/100 media interface
 model xxBROADCOM BCM4401	0x0036 BCM4401 10/100 media interface
+model xxBROADCOM BCM5365	0x0037 BCM5365 10/100 5-port PHY switch
 model BROADCOM BCM5400		0x0004 BCM5400 1000BASE-T media interface
 model BROADCOM BCM5401		0x0005 BCM5401 1000BASE-T media interface
 model BROADCOM BCM5411		0x0007 BCM5411 1000BASE-T media interface
@@ -148,28 +161,45 @@ model BROADCOM BCM5462		0x000d BCM5462 1
 model BROADCOM BCM5421		0x000e BCM5421 1000BASE-T media interface
 model BROADCOM BCM5752		0x0010 BCM5752 1000BASE-T media interface
 model BROADCOM BCM5701		0x0011 BCM5701 1000BASE-T media interface
+model BROADCOM BCM5706		0x0015 BCM5706 1000BASE-T/SX media interface
 model BROADCOM BCM5703		0x0016 BCM5703 1000BASE-T media interface
 model BROADCOM BCM5750		0x0018 BCM5750 1000BASE-T media interface
 model BROADCOM BCM5704		0x0019 BCM5704 1000BASE-T media interface
 model BROADCOM BCM5705		0x001a BCM5705 1000BASE-T media interface
 model BROADCOM BCM54K2		0x002e BCM54K2 1000BASE-T media interface
-model 

CVS commit: [netbsd-5] src/doc

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 10:36:46 UTC 2015

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
Ticket #1982


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.126 -r1.1.2.127 src/doc/CHANGES-5.3

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-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.126 src/doc/CHANGES-5.3:1.1.2.127
--- src/doc/CHANGES-5.3:1.1.2.126	Sat Nov  7 20:52:40 2015
+++ src/doc/CHANGES-5.3	Mon Nov  9 10:36:46 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.126 2015/11/07 20:52:40 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.127 2015/11/09 10:36:46 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -4078,3 +4078,26 @@ sys/kern/kern_exit.c1.248
 	Update value of p_stat before we release the proc_lock.
 	[pgoyette, ticket #1981]
 
+sys/dev/mii/miidevs1.79-1.80, 1.84, 1.86-1.88, 1.91-1.92, 1.94-1.96, 1.98-1.99, 1.101-1.112 via patch
+sys/dev/mii/miidevs.hregen
+sys/dev/mii/miidevs_data.h			regen
+
+	Sync miidevs up to rev. 1.112:
+	- Add Agere ET1101 (PR#39094)
+	- Add some CICADA PHYs.
+	- AddMarvell 88E1000[S], 88E1116R, 88E1118, 88E1145, 88E1149[R],
+	  88E1543, 88E3016, PHYG65G
+	- Add NS DP83849(PR#41256), DP83865.
+	- Add Broadcom BCM5325, BCM5365, BCM548[12], BCM5706, BCM570[89]S,
+	  BCM571[79]C, BCM5720C, BCM5756, BCM5785, BCM57765, BCM57780
+	- Add Atheros AR8021, AR8035
+	- Add RDC Semiconductor R6040 10/100 integrated PHY
+	- Add Vitesse VSC8221
+	- Add SMSC LAN 87[012]0
+	- Add Intel I21[07].
+	- Add IC Plus IP100, IP1000A and IP1001
+	- Add Micrel KSZ9021RN
+	- Add Relatek RTL8251
+	- Update comment.
+	[msaitoh, ticket #1982]
+



CVS commit: src/sys/arch/arm/nvidia

2015-11-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Nov 10 00:33:46 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_hdmireg.h

Log Message:
support disabling the HDMI output


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_hdmireg.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/arm/nvidia/tegra_hdmireg.h
diff -u src/sys/arch/arm/nvidia/tegra_hdmireg.h:1.4 src/sys/arch/arm/nvidia/tegra_hdmireg.h:1.5
--- src/sys/arch/arm/nvidia/tegra_hdmireg.h:1.4	Sat Jul 25 15:50:42 2015
+++ src/sys/arch/arm/nvidia/tegra_hdmireg.h	Tue Nov 10 00:33:46 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_hdmireg.h,v 1.4 2015/07/25 15:50:42 jmcneill Exp $ */
+/* $NetBSD: tegra_hdmireg.h,v 1.5 2015/11/10 00:33:46 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -239,7 +239,11 @@
 #define HDMI_NV_PDISP_SOR_LVDS_REG0x16c
 #define HDMI_NV_PDISP_SOR_CRCA_REG0x170
 #define HDMI_NV_PDISP_SOR_CRCB_REG0x174
+
 #define HDMI_NV_PDISP_SOR_BLANK_REG0x178
+#define HDMI_NV_PDISP_SOR_BLANK_STATUS__BIT(2)
+#define HDMI_NV_PDISP_SOR_BLANK_TRANSITION			__BIT(1)
+#define HDMI_NV_PDISP_SOR_BLANK_OVERRIDE			__BIT(0)
 
 #define HDMI_NV_PDISP_SOR_SEQ_CTL_REG0x17c
 #define HDMI_NV_PDISP_SOR_SEQ_CTL_SWITCH			__BIT(30)



CVS commit: src/sys/arch/arm/nvidia

2015-11-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Nov 10 00:04:04 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_drm_mode.c

Log Message:
allow either crtc to be used with hdmi encoder


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_drm_mode.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/arm/nvidia/tegra_drm_mode.c
diff -u src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.1 src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.2
--- src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.1	Mon Nov  9 23:05:58 2015
+++ src/sys/arch/arm/nvidia/tegra_drm_mode.c	Tue Nov 10 00:04:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm_mode.c,v 1.1 2015/11/09 23:05:58 jmcneill Exp $ */
+/* $NetBSD: tegra_drm_mode.c,v 1.2 2015/11/10 00:04:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.1 2015/11/09 23:05:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.2 2015/11/10 00:04:04 jmcneill Exp $");
 
 #include 
 #include 
@@ -532,11 +532,7 @@ tegra_encoder_init(struct drm_device *dd
 	DRM_MODE_ENCODER_TMDS);
 	drm_encoder_helper_add(>base, _encoder_helper_funcs);
 
-#if 0
 	encoder->base.possible_crtcs = (1 << 0) | (1 << 1);
-#else
-	encoder->base.possible_crtcs = (1 << 1);
-#endif
 
 	return tegra_connector_init(ddev, >base);
 }



CVS commit: src/sys/arch

2015-11-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Nov  9 23:05:58 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: files.tegra tegra_io.c
src/sys/arch/evbarm/conf: JETSONTK1 NYAN-BIG
src/sys/arch/evbarm/tegra: tegra_machdep.c
Added Files:
src/sys/arch/arm/nvidia: tegra_drm.c tegra_drm.h tegra_drm_fb.c
tegra_drm_mode.c tegra_fb.c
Removed Files:
src/sys/arch/arm/nvidia: tegra_dc.c tegra_hdmi.c

Log Message:
Port the Tegra (2D) display drivers to the DRM framework.

tegradrm0 at tegraio0
tegrafb0 at tegradrm0
tegrafb0: framebuffer at 0x9b00, size 1280x720, depth 32, stride 5120
wsdisplay0 at tegrafb0 kbdmux 1
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 0-3 added (default, vt100 emulation)
tegradrm0: info: registered panic notifier
tegradrm0: initialized tegra 0.1.0 20151108 on minor 0

Same features as before (fb console, X wsfb driver works) with the addition
of being able to use xf86-video-modesetting and xrandr to switch video
modes at runtime.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/nvidia/files.tegra
cvs rdiff -u -r1.3 -r0 src/sys/arch/arm/nvidia/tegra_dc.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_drm.c \
src/sys/arch/arm/nvidia/tegra_drm.h \
src/sys/arch/arm/nvidia/tegra_drm_fb.c \
src/sys/arch/arm/nvidia/tegra_drm_mode.c \
src/sys/arch/arm/nvidia/tegra_fb.c
cvs rdiff -u -r1.10 -r0 src/sys/arch/arm/nvidia/tegra_hdmi.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_io.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/evbarm/conf/JETSONTK1
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/NYAN-BIG
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/evbarm/tegra/tegra_machdep.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/arm/nvidia/files.tegra
diff -u src/sys/arch/arm/nvidia/files.tegra:1.19 src/sys/arch/arm/nvidia/files.tegra:1.20
--- src/sys/arch/arm/nvidia/files.tegra:1.19	Wed Oct 21 20:02:12 2015
+++ src/sys/arch/arm/nvidia/files.tegra	Mon Nov  9 23:05:58 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.tegra,v 1.19 2015/10/21 20:02:12 jmcneill Exp $
+#	$NetBSD: files.tegra,v 1.20 2015/11/09 23:05:58 jmcneill Exp $
 #
 # Configuration info for NVIDIA Tegra ARM Peripherals
 #
@@ -102,26 +102,24 @@ device	tegrahost1x
 attach	tegrahost1x at tegraio with tegra_host1x
 file	arch/arm/nvidia/tegra_host1x.c		tegra_host1x
 
-# Display controller
-device	tegradc { }
-attach	tegradc at tegraio with tegra_dc
-file	arch/arm/nvidia/tegra_dc.c		tegra_dc
-
-# Framebuffer console
-attach	genfb at tegradc with tegra_genfb
-file	arch/arm/nvidia/tegra_genfb.c		tegra_genfb
-
-# HDMI
-device	tegrahdmi: edid, ddc_read_edid, videomode
-attach	tegrahdmi at tegraio with tegra_hdmi
-file	arch/arm/nvidia/tegra_hdmi.c		tegra_hdmi
-defflag	opt_tegra.h			TEGRA_HDMI_DEBUG
-
 # HDMI CEC
 device	tegracec: hdmicecbus
 attach	tegracec at tegraio with tegra_cec
 file	arch/arm/nvidia/tegra_cec.c		tegra_cec
 
+# Display
+define	tegrafbbus { }
+device	tegradrm: drmkms, tegrafbbus
+attach	tegradrm at tegraio with tegra_drm
+file	arch/arm/nvidia/tegra_drm.c		tegra_drm
+file	arch/arm/nvidia/tegra_drm_mode.c	tegra_drm
+file	arch/arm/nvidia/tegra_drm_fb.c		tegra_drm
+
+# Framebuffer console
+device	tegrafb: tegrafbbus, drmfb, wsemuldisplaydev
+attach	tegrafb at tegrafbbus with tegra_fb
+file	arch/arm/nvidia/tegra_fb.c		tegra_fb
+
 # GPU
 attach	nouveau at tegraio with tegra_nouveau
 file	arch/arm/nvidia/tegra_nouveau.c		tegra_nouveau

Index: src/sys/arch/arm/nvidia/tegra_io.c
diff -u src/sys/arch/arm/nvidia/tegra_io.c:1.16 src/sys/arch/arm/nvidia/tegra_io.c:1.17
--- src/sys/arch/arm/nvidia/tegra_io.c:1.16	Fri Oct 30 19:11:57 2015
+++ src/sys/arch/arm/nvidia/tegra_io.c	Mon Nov  9 23:05:58 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_io.c,v 1.16 2015/10/30 19:11:57 jmcneill Exp $ */
+/* $NetBSD: tegra_io.c,v 1.17 2015/11/09 23:05:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_tegra.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_io.c,v 1.16 2015/10/30 19:11:57 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_io.c,v 1.17 2015/11/09 23:05:58 jmcneill Exp $");
 
 #include 
 #include 
@@ -142,12 +142,7 @@ static const struct tegra_locators tegra
 };
 
 static const struct tegra_locators tegra_ghost_locators[] = {
-  { "tegradc",
-TEGRA_DISPLAYA_OFFSET, TEGRA_DISPLAYA_SIZE, 0, TEGRA_INTR_DISPLAYA },
-  { "tegradc",
-TEGRA_DISPLAYB_OFFSET, TEGRA_DISPLAYB_SIZE, 1, TEGRA_INTR_DISPLAYB },
-  { "tegrahdmi",
-TEGRA_HDMI_OFFSET, TEGRA_HDMI_SIZE, NOPORT, TEGRA_INTR_HDMI },
+  { "tegradrm", 0, 0, NOPORT, NOINTR },
 };
 
 static const struct tegra_locators tegra_gpu_locators[] = {

Index: src/sys/arch/evbarm/conf/JETSONTK1
diff -u src/sys/arch/evbarm/conf/JETSONTK1:1.34 src/sys/arch/evbarm/conf/JETSONTK1:1.35
--- 

CVS commit: src/sys/arch/arm/nvidia

2015-11-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Nov 10 00:33:39 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_drm_mode.c

Log Message:
support disabling the HDMI output


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_drm_mode.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/arm/nvidia/tegra_drm_mode.c
diff -u src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.2 src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.3
--- src/sys/arch/arm/nvidia/tegra_drm_mode.c:1.2	Tue Nov 10 00:04:04 2015
+++ src/sys/arch/arm/nvidia/tegra_drm_mode.c	Tue Nov 10 00:33:39 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm_mode.c,v 1.2 2015/11/10 00:04:04 jmcneill Exp $ */
+/* $NetBSD: tegra_drm_mode.c,v 1.3 2015/11/10 00:33:39 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.2 2015/11/10 00:04:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.3 2015/11/10 00:33:39 jmcneill Exp $");
 
 #include 
 #include 
@@ -548,6 +548,23 @@ tegra_encoder_destroy(struct drm_encoder
 static void
 tegra_encoder_dpms(struct drm_encoder *encoder, int mode)
 {
+	struct tegra_encoder *tegra_encoder = to_tegra_encoder(encoder);
+
+	if (encoder->crtc == NULL)
+		return;
+
+	switch (mode) {
+	case DRM_MODE_DPMS_ON:
+	case DRM_MODE_DPMS_STANDBY:
+	case DRM_MODE_DPMS_SUSPEND:
+		HDMI_SET_CLEAR(tegra_encoder, HDMI_NV_PDISP_SOR_BLANK_REG,
+		0, HDMI_NV_PDISP_SOR_BLANK_OVERRIDE);
+		break;
+	case DRM_MODE_DPMS_OFF:
+		HDMI_SET_CLEAR(tegra_encoder, HDMI_NV_PDISP_SOR_BLANK_REG,
+		HDMI_NV_PDISP_SOR_BLANK_OVERRIDE, 0);
+		break;
+	}
 }
 
 static bool



CVS commit: src/sys/arch/arm/allwinner

2015-11-09 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Nov  9 10:10:39 UTC 2015

Modified Files:
src/sys/arch/arm/allwinner: awin_reg.h

Log Message:
Fix typo, pointed out by jmcneill@ (thanks !)


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/arm/allwinner/awin_reg.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/arm/allwinner/awin_reg.h
diff -u src/sys/arch/arm/allwinner/awin_reg.h:1.82 src/sys/arch/arm/allwinner/awin_reg.h:1.83
--- src/sys/arch/arm/allwinner/awin_reg.h:1.82	Tue Nov  3 18:38:03 2015
+++ src/sys/arch/arm/allwinner/awin_reg.h	Mon Nov  9 10:10:39 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_reg.h,v 1.82 2015/11/03 18:38:03 bouyer Exp $ */
+/* $NetBSD: awin_reg.h,v 1.83 2015/11/09 10:10:39 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -1702,7 +1702,7 @@ struct awin_mmc_idma_descriptor {
 #define AWIN_DEBE_MODCTL_ITLMOD_EN	__BIT(28)
 #define AWIN_DEBE_MODCTL_OUT_SEL	__BITS(22,20)
 #define AWIN_DEBE_MODCTL_OUT_SEL_LCD0	0
-#define AWIN_DEBE_MODCTL_OUT_SEL_LCD1	0
+#define AWIN_DEBE_MODCTL_OUT_SEL_LCD1	1
 #define AWIN_DEBE_MODCTL_OUT_SEL_FE0	6
 #define AWIN_DEBE_MODCTL_OUT_SEL_FE1	7
 #define AWIN_DEBE_MODCTL_OSCA_EN	__BIT(17)



CVS commit: [nick-nhusb] src/sys/dev/usb

2015-11-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Nov  9 08:35:23 UTC 2015

Modified Files:
src/sys/dev/usb [nick-nhusb]: uhci.c

Log Message:
KNF (whitespace)


To generate a diff of this commit:
cvs rdiff -u -r1.264.4.53 -r1.264.4.54 src/sys/dev/usb/uhci.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/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.53 src/sys/dev/usb/uhci.c:1.264.4.54
--- src/sys/dev/usb/uhci.c:1.264.4.53	Sun Nov  8 21:02:31 2015
+++ src/sys/dev/usb/uhci.c	Mon Nov  9 08:35:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.53 2015/11/08 21:02:31 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.54 2015/11/09 08:35:23 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.53 2015/11/08 21:02:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.54 2015/11/09 08:35:23 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1763,7 +1763,7 @@ uhci_run(uhci_softc_t *sc, int run, int 
 	else
 		cmd &= ~UHCI_CMD_RS;
 	UHCICMD(sc, cmd);
-	for(n = 0; n < 10; n++) {
+	for (n = 0; n < 10; n++) {
 		running = !(UREAD2(sc, UHCI_STS) & UHCI_STS_HCH);
 		/* return when we've entered the state we want */
 		if (run == running) {
@@ -1855,7 +1855,7 @@ uhci_alloc_sqh(uhci_softc_t *sc)
 			  UHCI_QH_ALIGN, );
 		if (err)
 			return NULL;
-		for(i = 0; i < UHCI_SQH_CHUNK; i++) {
+		for (i = 0; i < UHCI_SQH_CHUNK; i++) {
 			offs = i * UHCI_SQH_SIZE;
 			sqh = KERNADDR(, offs);
 			sqh->physaddr = DMAADDR(, offs);
@@ -2452,7 +2452,7 @@ uhci_device_intr_close(struct usbd_pipe 
 	 */
 	usb_delay_ms_locked(>sc_bus, 2, >sc_lock);
 
-	for(i = 0; i < npoll; i++)
+	for (i = 0; i < npoll; i++)
 		uhci_free_sqh(sc, upipe->intr.qhs[i]);
 	kmem_free(upipe->intr.qhs, npoll * sizeof(uhci_soft_qh_t *));
 
@@ -3014,7 +3014,7 @@ uhci_device_intr_done(struct usbd_xfer *
 	KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(>sc_lock));
 
 	npoll = upipe->intr.npoll;
-	for(i = 0; i < npoll; i++) {
+	for (i = 0; i < npoll; i++) {
 		sqh = upipe->intr.qhs[i];
 		sqh->elink = NULL;
 		sqh->qh.qh_elink = htole32(UHCI_PTR_T);
@@ -3257,7 +3257,7 @@ uhci_device_setintr(uhci_softc_t *sc, st
 	}
 	DPRINTF("bw=%d offs=%d", bestbw, bestoffs, 0, 0);
 	mutex_enter(>sc_lock);
-	for(i = 0; i < npoll; i++) {
+	for (i = 0; i < npoll; i++) {
 		upipe->intr.qhs[i] = sqh = uhci_alloc_sqh(sc);
 		sqh->elink = NULL;
 		sqh->qh.qh_elink = htole32(UHCI_PTR_T);
@@ -3270,7 +3270,7 @@ uhci_device_setintr(uhci_softc_t *sc, st
 #undef MOD
 
 	/* Enter QHs into the controller data structures. */
-	for(i = 0; i < npoll; i++)
+	for (i = 0; i < npoll; i++)
 		uhci_add_intr(sc, upipe->intr.qhs[i]);
 	mutex_exit(>sc_lock);
 



CVS commit: [netbsd-5] src/sys/ufs/lfs

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 09:59:18 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5]: lfs_segment.c

Log Message:
Fix breakage from ticket #1974


To generate a diff of this commit:
cvs rdiff -u -r1.213.8.1 -r1.213.8.2 src/sys/ufs/lfs/lfs_segment.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/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.213.8.1 src/sys/ufs/lfs/lfs_segment.c:1.213.8.2
--- src/sys/ufs/lfs/lfs_segment.c:1.213.8.1	Sat Nov  7 20:30:41 2015
+++ src/sys/ufs/lfs/lfs_segment.c	Mon Nov  9 09:59:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.8.2 2015/11/09 09:59:18 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.8.2 2015/11/09 09:59:18 sborrill Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1700,7 +1700,7 @@ lfs_rewind(struct lfs *fs, int newsn)
 		panic("lfs_rewind: no clean segments");
 	if (newsn >= 0 && sn >= newsn)
 		return ENOENT;
-	fs->lfs_nextseg = lfs_sntod(fs, sn);
+	fs->lfs_nextseg = sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: src/distrib/sets/lists/debug

2015-11-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Nov  9 11:57:00 UTC 2015

Modified Files:
src/distrib/sets/lists/debug: shl.mi

Log Message:
Adapt to libc minor bump


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/distrib/sets/lists/debug/shl.mi

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

Modified files:

Index: src/distrib/sets/lists/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.115 src/distrib/sets/lists/debug/shl.mi:1.116
--- src/distrib/sets/lists/debug/shl.mi:1.115	Wed Nov  4 23:57:06 2015
+++ src/distrib/sets/lists/debug/shl.mi	Mon Nov  9 11:57:00 2015
@@ -1,7 +1,7 @@
-# $NetBSD: shl.mi,v 1.115 2015/11/04 23:57:06 knakahara Exp $
+# $NetBSD: shl.mi,v 1.116 2015/11/09 11:57:00 martin Exp $
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug		comp-sys-debug	debug,dynamicroot
-./usr/libdata/debug/lib/libc.so.12.198.debug			comp-sys-debug	debug,dynamicroot
+./usr/libdata/debug/lib/libc.so.12.199.debug			comp-sys-debug	debug,dynamicroot
 ./usr/libdata/debug/lib/libcrypt.so.1.0.debug			comp-sys-debug	debug,dynamicroot
 ./usr/libdata/debug/lib/libcrypto.so.8.4.debug			comp-sys-debug	debug,dynamicroot
 ./usr/libdata/debug/lib/libdevmapper.so.1.0.debug		comp-sys-debug	debug,dynamicroot
@@ -67,7 +67,7 @@
 ./usr/libdata/debug/usr/lib/libbsdmalloc.so.0.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libbz2.so.1.1.debug			comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libc++.so.1.0.debug			comp-sys-debug	debug,compatfile,libcxx
-./usr/libdata/debug/usr/lib/libc.so.12.198.debug		comp-sys-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libc.so.12.199.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libcom_err.so.7.0.debug		comp-krb5-debug	debug,compatfile,kerberos
 ./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libcrypto.so.8.4.debug		comp-crypto-debug	debug,compatfile,crypto