Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 2008 11:08:13 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 145422 for review
Message-ID:  <200807181108.m6IB8Dp3048734@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=145422

Change 145422 by zec@zec_tpx32 on 2008/07/18 11:07:44

	IFC to 145420

Affected files ...

.. //depot/projects/vimage/src/sys/arm/xscale/i80321/ep80219_machdep.c#7 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/i80321/iq31244_machdep.c#7 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/i8134x/crb_machdep.c#6 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/ixp425/avila_machdep.c#8 integrate
.. //depot/projects/vimage/src/sys/arm/xscale/pxa/pxa_machdep.c#3 integrate
.. //depot/projects/vimage/src/sys/conf/files#31 integrate
.. //depot/projects/vimage/src/sys/dev/age/if_age.c#3 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_ael1002.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_common.h#7 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_mc5.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_mv88e1xxx.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_t3_cpl.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_t3_hw.c#7 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_tn1010.c#1 branch
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_vsc8211.c#5 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_xgmac.c#6 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/cxgb_adapter.h#11 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/cxgb_main.c#12 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/cxgb_osdep.h#9 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/cxgb_sge.c#12 integrate
.. //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#4 integrate
.. //depot/projects/vimage/src/sys/dev/jme/if_jme.c#2 integrate
.. //depot/projects/vimage/src/sys/kern/kern_intr.c#11 integrate
.. //depot/projects/vimage/src/sys/kern/subr_taskqueue.c#6 integrate
.. //depot/projects/vimage/src/sys/modules/cxgb/cxgb/Makefile#4 integrate
.. //depot/projects/vimage/src/sys/netinet/raw_ip.c#21 integrate
.. //depot/projects/vimage/src/sys/sys/_task.h#2 integrate
.. //depot/projects/vimage/src/sys/sys/interrupt.h#7 integrate
.. //depot/projects/vimage/src/sys/sys/taskqueue.h#3 integrate

Differences ...

==== //depot/projects/vimage/src/sys/arm/xscale/i80321/ep80219_machdep.c#7 (text+ko) ====

@@ -48,7 +48,7 @@
 #include "opt_msgbuf.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.10 2008/04/08 10:24:41 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.11 2008/07/18 06:14:36 alc Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -129,7 +129,6 @@
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
 vm_offset_t physical_pages;
-vm_offset_t clean_sva, clean_eva;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;

==== //depot/projects/vimage/src/sys/arm/xscale/i80321/iq31244_machdep.c#7 (text+ko) ====

@@ -48,7 +48,7 @@
 #include "opt_msgbuf.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.31 2008/04/08 10:24:41 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.32 2008/07/18 06:14:36 alc Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -129,7 +129,6 @@
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
 vm_offset_t physical_pages;
-vm_offset_t clean_sva, clean_eva;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;

==== //depot/projects/vimage/src/sys/arm/xscale/i8134x/crb_machdep.c#6 (text+ko) ====

@@ -48,7 +48,7 @@
 #include "opt_msgbuf.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/i8134x/crb_machdep.c,v 1.7 2008/06/09 05:53:04 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/i8134x/crb_machdep.c,v 1.8 2008/07/18 06:14:36 alc Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -129,7 +129,6 @@
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
 vm_offset_t physical_pages;
-vm_offset_t clean_sva, clean_eva;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;

==== //depot/projects/vimage/src/sys/arm/xscale/ixp425/avila_machdep.c#8 (text+ko) ====

@@ -48,7 +48,7 @@
 #include "opt_msgbuf.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_machdep.c,v 1.10 2008/04/08 10:24:42 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/avila_machdep.c,v 1.11 2008/07/18 06:14:36 alc Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -128,7 +128,6 @@
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
 vm_offset_t physical_pages;
-vm_offset_t clean_sva, clean_eva;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;

==== //depot/projects/vimage/src/sys/arm/xscale/pxa/pxa_machdep.c#3 (text+ko) ====

@@ -49,7 +49,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/xscale/pxa/pxa_machdep.c,v 1.2 2008/06/09 05:50:42 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/xscale/pxa/pxa_machdep.c,v 1.3 2008/07/18 06:14:36 alc Exp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -128,7 +128,6 @@
 vm_paddr_t phys_avail[PXA2X0_SDRAM_BANKS * 2 + 4];
 vm_paddr_t dump_avail[PXA2X0_SDRAM_BANKS * 2 + 4];
 vm_offset_t physical_pages;
-vm_offset_t clean_sva, clean_eva;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;

==== //depot/projects/vimage/src/sys/conf/files#31 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1314 2008/07/04 21:24:35 jhb Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1315 2008/07/18 06:12:31 kmacy Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -525,6 +525,7 @@
 dev/cxgb/common/cxgb_mv88e1xxx.c	optional cxgb pci
 dev/cxgb/common/cxgb_xgmac.c	optional cxgb pci
 dev/cxgb/common/cxgb_t3_hw.c	optional cxgb pci
