Remove unused macros
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 21 Dec 2008 11:37:07 +0000 (19:37 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 22 Dec 2008 13:33:39 +0000 (21:33 +0800)
sys/dev/netif/jme/if_jme.c
sys/dev/netif/jme/if_jmevar.h

index 080768b..ed66272 100644 (file)
@@ -364,12 +364,12 @@ jme_miibus_statchg(device_t dev)
                CSR_WRITE_4(sc, JME_TXCSR, sc->jme_txcsr);
 
                /* Set Tx ring address to the hardware. */
-               paddr = JME_TX_RING_ADDR(sc, 0);
+               paddr = sc->jme_cdata.jme_tx_ring_paddr;
                CSR_WRITE_4(sc, JME_TXDBA_HI, JME_ADDR_HI(paddr));
                CSR_WRITE_4(sc, JME_TXDBA_LO, JME_ADDR_LO(paddr));
 
                /* Set Rx ring address to the hardware. */
-               paddr = JME_RX_RING_ADDR(sc, 0);
+               paddr = sc->jme_cdata.jme_rx_ring_paddr;
                CSR_WRITE_4(sc, JME_RXDBA_HI, JME_ADDR_HI(paddr));
                CSR_WRITE_4(sc, JME_RXDBA_LO, JME_ADDR_LO(paddr));
 
@@ -2427,7 +2427,7 @@ jme_init(void *xsc)
        CSR_WRITE_4(sc, JME_TXQDC, sc->jme_tx_desc_cnt);
 
        /* Set Tx ring address to the hardware. */
-       paddr = JME_TX_RING_ADDR(sc, 0);
+       paddr = sc->jme_cdata.jme_tx_ring_paddr;
        CSR_WRITE_4(sc, JME_TXDBA_HI, JME_ADDR_HI(paddr));
        CSR_WRITE_4(sc, JME_TXDBA_LO, JME_ADDR_LO(paddr));
 
@@ -2471,7 +2471,7 @@ jme_init(void *xsc)
        CSR_WRITE_4(sc, JME_RXQDC, sc->jme_rx_desc_cnt);
 
        /* Set Rx ring address to the hardware. */
-       paddr = JME_RX_RING_ADDR(sc, 0);
+       paddr = sc->jme_cdata.jme_rx_ring_paddr;
        CSR_WRITE_4(sc, JME_RXDBA_HI, JME_ADDR_HI(paddr));
        CSR_WRITE_4(sc, JME_RXDBA_LO, JME_ADDR_LO(paddr));
 
index b12d430..cc23619 100644 (file)
@@ -36,7 +36,7 @@
 #include <sys/taskqueue.h>
 
 /*
- * JMC250 supports upto 1024 descriptors and the number of
+ * JMC250 supports upto JME_NDESC_MAX descriptors and the number of
  * descriptors should be multiple of JME_NDESC_ALIGN.
  */
 #define        JME_TX_DESC_CNT_DEF     384
@@ -160,11 +160,6 @@ struct jme_chain_data {
        struct mbuf             *jme_rxtail;
 };
 
-#define JME_TX_RING_ADDR(sc, i)        \
-    ((sc)->jme_cdata.jme_tx_ring_paddr + sizeof(struct jme_desc) * (i))
-#define JME_RX_RING_ADDR(sc, i)        \
-    ((sc)->jme_cdata.jme_rx_ring_paddr + sizeof(struct jme_desc) * (i))
-
 #define JME_TX_RING_SIZE(sc)   \
     (sizeof(struct jme_desc) * (sc)->jme_tx_desc_cnt)
 #define JME_RX_RING_SIZE(sc)   \