aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_enet.h
diff options
context:
space:
mode:
authorScott Feldman <scofeldm@cisco.com>2009-12-23 13:27:54 +0000
committerDavid S. Miller <davem@davemloft.net>2009-12-23 21:03:41 -0800
commit7c8445991172cc17eaca9f7de0a300c02caaa49d (patch)
tree0518a514d0d3e5af0d6442a2ef72aa10bbce58ae /drivers/net/enic/vnic_enet.h
parentenic: Bug fix: align desc ring sizes to 32 descs (diff)
downloadlinux-dev-7c8445991172cc17eaca9f7de0a300c02caaa49d.tar.xz
linux-dev-7c8445991172cc17eaca9f7de0a300c02caaa49d.zip
enic: feature add: add ethtool -c/C support
Only rx_usec and tx_usec options for ethtool -C are settable as those are the only settings that make sense to HW. Adds driver reporting of intr coalescing timer value in usec units rather than HW units. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic/vnic_enet.h')
-rw-r--r--drivers/net/enic/vnic_enet.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_enet.h b/drivers/net/enic/vnic_enet.h
index 6332ac9391b8..8eeb6758491b 100644
--- a/drivers/net/enic/vnic_enet.h
+++ b/drivers/net/enic/vnic_enet.h
@@ -20,6 +20,10 @@
#ifndef _VNIC_ENIC_H_
#define _VNIC_ENIC_H_
+/* Hardware intr coalesce timer is in units of 1.5us */
+#define INTR_COALESCE_USEC_TO_HW(usec) ((usec) * 2/3)
+#define INTR_COALESCE_HW_TO_USEC(usec) ((usec) * 3/2)
+
/* Device-specific region: enet configuration */
struct vnic_enet_config {
u32 flags;
@@ -30,6 +34,7 @@ struct vnic_enet_config {
u8 intr_timer_type;
u8 intr_mode;
char devname[16];
+ u32 intr_timer_usec;
};
#define VENETF_TSO 0x1 /* TSO enabled */