+dev/cxgb/common/cxgb_tn1010.c	optional cxgb pci	
 dev/cxgb/sys/uipc_mvec.c	optional cxgb pci
 dev/cxgb/sys/cxgb_support.c	optional cxgb pci
 dev/cxgb/cxgb_t3fw.c		optional cxgb cxgb_t3fw

==== //depot/projects/vimage/src/sys/dev/age/if_age.c#3 (text+ko) ====

@@ -28,7 +28,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/age/if_age.c,v 1.2 2008/06/08 14:42:43 rpaulo Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/age/if_age.c,v 1.3 2008/07/18 01:00:54 yongari Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -492,9 +492,9 @@
 
 	/* Reset PHY. */
 	CSR_WRITE_4(sc, AGE_GPHY_CTRL, GPHY_CTRL_RST);
-	pause("agephy", hz / 1000);
+	DELAY(1000);
 	CSR_WRITE_4(sc, AGE_GPHY_CTRL, GPHY_CTRL_CLR);
-	pause("agephy", hz / 1000);
+	DELAY(1000);
 }
 
 static int

==== //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_ael1002.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
 ***************************************************************************/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_ael1002.c,v 1.5 2008/03/18 03:55:11 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_ael1002.c,v 1.6 2008/07/18 06:12:31 kmacy Exp $");
 
 #ifdef CONFIG_DEFINED
 #include <cxgb_include.h>
@@ -46,11 +46,32 @@
 	AEL1002_PWR_DOWN_LO = 0xc012,
 	AEL1002_XFI_EQL     = 0xc015,
 	AEL1002_LB_EN       = 0xc017,
+	AEL_OPT_SETTINGS    = 0xc017,
+};
 
-	LASI_CTRL   = 0x9002,
-	LASI_STAT   = 0x9005
+struct reg_val {
+	unsigned short mmd_addr;
+	unsigned short reg_addr;
+	unsigned short clear_bits;
+	unsigned short set_bits;
 };
 
+static int set_phy_regs(struct cphy *phy, const struct reg_val *rv)
+{
+	int err;
+
+	for (err = 0; rv->mmd_addr && !err; rv++) {
+		if (rv->clear_bits == 0xffff)
+			err = mdio_write(phy, rv->mmd_addr, rv->reg_addr,
+					 rv->set_bits);
+		else
+			err = t3_mdio_change_bits(phy, rv->mmd_addr,
+						  rv->reg_addr, rv->clear_bits,
+						  rv->set_bits);
+	}
+	return err;
+}
+
 static void ael100x_txon(struct cphy *phy)
 {
 	int tx_on_gpio = phy->addr == 0 ? F_GPIO7_OUT_VAL : F_GPIO2_OUT_VAL;
@@ -158,83 +179,425 @@
 	return t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait);
 }
 
-static int ael1006_intr_enable(struct cphy *phy)
+static int ael1006_power_down(struct cphy *phy, int enable)
 {
-	return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 1);
+	return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR,
+				   BMCR_PDOWN, enable ? BMCR_PDOWN : 0);
 }
 
-static int ael1006_intr_disable(struct cphy *phy)
+#ifdef C99_NOT_SUPPORTED
+static struct cphy_ops ael1006_ops = {
+	ael1006_reset,
+	t3_phy_lasi_intr_enable,
+	t3_phy_lasi_intr_disable,
+	t3_phy_lasi_intr_clear,
+	t3_phy_lasi_intr_handler,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	ael100x_get_link_status,
+	ael1006_power_down,
+};
+#else
+static struct cphy_ops ael1006_ops = {
+	.reset           = ael1006_reset,
+	.intr_enable     = t3_phy_lasi_intr_enable,
+	.intr_disable    = t3_phy_lasi_intr_disable,
+	.intr_clear      = t3_phy_lasi_intr_clear,
+	.intr_handler    = t3_phy_lasi_intr_handler,
+	.get_link_status = ael100x_get_link_status,
+	.power_down      = ael1006_power_down,
+};
+#endif
+
+int t3_ael1006_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
+			const struct mdio_ops *mdio_ops)
 {
-	return mdio_write(phy, MDIO_DEV_PMA_PMD, LASI_CTRL, 0);
+	cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops,
+		  SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE,
+		  "10GBASE-SR");
+	ael100x_txon(phy);
+	return 0;
 }
 
