Index: pci/if_sk.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sk.c,v retrieving revision 1.106 diff -b -u -r1.106 if_sk.c --- pci/if_sk.c 10 Jun 2005 16:49:22 -0000 1.106 +++ pci/if_sk.c 3 Jul 2005 18:25:40 -0000 @@ -157,6 +157,11 @@ }, { VENDORID_MARVELL, + DEVICEID_SK_PCIEXP, + "Marvell Gigabit Ethernet(PCI-EXPRESS)" + }, + { + VENDORID_MARVELL, DEVICEID_BELKIN_5005, "Belkin F5D5005 Gigabit Ethernet" }, @@ -457,10 +462,12 @@ int i; u_int8_t *ptr; + printf("- read %d bytes@%08x\n", (int)sizeof(struct vpd_res), addr); ptr = (u_int8_t *)res; for (i = 0; i < sizeof(struct vpd_res); i++) ptr[i] = sk_vpd_readbyte(sc, i + addr); + printf("- read %d bytes\n", i); return; } @@ -534,6 +541,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: return(sk_marv_miibus_readreg(sc_if, phy, reg)); } @@ -555,6 +565,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: return(sk_marv_miibus_writereg(sc_if, phy, reg, val)); } @@ -576,6 +589,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: sk_marv_miibus_statchg(sc_if); break; } @@ -810,6 +826,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: SK_YU_WRITE_2(sc_if, YUKON_MCAH1, 0); SK_YU_WRITE_2(sc_if, YUKON_MCAH2, 0); SK_YU_WRITE_2(sc_if, YUKON_MCAH3, 0); @@ -846,6 +865,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: h = sk_gmchash( LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); break; @@ -867,6 +889,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: SK_YU_WRITE_2(sc_if, YUKON_MCAH1, hashes[0] & 0xffff); SK_YU_WRITE_2(sc_if, YUKON_MCAH2, (hashes[0] >> 16) & 0xffff); SK_YU_WRITE_2(sc_if, YUKON_MCAH3, hashes[1] & 0xffff); @@ -895,6 +920,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: if (ifp->if_flags & IFF_PROMISC) { SK_YU_CLRBIT_2(sc_if, YUKON_RCR, YU_RCR_UFLEN | YU_RCR_MUFLEN); @@ -1053,6 +1081,7 @@ /* Grab a big chunk o' storage. */ sc_if->sk_cdata.sk_jumbo_buf = contigmalloc(SK_JMEM, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); + printf("allocating %ld bytes for jumbo frame\n", SK_JMEM); if (sc_if->sk_cdata.sk_jumbo_buf == NULL) { printf("sk%d: no memory for jumbo buffers!\n", sc_if->sk_unit); @@ -1382,6 +1411,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: device_set_desc(dev, "Marvell Semiconductor, Inc. Yukon"); break; } @@ -1509,6 +1541,7 @@ /* Read and save PHY type and set PHY address */ sc_if->sk_phytype = sk_win_read_1(sc, SK_EPROM1) & 0xF; + printf("PHY type %02x\n", sc_if->sk_phytype); switch(sc_if->sk_phytype) { case SK_PHYTYPE_XMAC: sc_if->sk_phyaddr = SK_PHYADDR_XMAC; @@ -1546,6 +1579,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: sk_init_yukon(sc_if); break; } @@ -1761,6 +1797,10 @@ } } break; + + case DEVICEID_SK_PCIEXP: + pname = "MARVELL YUKON PCI-EXPRESS(?)"; + break; default: device_printf(dev, "unknown device: vendor=%04x, device=%04x, " "chipver=%02x, rev=%x\n", @@ -2791,6 +2831,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: sk_init_yukon(sc_if); break; } @@ -2881,6 +2924,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: reg = SK_YU_READ_2(sc_if, YUKON_GPCR); reg |= YU_GPCR_TXEN | YU_GPCR_RXEN; reg &= ~(YU_GPCR_SPEED_EN | YU_GPCR_DPLX_EN); @@ -2934,6 +2980,9 @@ case SK_YUKON: case SK_YUKON_LITE: case SK_YUKON_LP: + case SK_YUKON_XL: + case SK_YUKON_EC: + case SK_YUKON_FE: SK_IF_WRITE_1(sc_if,0, SK_RXMF1_CTRL_TEST, SK_RFCTL_RESET_SET); SK_IF_WRITE_1(sc_if,0, SK_TXMF1_CTRL_TEST, SK_TFCTL_RESET_SET); break; Index: pci/if_skreg.h =================================================================== RCS file: /home/ncvs/src/sys/pci/if_skreg.h,v retrieving revision 1.29 diff -b -u -r1.29 if_skreg.h --- pci/if_skreg.h 10 Jun 2005 16:49:23 -0000 1.29 +++ pci/if_skreg.h 3 Jul 2005 18:25:41 -0000 @@ -55,6 +55,9 @@ #define SK_YUKON 0xB0 #define SK_YUKON_LITE 0xB1 #define SK_YUKON_LP 0xB2 +#define SK_YUKON_XL 0xB3 +#define SK_YUKON_EC 0xB6 +#define SK_YUKON_FE 0xB7 #define SK_YUKON_FAMILY(x) ((x) & 0xB0) /* Known revisions in SK_CONFIG. */ @@ -77,6 +80,7 @@ */ #define DEVICEID_SK_V1 0x4300 #define DEVICEID_SK_V2 0x4320 +#define DEVICEID_SK_PCIEXP 0x4362 /* * Belkin F5D5005