igb: A fix to VF TX rate limit
authorLior Levy <lior.levy@intel.com>
Sat, 4 Jun 2011 06:05:03 +0000 (06:05 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 20 Jun 2012 08:11:32 +0000 (01:11 -0700)
There is a need to configure MMW_SIZE in register RTTBCNRM with a correct
value. For 82576 device, the value should be 0x14.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/e1000_regs.h
drivers/net/ethernet/intel/igb/igb_main.c

index 35d1e4f2c92c1ccd535ae1ec1c0c5e0650f6715e..10efcd88dca00c81ef2539914851d25536447c78 100644 (file)
 
 /* TX Rate Limit Registers */
 #define E1000_RTTDQSEL 0x3604  /* Tx Desc Plane Queue Select - WO */
+#define E1000_RTTBCNRM 0x3690  /* Tx BCN Rate-scheduler MMW */
 #define E1000_RTTBCNRC 0x36B0  /* Tx BCN Rate-Scheduler Config - WO */
 
 /* Split and Replication RX Control - RW */
index dd3bfe8cd36c70e94a24ca9bafe100b1b0286cf9..64090549722d2eb953023cb36ac6dda44d545920 100644 (file)
@@ -6997,6 +6997,11 @@ static void igb_set_vf_rate_limit(struct e1000_hw *hw, int vf, int tx_rate,
        }
 
        wr32(E1000_RTTDQSEL, vf); /* vf X uses queue X */
+       /*
+        * Set global transmit compensation time to the MMW_SIZE in RTTBCNRM
+        * register. MMW_SIZE=0x014 if 9728-byte jumbo is supported.
+        */
+       wr32(E1000_RTTBCNRM, 0x14);
        wr32(E1000_RTTBCNRC, bcnrc_val);
 }