-static int ael1006_intr_clear(struct cphy *phy)
+static int ael2005_setup_sr_edc(struct cphy *phy)
 {
-	u32 val;
+	static u16 sr_edc[] = {
+		0xcc00, 0x2ff4,
+		0xcc01, 0x3cd4,
+		0xcc02, 0x2015,
+		0xcc03, 0x3105,
+		0xcc04, 0x6524,
+		0xcc05, 0x27ff,
+		0xcc06, 0x300f,
+		0xcc07, 0x2c8b,
+		0xcc08, 0x300b,
+		0xcc09, 0x4009,
+		0xcc0a, 0x400e,
+		0xcc0b, 0x2f72,
+		0xcc0c, 0x3002,
+		0xcc0d, 0x1002,
+		0xcc0e, 0x2172,
+		0xcc0f, 0x3012,
+		0xcc10, 0x1002,
+		0xcc11, 0x25d2,
+		0xcc12, 0x3012,
+		0xcc13, 0x1002,
+		0xcc14, 0xd01e,
+		0xcc15, 0x27d2,
+		0xcc16, 0x3012,
+		0xcc17, 0x1002,
+		0xcc18, 0x2004,
+		0xcc19, 0x3c84,
+		0xcc1a, 0x6436,
+		0xcc1b, 0x2007,
+		0xcc1c, 0x3f87,
+		0xcc1d, 0x8676,
+		0xcc1e, 0x40b7,
+		0xcc1f, 0xa746,
+		0xcc20, 0x4047,
+		0xcc21, 0x5673,
+		0xcc22, 0x2982,
+		0xcc23, 0x3002,
+		0xcc24, 0x13d2,
+		0xcc25, 0x8bbd,
+		0xcc26, 0x2862,
+		0xcc27, 0x3012,
+		0xcc28, 0x1002,
+		0xcc29, 0x2092,
+		0xcc2a, 0x3012,
+		0xcc2b, 0x1002,
+		0xcc2c, 0x5cc3,
+		0xcc2d, 0x314,
+		0xcc2e, 0x2942,
+		0xcc2f, 0x3002,
+		0xcc30, 0x1002,
+		0xcc31, 0xd019,
+		0xcc32, 0x2032,
+		0xcc33, 0x3012,
+		0xcc34, 0x1002,
+		0xcc35, 0x2a04,
+		0xcc36, 0x3c74,
+		0xcc37, 0x6435,
+		0xcc38, 0x2fa4,
+		0xcc39, 0x3cd4,
+		0xcc3a, 0x6624,
+		0xcc3b, 0x5563,
+		0xcc3c, 0x2d42,
+		0xcc3d, 0x3002,
+		0xcc3e, 0x13d2,
+		0xcc3f, 0x464d,
+		0xcc40, 0x2862,
+		0xcc41, 0x3012,
+		0xcc42, 0x1002,
+		0xcc43, 0x2032,
+		0xcc44, 0x3012,
+		0xcc45, 0x1002,
+		0xcc46, 0x2fb4,
+		0xcc47, 0x3cd4,
+		0xcc48, 0x6624,
+		0xcc49, 0x5563,
+		0xcc4a, 0x2d42,
+		0xcc4b, 0x3002,
+		0xcc4c, 0x13d2,
+		0xcc4d, 0x2ed2,
+		0xcc4e, 0x3002,
+		0xcc4f, 0x1002,
+		0xcc50, 0x2fd2,
+		0xcc51, 0x3002,
+		0xcc52, 0x1002,
+		0xcc53, 0x004,
+		0xcc54, 0x2942,
+		0xcc55, 0x3002,
+		0xcc56, 0x1002,
+		0xcc57, 0x2092,
+		0xcc58, 0x3012,
+		0xcc59, 0x1002,
+		0xcc5a, 0x5cc3,
+		0xcc5b, 0x317,
+		0xcc5c, 0x2f72,
+		0xcc5d, 0x3002,
+		0xcc5e, 0x1002,
+		0xcc5f, 0x2942,
+		0xcc60, 0x3002,
+		0xcc61, 0x1002,
+		0xcc62, 0x22cd,
+		0xcc63, 0x301d,
+		0xcc64, 0x2862,
+		0xcc65, 0x3012,
+		0xcc66, 0x1002,
+		0xcc67, 0x2ed2,
+		0xcc68, 0x3002,
+		0xcc69, 0x1002,
+		0xcc6a, 0x2d72,
+		0xcc6b, 0x3002,
+		0xcc6c, 0x1002,
+		0xcc6d, 0x628f,
+		0xcc6e, 0x2112,
+		0xcc6f, 0x3012,
+		0xcc70, 0x1002,
+		0xcc71, 0x5aa3,
+		0xcc72, 0x2dc2,
+		0xcc73, 0x3002,
+		0xcc74, 0x1312,
+		0xcc75, 0x6f72,
+		0xcc76, 0x1002,
+		0xcc77, 0x2807,
+		0xcc78, 0x31a7,
+		0xcc79, 0x20c4,
+		0xcc7a, 0x3c24,
+		0xcc7b, 0x6724,
+		0xcc7c, 0x1002,
+		0xcc7d, 0x2807,
+		0xcc7e, 0x3187,
+		0xcc7f, 0x20c4,
+		0xcc80, 0x3c24,
+		0xcc81, 0x6724,
+		0xcc82, 0x1002,
+		0xcc83, 0x2514,
+		0xcc84, 0x3c64,
+		0xcc85, 0x6436,
+		0xcc86, 0xdff4,
+		0xcc87, 0x6436,
+		0xcc88, 0x1002,
+		0xcc89, 0x40a4,
+		0xcc8a, 0x643c,
+		0xcc8b, 0x4016,
+		0xcc8c, 0x8c6c,
+		0xcc8d, 0x2b24,
+		0xcc8e, 0x3c24,
+		0xcc8f, 0x6435,
+		0xcc90, 0x1002,
+		0xcc91, 0x2b24,
+		0xcc92, 0x3c24,
+		0xcc93, 0x643a,
+		0xcc94, 0x4025,
+		0xcc95, 0x8a5a,
+		0xcc96, 0x1002,
+		0xcc97, 0x2731,
+		0xcc98, 0x3011,
+		0xcc99, 0x1001,
+		0xcc9a, 0xc7a0,
+		0xcc9b, 0x100,
+		0xcc9c, 0xc502,
+		0xcc9d, 0x53ac,
+		0xcc9e, 0xc503,
+		0xcc9f, 0xd5d5,
+		0xcca0, 0xc600,
+		0xcca1, 0x2a6d,
+		0xcca2, 0xc601,
+		0xcca3, 0x2a4c,
+		0xcca4, 0xc602,
+		0xcca5, 0x111,
+		0xcca6, 0xc60c,
+		0xcca7, 0x5900,
+		0xcca8, 0xc710,
+		0xcca9, 0x700,
+		0xccaa, 0xc718,
+		0xccab, 0x700,
+		0xccac, 0xc720,
+		0xccad, 0x4700,
+		0xccae, 0xc801,
+		0xccaf, 0x7f50,
+		0xccb0, 0xc802,
+		0xccb1, 0x7760,
+		0xccb2, 0xc803,
+		0xccb3, 0x7fce,
+		0xccb4, 0xc804,
+		0xccb5, 0x5700,
+		0xccb6, 0xc805,
+		0xccb7, 0x5f11,
+		0xccb8, 0xc806,
+		0xccb9, 0x4751,
+		0xccba, 0xc807,
+		0xccbb, 0x57e1,
+		0xccbc, 0xc808,
+		0xccbd, 0x2700,
+		0xccbe, 0xc809,
+		0xccbf, 0x000,
+		0xccc0, 0xc821,
+		0xccc1, 0x002,
+		0xccc2, 0xc822,
+		0xccc3, 0x014,
+		0xccc4, 0xc832,
+		0xccc5, 0x1186,
+		0xccc6, 0xc847,
+		0xccc7, 0x1e02,
+		0xccc8, 0xc013,
+		0xccc9, 0xf341,
+		0xccca, 0xc01a,
+		0xcccb, 0x446,
+		0xcccc, 0xc024,
+		0xcccd, 0x1000,
+		0xccce, 0xc025,
+		0xcccf, 0xa00,
+		0xccd0, 0xc026,
+		0xccd1, 0xc0c,
+		0xccd2, 0xc027,
+		0xccd3, 0xc0c,
+		0xccd4, 0xc029,
+		0xccd5, 0x0a0,
+		0xccd6, 0xc030,
+		0xccd7, 0xa00,
+		0xccd8, 0xc03c,
+		0xccd9, 0x01c,
+		0xccda, 0xc005,
+		0xccdb, 0x7a06,
+		0xccdc, 0x000,
+		0xccdd, 0x2731,
+		0xccde, 0x3011,
+		0xccdf, 0x1001,
+		0xcce0, 0xc620,
+		0xcce1, 0x000,
+		0xcce2, 0xc621,
+		0xcce3, 0x03f,
+		0xcce4, 0xc622,
+		0xcce5, 0x000,
+		0xcce6, 0xc623,
+		0xcce7, 0x000,
+		0xcce8, 0xc624,
+		0xcce9, 0x000,
+		0xccea, 0xc625,
+		0xcceb, 0x000,
+		0xccec, 0xc627,
+		0xcced, 0x000,
+		0xccee, 0xc628,
+		0xccef, 0x000,
+		0xccf0, 0xc62c,
+		0xccf1, 0x000,
+		0xccf2, 0x000,
+		0xccf3, 0x2806,
+		0xccf4, 0x3cb6,
+		0xccf5, 0xc161,
+		0xccf6, 0x6134,
+		0xccf7, 0x6135,
+		0xccf8, 0x5443,
+		0xccf9, 0x303,
+		0xccfa, 0x6524,
+		0xccfb, 0x00b,
+		0xccfc, 0x1002,
+		0xccfd, 0x2104,
+		0xccfe, 0x3c24,
+		0xccff, 0x2105,
+		0xcd00, 0x3805,
+		0xcd01, 0x6524,
+		0xcd02, 0xdff4,
+		0xcd03, 0x4005,
+		0xcd04, 0x6524,
+		0xcd05, 0x1002,
+		0xcd06, 0x5dd3,
+		0xcd07, 0x306,
+		0xcd08, 0x2ff7,
+		0xcd09, 0x38f7,
+		0xcd0a, 0x60b7,
+		0xcd0b, 0xdffd,
+		0xcd0c, 0x00a,
+		0xcd0d, 0x1002,
+		0xcd0e, 0
+	};
+	int i, err;
 
-	return mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &val);
+	for (err = i = 0; i < ARRAY_SIZE(sr_edc) && !err; i += 2)
+		err = mdio_write(phy, MDIO_DEV_PMA_PMD, sr_edc[i],
+				 sr_edc[i + 1]);
+	return err;
 }
 
