Advertisement
Guest User

vmware-tools-8.8.2_fix-vmxnet.c.patch

a guest
Mar 18th, 2012
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.95 KB | None | 0 0
  1. --- vmxnet-only/vmxnet.c.orig   2012-01-18 06:55:49.000000000 +0900
  2. +++ vmxnet-only/vmxnet.c    2012-03-18 22:46:26.444561624 +0900
  3. @@ -1005,7 +1005,9 @@
  4.        .ndo_start_xmit = &vmxnet_start_tx,
  5.        .ndo_stop = &vmxnet_close,
  6.        .ndo_get_stats = &vmxnet_get_stats,
  7. +#   if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
  8.        .ndo_set_multicast_list = &vmxnet_set_multicast_list,
  9. +#   endif
  10.        .ndo_change_mtu = &vmxnet_change_mtu,
  11.  #   ifdef VMW_HAVE_POLL_CONTROLLER
  12.        .ndo_poll_controller = vmxnet_netpoll,
  13. @@ -2079,7 +2081,11 @@
  14.           } else {
  15.              // map the part of the frag that is not copied
  16.              dma = pci_map_page(lp->pdev,
  17. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
  18.                                 frag->page,
  19. +#else
  20. +                               frag->page.p,
  21. +#endif
  22.                                 frag->page_offset + offset,
  23.                                 frag->size - offset,
  24.                                 PCI_DMA_TODEVICE);
  25. @@ -2098,7 +2104,11 @@
  26.     for ( ; nextFrag < skb_shinfo(skb)->nr_frags; nextFrag++) {
  27.        frag = &skb_shinfo(skb)->frags[nextFrag];
  28.        dma = pci_map_page(lp->pdev,
  29. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
  30.                           frag->page,
  31. +#else
  32. +                         frag->page.p,
  33. +#endif
  34.                           frag->page_offset,
  35.                           frag->size,
  36.                           PCI_DMA_TODEVICE);
  37. @@ -2596,7 +2606,11 @@
  38.           }
  39.  
  40.           pci_unmap_page(pdev, rre2->paddr, PAGE_SIZE, PCI_DMA_FROMDEVICE);
  41. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
  42.           skb_shinfo(skb)->frags[numFrags].page = lp->rxPages[dd->rxDriverNext2];
  43. +#else
  44. +         skb_shinfo(skb)->frags[numFrags].page.p = lp->rxPages[dd->rxDriverNext2];
  45. +#endif
  46.           skb_shinfo(skb)->frags[numFrags].page_offset = 0;
  47.           skb_shinfo(skb)->frags[numFrags].size = rre2->actualLength;
  48.           skb->data_len += rre2->actualLength;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement