]> Pileus Git - ~andy/linux/blobdiff - drivers/net/ethernet/cisco/enic/enic.h
drivers/net: enic: Adding support for Cisco Low Latency NIC
[~andy/linux] / drivers / net / ethernet / cisco / enic / enic.h
index afe9b1662b8cef8c2ba09c73febdca3583f2642a..75e842d6cfe72eb1cf2f41d62231670679319a6e 100644 (file)
@@ -33,7 +33,7 @@
 #define DRV_NAME               "enic"
 #define DRV_DESCRIPTION                "Cisco VIC Ethernet NIC Driver"
 #define DRV_VERSION            "2.1.1.39"
-#define DRV_COPYRIGHT          "Copyright 2008-2011 Cisco Systems, Inc"
+#define DRV_COPYRIGHT          "Copyright 2008-2013 Cisco Systems, Inc"
 
 #define ENIC_BARS_MAX          6
 
@@ -127,9 +127,57 @@ static inline struct device *enic_get_dev(struct enic *enic)
        return &(enic->pdev->dev);
 }
 
+static inline unsigned int enic_cq_rq(struct enic *enic, unsigned int rq)
+{
+       return rq;
+}
+
+static inline unsigned int enic_cq_wq(struct enic *enic, unsigned int wq)
+{
+       return enic->rq_count + wq;
+}
+
+static inline unsigned int enic_legacy_io_intr(void)
+{
+       return 0;
+}
+
+static inline unsigned int enic_legacy_err_intr(void)
+{
+       return 1;
+}
+
+static inline unsigned int enic_legacy_notify_intr(void)
+{
+       return 2;
+}
+
+static inline unsigned int enic_msix_rq_intr(struct enic *enic,
+       unsigned int rq)
+{
+       return enic->cq[enic_cq_rq(enic, rq)].interrupt_offset;
+}
+
+static inline unsigned int enic_msix_wq_intr(struct enic *enic,
+       unsigned int wq)
+{
+       return enic->cq[enic_cq_wq(enic, wq)].interrupt_offset;
+}
+
+static inline unsigned int enic_msix_err_intr(struct enic *enic)
+{
+       return enic->rq_count + enic->wq_count;
+}
+
+static inline unsigned int enic_msix_notify_intr(struct enic *enic)
+{
+       return enic->rq_count + enic->wq_count + 1;
+}
+
 void enic_reset_addr_lists(struct enic *enic);
 int enic_sriov_enabled(struct enic *enic);
 int enic_is_valid_vf(struct enic *enic, int vf);
 int enic_is_dynamic(struct enic *enic);
+void enic_set_ethtool_ops(struct net_device *netdev);
 
 #endif /* _ENIC_H_ */