-static int ael1006_intr_handler(struct cphy *phy)
+static int ael2005_reset(struct cphy *phy, int wait)
 {
-	unsigned int status;
-	int err = mdio_read(phy, MDIO_DEV_PMA_PMD, LASI_STAT, &status);
+	static struct reg_val regs0[] = {
+		{ MDIO_DEV_PMA_PMD, 0xc001, 0, 1 << 5 },
+		{ MDIO_DEV_PMA_PMD, 0xc017, 0, 1 << 5 },
+		{ MDIO_DEV_PMA_PMD, 0xc013, 0xffff, 0xf341 },
+		{ MDIO_DEV_PMA_PMD, 0xc210, 0xffff, 0x8000 },
+		{ MDIO_DEV_PMA_PMD, 0xc210, 0xffff, 0x8100 },
+		{ MDIO_DEV_PMA_PMD, 0xc210, 0xffff, 0x8000 },
+		{ MDIO_DEV_PMA_PMD, 0xc210, 0xffff, 0 },
+		{ 0, 0, 0, 0 }
+	};
+	static struct reg_val regs1[] = {
+		{ MDIO_DEV_PMA_PMD, 0xc003, 0xffff, 0x181 },
+		{ MDIO_DEV_PMA_PMD, 0xc010, 0xffff, 0x448a },
+		{ MDIO_DEV_PMA_PMD, 0xc04a, 0xffff, 0x5200 },
+		{ 0, 0, 0, 0 }
+	};
+	static struct reg_val regs2[] = {
+		{ MDIO_DEV_PMA_PMD, 0xca00, 0xffff, 0x0080 },
+		{ MDIO_DEV_PMA_PMD, 0xca12, 0xffff, 0 },
+		{ 0, 0, 0, 0 }
+	};
+
+	int err;
+
+	err = t3_phy_reset(phy, MDIO_DEV_PMA_PMD, 0);
+	if (err)
+		return err;
+
+	msleep(125);
+	err = set_phy_regs(phy, regs0);
+	if (err)
+		return err;
+
+	msleep(50);
+	err = set_phy_regs(phy, regs1);
+	if (err)
+		return err;
 
+	msleep(50);
+	err = ael2005_setup_sr_edc(phy);
 	if (err)
 		return err;
-	return (status & 1) ?  cphy_cause_link_change : 0;
-}
 
