Print this page
3373 update files for xen

@@ -2157,11 +2157,12 @@
         dev_info_t              *devinfo = xnfp->xnf_devinfo;
         size_t                  len;
         ddi_dma_cookie_t        dma_cookie;
         uint_t                  ncookies;
         int                     rc;
-        caddr_t                 rptr;
+        struct netif_tx_sring *txs;
+        struct netif_rx_sring *rxs;
 
         /*
          * The code below allocates all the DMA data structures that
          * need to be released when the driver is detached.
          *

@@ -2171,19 +2172,19 @@
             DDI_DMA_SLEEP, 0, &xnfp->xnf_tx_ring_dma_handle) != DDI_SUCCESS)
                 goto alloc_error;
 
         if (ddi_dma_mem_alloc(xnfp->xnf_tx_ring_dma_handle,
             PAGESIZE, &accattr, DDI_DMA_CONSISTENT,
-            DDI_DMA_SLEEP, 0, &rptr, &len,
+            DDI_DMA_SLEEP, 0, (caddr_t *)&txs, &len,
             &xnfp->xnf_tx_ring_dma_acchandle) != DDI_SUCCESS) {
                 ddi_dma_free_handle(&xnfp->xnf_tx_ring_dma_handle);
                 xnfp->xnf_tx_ring_dma_handle = NULL;
                 goto alloc_error;
         }
 
         if ((rc = ddi_dma_addr_bind_handle(xnfp->xnf_tx_ring_dma_handle, NULL,
-            rptr, PAGESIZE, DDI_DMA_RDWR | DDI_DMA_CONSISTENT,
+            (caddr_t)&txs, PAGESIZE, DDI_DMA_RDWR | DDI_DMA_CONSISTENT,
             DDI_DMA_SLEEP, 0, &dma_cookie, &ncookies)) != DDI_DMA_MAPPED) {
                 ddi_dma_mem_free(&xnfp->xnf_tx_ring_dma_acchandle);
                 ddi_dma_free_handle(&xnfp->xnf_tx_ring_dma_handle);
                 xnfp->xnf_tx_ring_dma_handle = NULL;
                 xnfp->xnf_tx_ring_dma_acchandle = NULL;

@@ -2192,15 +2193,15 @@
                 else
                         goto error;
         }
 
         ASSERT(ncookies == 1);
-        bzero(rptr, PAGESIZE);
+        bzero(txs, PAGESIZE);
         /* LINTED: constant in conditional context */
-        SHARED_RING_INIT((netif_tx_sring_t *)rptr);
+        SHARED_RING_INIT(txs);
         /* LINTED: constant in conditional context */
-        FRONT_RING_INIT(&xnfp->xnf_tx_ring, (netif_tx_sring_t *)rptr, PAGESIZE);
+        FRONT_RING_INIT(&xnfp->xnf_tx_ring, txs, PAGESIZE);
         xnfp->xnf_tx_ring_phys_addr = dma_cookie.dmac_laddress;
 
         /*
          * Allocate page for the receive descriptor ring.
          */

@@ -2208,19 +2209,19 @@
             DDI_DMA_SLEEP, 0, &xnfp->xnf_rx_ring_dma_handle) != DDI_SUCCESS)
                 goto alloc_error;
 
         if (ddi_dma_mem_alloc(xnfp->xnf_rx_ring_dma_handle,
             PAGESIZE, &accattr, DDI_DMA_CONSISTENT,
-            DDI_DMA_SLEEP, 0, &rptr, &len,
+            DDI_DMA_SLEEP, 0, (caddr_t *)&rxs, &len,
             &xnfp->xnf_rx_ring_dma_acchandle) != DDI_SUCCESS) {
                 ddi_dma_free_handle(&xnfp->xnf_rx_ring_dma_handle);
                 xnfp->xnf_rx_ring_dma_handle = NULL;
                 goto alloc_error;
         }
 
         if ((rc = ddi_dma_addr_bind_handle(xnfp->xnf_rx_ring_dma_handle, NULL,
-            rptr, PAGESIZE, DDI_DMA_RDWR | DDI_DMA_CONSISTENT,
+            (caddr_t)&rxs, PAGESIZE, DDI_DMA_RDWR | DDI_DMA_CONSISTENT,
             DDI_DMA_SLEEP, 0, &dma_cookie, &ncookies)) != DDI_DMA_MAPPED) {
                 ddi_dma_mem_free(&xnfp->xnf_rx_ring_dma_acchandle);
                 ddi_dma_free_handle(&xnfp->xnf_rx_ring_dma_handle);
                 xnfp->xnf_rx_ring_dma_handle = NULL;
                 xnfp->xnf_rx_ring_dma_acchandle = NULL;

@@ -2229,15 +2230,15 @@
                 else
                         goto error;
         }
 
         ASSERT(ncookies == 1);
-        bzero(rptr, PAGESIZE);
+        bzero(rxs, PAGESIZE);
         /* LINTED: constant in conditional context */
-        SHARED_RING_INIT((netif_rx_sring_t *)rptr);
+        SHARED_RING_INIT(rxs);
         /* LINTED: constant in conditional context */
-        FRONT_RING_INIT(&xnfp->xnf_rx_ring, (netif_rx_sring_t *)rptr, PAGESIZE);
+        FRONT_RING_INIT(&xnfp->xnf_rx_ring, rxs, PAGESIZE);
         xnfp->xnf_rx_ring_phys_addr = dma_cookie.dmac_laddress;
 
         return (DDI_SUCCESS);
 
 alloc_error: