em(4): We don't dynamicly config txd_cmd; there is no reason to keep it anymore.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 27 Feb 2009 13:26:42 +0000 (21:26 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 27 Feb 2009 13:49:55 +0000 (21:49 +0800)
sys/dev/netif/em/if_em.c
sys/dev/netif/em/if_em.h

index 2197b69..29f72ca 100644 (file)
@@ -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)
index 4cba7c3..b291619 100644 (file)
@@ -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;