-static int ael1006_power_down(struct cphy *phy, int enable)
-{
-	return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR,
-				   BMCR_PDOWN, enable ? BMCR_PDOWN : 0);
+	return set_phy_regs(phy, regs2);
 }
 
 #ifdef C99_NOT_SUPPORTED
-static struct cphy_ops ael1006_ops = {
-	ael1006_reset,
-	ael1006_intr_enable,
-	ael1006_intr_disable,
-	ael1006_intr_clear,
-	ael1006_intr_handler,
+static struct cphy_ops ael2005_ops = {
+	ael2005_reset,
+	t3_phy_lasi_intr_enable,
+	t3_phy_lasi_intr_disable,
+	t3_phy_lasi_intr_clear,
+	t3_phy_lasi_intr_handler,
 	NULL,
 	NULL,
 	NULL,
 	NULL,
 	NULL,
 	ael100x_get_link_status,
-	ael1006_power_down,
+	ael1002_power_down,
 };
 #else
-static struct cphy_ops ael1006_ops = {
-	.reset           = ael1006_reset,
-	.intr_enable     = ael1006_intr_enable,
-	.intr_disable    = ael1006_intr_disable,
-	.intr_clear      = ael1006_intr_clear,
-	.intr_handler    = ael1006_intr_handler,
+static struct cphy_ops ael2005_ops = {
+	.reset           = ael2005_reset,
+	.intr_enable     = t3_phy_lasi_intr_enable,
+	.intr_disable    = t3_phy_lasi_intr_disable,
+	.intr_clear      = t3_phy_lasi_intr_clear,
+	.intr_handler    = t3_phy_lasi_intr_handler,
 	.get_link_status = ael100x_get_link_status,
-	.power_down      = ael1006_power_down,
+	.power_down      = ael1002_power_down,
 };
 #endif
 
-int t3_ael1006_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
+int t3_ael2005_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
 			const struct mdio_ops *mdio_ops)
 {
-	cphy_init(phy, adapter, phy_addr, &ael1006_ops, mdio_ops,
+	cphy_init(phy, adapter, phy_addr, &ael2005_ops, mdio_ops,
 		  SUPPORTED_10000baseT_Full | SUPPORTED_AUI | SUPPORTED_FIBRE,
-		  "10GBASE-SR");
-	ael100x_txon(phy);
-	return 0;
+		  "10GBASE-R");
+	msleep(125);
+	return t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, AEL_OPT_SETTINGS, 0,
+				   1 << 5);
 }
 
 #ifdef C99_NOT_SUPPORTED
 static struct cphy_ops qt2045_ops = {
 	ael1006_reset,
-	ael1006_intr_enable,
-	ael1006_intr_disable,
-	ael1006_intr_clear,
-	ael1006_intr_handler,
+	t3_phy_lasi_intr_enable,
+	t3_phy_lasi_intr_disable,
+	t3_phy_lasi_intr_clear,
+	t3_phy_lasi_intr_handler,
 	NULL,
 	NULL,
 	NULL,
@@ -246,10 +609,10 @@
 #else
 static struct cphy_ops qt2045_ops = {
 	.reset           = ael1006_reset,
-	.intr_enable     = ael1006_intr_enable,
-	.intr_disable    = ael1006_intr_disable,
-	.intr_clear      = ael1006_intr_clear,
-	.intr_handler    = ael1006_intr_handler,
+	.intr_enable     = t3_phy_lasi_intr_enable,
+	.intr_disable    = t3_phy_lasi_intr_disable,
+	.intr_clear      = t3_phy_lasi_intr_clear,
+	.intr_handler    = t3_phy_lasi_intr_handler,
 	.get_link_status = ael100x_get_link_status,
 	.power_down      = ael1006_power_down,
 };

==== //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_common.h#7 (text+ko) ====

@@ -25,7 +25,7 @@
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 
-$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.9 2008/03/18 03:55:11 kmacy Exp $
+$FreeBSD: src/sys/dev/cxgb/common/cxgb_common.h,v 1.10 2008/07/18 06:12:31 kmacy Exp $
 
 ***************************************************************************/
 #ifndef __CHELSIO_COMMON_H
@@ -47,10 +47,7 @@
 	NCCTRL_WIN     = 32,    /* # of congestion control windows */
 	NTX_SCHED      = 8,     /* # of HW Tx scheduling queues */
 	PROTO_SRAM_LINES = 128, /* size of protocol sram */
-	MAX_NPORTS     = 4,
-	TP_TMR_RES     = 200,
-	TP_SRAM_OFFSET = 4096,	/* TP SRAM content offset in eeprom */
-	TP_SRAM_LEN    = 2112,	/* TP SRAM content offset in eeprom */
+	EXACT_ADDR_FILTERS = 8,	/* # of HW exact match filters */
 };
 
 #define MAX_RX_COALESCING_LEN 12288U
