Deleted Added
full compact
102c102
< __FBSDID("$FreeBSD: head/sys/dev/msk/if_msk.c 192725 2009-05-25 04:27:12Z yongari $");
---
> __FBSDID("$FreeBSD: head/sys/dev/msk/if_msk.c 192726 2009-05-25 06:09:18Z yongari $");
2402c2402,2403
< if ((m->m_pkthdr.csum_flags & (MSK_CSUM_FEATURES | CSUM_TSO)) != 0) {
---
> if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 &&
> (m->m_pkthdr.csum_flags & (MSK_CSUM_FEATURES | CSUM_TSO)) != 0) {
2529c2530,2533
< tso_mtu = offset + m->m_pkthdr.tso_segsz;
---
> if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0)
> tso_mtu = m->m_pkthdr.tso_segsz;
> else
> tso_mtu = offset + m->m_pkthdr.tso_segsz;
2533c2537,2541
< tx_le->msk_control = htole32(OP_LRGLEN | HW_OWNER);
---
> if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0)
> tx_le->msk_control = htole32(OP_MSS | HW_OWNER);
> else
> tx_le->msk_control =
> htole32(OP_LRGLEN | HW_OWNER);
2557,2565c2565,2579
< tx_le = &sc_if->msk_rdata.msk_tx_ring[prod];
< tx_le->msk_addr = htole32(((tcp_offset + m->m_pkthdr.csum_data)
< & 0xffff) | ((uint32_t)tcp_offset << 16));
< tx_le->msk_control = htole32(1 << 16 | (OP_TCPLISW | HW_OWNER));
< control = CALSUM | WR_SUM | INIT_SUM | LOCK_SUM;
< if ((m->m_pkthdr.csum_flags & CSUM_UDP) != 0)
< control |= UDPTCP;
< sc_if->msk_cdata.msk_tx_cnt++;
< MSK_INC(prod, MSK_TX_RING_CNT);
---
> if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0)
> control |= CALSUM;
> else {
> tx_le = &sc_if->msk_rdata.msk_tx_ring[prod];
> tx_le->msk_addr = htole32(((tcp_offset +
> m->m_pkthdr.csum_data) & 0xffff) |
> ((uint32_t)tcp_offset << 16));
> tx_le->msk_control = htole32(1 << 16 |
> (OP_TCPLISW | HW_OWNER));
> control = CALSUM | WR_SUM | INIT_SUM | LOCK_SUM;
> if ((m->m_pkthdr.csum_flags & CSUM_UDP) != 0)
> control |= UDPTCP;
> sc_if->msk_cdata.msk_tx_cnt++;
> MSK_INC(prod, MSK_TX_RING_CNT);
> }