From 2af74b85b2da0de635bdf1e8f286da4f400b5fbe Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 27 Feb 2009 21:26:42 +0800 Subject: [PATCH] em(4): We don't dynamicly config txd_cmd; there is no reason to keep it anymore. --- sys/dev/netif/em/if_em.c | 9 +++------ sys/dev/netif/em/if_em.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/dev/netif/em/if_em.c b/sys/dev/netif/em/if_em.c index 2197b69..29f72ca 100644 --- a/sys/dev/netif/em/if_em.c +++ b/sys/dev/netif/em/if_em.c @@ -1581,7 +1581,7 @@ em_encap(struct adapter *adapter, struct mbuf **m_headp) ctxd->buffer_addr = htole64( desc_array.descriptor[counter].address); ctxd->lower.data = htole32( - adapter->txd_cmd | txd_lower | + E1000_TXD_CMD_IFCS | txd_lower | desc_array.descriptor[counter].length); ctxd->upper.data = htole32(txd_upper); @@ -1597,7 +1597,7 @@ em_encap(struct adapter *adapter, struct mbuf **m_headp) ctxd = &adapter->tx_desc_base[i]; ctxd->buffer_addr = htole64(segs[j].ds_addr); - ctxd->lower.data = htole32(adapter->txd_cmd | + ctxd->lower.data = htole32(E1000_TXD_CMD_IFCS | txd_lower | segs[j].ds_len); ctxd->upper.data = htole32(txd_upper); @@ -2523,9 +2523,6 @@ em_init_tx_unit(struct adapter *adapter) /* This write will effectively turn on the transmit unit. */ E1000_WRITE_REG(&adapter->hw, E1000_TCTL, tctl); - - /* Setup Transmit Descriptor Base Settings */ - adapter->txd_cmd = E1000_TXD_CMD_IFCS; } static void @@ -2684,7 +2681,7 @@ em_txcsum(struct adapter *adapter, struct mbuf *mp, TXD->tcp_seg_setup.data = htole32(0); TXD->cmd_and_length = - htole32(adapter->txd_cmd | E1000_TXD_CMD_DEXT | cmd); + htole32(E1000_TXD_CMD_IFCS | E1000_TXD_CMD_DEXT | cmd); tx_buffer->m_head = NULL; if (++curr_txd == adapter->num_tx_desc) diff --git a/sys/dev/netif/em/if_em.h b/sys/dev/netif/em/if_em.h index 4cba7c3..b291619 100644 --- a/sys/dev/netif/em/if_em.h +++ b/sys/dev/netif/em/if_em.h @@ -300,7 +300,6 @@ struct adapter { uint32_t next_tx_to_clean; int num_tx_desc_avail; int num_tx_desc; - uint32_t txd_cmd; bus_dma_tag_t txtag; /* dma tag for tx */ int spare_tx_desc; int oact_tx_desc; -- 1.7.7.2