@@ -122,8 +119,8 @@
 };
 
 struct sg_ent {                   /* SGE scatter/gather entry */
-	u32 len[2];
-	u64 addr[2];
+	__be32 len[2];
+	__be64 addr[2];
 };
 
 #ifndef SGE_NUM_GENBITS
@@ -150,7 +147,7 @@
 	unsigned char          mdien:1;
 	unsigned char          mdiinv:1;
 	unsigned int           gpio_out;       /* GPIO output settings */
-	unsigned int           gpio_intr;      /* GPIO IRQ enable mask */
+	unsigned char gpio_intr[MAX_NPORTS];   /* GPIO PHY IRQ pins */
 	unsigned long          caps;           /* adapter capabilities */
 	const struct mdio_ops *mdio_ops;       /* MDIO operations */
 	const char            *desc;           /* product description */
@@ -159,8 +156,6 @@
 struct port_type_info {
 	int (*phy_prep)(struct cphy *phy, adapter_t *adapter, int phy_addr,
 			const struct mdio_ops *ops);
-
-
 };
 
 struct mc5_stats {
@@ -307,7 +302,7 @@
 struct qset_params {                   /* SGE queue set parameters */
 	unsigned int polling;          /* polling/interrupt service for rspq */
 	unsigned int lro;              /* large receive offload */
-	unsigned int coalesce_nsecs;   /* irq coalescing timer */
+	unsigned int coalesce_usecs;   /* irq coalescing timer */
 	unsigned int rspq_size;        /* # of entries in response queue */
 	unsigned int fl_size;          /* # of entries in regular free list */
 	unsigned int jumbo_size;       /* # of entries in jumbo free list */
@@ -486,12 +481,25 @@
 	MAC_RXFIFO_SIZE  = 32768
 };
 
-/* IEEE 802.3ae specified MDIO devices */
+/* IEEE 802.3 specified MDIO devices */
 enum {
 	MDIO_DEV_PMA_PMD = 1,
 	MDIO_DEV_WIS     = 2,
 	MDIO_DEV_PCS     = 3,
-	MDIO_DEV_XGXS    = 4
+	MDIO_DEV_XGXS    = 4,
+	MDIO_DEV_ANEG    = 7,
+	MDIO_DEV_VEND1   = 30,
+	MDIO_DEV_VEND2   = 31
+};
+
+/* LASI control and status registers */
+enum {
+	RX_ALARM_CTRL = 0x9000,
+	TX_ALARM_CTRL = 0x9001,
+	LASI_CTRL     = 0x9002,
+	RX_ALARM_STAT = 0x9003,
+	TX_ALARM_STAT = 0x9004,
+	LASI_STAT     = 0x9005
 };
 
 /* PHY loopback direction */
@@ -556,8 +564,8 @@
 /* Convenience initializer */
 static inline void cphy_init(struct cphy *phy, adapter_t *adapter,
 			     int phy_addr, struct cphy_ops *phy_ops,
-                             const struct mdio_ops *mdio_ops, unsigned int caps,
-                             const char *desc)
+			     const struct mdio_ops *mdio_ops, unsigned int caps,
+			     const char *desc)
 {
 	phy->adapter = adapter;
 	phy->addr    = phy_addr;
@@ -651,7 +659,12 @@
 			unsigned int set);
 int t3_phy_reset(struct cphy *phy, int mmd, int wait);
 int t3_phy_advertise(struct cphy *phy, unsigned int advert);
