weerok

http://ogris.de/vmware/vmxnet3.diff

Nov 12th, 2012
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1. diff -dru vmxnet3-only.orig/vmxnet3.c vmxnet3-only/vmxnet3.c
  2. --- vmxnet3-only.orig/vmxnet3.c 2012-02-15 16:07:44.000000000 +0100
  3. +++ vmxnet3-only/vmxnet3.c 2012-05-20 11:20:47.280333352 +0200
  4. @@ -1146,7 +1146,6 @@
  5. /* If this device is being reset, dont reset it again. */
  6. if (test_and_set_bit(&sc->state, VMXNET3_STATE_BIT_RESETTING)) {
  7. VMXNET3_LOG(sc->dev, 1, "Device being reset, watchdog will exit");
  8. - ifp->if_timer = 1;
  9. VMXNET3_UNLOCK(sc);
  10. return;
  11. }
  12. @@ -1200,7 +1199,6 @@
  13. vmxnet3_close_locked(vmxnet3_adapter_t *sc)
  14. {
  15. int i;
  16. - sc->ifp->if_watchdog = NULL;
  17.  
  18. if (!(sc->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
  19. VMXNET3_LOG(sc->dev, 1, "Interface already closed.\n");
  20. @@ -1269,10 +1267,6 @@
  21. return ret;
  22. }
  23.  
  24. - /* Setup watchdog function */
  25. - sc->ifp->if_watchdog = NULL;//vmxnet3_watchdog;
  26. - sc->ifp->if_timer = 1;
  27. -
  28. VMXNET3_LOG(sc->dev, 1, "Interface activated.\n");
  29. return 0;
  30. }
  31. @@ -2090,7 +2084,6 @@
  32. ifp = sc->ifp;
  33. if_initname(ifp, device_get_name(dev), device_get_unit(dev));
  34. ifp->if_softc = sc;
  35. - ifp->if_timer = 1;
  36. ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX;
  37.  
  38. ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU |
  39. diff -dru vmxnet3-only.orig/vmxnet3_int.h vmxnet3-only/vmxnet3_int.h
  40. --- vmxnet3-only.orig/vmxnet3_int.h 2012-02-15 16:07:44.000000000 +0100
  41. +++ vmxnet3-only/vmxnet3_int.h 2012-05-20 11:21:32.132987316 +0200
  42. @@ -134,9 +134,6 @@
  43. #define VMXNET3_GET_ADDR_LO(dma) ((uint32_t)(dma))
  44. #define VMXNET3_GET_ADDR_HI(dma) ((uint32_t)(((uint64_t)(dma)) >> 32))
  45.  
  46. -inline Bool set_bit(uint8_t *field, uint8_t bit);
  47. -inline Bool test_and_set_bit(uint8_t *field, uint8_t bit);
  48. -
  49. /* Following are not neccesarily atomic operations */
  50. static inline Bool
  51. set_bit(uint8_t *field, uint8_t bit) {
  52. diff -dru vmxnet3-only.orig/vmxnet3_tx.c vmxnet3-only/vmxnet3_tx.c
  53. --- vmxnet3-only.orig/vmxnet3_tx.c 2012-02-15 16:07:44.000000000 +0100
  54. +++ vmxnet3-only/vmxnet3_tx.c 2012-05-20 11:29:24.144945489 +0200
  55. @@ -470,6 +470,12 @@
  56.  
  57. sop = (Vmxnet3_TxDesc *)(tq->cmd_ring.base + tq->cmd_ring.next2fill);
  58.  
  59. + if (m_head == NULL) {
  60. + VMXNET3_LOG(sc->dev, 1, "Warning : Called with no mbuf (m_head == NULL) !\n");
  61. + tq->stats.drop_total++;
  62. + return EINVAL;
  63. + }
  64. +
  65. for (m = m_head; m != NULL; m = m->m_next) {
  66. tbi = tq->cmd_ring.buf_info + tq->cmd_ring.next2fill;
  67. txd = (Vmxnet3_TxDesc *)tq->cmd_ring.base + tq->cmd_ring.next2fill;
Add Comment
Please, Sign In to add comment