igc: Remove obsolete DMA coalescing code
authorSasha Neftin <sasha.neftin@intel.com>
Thu, 23 Feb 2023 07:03:17 +0000 (09:03 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 21 Mar 2023 18:37:16 +0000 (11:37 -0700)
DMA coalescing is not applicable for i225 parts. This patch comes to tidy
up the driver code.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_defines.h
drivers/net/ethernet/intel/igc/igc_i225.c
drivers/net/ethernet/intel/igc/igc_regs.h

index 9dec3563ce3ae9abc565ea435fba54785fb50cec..44a5070299465a82835466d8e1d65376f8ac2083 100644 (file)
  */
 #define IGC_TW_SYSTEM_100_MASK         0x0000FF00
 #define IGC_TW_SYSTEM_100_SHIFT                8
-#define IGC_DMACR_DMAC_EN              0x80000000 /* Enable DMA Coalescing */
-#define IGC_DMACR_DMACTHR_MASK         0x00FF0000
-#define IGC_DMACR_DMACTHR_SHIFT                16
 /* Reg val to set scale to 1024 nsec */
 #define IGC_LTRMINV_SCALE_1024         2
 /* Reg val to set scale to 32768 nsec */
index 59d5c467ea6e356abecd381fe3420beac0521f5d..17546a035ab197ac7c9f3a73af61af5a4d407b10 100644 (file)
@@ -593,20 +593,11 @@ s32 igc_set_ltr_i225(struct igc_hw *hw, bool link)
                size = rd32(IGC_RXPBS) &
                       IGC_RXPBS_SIZE_I225_MASK;
 
-               /* Calculations vary based on DMAC settings. */
-               if (rd32(IGC_DMACR) & IGC_DMACR_DMAC_EN) {
-                       size -= (rd32(IGC_DMACR) &
-                                IGC_DMACR_DMACTHR_MASK) >>
-                                IGC_DMACR_DMACTHR_SHIFT;
-                       /* Convert size to bits. */
-                       size *= 1024 * 8;
-               } else {
-                       /* Convert size to bytes, subtract the MTU, and then
-                        * convert the size to bits.
-                        */
-                       size *= 1024;
-                       size *= 8;
-               }
+               /* Convert size to bytes, subtract the MTU, and then
+                * convert the size to bits.
+                */
+               size *= 1024;
+               size *= 8;
 
                if (size < 0) {
                        hw_dbg("Invalid effective Rx buffer size %d\n",
index 01c86d36856d27635c7fa973b8d1b919792e94d5..dba5a5759b1c0db231bef1103de70a1e018c5d53 100644 (file)
 
 /* LTR registers */
 #define IGC_LTRC       0x01A0 /* Latency Tolerance Reporting Control */
-#define IGC_DMACR      0x02508 /* DMA Coalescing Control Register */
 #define IGC_LTRMINV    0x5BB0 /* LTR Minimum Value */
 #define IGC_LTRMAXV    0x5BB4 /* LTR Maximum Value */