Print this page
3373 update files for xen

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/xen/io/xnb.c
          +++ new/usr/src/uts/common/xen/io/xnb.c
↓ open down ↓ 1368 lines elided ↑ open up ↑
1369 1369                   *
1370 1370                   * We reset the ring pointers to the state declared by
1371 1371                   * the frontend and try to carry on.
1372 1372                   */
1373 1373                  cmn_err(CE_WARN, "xnb_from_peer: domain %d tried to give us %u "
1374 1374                      "items in the ring, resetting and trying to recover.",
1375 1375                      xnbp->xnb_peer, (end - start));
1376 1376  
1377 1377                  /* LINTED: constant in conditional context */
1378 1378                  BACK_RING_ATTACH(&xnbp->xnb_tx_ring,
1379      -                    (netif_tx_sring_t *)xnbp->xnb_tx_ring_addr, PAGESIZE);
     1379 +                    (struct netif_tx_sring *)xnbp->xnb_tx_ring_addr, PAGESIZE);
1380 1380  
1381 1381                  goto around;
1382 1382          }
1383 1383  
1384 1384          loop = start;
1385 1385          cop = xnbp->xnb_tx_cop;
1386 1386          txpp = xnbp->xnb_tx_bufp;
1387 1387          n_data_req = 0;
1388 1388  
1389 1389          while (loop < end) {
↓ open down ↓ 388 lines elided ↑ open up ↑
1778 1778          hat_prepare_mapping(kas.a_hat, xnbp->xnb_tx_ring_addr, NULL);
1779 1779          if (xen_map_gref(GNTTABOP_map_grant_ref, &map_op, 1, B_FALSE) != 0 ||
1780 1780              map_op.status != 0) {
1781 1781                  cmn_err(CE_WARN, "xnb_connect_rings: cannot map tx-ring page.");
1782 1782                  goto fail;
1783 1783          }
1784 1784          xnbp->xnb_tx_ring_handle = map_op.handle;
1785 1785  
1786 1786          /* LINTED: constant in conditional context */
1787 1787          BACK_RING_INIT(&xnbp->xnb_tx_ring,
1788      -            (netif_tx_sring_t *)xnbp->xnb_tx_ring_addr, PAGESIZE);
     1788 +            (struct netif_tx_sring *)xnbp->xnb_tx_ring_addr, PAGESIZE);
1789 1789  
1790 1790          /* 1.rx */
1791 1791          xnbp->xnb_rx_ring_addr = vmem_xalloc(heap_arena, PAGESIZE, PAGESIZE,
1792 1792              0, 0, 0, 0, VM_SLEEP);
1793 1793          ASSERT(xnbp->xnb_rx_ring_addr != NULL);
1794 1794  
1795 1795          /* 2.rx */
1796 1796          map_op.host_addr = (uint64_t)((long)xnbp->xnb_rx_ring_addr);
1797 1797          map_op.flags = GNTMAP_host_map;
1798 1798          map_op.ref = xnbp->xnb_rx_ring_ref;
↓ open down ↓ 1 lines elided ↑ open up ↑
1800 1800          hat_prepare_mapping(kas.a_hat, xnbp->xnb_rx_ring_addr, NULL);
1801 1801          if (xen_map_gref(GNTTABOP_map_grant_ref, &map_op, 1, B_FALSE) != 0 ||
1802 1802              map_op.status != 0) {
1803 1803                  cmn_err(CE_WARN, "xnb_connect_rings: cannot map rx-ring page.");
1804 1804                  goto fail;
1805 1805          }
1806 1806          xnbp->xnb_rx_ring_handle = map_op.handle;
1807 1807  
1808 1808          /* LINTED: constant in conditional context */
1809 1809          BACK_RING_INIT(&xnbp->xnb_rx_ring,
1810      -            (netif_rx_sring_t *)xnbp->xnb_rx_ring_addr, PAGESIZE);
     1810 +            (struct netif_rx_sring *)xnbp->xnb_rx_ring_addr, PAGESIZE);
1811 1811  
1812 1812          /* 3 */
1813 1813          if (xvdi_bind_evtchn(dip, xnbp->xnb_fe_evtchn) != DDI_SUCCESS) {
1814 1814                  cmn_err(CE_WARN, "xnb_connect_rings: "
1815 1815                      "cannot bind event channel %d", xnbp->xnb_evtchn);
1816 1816                  xnbp->xnb_evtchn = INVALID_EVTCHN;
1817 1817                  goto fail;
1818 1818          }
1819 1819          xnbp->xnb_evtchn = xvdi_get_evtchn(dip);
1820 1820  
↓ open down ↓ 255 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX