CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:57:04 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c

Log Message:
Use ahci_resume


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.2.4.1 -r1.12.4.2.4.2 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1 src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.2
--- src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1	Tue Nov  5 18:32:45 2013
+++ src/sys/dev/pci/ahcisata_pci.c	Wed Mar 26 01:57:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.12.4.2.4.2 2014/03/26 01:57:03 matt Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.2 2014/03/26 01:57:03 matt Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -211,10 +211,7 @@ ahci_pci_resume(device_t dv PMF_FN_ARGS)
 	int s;
 
 	s = splbio();
-	ahci_reset(sc);
-	ahci_setup_ports(sc);
-	ahci_reprobe_drives(sc);
-	ahci_enable_intrs(sc);
+	ahci_resume(sc);
 	splx(s);
 
 	return true;



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-03-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Mar 26 01:57:04 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c

Log Message:
Use ahci_resume


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.2.4.1 -r1.12.4.2.4.2 src/sys/dev/pci/ahcisata_pci.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-02-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 15 10:17:20 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcivar.h

Log Message:
Add a few OKAY flags from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.83.12.1 -r1.83.12.2 src/sys/dev/pci/pcivar.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/pcivar.h
diff -u src/sys/dev/pci/pcivar.h:1.83.12.1 src/sys/dev/pci/pcivar.h:1.83.12.2
--- src/sys/dev/pci/pcivar.h:1.83.12.1	Tue Nov  5 18:34:44 2013
+++ src/sys/dev/pci/pcivar.h	Sat Feb 15 10:17:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcivar.h,v 1.83.12.1 2013/11/05 18:34:44 matt Exp $	*/
+/*	$NetBSD: pcivar.h,v 1.83.12.2 2014/02/15 10:17:20 matt Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -123,11 +123,18 @@ struct pci_attach_args {
  * Flags given in the bus and device attachment args.
  */
 #define	PCI_FLAGS_IO_ENABLED	0x01		/* I/O space is enabled */
+#define PCI_FLAGS_IO_OKAY	PCI_FLAGS_IO_ENABLED
 #define	PCI_FLAGS_MEM_ENABLED	0x02		/* memory space is enabled */
+#define PCI_FLAGS_MEM_OKAY	PCI_FLAGS_MEM_ENABLED
 #define	PCI_FLAGS_MRL_OKAY	0x04		/* Memory Read Line okay */
 #define	PCI_FLAGS_MRM_OKAY	0x08		/* Memory Read Multiple okay */
 #define	PCI_FLAGS_MWI_OKAY	0x10		/* Memory Write and Invalidate
 		   okay */
+#define PCI_FLAGS_MSI_OKAY	0x20		/* Message Signaled Interrupts
+		   okay */
+#define PCI_FLAGS_MSIX_OKAY	0x40		/* Message Signaled Interrupts
+		   (Extended) okay */  
+
 
 /*
  * PCI device 'quirks'.



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-02-15 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 15 10:17:20 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcivar.h

Log Message:
Add a few OKAY flags from HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.83.12.1 -r1.83.12.2 src/sys/dev/pci/pcivar.h

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 15 03:22:27 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: if_wm.c pcireg.h ppb.c

Log Message:
sync pcireg.h with HEAD.
update if_wm.c and ppb.c accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.162.4.3.2.1.2.1 -r1.162.4.3.2.1.2.2 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.57.26.1 -r1.57.26.2 src/sys/dev/pci/pcireg.h
cvs rdiff -u -r1.39.18.3 -r1.39.18.4 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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.162.4.3.2.1.2.1 src/sys/dev/pci/if_wm.c:1.162.4.3.2.1.2.2
--- src/sys/dev/pci/if_wm.c:1.162.4.3.2.1.2.1	Wed Apr 21 00:27:41 2010
+++ src/sys/dev/pci/if_wm.c	Sat Feb 15 03:22:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.162.4.3.2.1.2.1 2010/04/21 00:27:41 matt Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.162.4.3.2.1.2.2 2014/02/15 03:22:27 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.3.2.1.2.1 2010/04/21 00:27:41 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.3.2.1.2.2 2014/02/15 03:22:27 matt Exp $);
 
 #include bpfilter.h
 #include rnd.h
@@ -1162,25 +1162,25 @@ wm_attach(device_t parent, device_t self
  * incorrectly.
  */
 pcix_cmd = pci_conf_read(pa-pa_pc, pa-pa_tag,
-sc-sc_pcix_offset + PCI_PCIX_CMD);
+sc-sc_pcix_offset + PCIX_CMD);
 pcix_sts = pci_conf_read(pa-pa_pc, pa-pa_tag,
-sc-sc_pcix_offset + PCI_PCIX_STATUS);
+sc-sc_pcix_offset + PCIX_STATUS);
 
 bytecnt =
-(pcix_cmd  PCI_PCIX_CMD_BYTECNT_MASK) 
-PCI_PCIX_CMD_BYTECNT_SHIFT;
+(pcix_cmd  PCIX_CMD_BYTECNT_MASK) 
+PCIX_CMD_BYTECNT_SHIFT;
 maxb =
-(pcix_sts  PCI_PCIX_STATUS_MAXB_MASK) 
-PCI_PCIX_STATUS_MAXB_SHIFT;
+(pcix_sts  PCIX_STATUS_MAXB_MASK) 
+PCIX_STATUS_MAXB_SHIFT;
 if (bytecnt  maxb) {
 	aprint_verbose_dev(sc-sc_dev,
 	resetting PCI-X MMRBC: %d - %d\n,
 	512  bytecnt, 512  maxb);
 	pcix_cmd = (pcix_cmd 
-	~PCI_PCIX_CMD_BYTECNT_MASK) |
-	   (maxb  PCI_PCIX_CMD_BYTECNT_SHIFT);
+	~PCIX_CMD_BYTECNT_MASK) |
+	   (maxb  PCIX_CMD_BYTECNT_SHIFT);
 	pci_conf_write(pa-pa_pc, pa-pa_tag,
-	sc-sc_pcix_offset + PCI_PCIX_CMD,
+	sc-sc_pcix_offset + PCIX_CMD,
 	pcix_cmd);
 }
 			}

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.57.26.1 src/sys/dev/pci/pcireg.h:1.57.26.2
--- src/sys/dev/pci/pcireg.h:1.57.26.1	Sat Dec 24 01:27:25 2011
+++ src/sys/dev/pci/pcireg.h	Sat Feb 15 03:22:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.57.26.1 2011/12/24 01:27:25 matt Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.57.26.2 2014/02/15 03:22:27 matt Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -179,6 +179,7 @@ typedef u_int8_t pci_revision_t;
 #define	PCI_SUBCLASS_MASS_STORAGE_ATA		0x05
 #define	PCI_SUBCLASS_MASS_STORAGE_SATA		0x06
 #define	PCI_SUBCLASS_MASS_STORAGE_SAS		0x07
+#define	PCI_SUBCLASS_MASS_STORAGE_NVM		0x08
 #define	PCI_SUBCLASS_MASS_STORAGE_MISC		0x80
 
 /* 0x02 network subclasses */
@@ -462,6 +463,7 @@ typedef u_int8_t pci_revision_t;
 #define	PCI_CAP_DEBUGPORT	0x0a
 #define	PCI_CAP_CPCI_RSRCCTL	0x0b
 #define	PCI_CAP_HOTPLUG		0x0c
+#define	PCI_CAP_SUBVENDOR	0x0d
 #define	PCI_CAP_AGP8		0x0e
 #define	PCI_CAP_SECURE		0x0f
 #define	PCI_CAP_PCIEXPRESS 	0x10
@@ -567,128 +569,239 @@ struct pci_msix_table_entry {
  * as 32-bit values, offset and shifted appropriately.  Make sure you perform
  * the appropriate R/M/W cycles!
  */
-#define PCI_PCIX_CMD			0x00
-#define PCI_PCIX_CMD_PERR_RECOVER	0x0001
-#define PCI_PCIX_CMD_RELAXED_ORDER	0x0002
-#define PCI_PCIX_CMD_BYTECNT_MASK	0x000c
-#define	PCI_PCIX_CMD_BYTECNT_SHIFT	18
-#define		PCI_PCIX_CMD_BCNT_512		0x
-#define		PCI_PCIX_CMD_BCNT_1024		0x0004
-#define		PCI_PCIX_CMD_BCNT_2048		0x0008
-#define		PCI_PCIX_CMD_BCNT_4096		0x000c
-#define PCI_PCIX_CMD_SPLTRANS_MASK	0x0070
-#define		PCI_PCIX_CMD_SPLTRANS_1		0x
-#define		PCI_PCIX_CMD_SPLTRANS_2		0x0010
-#define		PCI_PCIX_CMD_SPLTRANS_3		0x0020
-#define		PCI_PCIX_CMD_SPLTRANS_4		0x0030
-#define		PCI_PCIX_CMD_SPLTRANS_8		0x0040
-#define		PCI_PCIX_CMD_SPLTRANS_12	0x0050
-#define		PCI_PCIX_CMD_SPLTRANS_16	0x0060
-#define		PCI_PCIX_CMD_SPLTRANS_32	0x0070
+#define PCIX_CMD			0x00
+#define PCIX_CMD_PERR_RECOVER	0x0001
+#define PCIX_CMD_RELAXED_ORDER	0x0002
+#define PCIX_CMD_BYTECNT_MASK	0x000c
+#define	PCIX_CMD_BYTECNT_SHIFT	18
+#define		PCIX_CMD_BCNT_512		0x
+#define		PCIX_CMD_BCNT_1024		0x0004
+#define		PCIX_CMD_BCNT_2048		0x0008
+#define		PCIX_CMD_BCNT_4096		0x000c
+#define PCIX_CMD_SPLTRANS_MASK	0x0070
+#define		PCIX_CMD_SPLTRANS_1		

CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2014-02-14 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Feb 15 03:22:27 UTC 2014

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: if_wm.c pcireg.h ppb.c

Log Message:
sync pcireg.h with HEAD.
update if_wm.c and ppb.c accordingly.


To generate a diff of this commit:
cvs rdiff -u -r1.162.4.3.2.1.2.1 -r1.162.4.3.2.1.2.2 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.57.26.1 -r1.57.26.2 src/sys/dev/pci/pcireg.h
cvs rdiff -u -r1.39.18.3 -r1.39.18.4 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: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:32:45 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c

Log Message:
Support a 64-bit BAR for AHCI


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.2 -r1.12.4.2.4.1 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.12.4.2 src/sys/dev/pci/ahcisata_pci.c:1.12.4.2.4.1
--- src/sys/dev/pci/ahcisata_pci.c:1.12.4.2	Mon Mar 30 16:49:25 2009
+++ src/sys/dev/pci/ahcisata_pci.c	Tue Nov  5 18:32:45 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.12.4.2 2009/03/30 16:49:25 snj Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2 2009/03/30 16:49:25 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: ahcisata_pci.c,v 1.12.4.2.4.1 2013/11/05 18:32:45 matt Exp $);
 
 #include sys/types.h
 #include sys/malloc.h
