diff options
author | Shrikrishna Khare <skhare@vmware.com> | 2016-06-16 19:51:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-17 07:37:04 +0200 |
commit | 190af10f0b5a07140ec4ce8e6ef04b7cb238dde1 (patch) | |
tree | 98679de6233551ea0f572456ece6975d6606f7bf /drivers/net/vmxnet3/vmxnet3_int.h | |
parent | Merge branch 'qeth-next' (diff) | |
download | linux-190af10f0b5a07140ec4ce8e6ef04b7cb238dde1.tar.xz linux-190af10f0b5a07140ec4ce8e6ef04b7cb238dde1.zip |
vmxnet3: prepare for version 3 changes
vmxnet3 is currently at version 2, but some command definitions from
previous vmxnet3 versions are missing. Add those definitions before
moving to version 3.
Also, introduce utility macros for vmxnet3 version comparison and update
Copyright information and Maintained by.
Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_int.h')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_int.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index 3d2b64e63408..de068e92cedb 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h @@ -1,7 +1,7 @@ /* * Linux driver for VMware's vmxnet3 ethernet NIC. * - * Copyright (C) 2008-2009, VMware, Inc. All Rights Reserved. + * Copyright (C) 2008-2016, VMware, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -20,7 +20,7 @@ * The full GNU General Public License is included in this distribution in * the file called "COPYING". * - * Maintained by: Shreyas Bhatewara <pv-drivers@vmware.com> + * Maintained by: pv-drivers@vmware.com * */ @@ -79,6 +79,10 @@ #define VMXNET3_RSS #endif +#define VMXNET3_REV_3 2 /* Vmxnet3 Rev. 3 */ +#define VMXNET3_REV_2 1 /* Vmxnet3 Rev. 2 */ +#define VMXNET3_REV_1 0 /* Vmxnet3 Rev. 1 */ + /* * Capabilities */ @@ -387,6 +391,11 @@ struct vmxnet3_adapter { #define VMXNET3_GET_ADDR_LO(dma) ((u32)(dma)) #define VMXNET3_GET_ADDR_HI(dma) ((u32)(((u64)(dma)) >> 32)) +#define VMXNET3_VERSION_GE_2(adapter) \ + (adapter->version >= VMXNET3_REV_2 + 1) +#define VMXNET3_VERSION_GE_3(adapter) \ + (adapter->version >= VMXNET3_REV_3 + 1) + /* must be a multiple of VMXNET3_RING_SIZE_ALIGN */ #define VMXNET3_DEF_TX_RING_SIZE 512 #define VMXNET3_DEF_RX_RING_SIZE 256 |