+int t3_phy_advertise_fiber(struct cphy *phy, unsigned int advert);
 int t3_set_phy_speed_duplex(struct cphy *phy, int speed, int duplex);
+int t3_phy_lasi_intr_enable(struct cphy *phy);
+int t3_phy_lasi_intr_disable(struct cphy *phy);
+int t3_phy_lasi_intr_clear(struct cphy *phy);
+int t3_phy_lasi_intr_handler(struct cphy *phy);
 
 void t3_intr_enable(adapter_t *adapter);
 void t3_intr_disable(adapter_t *adapter);
@@ -673,10 +686,10 @@
 int t3_get_tp_version(adapter_t *adapter, u32 *vers);
 int t3_check_tpsram_version(adapter_t *adapter, int *must_load);
 int t3_check_tpsram(adapter_t *adapter, const u8 *tp_ram, unsigned int size);
-int t3_load_fw(adapter_t *adapter, const const u8 *fw_data, unsigned int size);
-int t3_load_boot(adapter_t *adapter, u8 *boot_data, unsigned int size);
+int t3_load_fw(adapter_t *adapter, const u8 *fw_data, unsigned int size);
 int t3_get_fw_version(adapter_t *adapter, u32 *vers);
 int t3_check_fw_version(adapter_t *adapter, int *must_load);
+int t3_load_boot(adapter_t *adapter, u8 *fw_data, unsigned int size);
 int t3_init_hw(adapter_t *adapter, u32 fw_params);
 void mac_prep(struct cmac *mac, adapter_t *adapter, int index);
 void early_hw_init(adapter_t *adapter, const struct adapter_info *ai);
@@ -684,8 +697,8 @@
 void t3_led_ready(adapter_t *adapter);
 void t3_fatal_err(adapter_t *adapter);
 void t3_set_vlan_accel(adapter_t *adapter, unsigned int ports, int on);
+void t3_enable_filters(adapter_t *adap);
 void t3_tp_set_offload_mode(adapter_t *adap, int enable);
-void t3_enable_filters(adapter_t *adap);
 void t3_config_rss(adapter_t *adapter, unsigned int rss_config, const u8 *cpus,
 		   const u16 *rspq);
 int t3_read_rss(adapter_t *adapter, u8 *lkup, u16 *map);
@@ -719,7 +732,7 @@
 int t3_read_mc5_range(const struct mc5 *mc5, unsigned int start, unsigned int n,
 		      u32 *buf);
 
-#if defined(CONFIG_CHELSIO_T3_CORE)
+#ifdef CONFIG_CHELSIO_T3_CORE
 int t3_tp_set_coalescing_size(adapter_t *adap, unsigned int size, int psh);
 void t3_tp_set_max_rxsize(adapter_t *adap, unsigned int size);
 void t3_tp_get_mib_stats(adapter_t *adap, struct tp_mib_stats *tps);
@@ -774,21 +787,22 @@
 int t3_vsc7323_set_addr(adapter_t *adap, u8 addr[6], int port);
 int t3_vsc7323_enable(adapter_t *adap, int port, int which);
 int t3_vsc7323_disable(adapter_t *adap, int port, int which);
-
-int t3_phy_advertise_fiber(struct cphy *phy, unsigned int advert);
-
 const struct mac_stats *t3_vsc7323_update_stats(struct cmac *mac);
 
 int t3_mv88e1xxx_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
-			   const struct mdio_ops *mdio_ops);
+			  const struct mdio_ops *mdio_ops);
 int t3_vsc8211_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
-			 const struct mdio_ops *mdio_ops);
+			const struct mdio_ops *mdio_ops);
 int t3_ael1002_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
-			 const struct mdio_ops *mdio_ops);
+			const struct mdio_ops *mdio_ops);
 int t3_ael1006_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
