VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / arch / ppc / 8xx_io / enet.c
index 2f45f34..8ddef1c 100644 (file)
@@ -644,6 +644,7 @@ static int __init scc_enet_init(void)
        struct net_device *dev;
        struct scc_enet_private *cep;
        int i, j, k, err;
+       uint dp_offset;
        unsigned char   *eap, *ba;
        dma_addr_t      mem_addr;
        bd_t            *bd;
@@ -738,13 +739,13 @@ static int __init scc_enet_init(void)
         * These are relative offsets in the DP ram address space.
         * Initialize base addresses for the buffer descriptors.
         */
-       i = m8xx_cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE);
-       ep->sen_genscc.scc_rbase = i;
-       cep->rx_bd_base = (cbd_t *)&cp->cp_dpmem[i];
+       dp_offset = cpm_dpalloc(sizeof(cbd_t) * RX_RING_SIZE, 8);
+       ep->sen_genscc.scc_rbase = dp_offset;
+       cep->rx_bd_base = cpm_dpram_addr(dp_offset);
 
-       i = m8xx_cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE);
-       ep->sen_genscc.scc_tbase = i;
-       cep->tx_bd_base = (cbd_t *)&cp->cp_dpmem[i];
+       dp_offset = cpm_dpalloc(sizeof(cbd_t) * TX_RING_SIZE, 8);
+       ep->sen_genscc.scc_tbase = dp_offset;
+       cep->tx_bd_base = cpm_dpram_addr(dp_offset);
 
        cep->dirty_tx = cep->cur_tx = cep->tx_bd_base;
        cep->cur_rx = cep->rx_bd_base;