From owner-freebsd-net@FreeBSD.ORG Tue Nov 3 18:28:21 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D50D106566B for ; Tue, 3 Nov 2009 18:28:21 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 07A728FC15 for ; Tue, 3 Nov 2009 18:28:20 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id d26so943497eyd.9 for ; Tue, 03 Nov 2009 10:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=dvkja3LmVA3JBNT1BYoj2oGNhqqed20S+udVtyX3Qqc=; b=J6pUJ7TgOjA4sDpLPm3ARNC692t59Uy0f7uuWqoedOGXPrEI0op8l0Ur3hk15S/9Px GuGIQh2ogtfk9P2XOrA1yAQhNZaZ3ylbNg+9LiKlxbHyH+1Hbi2qoVmGdtkqy+343A++ uF48wvccYNQfeljktKB5m2/O9+4OsDKXsZxac= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=VOYtpqzKCwIJTpS4+Dqcbez/2JUBqr6UzAa6NSM4yYIUbpAhTp+1ZytP/9HcuWJ8s7 vLfhv9YkwhyDZtHW7ipSRi0emgbbFFfNC2TdOWPvGVGxM63UZVIK3DuBUrCQx1umbdBh 0qnrYHqzgdSR9fdKr/rxlc/jMV5TnstFMmR6M= Received: by 10.216.86.74 with SMTP id v52mr124370wee.124.1257272899912; Tue, 03 Nov 2009 10:28:19 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id q9sm1055578gve.0.2009.11.03.10.28.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Nov 2009 10:28:18 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 3 Nov 2009 10:27:39 -0800 From: Pyun YongHyeon Date: Tue, 3 Nov 2009 10:27:39 -0800 To: kalin m Message-ID: <20091103182739.GE1256@michelle.cdnetworks.com> References: <4AE2780F.4080600@el.net> <20091024214640.GE6050@michelle.cdnetworks.com> <20091024215219.GF6050@michelle.cdnetworks.com> <4AEFC390.2090600@el.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Clx92ZfkiYIKRjnr" Content-Disposition: inline In-Reply-To: <4AEFC390.2090600@el.net> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: Marvell 88E8057 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2009 18:28:21 -0000 --Clx92ZfkiYIKRjnr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 03, 2009 at 12:45:52AM -0500, kalin m wrote: > > hi pyun... and all.... > > after a few hours i'm sorry to report that the card is visible but not > usable (yet?!). here is what i have done so far: > > 1. got the files from http://svn.freebsd.org/viewvc/base/head/sys/dev/ > 2. applied the patch that pyun provided. > 3. replaced if_maddr_rlock(ifp) with IF_ADDR_UNLOCK(ifp) in if_msk.c - > two instances. > 4. replaced the files in /usr/src/sys/dev for mii and msk with he new > ones on the freebsd 7.2 machine. > 5. recompiled the kernel.. > > here is what i get: > > from dmesg at boot: > > mskc0: port 0xde00-0xdeff mem > 0xfddfc000-0xfddfffff irq 18 at device 0.0 on pci2 > mskc0: unknown device: id=0xba, rev=0x00 > device_attach: mskc0 attach returned 6 > > cant find what 6 stands for but it's not good.. > Sorry, there was a check that keep 88E8057 from attaching. I've regenerated patch. --Clx92ZfkiYIKRjnr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="msk.88E8057.diff2" Index: sys/dev/msk/if_msk.c =================================================================== --- sys/dev/msk/if_msk.c (revision 198812) +++ sys/dev/msk/if_msk.c (working copy) @@ -223,6 +223,8 @@ "Marvell Yukon 88E8071 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_436C, "Marvell Yukon 88E8072 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4380, + "Marvell Yukon 88E8057 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, @@ -237,7 +239,9 @@ "Yukon EX", "Yukon EC", "Yukon FE", - "Yukon FE+" + "Yukon FE+", + "Yukon Supreme", + "Yukon Ultra 2" }; static int mskc_probe(device_t); @@ -1144,6 +1148,7 @@ case CHIP_ID_YUKON_EC_U: case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: + case CHIP_ID_YUKON_UL_2: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1647,7 +1652,8 @@ sc->msk_hw_rev = (CSR_READ_1(sc, B2_MAC_CFG) >> 4) & 0x0f; /* Bail out if chip is not recognized. */ if (sc->msk_hw_id < CHIP_ID_YUKON_XL || - sc->msk_hw_id > CHIP_ID_YUKON_FE_P) { + sc->msk_hw_id > CHIP_ID_YUKON_UL_2 || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { device_printf(dev, "unknown device: id=0x%02x, rev=0x%02x\n", sc->msk_hw_id, sc->msk_hw_rev); mtx_destroy(&sc->msk_mtx); @@ -1746,6 +1752,10 @@ sc->msk_clock = 156; /* 156 Mhz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_UL_2: + sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_pflags |= MSK_FLAG_JUMBO; + break; default: sc->msk_clock = 156; /* 156 Mhz */ break; Index: sys/dev/msk/if_mskreg.h =================================================================== --- sys/dev/msk/if_mskreg.h (revision 198812) +++ sys/dev/msk/if_mskreg.h (working copy) @@ -144,6 +144,7 @@ #define DEVICEID_MRVL_436A 0x436A #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C +#define DEVICEID_MRVL_4380 0x4380 /* * D-Link gigabit ethernet device ID @@ -891,6 +892,8 @@ #define CHIP_ID_YUKON_EC 0xb6 /* Chip ID for YUKON-2 EC */ #define CHIP_ID_YUKON_FE 0xb7 /* Chip ID for YUKON-2 FE */ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ +#define CHIP_ID_YUKON_SUPR 0xb9 /* Chip ID for YUKON-2 Supreme */ +#define CHIP_ID_YUKON_UL_2 0xba /* Chip ID for YUKON-2 Ultra 2 */ #define CHIP_REV_YU_XL_A0 0 /* Chip Rev. for Yukon-2 A0 */ #define CHIP_REV_YU_XL_A1 1 /* Chip Rev. for Yukon-2 A1 */ --Clx92ZfkiYIKRjnr--