summaryrefslogtreecommitdiffstats
path: root/sys/dev/sk
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2004-12-20 10:07:12 +0000
committerbz <bz@FreeBSD.org>2004-12-20 10:07:12 +0000
commit457df2c499d55770f879b97fe99f82b3ae638737 (patch)
tree7165cb18a75187b7cf81efa55ad9e4b121a6223b /sys/dev/sk
parent80bf67513f7be1aec9cd1c7eb34a33ea962e37f6 (diff)
downloadFreeBSD-src-457df2c499d55770f879b97fe99f82b3ae638737.zip
FreeBSD-src-457df2c499d55770f879b97fe99f82b3ae638737.tar.gz
Enable jumbo frames on Yukon variants of sk(4).
In contrast to OpenBSD we enable jumbo frame support depending on MTU setting (like done for xmac). Approved by: pjd (mentor) Obtained from: OpenBSD if_sk.c r1.52 (YU_SMR_MFL_JUMBO flag) Tested by: Heinz Knocke <knockefreebsd at o2 dot pl> MFC after: 5 days
Diffstat (limited to 'sys/dev/sk')
-rw-r--r--sys/dev/sk/if_sk.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index c31b88c..be66cfb 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -2438,8 +2438,13 @@ sk_init_yukon(sc_if)
{
u_int32_t phy;
u_int16_t reg;
+ struct sk_softc *sc;
+ struct ifnet *ifp;
int i;
+ sc = sc_if->sk_softc;
+ ifp = &sc_if->arpcom.ac_if;
+
/* GMAC and GPHY Reset */
SK_IF_WRITE_4(sc_if, 0, SK_GPHY_CTRL, SK_GPHY_RESET_SET);
SK_IF_WRITE_4(sc_if, 0, SK_GMAC_CTRL, SK_GMAC_RESET_SET);
@@ -2490,8 +2495,10 @@ sk_init_yukon(sc_if)
YU_TPR_JAM_IPG(0xb) | YU_TPR_JAM2DATA_IPG(0x1a) );
/* serial mode register */
- SK_YU_WRITE_2(sc_if, YUKON_SMR, YU_SMR_DATA_BLIND(0x1c) |
- YU_SMR_MFL_VLAN | YU_SMR_IPG_DATA(0x1e));
+ reg = YU_SMR_DATA_BLIND(0x1c) | YU_SMR_MFL_VLAN | YU_SMR_IPG_DATA(0x1e);
+ if (ifp->if_mtu > (ETHERMTU + ETHER_HDR_LEN + ETHER_CRC_LEN))
+ reg |= YU_SMR_MFL_JUMBO;
+ SK_YU_WRITE_2(sc_if, YUKON_SMR, reg);
/* Setup Yukon's address */
for (i = 0; i < 3; i++) {
OpenPOWER on IntegriCloud