~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to modules/solaris/vmxnet3/vmxnet3_rx.c

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
#include "vmxnet3_solaris.h"
18
18
 
19
 
#define VMXNET3_RXBUF_SIZE (ETHERMTU + 18)
20
 
 
21
19
static void vmxnet3_put_rxbuf(vmxnet3_rxbuf_t *rxBuf);
22
20
 
23
21
/*
41
39
{
42
40
   vmxnet3_rxbuf_t *rxBuf;
43
41
   int flag = canSleep ? KM_SLEEP : KM_NOSLEEP;
 
42
   int err;
44
43
 
45
44
   rxBuf = kmem_zalloc(sizeof(vmxnet3_rxbuf_t), flag);
46
45
   if (!rxBuf) {
47
46
      return NULL;
48
47
   }
49
48
 
50
 
   if (vmxnet3_alloc_dma_mem_1(dp, &rxBuf->dma, VMXNET3_RXBUF_SIZE,
51
 
                               canSleep) != DDI_SUCCESS) {
 
49
   if ((err = vmxnet3_alloc_dma_mem_1(dp, &rxBuf->dma, (dp->cur_mtu + 18),
 
50
                                      canSleep)) != DDI_SUCCESS) {
 
51
 
 
52
      VMXNET3_DEBUG(dp, 0, "Failed to allocate %d bytes for rx buf, err:%d.\n",
 
53
                    (dp->cur_mtu + 18), err);
52
54
      kmem_free(rxBuf, sizeof(vmxnet3_rxbuf_t));
53
55
      return NULL;
54
56
   }