]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-beck.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_cmn.h
index c3a65d04c8c9a43689b6ffcfa25a892b3f5a0b62..151675d66b0d4d1f5b80289bb8697c43c69fb301 100644 (file)
@@ -50,13 +50,13 @@ extern int int_mode;
                } \
        } while (0)
 
-#define BNX2X_PCI_ALLOC(x, y, size) \
-       do { \
-               x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
-               if (x == NULL) \
-                       goto alloc_mem_err; \
-               memset((void *)x, 0, size); \
-       } while (0)
+#define BNX2X_PCI_ALLOC(x, y, size)                            \
+do {                                                           \
+       x = dma_alloc_coherent(&bp->pdev->dev, size, y,         \
+                              GFP_KERNEL | __GFP_ZERO);        \
+       if (x == NULL)                                          \
+               goto alloc_mem_err;                             \
+} while (0)
 
 #define BNX2X_ALLOC(x, size) \
        do { \
@@ -509,7 +509,10 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev);
 /* setup_tc callback */
 int bnx2x_setup_tc(struct net_device *dev, u8 num_tc);
 
+int bnx2x_get_vf_config(struct net_device *dev, int vf,
+                       struct ifla_vf_info *ivi);
 int bnx2x_set_vf_mac(struct net_device *dev, int queue, u8 *mac);
+int bnx2x_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos);
 
 /* select_queue callback */
 u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb);
@@ -847,7 +850,7 @@ static inline void bnx2x_add_all_napi_cnic(struct bnx2x *bp)
        /* Add NAPI objects */
        for_each_rx_queue_cnic(bp, i)
                netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
-                              bnx2x_poll, BNX2X_NAPI_WEIGHT);
+                              bnx2x_poll, NAPI_POLL_WEIGHT);
 }
 
 static inline void bnx2x_add_all_napi(struct bnx2x *bp)
@@ -857,7 +860,7 @@ static inline void bnx2x_add_all_napi(struct bnx2x *bp)
        /* Add NAPI objects */
        for_each_eth_queue(bp, i)
                netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
-                              bnx2x_poll, BNX2X_NAPI_WEIGHT);
+                              bnx2x_poll, NAPI_POLL_WEIGHT);
 }
 
 static inline void bnx2x_del_all_napi_cnic(struct bnx2x *bp)
@@ -983,6 +986,9 @@ static inline int bnx2x_func_start(struct bnx2x *bp)
        else /* CHIP_IS_E1X */
                start_params->network_cos_mode = FW_WRR;
 
+       start_params->gre_tunnel_mode = IPGRE_TUNNEL;
+       start_params->gre_tunnel_rss = GRE_INNER_HEADERS_RSS;
+
        return bnx2x_func_state_change(bp, &func_params);
 }
 
@@ -1409,4 +1415,8 @@ static inline bool bnx2x_is_valid_ether_addr(struct bnx2x *bp, u8 *addr)
  *
  */
 void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len);
+
+int bnx2x_drain_tx_queues(struct bnx2x *bp);
+void bnx2x_squeeze_objects(struct bnx2x *bp);
+
 #endif /* BNX2X_CMN_H */