-			 const struct mdio_ops *mdio_ops);
+			const struct mdio_ops *mdio_ops);
+int t3_ael2005_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
+			const struct mdio_ops *mdio_ops);
 int t3_qt2045_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
-			const struct mdio_ops *mdio_ops);
+		       const struct mdio_ops *mdio_ops);
+int t3_tn1010_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
+		       const struct mdio_ops *mdio_ops);
 int t3_xaui_direct_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
-			     const struct mdio_ops *mdio_ops);
+			    const struct mdio_ops *mdio_ops);
 #endif /* __CHELSIO_COMMON_H */

==== //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_mc5.c#5 (text+ko) ====

@@ -28,7 +28,7 @@
 ***************************************************************************/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_mc5.c,v 1.6 2008/02/23 01:06:16 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_mc5.c,v 1.7 2008/07/18 06:12:31 kmacy Exp $");
 
 #ifdef CONFIG_DEFINED
 #include <common/cxgb_common.h>
@@ -326,9 +326,16 @@
 			 V_PRTYEN(mc5->parity_enabled) | F_MBUSEN);
 }
 
-/*
- * Initialization that requires the OS and protocol layers to already
- * be intialized goes here.
+/**
+ *	t3_mc5_init - initialize MC5 and the TCAM
+ *	@mc5: the MC5 handle
+ *	@nservers: desired number the TCP servers (listening ports)
+ *	@nfilters: desired number of HW filters (classifiers)
+ *	@nroutes: desired number of routes
+ *
+ *	Initialize MC5 and the TCAM and partition the TCAM for the requested
+ *	number of servers, filters, and routes.  The number of routes is
+ *	typically 0 except for specialized uses of the T3 adapters.
  */
 int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters,
 		unsigned int nroutes)
@@ -344,7 +351,7 @@
 	if (nroutes > MAX_ROUTES || nroutes + nservers + nfilters > tcam_size)
 		return -EINVAL;
 
-	if (nfilters && adap->params.rev < T3_REV_C)
+	if (nfilters)
 		mc5->parity_enabled = 0;
 
 	/* Reset the TCAM */
@@ -420,7 +427,7 @@
 	}
 
 	mc5_dbgi_mode_disable(mc5);
-	return 0;
+	return err;
 }
 
 #define MC5_INT_FATAL (F_PARITYERR | F_REQQPARERR | F_DISPQPARERR)
@@ -465,7 +472,6 @@
 	t3_write_reg(adap, A_MC5_DB_INT_CAUSE, cause);
 }
 
-
 /**
  *	t3_mc5_prep - initialize the SW state for MC5
  *	@adapter: the adapter

==== //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_mv88e1xxx.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
 ***************************************************************************/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_mv88e1xxx.c,v 1.3 2008/02/23 01:06:16 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cxgb/common/cxgb_mv88e1xxx.c,v 1.4 2008/07/18 06:12:31 kmacy Exp $");
 
 #ifdef CONFIG_DEFINED
 #include <cxgb_include.h>
@@ -299,7 +299,7 @@
 #endif
 
 int t3_mv88e1xxx_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr,
-			   const struct mdio_ops *mdio_ops)
+			  const struct mdio_ops *mdio_ops)
 {
 	int err;
 
@@ -310,9 +310,9 @@
 
 	/* Configure copper PHY transmitter as class A to reduce EMI. */
 	err = mdio_write(phy, 0, MV88E1XXX_EXTENDED_ADDR, 0xb);
-
 	if (!err)
 		err = mdio_write(phy, 0, MV88E1XXX_EXTENDED_DATA, 0x8004);
+
 	if (!err)
 		err = mv88e1xxx_downshift_set(phy, 1);   /* Enable downshift */
 	return err;

==== //depot/projects/vimage/src/sys/dev/cxgb/common/cxgb_t3_cpl.h#6 (text+ko) ====

@@ -25,7 +25,7 @@
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 
-$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_cpl.h,v 1.7 2008/02/23 01:06:16 kmacy Exp $
+$FreeBSD: src/sys/dev/cxgb/common/cxgb_t3_cpl.h,v 1.8 2008/07/18 06:12:31 kmacy Exp $
 
 ***************************************************************************/
 #ifndef T3_CPL_H
@@ -103,6 +103,7 @@
 	CPL_RDMA_TERMINATE    = 0xA2,
 	CPL_TRACE_PKT         = 0xA3,
 	CPL_RDMA_EC_STATUS    = 0xA5,
+	CPL_SGE_EC_CR_RETURN  = 0xA6,
 
 	NUM_CPL_CMDS    /* must be last and previous entries must be sorted */
 };
@@ -148,7 +149,8 @@
 
 enum {
 	CPL_PASS_OPEN_ACCEPT,
-	CPL_PASS_OPEN_REJECT
+	CPL_PASS_OPEN_REJECT,
+	CPL_PASS_OPEN_ACCEPT_TNL

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807181108.m6IB8Dp3048734>