@@ -50,6 +50,7 @@ __KERNEL_RCSID(0, $NetBSD: ahcisata_pci
 #include dev/ic/ahcisatavar.h
 
 #define AHCI_PCI_QUIRK_FORCE	1	/* force attach */
+#define	AHCI_PCI_QUIRK_BAR0	2
 
 static const struct pci_quirkdata ahci_pci_quirks[] = {
 	{ PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP65_SATA,
@@ -64,6 +65,8 @@ static const struct pci_quirkdata ahci_p
 	AHCI_PCI_QUIRK_FORCE },
 	{ PCI_VENDOR_NVIDIA, PCI_PRODUCT_NVIDIA_MCP73_AHCI_1,
 	AHCI_PCI_QUIRK_FORCE },
+	{ PCI_VENDOR_NETLOGIC, PCI_PRODUCT_NETLOGIC_XLP_AHCISATA,
+	AHCI_PCI_QUIRK_BAR0 },
 };
 
 struct ahci_pci_softc {
@@ -92,6 +95,7 @@ ahci_pci_match(device_t parent, cfdata_t
 	bus_size_t size;
 	int ret = 0;
 	const struct pci_quirkdata *quirks;
+	int bar = AHCI_PCI_ABAR;
 
 	quirks = ahci_pci_lookup_quirkdata(PCI_VENDOR(pa-pa_id),
 	   PCI_PRODUCT(pa-pa_id));
@@ -104,10 +108,26 @@ ahci_pci_match(device_t parent, cfdata_t
 	(quirks == NULL || (quirks-quirks  AHCI_PCI_QUIRK_FORCE) == 0))
 		return 0;
 
-	if (pci_mapreg_map(pa, AHCI_PCI_ABAR,
-	PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
-	regt, regh, NULL, size) != 0)
+	/*
+	 * Sometimes people just can't read specs.
+	 */
+	if (quirks != NULL  (quirks-quirks  AHCI_PCI_QUIRK_BAR0)) {
+		bar = PCI_BAR0;
+	}
+
+	pcireg_t mem_type = pci_mapreg_type(pa-pa_pc, pa-pa_tag, bar);
+	if (PCI_MAPREG_TYPE(mem_type) != PCI_MAPREG_TYPE_MEM) {
+		printf(%s: tag %#lx: unexpected type %#x\n,
+		__func__, pa-pa_tag, mem_type);
+		return 0;
+	}
+
+	if (pci_mapreg_map(pa, bar, mem_type, 0,
+	regt, regh, NULL, size) != 0) {
+		printf(%s: tag %#lx: pci_mapreg_map failed\n,
+		__func__, pa-pa_tag);
 		return 0;
+	}
 
 	if ((PCI_SUBCLASS(pa-pa_class) == PCI_SUBCLASS_MASS_STORAGE_SATA 
 	 PCI_INTERFACE(pa-pa_class) == PCI_INTERFACE_SATA_AHCI) ||
@@ -130,13 +150,23 @@ ahci_pci_attach(device_t parent, device_
 	const char *intrstr;
 	pci_intr_handle_t intrhandle;
 	void *ih;
+	const struct pci_quirkdata *quirks;
+	int bar = AHCI_PCI_ABAR;
 
 	sc-sc_atac.atac_dev = self;
 
-	if (pci_mapreg_map(pa, AHCI_PCI_ABAR,
-	PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
+	/*
+	 * Sometimes people just can't read specs.
+	 */
+	quirks = ahci_pci_lookup_quirkdata(PCI_VENDOR(pa-pa_id),
+	   PCI_PRODUCT(pa-pa_id));
+	if (quirks != NULL  (quirks-quirks  AHCI_PCI_QUIRK_BAR0)) {
+		bar = PCI_BAR0;
+	}
+
+	if (pci_mapreg_map(pa, bar, PCI_MAPREG_TYPE_MEM, 0,
 	sc-sc_ahcit, sc-sc_ahcih, NULL, size) != 0) {
-		aprint_error_dev(self, can't map ahci registers\n);
+		aprint_error_dev(self, : can't map ahci registers\n);
 		return;
 	}
 	psc-sc_pc = pa-pa_pc;



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:34:21 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci_subr.c

Log Message:
Pull in support for pci_aprint_devinfo_fancy


To generate a diff of this commit:
cvs rdiff -u -r1.75.10.1.4.1 -r1.75.10.1.4.2 src/sys/dev/pci/pci_subr.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/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.75.10.1.4.1 src/sys/dev/pci/pci_subr.c:1.75.10.1.4.2
--- src/sys/dev/pci/pci_subr.c:1.75.10.1.4.1	Mon Dec 26 03:44:49 2011
+++ src/sys/dev/pci/pci_subr.c	Tue Nov  5 18:34:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.75.10.1.4.1 2011/12/26 03:44:49 matt Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.75.10.1.4.2 2013/11/05 18:34:21 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.75.10.1.4.1 2011/12/26 03:44:49 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.75.10.1.4.2 2013/11/05 18:34:21 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -421,6 +421,32 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl
 	}
 }
 
+#ifdef _KERNEL
+void
+pci_aprint_devinfo_fancy(const struct pci_attach_args *pa, const char *naive,
+			 const char *known, int addrev)
+{
+	char devinfo[256];
+
+	if (known) {
+		aprint_normal(: %s, known);
+		if (addrev)
+			aprint_normal( (rev. 0x%02x),
+  PCI_REVISION(pa-pa_class));
+		aprint_normal(\n);
+	} else {
+		pci_devinfo(pa-pa_id, pa-pa_class, 0,
+			devinfo, sizeof(devinfo));
+		aprint_normal(: %s (rev. 0x%02x)\n, devinfo,
+			  PCI_REVISION(pa-pa_class));
+	}
+	if (naive)
+		aprint_naive(: %s\n, naive);
+	else
+		aprint_naive(\n);
+}
+#endif
+
 /*
  * Print out most of the PCI configuration registers.  Typically used
  * in a device attach routine like this:



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:34:44 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcivar.h

Log Message:
Pull in support for pci_aprint_devinfo_fancy


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.83.12.1 src/sys/dev/pci/pcivar.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/pcivar.h
diff -u src/sys/dev/pci/pcivar.h:1.83 src/sys/dev/pci/pcivar.h:1.83.12.1
--- src/sys/dev/pci/pcivar.h:1.83	Tue Jul 22 04:52:19 2008
+++ src/sys/dev/pci/pcivar.h	Tue Nov  5 18:34:44 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcivar.h,v 1.83 2008/07/22 04:52:19 bjs Exp $	*/
+/*	$NetBSD: pcivar.h,v 1.83.12.1 2013/11/05 18:34:44 matt Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -213,6 +213,10 @@ int pci_get_capability(pci_chipset_tag_t
 int	pci_probe_device(struct pci_softc *, pcitag_t tag,
 	int (*)(struct pci_attach_args *), struct pci_attach_args *);
 void	pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t);
+void	pci_aprint_devinfo_fancy(const struct pci_attach_args *,
+ const char *, const char *, int);
+#define pci_aprint_devinfo(pap, naive) \
+	pci_aprint_devinfo_fancy(pap, naive, NULL, 0);
 void	pci_conf_print(pci_chipset_tag_t, pcitag_t,
 	void (*)(pci_chipset_tag_t, pcitag_t, const pcireg_t *));
 const struct pci_quirkdata *



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:37:37 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.8 -r1.963.4.1.4.9 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.8 -r1.962.4.1.4.9 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.1.4.8 src/sys/dev/pci/pcidevs.h:1.963.4.1.4.9
--- src/sys/dev/pci/pcidevs.h:1.963.4.1.4.8	Tue Nov  5 18:36:18 2013
+++ src/sys/dev/pci/pcidevs.h	Tue Nov  5 18:37:24 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.8 2013/11/05 18:36:18 matt Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.9 2013/11/05 18:37:24 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.7 2012/01/03 18:27:47 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.8 2013/11/05 18:36:18 matt Exp
  */
 
 /*

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.8 src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.9
--- src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.8	Tue Nov  5 18:36:18 2013
+++ src/sys/dev/pci/pcidevs_data.h	Tue Nov  5 18:37:24 2013
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.8 2013/11/05 18:36:18 matt Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.9 2013/11/05 18:37:24 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.7 2012/01/03 18:27:47 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.8 2013/11/05 18:36:18 matt Exp
  */
 
 /*



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:32:45 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ahcisata_pci.c

Log Message:
Support a 64-bit BAR for AHCI


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.2 -r1.12.4.2.4.1 src/sys/dev/pci/ahcisata_pci.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:34:21 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci_subr.c

Log Message:
Pull in support for pci_aprint_devinfo_fancy


To generate a diff of this commit:
cvs rdiff -u -r1.75.10.1.4.1 -r1.75.10.1.4.2 src/sys/dev/pci/pci_subr.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:34:44 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcivar.h

Log Message:
Pull in support for pci_aprint_devinfo_fancy


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.83.12.1 src/sys/dev/pci/pcivar.h

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2013-11-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Nov  5 18:37:37 UTC 2013

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.8 -r1.963.4.1.4.9 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.8 -r1.962.4.1.4.9 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.



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:26:25 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci_map.c

Log Message:
Only probe the upper BAR of a mem64 if the bit31 of the lower BAR isn't
writable.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.12.1 src/sys/dev/pci/pci_map.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/pci_map.c
diff -u src/sys/dev/pci/pci_map.c:1.24 src/sys/dev/pci/pci_map.c:1.24.12.1
--- src/sys/dev/pci/pci_map.c:1.24	Tue Jul 22 04:52:19 2008
+++ src/sys/dev/pci/pci_map.c	Tue Jan  3 18:26:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_map.c,v 1.24 2008/07/22 04:52:19 bjs Exp $	*/
+/*	$NetBSD: pci_map.c,v 1.24.12.1 2012/01/03 18:26:25 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_map.c,v 1.24 2008/07/22 04:52:19 bjs Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_map.c,v 1.24.12.1 2012/01/03 18:26:25 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -131,7 +131,8 @@ pci_mem_find(pci_chipset_tag_t pc, pcita
 	 *
 	 * 2) A device which wants 2^n bytes of memory will hardwire the bottom
 	 * n bits of the address to 0.  As recommended, we write all 1s and see
-	 * what we get back.
+	 * what we get back.  Only probe the upper BAR of a mem64 BAR if bit 31
+	 * is readonly.
 	 */
 	s = splhigh();
 	address = pci_conf_read(pc, tag, reg);
@@ -140,9 +141,11 @@ pci_mem_find(pci_chipset_tag_t pc, pcita
 	pci_conf_write(pc, tag, reg, address);
 	if (is64bit) {
 		address1 = pci_conf_read(pc, tag, reg + 4);
-		pci_conf_write(pc, tag, reg + 4, 0x);
-		mask1 = pci_conf_read(pc, tag, reg + 4);
-		pci_conf_write(pc, tag, reg + 4, address1);
+		if ((mask  0x8000) == 0) {
+			pci_conf_write(pc, tag, reg + 4, 0x);
+			mask1 = pci_conf_read(pc, tag, reg + 4);
+			pci_conf_write(pc, tag, reg + 4, address1);
+		}
 	}
 	splx(s);
 



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:27:21 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ehci_pci.c

Log Message:
Only do the pci_conf_write if PCI_COMMAND_MASTER_ENABLE isn't already set.


To generate a diff of this commit:
cvs rdiff -u -r1.38.16.1.2.1 -r1.38.16.1.2.2 src/sys/dev/pci/ehci_pci.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/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.38.16.1.2.1 src/sys/dev/pci/ehci_pci.c:1.38.16.1.2.2
--- src/sys/dev/pci/ehci_pci.c:1.38.16.1.2.1	Wed Apr 21 00:27:39 2010
+++ src/sys/dev/pci/ehci_pci.c	Tue Jan  3 18:27:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.38.16.1.2.1 2010/04/21 00:27:39 matt Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.38.16.1.2.2 2012/01/03 18:27:21 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.38.16.1.2.1 2010/04/21 00:27:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.38.16.1.2.2 2012/01/03 18:27:21 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -165,8 +165,10 @@ ehci_pci_attach(struct device *parent, s
 
 	/* Enable the device. */
 	csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
-	pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
-		   csr | PCI_COMMAND_MASTER_ENABLE);
+	if ((csr  PCI_COMMAND_MASTER_ENABLE) == 0) {
+		pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
+			   csr | PCI_COMMAND_MASTER_ENABLE);
+	}
 
 	/* Disable interrupts, so we don't get any spurious ones. */
 	sc-sc.sc_offs = EREAD1(sc-sc, EHCI_CAPLENGTH);



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:27:47 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Change XLP_RAID to XLP_DMA.


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.6 -r1.962.4.1.4.7 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.962.4.1.4.6 src/sys/dev/pci/pcidevs:1.962.4.1.4.7
--- src/sys/dev/pci/pcidevs:1.962.4.1.4.6	Sat Dec 31 02:25:42 2011
+++ src/sys/dev/pci/pcidevs	Tue Jan  3 18:27:47 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.1.4.6 2011/12/31 02:25:42 matt Exp $
+$NetBSD: pcidevs,v 1.962.4.1.4.7 2012/01/03 18:27:47 matt Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2917,7 +2917,7 @@ product NETLOGIC XLP_OHCIUSB	0x1008	XLP 
 product NETLOGIC XLP_NAE	0x1009	XLP Network Acceleration engine
 product NETLOGIC XLP_POE	0x100A	XLP Packet Ordering engine
 product NETLOGIC XLP_FMN	0x100B	XLP Fast Messaging Network
-product NETLOGIC XLP_RAID	0x100C	XLP Data Transfer and RAID engine
+product NETLOGIC XLP_DMA	0x100C	XLP Data Transfer and RAID engine
 product NETLOGIC XLP_SAE	0x100D	XLP Security accelerator
 product NETLOGIC XLP_PKE	0x100E	XLP RSA/ECC accelerator
 product NETLOGIC XLP_CDE	0x100F	XLP Compress/Decompression engine



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:28:36 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.6 -r1.963.4.1.4.7 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.6 -r1.962.4.1.4.7 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.1.4.6 src/sys/dev/pci/pcidevs.h:1.963.4.1.4.7
--- src/sys/dev/pci/pcidevs.h:1.963.4.1.4.6	Sat Dec 31 02:26:21 2011
+++ src/sys/dev/pci/pcidevs.h	Tue Jan  3 18:28:15 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.6 2011/12/31 02:26:21 matt Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.7 2012/01/03 18:28:15 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.6 2011/12/31 02:25:42 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.7 2012/01/03 18:27:47 matt Exp
  */
 
 /*
@@ -2924,7 +2924,7 @@
 #define	PCI_PRODUCT_NETLOGIC_XLP_NAE	0x1009		/* XLP Network Acceleration engine */
 #define	PCI_PRODUCT_NETLOGIC_XLP_POE	0x100A		/* XLP Packet Ordering engine */
 #define	PCI_PRODUCT_NETLOGIC_XLP_FMN	0x100B		/* XLP Fast Messaging Network */
-#define	PCI_PRODUCT_NETLOGIC_XLP_RAID	0x100C		/* XLP Data Transfer and RAID engine */
+#define	PCI_PRODUCT_NETLOGIC_XLP_DMA	0x100C		/* XLP Data Transfer and RAID engine */
 #define	PCI_PRODUCT_NETLOGIC_XLP_SAE	0x100D		/* XLP Security accelerator */
 #define	PCI_PRODUCT_NETLOGIC_XLP_PKE	0x100E		/* XLP RSA/ECC accelerator */
 #define	PCI_PRODUCT_NETLOGIC_XLP_CDE	0x100F		/* XLP Compress/Decompression engine */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.6 src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.7
--- src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.6	Sat Dec 31 02:26:21 2011
+++ src/sys/dev/pci/pcidevs_data.h	Tue Jan  3 18:28:16 2012
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.6 2011/12/31 02:26:21 matt Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.7 2012/01/03 18:28:16 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.6 2011/12/31 02:25:42 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.7 2012/01/03 18:27:47 matt Exp
  */
 
 /*
@@ -10244,7 +10244,7 @@ static const struct pci_product pci_prod
 	XLP Fast Messaging Network,
 	},
 	{
-	PCI_VENDOR_NETLOGIC, PCI_PRODUCT_NETLOGIC_XLP_RAID,
+	PCI_VENDOR_NETLOGIC, PCI_PRODUCT_NETLOGIC_XLP_DMA,
 	XLP Data Transfer and RAID engine,
 	},
 	{



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jan  4 00:10:40 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ehci_pci.c usb_pci.h

Log Message:
Take changes from matt-nb5-pq3 which fixes how multiple ehci functions
on a pci device claim companion ohci controllers.


To generate a diff of this commit:
cvs rdiff -u -r1.38.16.1.2.2 -r1.38.16.1.2.3 src/sys/dev/pci/ehci_pci.c
cvs rdiff -u -r1.5 -r1.5.18.1 src/sys/dev/pci/usb_pci.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/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.38.16.1.2.2 src/sys/dev/pci/ehci_pci.c:1.38.16.1.2.3
--- src/sys/dev/pci/ehci_pci.c:1.38.16.1.2.2	Tue Jan  3 18:27:21 2012
+++ src/sys/dev/pci/ehci_pci.c	Wed Jan  4 00:10:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.38.16.1.2.2 2012/01/03 18:27:21 matt Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.38.16.1.2.3 2012/01/04 00:10:40 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.38.16.1.2.2 2012/01/03 18:27:21 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.38.16.1.2.3 2012/01/04 00:10:40 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -230,13 +230,17 @@ ehci_pci_attach(struct device *parent, s
 	 * Find companion controllers.  According to the spec they always
 	 * have lower function numbers so they should be enumerated already.
 	 */
+	const u_int maxncomp = EHCI_HCS_N_CC(EREAD4(sc-sc, EHCI_HCSPARAMS));
+	KASSERT(maxncomp = EHCI_COMPANION_MAX);
 	ncomp = 0;
 	TAILQ_FOREACH(up, ehci_pci_alldevs, next) {
-		if (up-bus == pa-pa_bus  up-device == pa-pa_device) {
+		if (up-bus == pa-pa_bus  up-device == pa-pa_device
+		 !up-claimed) {
 			DPRINTF((ehci_pci_attach: companion %s\n,
  device_xname(up-usb)));
 			sc-sc.sc_comps[ncomp++] = up-usb;
-			if (ncomp = EHCI_COMPANION_MAX)
+			up-claimed = true;
+			if (ncomp == maxncomp)
 break;
 		}
 	}

Index: src/sys/dev/pci/usb_pci.h
diff -u src/sys/dev/pci/usb_pci.h:1.5 src/sys/dev/pci/usb_pci.h:1.5.18.1
--- src/sys/dev/pci/usb_pci.h:1.5	Mon Apr 28 20:23:55 2008
+++ src/sys/dev/pci/usb_pci.h	Wed Jan  4 00:10:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_pci.h,v 1.5 2008/04/28 20:23:55 martin Exp $	*/
+/*	$NetBSD: usb_pci.h,v 1.5.18.1 2012/01/04 00:10:40 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -41,6 +41,7 @@ struct usb_pci {
 	u_int		device;
 	u_int		function;
 	device_t	usb;
+	bool		claimed;
 };
 
 TAILQ_HEAD(usb_pci_alldevs, usb_pci);



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:26:25 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci_map.c

Log Message:
Only probe the upper BAR of a mem64 if the bit31 of the lower BAR isn't
writable.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.24.12.1 src/sys/dev/pci/pci_map.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:27:21 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ehci_pci.c

Log Message:
Only do the pci_conf_write if PCI_COMMAND_MASTER_ENABLE isn't already set.


To generate a diff of this commit:
cvs rdiff -u -r1.38.16.1.2.1 -r1.38.16.1.2.2 src/sys/dev/pci/ehci_pci.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:27:47 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Change XLP_RAID to XLP_DMA.


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.6 -r1.962.4.1.4.7 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: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jan  3 18:28:36 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.6 -r1.963.4.1.4.7 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.6 -r1.962.4.1.4.7 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.



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2012-01-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jan  4 00:10:40 UTC 2012

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ehci_pci.c usb_pci.h

Log Message:
Take changes from matt-nb5-pq3 which fixes how multiple ehci functions
on a pci device claim companion ohci controllers.


To generate a diff of this commit:
cvs rdiff -u -r1.38.16.1.2.2 -r1.38.16.1.2.3 src/sys/dev/pci/ehci_pci.c
cvs rdiff -u -r1.5 -r1.5.18.1 src/sys/dev/pci/usb_pci.h

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-30 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 31 02:25:43 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Add XLP RXE and SRIO product ids.


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.5 -r1.962.4.1.4.6 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.962.4.1.4.5 src/sys/dev/pci/pcidevs:1.962.4.1.4.6
--- src/sys/dev/pci/pcidevs:1.962.4.1.4.5	Sat Dec 24 01:22:44 2011
+++ src/sys/dev/pci/pcidevs	Sat Dec 31 02:25:42 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.1.4.5 2011/12/24 01:22:44 matt Exp $
+$NetBSD: pcidevs,v 1.962.4.1.4.6 2011/12/31 02:25:42 matt Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2930,7 +2930,9 @@ product NETLOGIC XLP_NOR	0x1015	XLP NOR 
 product NETLOGIC XLP_NAND	0x1016	XLP NAND flash controller
 product NETLOGIC XLP_SPI	0x1017	XLP SPI controller
 product NETLOGIC XLP_SDHC	0x1018	XLP eMMC/SD/SDIO controller
+product NETLOGIC XLP_RXE	0x1019	XLP Regular Expression accelerator
 product NETLOGIC XLP_AHCISATA	0x101a	XLP AHCI SATA controller
+product NETLOGIC XLP_SRIO	0x101b	XLP SRIO (Serial Rapid IO) controller
 
 /* NetVin products - XXX better descriptions */
 product NETVIN 5000	0x5000	5000 Ethernet



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-30 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 31 02:26:41 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.5 -r1.963.4.1.4.6 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.5 -r1.962.4.1.4.6 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.1.4.5 src/sys/dev/pci/pcidevs.h:1.963.4.1.4.6
--- src/sys/dev/pci/pcidevs.h:1.963.4.1.4.5	Sat Dec 24 01:23:12 2011
+++ src/sys/dev/pci/pcidevs.h	Sat Dec 31 02:26:21 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.5 2011/12/24 01:23:12 matt Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.6 2011/12/31 02:26:21 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.5 2011/12/24 01:22:44 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.6 2011/12/31 02:25:42 matt Exp
  */
 
 /*
@@ -2937,7 +2937,9 @@
 #define	PCI_PRODUCT_NETLOGIC_XLP_NAND	0x1016		/* XLP NAND flash controller */
 #define	PCI_PRODUCT_NETLOGIC_XLP_SPI	0x1017		/* XLP SPI controller */
 #define	PCI_PRODUCT_NETLOGIC_XLP_SDHC	0x1018		/* XLP eMMC/SD/SDIO controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_RXE	0x1019		/* XLP Regular Expression accelerator */
 #define	PCI_PRODUCT_NETLOGIC_XLP_AHCISATA	0x101a		/* XLP AHCI SATA controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_SRIO	0x101b		/* XLP SRIO (Serial Rapid IO) controller */
 
 /* NetVin products - XXX better descriptions */
 #define	PCI_PRODUCT_NETVIN_5000	0x5000		/* 5000 Ethernet */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.5 src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.6
--- src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.5	Sat Dec 24 01:23:13 2011
+++ src/sys/dev/pci/pcidevs_data.h	Sat Dec 31 02:26:21 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.5 2011/12/24 01:23:13 matt Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.6 2011/12/31 02:26:21 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.5 2011/12/24 01:22:44 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.6 2011/12/31 02:25:42 matt Exp
  */
 
 /*
@@ -10296,10 +10296,18 @@ static const struct pci_product pci_prod
 	XLP eMMC/SD/SDIO controller,
 	},
 	{
+	PCI_VENDOR_NETLOGIC, PCI_PRODUCT_NETLOGIC_XLP_RXE,
+	XLP Regular Expression accelerator,
+	},
+	{
 	PCI_VENDOR_NETLOGIC, PCI_PRODUCT_NETLOGIC_XLP_AHCISATA,
 	XLP AHCI SATA controller,
 	},
 	{
+	PCI_VENDOR_NETLOGIC, PCI_PRODUCT_NETLOGIC_XLP_SRIO,
+	XLP SRIO (Serial Rapid IO) controller,
+	},
+	{
 	PCI_VENDOR_NETVIN, PCI_PRODUCT_NETVIN_5000,
 	5000 Ethernet,
 	},
@@ -14948,4 +14956,4 @@ static const struct pci_product pci_prod
 	Video Controller,
 	},
 };
-const int pci_nproducts = 3134;
+const int pci_nproducts = 3136;



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-30 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 31 02:25:43 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Add XLP RXE and SRIO product ids.


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.5 -r1.962.4.1.4.6 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: [matt-nb5-mips64] src/sys/dev/pci

2011-12-30 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 31 02:26:41 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.5 -r1.963.4.1.4.6 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.5 -r1.962.4.1.4.6 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.



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 26 03:44:49 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci_subr.c

Log Message:
Merge -HEAD changes (except for PCIVERBOSE chagnes).


To generate a diff of this commit:
cvs rdiff -u -r1.75.10.1 -r1.75.10.1.4.1 src/sys/dev/pci/pci_subr.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/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.75.10.1 src/sys/dev/pci/pci_subr.c:1.75.10.1.4.1
--- src/sys/dev/pci/pci_subr.c:1.75.10.1	Tue Feb 24 03:50:48 2009
+++ src/sys/dev/pci/pci_subr.c	Mon Dec 26 03:44:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.75.10.1 2009/02/24 03:50:48 snj Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.75.10.1.4.1 2011/12/26 03:44:49 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.75.10.1 2009/02/24 03:50:48 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_subr.c,v 1.75.10.1.4.1 2011/12/26 03:44:49 matt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pci.h
@@ -355,9 +355,9 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl
 	const char *vendor_namep, *product_namep;
 	const struct pci_class *classp, *subclassp;
 #ifdef PCIVERBOSE
-	const char *unmatched = unknown ;
+	static const char unmatched[] = unknown ;
 #else
-	const char *unmatched = ;
+	static const char unmatched[] = ;
 #endif
 	char *ep;
 
@@ -405,7 +405,7 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl
 		else {
 			if (subclassp == NULL || subclassp-name == NULL)
 cp += snprintf(cp, ep - cp,
-%s subclass 0x%02x,
+%s, subclass 0x%02x,
 classp-name, subclass);
 			else
 cp += snprintf(cp, ep - cp, %s %s,
@@ -433,8 +433,9 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl
 
 #define	i2o(i)	((i) * 4)
 #define	o2i(o)	((o) / 4)
-#define	onoff(str, bit)			\
-	printf(  %s: %s\n, (str), (rval  (bit)) ? on : off);
+#define	onoff2(str, bit, onstr, offstr)	\
+	printf(  %s: %s\n, (str), (rval  (bit)) ? onstr : offstr);
+#define	onoff(str, bit)	onoff2(str, bit, on, off)
 
 static void
 pci_conf_print_common(
@@ -477,6 +478,7 @@ pci_conf_print_common(
 	onoff(Interrupt disable, PCI_COMMAND_INTERRUPT_DISABLE);
 
 	printf(Status register: 0x%04x\n, (rval  16)  0x);
+	onoff2(Interrupt status, PCI_STATUS_INT_STATUS, active, inactive);
 	onoff(Capability List support, PCI_STATUS_CAPLIST_SUPPORT);
 	onoff(66 MHz capable, PCI_STATUS_66MHZ_SUPPORT);
 	onoff(User Definable Features (UDF) support, PCI_STATUS_UDF_SUPPORT);
@@ -819,6 +821,29 @@ pci_conf_print_pcie_cap(const pcireg_t *
 		printf(Slot implemented\n);
 	printf(Interrupt Message Number: %x\n,
 	(unsigned int)((regs[o2i(capoff)]  0x4e00)  27));
+	printf(Link Capabilities Register: 0x%08x\n,
+	regs[o2i(capoff + 0x0c)]);
+	printf(  Maximum Link Speed: );
+	if ((regs[o2i(capoff + 0x0c)]  0x000f) != 1) {
+		printf(unknown %u value\n, 
+		(regs[o2i(capoff + 0x0c)]  0x000f));
+	} else {
+		printf(2.5Gb/s\n);
+	}
+	printf(  Maximum Link Width: x%u lanes\n,
+	(regs[o2i(capoff + 0x0c)]  0x03f0)  4);
+	printf(  Port Number: %u\n, regs[o2i(capoff + 0x0c)]  24);
+	printf(Link Status Register: 0x%04x\n,
+	regs[o2i(capoff + 0x10)]  16);
+	printf(  Negotiated Link Speed: );
+	if (((regs[o2i(capoff + 0x10)]  16)  0x000f) != 1) {
+		printf(unknown %u value\n, 
+		(regs[o2i(capoff + 0x10)]  16)  0x000f);
+	} else {
+		printf(2.5Gb/s\n);
+	}
+	printf(  Negotiated Link Width: x%u lanes\n,
+	(regs[o2i(capoff + 0x10)]  20)  0x003f);
 	if ((regs[o2i(capoff + 0x18)]  0x07ff) != 0) {
 		printf(Slot Control Register:\n);
 		if ((regs[o2i(capoff + 0x18)]  0x0001) != 0)
@@ -833,8 +858,8 @@ pci_conf_print_pcie_cap(const pcireg_t *
 			printf(  Command Completed Interrupt Enabled\n);
 		if ((regs[o2i(capoff + 0x18)]  0x0020) != 0)
 			printf(  Hot-Plug Interrupt Enabled\n);
-		printf(  Attention Indictor Control: );
-		switch ((regs[o2i(capoff + 0x18)]  0x00a0)  6) {
+		printf(  Attention Indicator Control: );
+		switch ((regs[o2i(capoff + 0x18)]  0x00c0)  6) {
 		case 0x0:
 			printf(reserved\n);
 			break;
@@ -848,7 +873,7 @@ pci_conf_print_pcie_cap(const pcireg_t *
 			printf(off\n);
 			break;
 		}
-		printf(  Power Indictor Control: );
+		printf(  Power Indicator Control: );
 		switch ((regs[o2i(capoff + 0x18)]  0x0300)  8) {
 		case 0x0:
 			printf(reserved\n);
@@ -934,6 +959,41 @@ pci_conf_print_pcipm_cap(const pcireg_t 
 }
 
 static void
+pci_conf_print_msi_cap(const pcireg_t *regs, int capoff)
+{
+	uint32_t ctl, mmc, mme;
+
+	regs += o2i(capoff);
+	ctl = *regs++;
+	mmc = __SHIFTOUT(ctl, PCI_MSI_CTL_MMC_MASK);
+	mme = __SHIFTOUT(ctl, PCI_MSI_CTL_MME_MASK);
+
+	printf(\n  PCI Message Signaled Interrupt\n);
+
+	printf(Message Control register: 0x%04x\n, ctl  16);
+	printf(  MSI 

CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-25 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Dec 26 03:44:49 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci_subr.c

Log Message:
Merge -HEAD changes (except for PCIVERBOSE chagnes).


To generate a diff of this commit:
cvs rdiff -u -r1.75.10.1 -r1.75.10.1.4.1 src/sys/dev/pci/pci_subr.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:22:44 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Add NetLogic(RMI) XLP devices


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.4 -r1.962.4.1.4.5 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.962.4.1.4.4 src/sys/dev/pci/pcidevs:1.962.4.1.4.5
--- src/sys/dev/pci/pcidevs:1.962.4.1.4.4	Mon May 10 06:55:25 2010
+++ src/sys/dev/pci/pcidevs	Sat Dec 24 01:22:44 2011
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.1.4.4 2010/05/10 06:55:25 matt Exp $
+$NetBSD: pcidevs,v 1.962.4.1.4.5 2011/12/24 01:22:44 matt Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -602,6 +602,7 @@ vendor S2IO		0x17d5	S2io Technologies
 vendor LINKSYS2		0x17fe	Linksys
 vendor RALINK		0x1814	Ralink Technologies
 vendor RMI		0x182e	Raza Microelectronics Inc.
+vendor NETLOGIC		0x184e	NetLogic Microsystems
 vendor BBELEC		0x1896	B  B Electronics
 vendor ATTANSIC		0x1969	Attansic Technologies
 vendor EVE		0x1adb	EVE
@@ -2233,6 +2234,7 @@ product INTEL 82801J_D_BM_LM	0x10de	i825
 product INTEL 82801J_D_BM_LF	0x10df	i82567LF-3 LAN Controller
 product INTEL 82575GB_QUAD_COPPER_PM 0x10e2 i82575GB Quad-1000baseT Ethernet (PM)
 product INTEL 82801I_BM		0x10e5	i82567LM-4 LAN Controller
+product INTEL 82576_QUAD_COPPER	0x10e8	82576 quad-1000BaseT Ethernet
 product INTEL PCH_M_LM		0x10ea	PCH LAN (82577LM) Controller
 product INTEL PCH_M_LC		0x10eb	PCH LAN (82577LC) Controller
 product INTEL PCH_D_DM		0x10ef	PCH LAN (82578DM) Controller
@@ -2900,12 +2902,39 @@ product MYSON MTD803	0x0803	MTD803 3-in-
 product NDC NCP130		0x0130 NCP130 Wireless NIC
 product NDC NCP130A2		0x0131 NCP130 rev A2 Wireless NIC
 
-/* NetVin products - XXX better descriptions */
-product NETVIN 5000	0x5000	5000 Ethernet
-
 /* NetBoost (now Intel) products */
 product NETBOOST POLICY	0x	Policy Accelerator
 
+/* NetLogic (now Broadcom?) products */
+product NETLOGIC XLP_SBC	0x1001	XLP System Bridge controller
+product NETLOGIC XLP_ICI	0x1002	XLP Inter-Chip interconnect
+product NETLOGIC XLP_PIC	0x1003	XLP Programmable Interrupt controller
+product NETLOGIC XLP_PCIROOT	0x1004	XLP PCI-Express RootComplex/Endpoint port
+product NETLOGIC XLP_INTERLAKEN	0x1005	XLP Interlaken LA interface
+product NETLOGIC XLP_DEVUSB	0x1006	XLP Device USB controller
+product NETLOGIC XLP_EHCIUSB	0x1007	XLP EHCI USB controller
+product NETLOGIC XLP_OHCIUSB	0x1008	XLP OHCI USB controller
+product NETLOGIC XLP_NAE	0x1009	XLP Network Acceleration engine
+product NETLOGIC XLP_POE	0x100A	XLP Packet Ordering engine
+product NETLOGIC XLP_FMN	0x100B	XLP Fast Messaging Network
+product NETLOGIC XLP_RAID	0x100C	XLP Data Transfer and RAID engine
+product NETLOGIC XLP_SAE	0x100D	XLP Security accelerator
+product NETLOGIC XLP_PKE	0x100E	XLP RSA/ECC accelerator
+product NETLOGIC XLP_CDE	0x100F	XLP Compress/Decompression engine
+product NETLOGIC XLP_UART	0x1010	XLP UART controller
+product NETLOGIC XLP_I2C	0x1011	XLP I2C controller
+product NETLOGIC XLP_GPIO	0x1012	XLP GPIO controller
+product NETLOGIC XLP_SYSTEM	0x1013	XLP System controller
+product NETLOGIC XLP_JTAG	0x1014	XLP JTAG interface
+product NETLOGIC XLP_NOR	0x1015	XLP NOR flash controller
+product NETLOGIC XLP_NAND	0x1016	XLP NAND flash controller
+product NETLOGIC XLP_SPI	0x1017	XLP SPI controller
+product NETLOGIC XLP_SDHC	0x1018	XLP eMMC/SD/SDIO controller
+product NETLOGIC XLP_AHCISATA	0x101a	XLP AHCI SATA controller
+
+/* NetVin products - XXX better descriptions */
+product NETVIN 5000	0x5000	5000 Ethernet
+
 /* Newbridge / Tundra products */
 product NEWBRIDGE CA91CX42		0x	Universe VME bridge
 product NEWBRIDGE CA91L826A		0x0826	QSpan II PCI bridge



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:23:34 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.4 -r1.963.4.1.4.5 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.4 -r1.962.4.1.4.5 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.1.4.4 src/sys/dev/pci/pcidevs.h:1.963.4.1.4.5
--- src/sys/dev/pci/pcidevs.h:1.963.4.1.4.4	Mon May 10 06:55:44 2010
+++ src/sys/dev/pci/pcidevs.h	Sat Dec 24 01:23:12 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.4 2010/05/10 06:55:44 matt Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.5 2011/12/24 01:23:12 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.4 2010/05/10 06:55:25 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.5 2011/12/24 01:22:44 matt Exp
  */
 
 /*
@@ -609,6 +609,7 @@
 #define	PCI_VENDOR_LINKSYS2	0x17fe		/* Linksys */
 #define	PCI_VENDOR_RALINK	0x1814		/* Ralink Technologies */
 #define	PCI_VENDOR_RMI	0x182e		/* Raza Microelectronics Inc. */
+#define	PCI_VENDOR_NETLOGIC	0x184e		/* NetLogic Microsystems */
 #define	PCI_VENDOR_BBELEC	0x1896		/* B  B Electronics */
 #define	PCI_VENDOR_ATTANSIC	0x1969		/* Attansic Technologies */
 #define	PCI_VENDOR_EVE	0x1adb		/* EVE */
@@ -2240,6 +2241,7 @@
 #define	PCI_PRODUCT_INTEL_82801J_D_BM_LF	0x10df		/* i82567LF-3 LAN Controller */
 #define	PCI_PRODUCT_INTEL_82575GB_QUAD_COPPER_PM	0x10e2		/* i82575GB Quad-1000baseT Ethernet (PM) */
 #define	PCI_PRODUCT_INTEL_82801I_BM	0x10e5		/* i82567LM-4 LAN Controller */
+#define	PCI_PRODUCT_INTEL_82576_QUAD_COPPER	0x10e8		/* 82576 quad-1000BaseT Ethernet */
 #define	PCI_PRODUCT_INTEL_PCH_M_LM	0x10ea		/* PCH LAN (82577LM) Controller */
 #define	PCI_PRODUCT_INTEL_PCH_M_LC	0x10eb		/* PCH LAN (82577LC) Controller */
 #define	PCI_PRODUCT_INTEL_PCH_D_DM	0x10ef		/* PCH LAN (82578DM) Controller */
@@ -2907,12 +2909,39 @@
 #define	PCI_PRODUCT_NDC_NCP130	0x0130		/* NCP130 Wireless NIC */
 #define	PCI_PRODUCT_NDC_NCP130A2	0x0131		/* NCP130 rev A2 Wireless NIC */
 
-/* NetVin products - XXX better descriptions */
-#define	PCI_PRODUCT_NETVIN_5000	0x5000		/* 5000 Ethernet */
-
 /* NetBoost (now Intel) products */
 #define	PCI_PRODUCT_NETBOOST_POLICY	0x		/* Policy Accelerator */
 
+/* NetLogic (now Broadcom?) products */
+#define	PCI_PRODUCT_NETLOGIC_XLP_SBC	0x1001		/* XLP System Bridge controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_ICI	0x1002		/* XLP Inter-Chip interconnect */
+#define	PCI_PRODUCT_NETLOGIC_XLP_PIC	0x1003		/* XLP Programmable Interrupt controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_PCIROOT	0x1004		/* XLP PCI-Express RootComplex/Endpoint port */
+#define	PCI_PRODUCT_NETLOGIC_XLP_INTERLAKEN	0x1005		/* XLP Interlaken LA interface */
+#define	PCI_PRODUCT_NETLOGIC_XLP_DEVUSB	0x1006		/* XLP Device USB controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_EHCIUSB	0x1007		/* XLP EHCI USB controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_OHCIUSB	0x1008		/* XLP OHCI USB controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_NAE	0x1009		/* XLP Network Acceleration engine */
+#define	PCI_PRODUCT_NETLOGIC_XLP_POE	0x100A		/* XLP Packet Ordering engine */
+#define	PCI_PRODUCT_NETLOGIC_XLP_FMN	0x100B		/* XLP Fast Messaging Network */
+#define	PCI_PRODUCT_NETLOGIC_XLP_RAID	0x100C		/* XLP Data Transfer and RAID engine */
+#define	PCI_PRODUCT_NETLOGIC_XLP_SAE	0x100D		/* XLP Security accelerator */
+#define	PCI_PRODUCT_NETLOGIC_XLP_PKE	0x100E		/* XLP RSA/ECC accelerator */
+#define	PCI_PRODUCT_NETLOGIC_XLP_CDE	0x100F		/* XLP Compress/Decompression engine */
+#define	PCI_PRODUCT_NETLOGIC_XLP_UART	0x1010		/* XLP UART controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_I2C	0x1011		/* XLP I2C controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_GPIO	0x1012		/* XLP GPIO controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_SYSTEM	0x1013		/* XLP System controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_JTAG	0x1014		/* XLP JTAG interface */
+#define	PCI_PRODUCT_NETLOGIC_XLP_NOR	0x1015		/* XLP NOR flash controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_NAND	0x1016		/* XLP NAND flash controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_SPI	0x1017		/* XLP SPI controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_SDHC	0x1018		/* XLP eMMC/SD/SDIO controller */
+#define	PCI_PRODUCT_NETLOGIC_XLP_AHCISATA	0x101a		/* XLP AHCI SATA controller */
+
+/* NetVin products - XXX better descriptions */
+#define	PCI_PRODUCT_NETVIN_5000	0x5000		/* 5000 Ethernet */
+
 /* Newbridge / Tundra products */
 #define	PCI_PRODUCT_NEWBRIDGE_CA91CX42	0x		/* Universe VME bridge */
 #define	PCI_PRODUCT_NEWBRIDGE_CA91L826A	0x0826		/* QSpan II PCI bridge */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.4 

CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:24:44 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci.c

Log Message:
Add support for __PCI_DEV_FUNCORDER


To generate a diff of this commit:
cvs rdiff -u -r1.119.4.1 -r1.119.4.1.4.1 src/sys/dev/pci/pci.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/pci.c
diff -u src/sys/dev/pci/pci.c:1.119.4.1 src/sys/dev/pci/pci.c:1.119.4.1.4.1
--- src/sys/dev/pci/pci.c:1.119.4.1	Thu Nov 20 02:40:59 2008
+++ src/sys/dev/pci/pci.c	Sat Dec 24 01:24:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $	*/
+/*	$NetBSD: pci.c,v 1.119.4.1.4.1 2011/12/24 01:24:44 matt Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1997, 1998
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.1 2008/11/20 02:40:59 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci.c,v 1.119.4.1.4.1 2011/12/24 01:24:44 matt Exp $);
 
 #include opt_pci.h
 
@@ -533,7 +533,24 @@ pci_enumerate_bus(struct pci_softc *sc, 
 		else
 			nfunctions = PCI_HDRTYPE_MULTIFN(bhlcr) ? 8 : 1;
 
+#ifdef __PCI_DEV_FUNCORDER
+		char funcs[8];
+		int j;
+		for (j = 0; j  nfunctions; j++) {
+			funcs[j] = j;
+		}
+		if (j  __arraycount(funcs))
+			funcs[j] = -1;
+		if (nfunctions  1) {
+			pci_dev_funcorder(sc-sc_pc, sc-sc_bus, device,
+			nfunctions, funcs);
+		}
+		for (j = 0;
+		 j  8  (function = funcs[j])  8  function = 0;
+		 j++) {
+#else
 		for (function = 0; function  nfunctions; function++) {
+#endif
 			if ((locators[PCICF_FUNCTION] != PCICF_FUNCTION_DEFAULT)
 			 (locators[PCICF_FUNCTION] != function))
 continue;



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:25:51 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pciconf.c

Log Message:
Fix problem when alignment of a device is  then the alignment of the bus
bus spaces provided.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.52.1 src/sys/dev/pci/pciconf.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/pciconf.c
diff -u src/sys/dev/pci/pciconf.c:1.30 src/sys/dev/pci/pciconf.c:1.30.52.1
--- src/sys/dev/pci/pciconf.c:1.30	Thu May 24 15:57:58 2007
+++ src/sys/dev/pci/pciconf.c	Sat Dec 24 01:25:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pciconf.c,v 1.30 2007/05/24 15:57:58 briggs Exp $	*/
+/*	$NetBSD: pciconf.c,v 1.30.52.1 2011/12/24 01:25:51 matt Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pciconf.c,v 1.30 2007/05/24 15:57:58 briggs Exp $);
+__KERNEL_RCSID(0, $NetBSD: pciconf.c,v 1.30.52.1 2011/12/24 01:25:51 matt Exp $);
 
 #include opt_pci.h
 
@@ -130,6 +130,9 @@ typedef struct _s_pciconf_bus_t {
 	int		swiz;
 	int		io_32bit;
 	int		pmem_64bit;
+	int		io_align;
+	int		mem_align;
+	int		pmem_align;
 
 	int		ndevs;
 	pciconf_dev_t	device[MAX_CONF_DEV];
@@ -328,6 +331,10 @@ query_bus(pciconf_bus_t *parent, pciconf
 	pb-parent_bus = parent;
 	alloc_busno(parent, pb);
 
+	pb-mem_align = 0x10;	/* 1M alignment */
+	pb-pmem_align = 0x10;	/* 1M alignment */
+	pb-io_align = 0x1000;		/* 4K alignment */
+
 	set_busreg(parent-pc, pd-tag, parent-busno, pb-busno, 0xff);
 
 	pb-swiz = parent-swiz + dev;
@@ -374,12 +381,14 @@ query_bus(pciconf_bus_t *parent, pciconf
 			printf(pciconf: too many I/O windows\n);
 			goto err;
 		}
-		pb-io_total |= 0xfff;	/* Round up */
+		pb-io_total |= pb-io_align - 1; /* Round up */
 		pi = get_io_desc(parent, pb-io_total);
 		pi-dev = pd;
 		pi-reg = 0;
 		pi-size = pb-io_total;
-		pi-align = 0x1000;	/* 4K alignment */
+		pi-align = pb-io_align;	/* 4K min alignment */
+		if (parent-io_align  pb-io_align)
+			parent-io_align = pb-io_align;
 		pi-prefetch = 0;
 		parent-niowin++;
 		parent-io_total += pb-io_total;
@@ -390,12 +399,14 @@ query_bus(pciconf_bus_t *parent, pciconf
 			printf(pciconf: too many MEM windows\n);
 			goto err;
 		}
-		pb-mem_total |= 0xf;	/* Round up */
+		pb-mem_total |= pb-mem_align-1; /* Round up */
 		pm = get_mem_desc(parent, pb-mem_total);
 		pm-dev = pd;
 		pm-reg = 0;
 		pm-size = pb-mem_total;
-		pm-align = 0x10;	/* 1M alignment */
+		pm-align = pb-mem_align;	/* 1M min alignment */
+		if (parent-mem_align  pb-mem_align)
+			parent-mem_align = pb-mem_align;
 		pm-prefetch = 0;
 		parent-nmemwin++;
 		parent-mem_total += pb-mem_total;
@@ -406,12 +417,14 @@ query_bus(pciconf_bus_t *parent, pciconf
 			printf(pciconf: too many MEM windows\n);
 			goto err;
 		}
-		pb-pmem_total |= 0xf;	/* Round up */
+		pb-pmem_total |= pb-pmem_align-1; /* Round up */
 		pm = get_mem_desc(parent, pb-pmem_total);
 		pm-dev = pd;
 		pm-reg = 0;
 		pm-size = pb-pmem_total;
-		pm-align = 0x10;		/* 1M alignment */
+		pm-align = pb-pmem_align;	/* 1M alignment */
+		if (parent-pmem_align  pb-pmem_align)
+			parent-pmem_align = pb-pmem_align;
 		pm-prefetch = 1;
 		parent-nmemwin++;
 		parent-pmem_total += pb-pmem_total;
@@ -551,6 +564,8 @@ pci_do_device_query(pciconf_bus_t *pb, p
 			pi-reg = br;
 			pi-size = (u_int64_t) size;
 			pi-align = 4;
+			if (pb-io_align  pi-size)
+pb-io_align = pi-size;
 			pi-prefetch = 0;
 			if (pci_conf_debug) {
 print_tag(pb-pc, tag);
@@ -594,7 +609,7 @@ pci_do_device_query(pciconf_bus_t *pb, p
 			} else {
 if (pci_conf_debug) {
 	print_tag(pb-pc, tag);
-	printf(MEM%d BAR 0x%x has size %lx\n,
+	printf(MEM%d BAR 0x%x has size %#lx\n,
 	PCI_MAPREG_MEM_TYPE(mask) ==
 		PCI_MAPREG_MEM_TYPE_64BIT ?
 		64 : 32, br, (unsigned long)size);
@@ -620,8 +635,12 @@ pci_do_device_query(pciconf_bus_t *pb, p
 			pb-nmemwin++;
 			if (pm-prefetch) {
 pb-pmem_total += size;
+if (pb-pmem_align  pm-size)
+	pb-pmem_align = pm-size;
 			} else {
 pb-mem_total += size;
+if (pb-mem_align  pm-size)
+	pb-mem_align = pm-size;
 			}
 		}
 	}
@@ -682,12 +701,12 @@ pci_allocate_range(struct extent *ex, u_
 
 	r = extent_alloc(ex, amt, align, 0, EX_NOWAIT, addr);
 	if (r) {
-		addr = (u_long) -1;
-		printf(extent_alloc(%p, % PRIu64 , %d) returned %d\n,
+		printf(extent_alloc(%p, %# PRIx64 , %#x) returned %d\n,
 		ex, amt, align, r);
 		extent_print(ex);
+		return ~0ULL;
 	}
-	return (pcireg_t) addr;
+	return addr;
 }
 
 static int
@@ -703,7 +722,7 @@ setup_iowins(pciconf_bus_t *pb)
 		pd = pi-dev;
 		pi-address = pci_allocate_range(pb-ioext, pi-size,
 		pi-align);
-		if (pi-address == -1) {
+		if (~pi-address == 0) {
 			print_tag(pd-pc, pd-tag);
 			printf(Failed to allocate PCI I/O space (%
 			

CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:28:02 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ppb.c

Log Message:
Pull latest from -HEAD.
Add printing bus lanes and speed.


To generate a diff of this commit:
cvs rdiff -u -r1.39.18.2 -r1.39.18.3 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.39.18.2 src/sys/dev/pci/ppb.c:1.39.18.3
--- src/sys/dev/pci/ppb.c:1.39.18.2	Thu Jan 28 17:42:37 2010
+++ src/sys/dev/pci/ppb.c	Sat Dec 24 01:28:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppb.c,v 1.39.18.2 2010/01/28 17:42:37 matt Exp $	*/
+/*	$NetBSD: ppb.c,v 1.39.18.3 2011/12/24 01:28:02 matt 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.39.18.2 2010/01/28 17:42:37 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.39.18.3 2011/12/24 01:28:02 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -43,6 +43,10 @@ __KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.39
 #include dev/pci/ppbreg.h
 #include dev/pci/pcidevs.h
 
+#define	PCI_PCIE_SLCSR_NOTIFY_MASK	\
+	(PCI_PCIE_SLCSR_ABE | PCI_PCIE_SLCSR_PFE | PCI_PCIE_SLCSR_MSE |	\
+	 PCI_PCIE_SLCSR_PDE | PCI_PCIE_SLCSR_CCE | PCI_PCIE_SLCSR_HPE)
+
 struct ppb_softc {
 	device_t sc_dev;		/* generic device glue */
 	pci_chipset_tag_t sc_pc;	/* our PCI chipset... */
@@ -89,15 +93,81 @@ ppb_fix_pcie(device_t self)
 off, reg))
 		return; /* Not a PCIe device */
 
-	if ((reg  0x000f) != 0x0001) {
-		aprint_normal_dev(self, unsupported PCI Express version\n);
+	aprint_normal_dev(self, PCI Express );
+	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;
+	default:
+		aprint_normal_dev(self,
+		version unsupported (0x% PRIxMAX )\n,
+		__SHIFTOUT(reg, PCI_PCIE_XCAP_VER_MASK));
 		return;
 	}
-	reg = pci_conf_read(sc-sc_pc, sc-sc_tag, off + 0x18);
-	if (reg  0x003f) {
-		aprint_normal_dev(self, disabling notification events\n);
-		reg = ~0x003f;
-		pci_conf_write(sc-sc_pc, sc-sc_tag, off + 0x18, reg);
+	aprint_normal( );
+	switch (reg  PCI_PCIE_XCAP_TYPE_MASK) {
+	case PCI_PCIE_XCAP_TYPE_PCIE_DEV:
+		aprint_normal(PCI-E Endpoint device);
+		break;
+	case PCI_PCIE_XCAP_TYPE_PCI_DEV:
+		aprint_normal(Legacy PCI-E Endpoint device);
+		break;
+	case PCI_PCIE_XCAP_TYPE_ROOT:
+		aprint_normal(Root Port of PCI-E Root Complex);
+		break;
+	case PCI_PCIE_XCAP_TYPE_UP:
+		aprint_normal(Upstream Port of PCI-E Switch);
+		break;
+	case PCI_PCIE_XCAP_TYPE_DOWN:
+		aprint_normal(Downstream Port of PCI-E Switch);
+		break;
+	case PCI_PCIE_XCAP_TYPE_PCIE2PCI:
+		aprint_normal(PCI-E to PCI/PCI-X Bridge);
+		break;
+	case PCI_PCIE_XCAP_TYPE_PCI2PCIE:
+		aprint_normal(PCI/PCI-X to PCI-E Bridge);
+		break;
+	default:
+		aprint_normal(Device/Port Type 0x% PRIxMAX,
+		__SHIFTOUT(reg, PCI_PCIE_XCAP_TYPE_MASK));
+		break;
+	}
+
+	switch (reg  PCI_PCIE_XCAP_TYPE_MASK) {
+	case PCI_PCIE_XCAP_TYPE_ROOT:
+	case PCI_PCIE_XCAP_TYPE_DOWN:
+	case PCI_PCIE_XCAP_TYPE_PCI2PCIE:
+		reg = pci_conf_read(sc-sc_pc, sc-sc_tag, off + 0x0c);
+		u_int mlw = (reg  4)  0x1f;
+		u_int mls = (reg  0)  0x0f;
+		aprint_normal( x%d @ %d.%dGb/s\n,
+		mlw, (mls * 25) / 10, (mls * 25) % 10);
+
+		reg = pci_conf_read(sc-sc_pc, sc-sc_tag, off + 0x10);
+		if (reg  __BIT(29)) {	/* DLLA */
+			u_int lw = (reg  20)  0x1f;
+			u_int ls = (reg  16)  0x0f;
+			if (lw != mlw || ls != mls) {
+aprint_normal_dev(self,
+link is x%d @ %d.%dGb/s\n,
+lw, (ls * 25) / 10, (ls * 25) % 10);
+			}
+		}
+		break;
+	default:
+		aprint_normal(\n);
+		break;
+	}
+
+	reg = pci_conf_read(sc-sc_pc, sc-sc_tag, off + PCI_PCIE_SLCSR);
+	if (reg  PCI_PCIE_SLCSR_NOTIFY_MASK) {
+		aprint_debug_dev(self, disabling notification events\n);
+		reg = ~PCI_PCIE_SLCSR_NOTIFY_MASK;
+		pci_conf_write(sc-sc_pc, sc-sc_tag,
+		off + PCI_PCIE_SLCSR, reg);
 	}
 }
 
@@ -122,13 +192,13 @@ ppbattach(device_t parent, device_t self
 
 	busdata = pci_conf_read(pc, pa-pa_tag, PPB_REG_BUSINFO);
 
+	ppb_fix_pcie(self);
+
 	if (PPB_BUSINFO_SECONDARY(busdata) == 0) {
 		aprint_normal_dev(self, not configured by system firmware\n);
 		return;
 	}
 
-	ppb_fix_pcie(self);
-
 #if 0
 	/*
 	 * XXX can't do this, because we're not given our bus number



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:22:44 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Add NetLogic(RMI) XLP devices


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.4 -r1.962.4.1.4.5 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: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:23:34 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.4 -r1.963.4.1.4.5 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.4 -r1.962.4.1.4.5 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.



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:24:44 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pci.c

Log Message:
Add support for __PCI_DEV_FUNCORDER


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

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:25:51 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pciconf.c

Log Message:
Fix problem when alignment of a device is  then the alignment of the bus
bus spaces provided.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.30.52.1 src/sys/dev/pci/pciconf.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:27:25 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcireg.h

Log Message:
Pull down latest from -HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.26.1 src/sys/dev/pci/pcireg.h

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-12-23 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sat Dec 24 01:28:02 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ppb.c

Log Message:
Pull latest from -HEAD.
Add printing bus lanes and speed.


To generate a diff of this commit:
cvs rdiff -u -r1.39.18.2 -r1.39.18.3 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: [matt-nb5-mips64] src/sys/dev/pci

2011-04-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Apr 29 08:21:25 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: siisata_pci.c

Log Message:
Add 3114 entry


To generate a diff of this commit:
cvs rdiff -u -r1.1.14.1.4.1 -r1.1.14.1.4.2 src/sys/dev/pci/siisata_pci.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/siisata_pci.c
diff -u src/sys/dev/pci/siisata_pci.c:1.1.14.1.4.1 src/sys/dev/pci/siisata_pci.c:1.1.14.1.4.2
--- src/sys/dev/pci/siisata_pci.c:1.1.14.1.4.1	Wed Apr 21 00:27:49 2010
+++ src/sys/dev/pci/siisata_pci.c	Fri Apr 29 08:21:25 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata_pci.c,v 1.1.14.1.4.1 2010/04/21 00:27:49 matt Exp $ */
+/* $NetBSD: siisata_pci.c,v 1.1.14.1.4.2 2011/04/29 08:21:25 matt Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -93,6 +93,12 @@
 static const struct siisata_pci_board siisata_pci_boards[] = {
 	{
 		.spb_vend = PCI_VENDOR_CMDTECH,
+		.spb_prod = PCI_PRODUCT_CMDTECH_3114,
+		.spb_port = 4,
+		.spb_chip = 3114,
+	},
+	{
+		.spb_vend = PCI_VENDOR_CMDTECH,
 		.spb_prod = PCI_PRODUCT_CMDTECH_3124,
 		.spb_port = 4,
 		.spb_chip = 3124,



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2011-04-29 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Apr 29 08:21:25 UTC 2011

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: siisata_pci.c

Log Message:
Add 3114 entry


To generate a diff of this commit:
cvs rdiff -u -r1.1.14.1.4.1 -r1.1.14.1.4.2 src/sys/dev/pci/siisata_pci.c

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-05-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May 10 06:55:25 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Add Marvell 88SB2211


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.3 -r1.962.4.1.4.4 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.962.4.1.4.3 src/sys/dev/pci/pcidevs:1.962.4.1.4.4
--- src/sys/dev/pci/pcidevs:1.962.4.1.4.3	Tue Apr 20 22:03:26 2010
+++ src/sys/dev/pci/pcidevs	Mon May 10 06:55:25 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.1.4.3 2010/04/20 22:03:26 matt Exp $
+$NetBSD: pcidevs,v 1.962.4.1.4.4 2010/05/10 06:55:25 matt Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1914,6 +1914,7 @@
 product MARVELL 88W8310		0x1fa7	Libertas 88W8310
 product MARVELL 88W8335_1	0x1faa	Libertas 88W8335
 product MARVELL 88W8335_2	0x1fab	Libertas 88W8335
+product MARVELL	88SB2211	0x2211	88SB2211 x1 PCIe-PCI Bridge
 product MARVELL	88W8300_2	0x2a01	Libertas 88W8300
 product MARVELL	GT64115		0x4111	GT-64115 System Controller
 product MARVELL	GT64011		0x4146	GT-64011 System Controller



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-05-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May 10 06:55:51 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.3 -r1.963.4.1.4.4 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.3 -r1.962.4.1.4.4 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.1.4.3 src/sys/dev/pci/pcidevs.h:1.963.4.1.4.4
--- src/sys/dev/pci/pcidevs.h:1.963.4.1.4.3	Wed Apr 21 00:27:42 2010
+++ src/sys/dev/pci/pcidevs.h	Mon May 10 06:55:44 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.3 2010/04/21 00:27:42 matt Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.4 2010/05/10 06:55:44 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.3 2010/04/20 22:03:26 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.4 2010/05/10 06:55:25 matt Exp
  */
 
 /*
@@ -1921,6 +1921,7 @@
 #define	PCI_PRODUCT_MARVELL_88W8310	0x1fa7		/* Libertas 88W8310 */
 #define	PCI_PRODUCT_MARVELL_88W8335_1	0x1faa		/* Libertas 88W8335 */
 #define	PCI_PRODUCT_MARVELL_88W8335_2	0x1fab		/* Libertas 88W8335 */
+#define	PCI_PRODUCT_MARVELL_88SB2211	0x2211		/* 88SB2211 x1 PCIe-PCI Bridge */
 #define	PCI_PRODUCT_MARVELL_88W8300_2	0x2a01		/* Libertas 88W8300 */
 #define	PCI_PRODUCT_MARVELL_GT64115	0x4111		/* GT-64115 System Controller */
 #define	PCI_PRODUCT_MARVELL_GT64011	0x4146		/* GT-64011 System Controller */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.3 src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.4
--- src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.3	Wed Apr 21 00:27:42 2010
+++ src/sys/dev/pci/pcidevs_data.h	Mon May 10 06:55:44 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.3 2010/04/21 00:27:42 matt Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.4 2010/05/10 06:55:44 matt Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1.4.3 2010/04/20 22:03:26 matt Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.4 2010/05/10 06:55:25 matt Exp
  */
 
 /*
@@ -6644,6 +6644,10 @@
 	Libertas 88W8335,
 	},
 	{
+	PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88SB2211,
+	88SB2211 x1 PCIe-PCI Bridge,
+	},
+	{
 	PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_88W8300_2,
 	Libertas 88W8300,
 	},
@@ -14836,4 +14840,4 @@
 	Video Controller,
 	},
 };
-const int pci_nproducts = 3107;
+const int pci_nproducts = 3108;



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-05-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May 10 06:55:25 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
Add Marvell 88SB2211


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.3 -r1.962.4.1.4.4 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: [matt-nb5-mips64] src/sys/dev/pci

2010-05-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May 10 06:55:51 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.1.4.3 -r1.963.4.1.4.4 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.1.4.3 -r1.962.4.1.4.4 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.



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-04-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Apr 20 22:03:27 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
sync with netbsd-5


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.2 -r1.962.4.1.4.3 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.962.4.1.4.2 src/sys/dev/pci/pcidevs:1.962.4.1.4.3
--- src/sys/dev/pci/pcidevs:1.962.4.1.4.2	Wed Apr  7 18:32:20 2010
+++ src/sys/dev/pci/pcidevs	Tue Apr 20 22:03:26 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.1.4.2 2010/04/07 18:32:20 cliff Exp $
+$NetBSD: pcidevs,v 1.962.4.1.4.3 2010/04/20 22:03:26 matt Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1060,6 +1060,7 @@
 product ASUSTEK HFCPCI		0x0675	ISDN
 
 /* Attansic Technology Corp. */
+product ATTANSIC ETHERNET_L1E	0x1026	L1E Gigabit Ethernet Adapter
 product ATTANSIC ETHERNET_GIGA	0x1048	L1 Gigabit Ethernet Adapter
 product ATTANSIC ETHERNET_100	0x2048	L2 100 Mbit Ethernet Adapter
 
@@ -1410,6 +1411,9 @@
 product BROADCOM BCM5752	0x1600	BCM5752 10/100/1000 Ethernet
 product BROADCOM BCM5752M	0x1601	BCM5752M 10/100/1000 Ethernet
 product BROADCOM BCM5709	0x1639	BCM5709 NetXtreme II 1000baseT Ethernet
+product BROADCOM BCM5709S	0x163a	BCM5709 NetXtreme II 1000baseSX Ethernet
+product BROADCOM BCM5716	0x163b	BCM5716 NetXtreme II 1000baseT Ethernet
+product BROADCOM BCM5716S	0x163c	BCM5716 NetXtreme II 1000baseSX Ethernet
 product BROADCOM BCM5700	0x1644	BCM5700 10/100/1000 Ethernet
 product BROADCOM BCM5701	0x1645	BCM5701 10/100/1000 Ethernet
 product BROADCOM BCM5702	0x1646	BCM5702 10/100/1000 Ethernet
@@ -1815,6 +1819,7 @@
 
 /* ENE Technology products */
 product ENE MCR510	0x0510	MCR510 PCI Memory Card Reader Controller
+product ENE CB712	0x0550	CB712/714/810 PCI SD Card Reader Controller
 product ENE CB1211	0x1211	CB1211 CardBus Controller
 product ENE CB1225	0x1225	CB1225 CardBus Controller
 product ENE CB1410	0x1410	CB1410 CardBus Controller
@@ -2066,6 +2071,8 @@
 product IBM GXT6500P	0x021b	GXT-6500P Graphics Adapter
 product IBM GXT4500P	0x021c	GXT-4500P Graphics Adapter
 product IBM GXT135P	0x0233	GXT-135P Graphics Adapter
+product IBM 4810_BSP	0x0295	4810 BSP
+product IBM 4810_SCC	0x0297	4810 SCC
 product IBM SERVERAID8K	0x9580	ServeRAID 8k
 product IBM MPIC2	0x	MPIC-II
 
@@ -2195,16 +2202,18 @@
 product INTEL PRO_100_VE_6	0x1092	PRO/100 VE Network Controller
 product INTEL PRO_100_VE_8	0x1093	PRO/100 VE Network Controller
 product INTEL PRO_100_VE_7	0x1094	PRO/100 VE Network Controller with 82562G PHY
-product INTEL 80K3LAN_CPR_DPT 0x1096	i80003 dual 1000baseT Ethernet
-product INTEL 80K3LAN_FIB_DPT 0x1097	i80003 dual 1000baseX Ethernet
-product INTEL 80K3LAN_SDS_DPT 0x1098	i80003 dual Gigabit Ethernet (SERDES)
+product INTEL 80K3LAN_CPR_DPT	0x1096	i80003 dual 1000baseT Ethernet
+product INTEL 80K3LAN_FIB_DPT	0x1097	i80003 dual 1000baseX Ethernet
+product INTEL 80K3LAN_SDS_DPT	0x1098	i80003 dual Gigabit Ethernet (SERDES)
 product INTEL 82546GB_QUAD_COPPER 0x1099 i82546GB quad-port Gigabit Ethernet
 product INTEL 82573L		0x109a	i82573L Gigabit Ethernet
 product INTEL 82571EB_QUAD_COPPER 0x10a4 i82571EB quad-1000baseT Ethernet
+product INTEL 82575EB_COPPER	0x10a7 i82575EB dual-1000baseT Ethernet
+product INTEL 82575EB_FIBER_SERDES 0x10a9 i82575EB dual-1000baseX Ethernet (SERDES)
 product INTEL 82546GB_QUAD_COPPER_KSP3 0x10b5 i82546GB quad-port Gigabit Ethernet (KSP3)
 product INTEL 82572EI		0x10b9	i82572EI 1000baseT Ethernet
-product INTEL 80K3LAN_CPR_SPT 0x10ba	i80003 1000baseT Ethernet
-product INTEL 80K3LAN_SDS_SPT 0x10bb	i80003 Gigabit Ethernet (SERDES)
+product INTEL 80K3LAN_CPR_SPT	0x10ba	i80003 1000baseT Ethernet
+product INTEL 80K3LAN_SDS_SPT	0x10bb	i80003 Gigabit Ethernet (SERDES)
 product	INTEL 82571GB_QUAD_COPPER 0x10bc i82571GB quad 1000baseT Ethernet
 product INTEL 82801I_IGP_AMT	0x10bd	82801I (AMT) LAN Controller
 product INTEL 82801I_IGP_M	0x10bf  82801I mobile LAN controller
@@ -2214,9 +2223,20 @@
 product INTEL 82801H_IFE_GT 	0x10c4	i82801H IFE (GT) LAN Controller
 product INTEL 82801H_IFE_G 	0x10c5	i82801H IFE (G) LAN Controller
 product INTEL 82801H_IGP_M_V 	0x10cb	i82801H IGP (MV) LAN Controller
-product INTEL 82567V		0x10ce	i82567V LAN controller
+product INTEL 82801J_R_BM_LM	0x10cc	i82567LM-2 LAN Controller
+product INTEL 82801J_R_BM_LF	0x10cd	i82567LF-2 LAN Controller
+product INTEL 82801J_R_BM_V	0x10ce	i82567V-2 LAN Controller
 product INTEL 82574L		0x10d3	i82574L 1000baseT Ethernet
-product INTEL 82801I_IGP_M_AMT	0x10f5  82801I mobile (AMT) LAN controller
+product INTEL 82575GB_QUAD_COPPER 0x10d6 i82575GB quad-1000baseT Ethernet
+product INTEL 82801J_D_BM_LM	0x10de	i82567LM-3 LAN Controller
+product INTEL 82801J_D_BM_LF	0x10df	i82567LF-3 LAN Controller
+product INTEL 82575GB_QUAD_COPPER_PM 0x10e2 i82575GB 

CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-04-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Apr 20 22:03:27 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs

Log Message:
sync with netbsd-5


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.2 -r1.962.4.1.4.3 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: [matt-nb5-mips64] src/sys/dev/pci

2010-04-07 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Apr  7 18:32:27 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs pcidevs.h pcidevs_data.h

Log Message:
add RMI XLR PCI-X bridge


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.1 -r1.962.4.1.4.2 src/sys/dev/pci/pcidevs \
src/sys/dev/pci/pcidevs_data.h
cvs rdiff -u -r1.963.4.1.4.1 -r1.963.4.1.4.2 src/sys/dev/pci/pcidevs.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
diff -u src/sys/dev/pci/pcidevs:1.962.4.1.4.1 src/sys/dev/pci/pcidevs:1.962.4.1.4.2
--- src/sys/dev/pci/pcidevs:1.962.4.1.4.1	Mon Nov  9 10:13:14 2009
+++ src/sys/dev/pci/pcidevs	Wed Apr  7 18:32:20 2010
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.962.4.1.4.1 2009/11/09 10:13:14 cliff Exp $
+$NetBSD: pcidevs,v 1.962.4.1.4.2 2010/04/07 18:32:20 cliff Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1375,6 +1375,7 @@
 product AVM T1			0x1200	Primary Rate T1 ISDN Interface
 
 /* RMI products */
+product RMI XLR_PCIX		0x000b	XLR PCI-X bridge
 product RMI XLS_PCIE		0xabcd	XLS PCIe-PCIe bridge
 
 /* B  B Electronics Products */
Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.1 src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.2
--- src/sys/dev/pci/pcidevs_data.h:1.962.4.1.4.1	Mon Nov  9 10:13:14 2009
+++ src/sys/dev/pci/pcidevs_data.h	Wed Apr  7 18:32:21 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.1 2009/11/09 10:13:14 cliff Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.962.4.1.4.2 2010/04/07 18:32:21 cliff Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1 2009/03/20 13:01:35 msaitoh Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.1 2009/11/09 10:13:14 cliff Exp
  */
 
 /*
@@ -5000,6 +5000,10 @@
 	Primary Rate T1 ISDN Interface,
 	},
 	{
+	PCI_VENDOR_RMI, PCI_PRODUCT_RMI_XLR_PCIX,
+	XLR PCI-X bridge,
+	},
+	{
 	PCI_VENDOR_RMI, PCI_PRODUCT_RMI_XLS_PCIE,
 	XLS PCIe-PCIe bridge,
 	},
@@ -14520,4 +14524,4 @@
 	Video Controller,
 	},
 };
-const int pci_nproducts = 3028;
+const int pci_nproducts = 3029;

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.963.4.1.4.1 src/sys/dev/pci/pcidevs.h:1.963.4.1.4.2
--- src/sys/dev/pci/pcidevs.h:1.963.4.1.4.1	Mon Nov  9 10:13:14 2009
+++ src/sys/dev/pci/pcidevs.h	Wed Apr  7 18:32:21 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.1 2009/11/09 10:13:14 cliff Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.1.4.2 2010/04/07 18:32:21 cliff Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.1 2009/03/20 13:01:35 msaitoh Exp
+ *	NetBSD: pcidevs,v 1.962.4.1.4.1 2009/11/09 10:13:14 cliff Exp
  */
 
 /*
@@ -1382,6 +1382,7 @@
 #define	PCI_PRODUCT_AVM_T1	0x1200		/* Primary Rate T1 ISDN Interface */
 
 /* RMI products */
+#define	PCI_PRODUCT_RMI_XLR_PCIX	0x000b		/* XLR PCI-X bridge */
 #define	PCI_PRODUCT_RMI_XLS_PCIE	0xabcd		/* XLS PCIe-PCIe bridge */
 
 /* B  B Electronics Products */



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-04-07 Thread Cliff Neighbors
Module Name:src
Committed By:   cliff
Date:   Wed Apr  7 18:32:27 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: pcidevs pcidevs.h pcidevs_data.h

Log Message:
add RMI XLR PCI-X bridge


To generate a diff of this commit:
cvs rdiff -u -r1.962.4.1.4.1 -r1.962.4.1.4.2 src/sys/dev/pci/pcidevs \
src/sys/dev/pci/pcidevs_data.h
cvs rdiff -u -r1.963.4.1.4.1 -r1.963.4.1.4.2 src/sys/dev/pci/pcidevs.h

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



CVS commit: [matt-nb5-mips64] src/sys/dev/pci

2010-01-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 28 17:42:37 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ppb.c

Log Message:
Change ppb_fix_pcix to ppb_fix_pcie since pcix is usually PCI-X while
pcie is PCI-Express.


To generate a diff of this commit:
cvs rdiff -u -r1.39.18.1 -r1.39.18.2 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: [matt-nb5-mips64] src/sys/dev/pci

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 07:43:59 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ppb.c

Log Message:
Support the SB1250 LDT HB.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.18.1 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: [matt-nb5-mips64] src/sys/dev/pci

2010-01-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Jan 21 07:43:59 UTC 2010

Modified Files:
src/sys/dev/pci [matt-nb5-mips64]: ppb.c

Log Message:
Support the SB1250 LDT HB.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.18.1 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.39 src/sys/dev/pci/ppb.c:1.39.18.1
--- src/sys/dev/pci/ppb.c:1.39	Sat May  3 05:44:06 2008
+++ src/sys/dev/pci/ppb.c	Thu Jan 21 07:43:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppb.c,v 1.39 2008/05/03 05:44:06 cegger Exp $	*/
+/*	$NetBSD: ppb.c,v 1.39.18.1 2010/01/21 07:43:59 matt 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.39 2008/05/03 05:44:06 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: ppb.c,v 1.39.18.1 2010/01/21 07:43:59 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -68,6 +68,13 @@
 	PCI_SUBCLASS(pa-pa_class) == PCI_SUBCLASS_BRIDGE_PCI)
 		return 1;
 
+#ifdef _MIPS_PADDR_T_64BIT
+/* The LDT HB acts just like a PPB.  */
+if (PCI_VENDOR(pa-pa_id) == PCI_VENDOR_SIBYTE 
+PCI_PRODUCT(pa-pa_id) == PCI_PRODUCT_SIBYTE_BCM1250_LDTHB)
+return 1;
+#endif
+
 	return 0;
 }