Skip to contentSkip to conversation

igc: Add support for Tx/Rx rings

PATCH Superseded Sasha Neftin 3 participants 3 messages Aug 15, 2018 – Aug 16, 2018

Subsystems (2)

v5 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 5/11 igc: Add support for Tx/Rx rings

This change adds the defines and structures necessary to support both Tx and Rx descriptor rings.

Sasha Neftin (v2):
fixed code indentation

Sasha Nedftin (v3):
minor code fixes

Sasha Nedftin (v4):
refactor of igc_clean_tx_ring method and resovle rmmod hang problem remove unused code
address comments
fix indent problem
fix xmas layout
fix header of igc_tx_buffer method
remove duplicate defines of IGC_TX_HTHRESH and IGC_TX_PTHRESH fix typo
replace e1000_ prefix with igc_prefix

Sasha Nedftin (v5):
remove unused defines

---
 drivers/net/ethernet/intel/igc/Makefile      |   2 +-
 drivers/net/ethernet/intel/igc/igc.h         | 126 ++++
 drivers/net/ethernet/intel/igc/igc_base.c    |  83 +++
 drivers/net/ethernet/intel/igc/igc_base.h    |  89 +++
 drivers/net/ethernet/intel/igc/igc_defines.h |  57 +-
 drivers/net/ethernet/intel/igc/igc_hw.h      |   1 +
 drivers/net/ethernet/intel/igc/igc_main.c    | 839 ++++++++++++++++++++++++++-
 drivers/net/ethernet/intel/igc/igc_regs.h    |   3 +
 8 files changed, 1188 insertions(+), 12 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/igc/igc_base.c
 create mode 100644 drivers/net/ethernet/intel/igc/igc_base.h
drivers/net/ethernet/intel/igc/Makefile +1 -1
index 06e0b9e..c32c453 100644
@@ -7,4 +7,4 @@
 
 obj-$(CONFIG_IGC) += igc.o
 
-igc-objs := igc_main.o igc_mac.o
+igc-objs := igc_main.o igc_mac.o igc_base.o
drivers/net/ethernet/intel/igc/igc.h +126 -0

142 lines not on this page · raw message

drivers/net/ethernet/intel/igc/igc_base.c new file +83 -0

83 lines not on this page · raw message

drivers/net/ethernet/intel/igc/igc_base.h new file +89 -0

89 lines not on this page · raw message

drivers/net/ethernet/intel/igc/igc_defines.h +50 -7

75 lines not on this page · raw message

drivers/net/ethernet/intel/igc/igc_hw.h +1 -0
index f461ca9..6a1d8d5 100644
@@ -10,6 +10,7 @@
 #include "igc_defines.h"
 #include "igc_mac.h"
 #include "igc_i225.h"
+#include "igc_base.h"
 
 #define IGC_DEV_ID_I225_LM			0x15F2
 #define IGC_DEV_ID_I225_V			0x15F3
drivers/net/ethernet/intel/igc/igc_main.c +835 -4

949 lines not on this page · raw message

drivers/net/ethernet/intel/igc/igc_regs.h +3 -0
index d390b53..753ac66 100644
@@ -168,6 +168,9 @@
 #define IGC_SCVPC	0x04228  /* SerDes/SGMII Code Violation Pkt Count */
 #define IGC_HRMPC	0x0A018  /* Header Redirection Missed Packet Count */
 
+/* Management registers */
+#define IGC_MANC	0x05820  /* Management Control - RW */
+
 /* forward declaration */
 struct igc_hw;
 u32 igc_rd32(struct igc_hw *hw, u32 reg);
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v5 5/11 igc: Add support for Tx/Rx rings

Quoted 13 lines · Sasha Neftin
drivers/net/ethernet/intel/igc/igc_defines.h +0 -4
index 1ce997a..f9d1842 100644
@@ -28,13 +28,13 @@
 #define IGC_RAH_POOL_1         0x00040000
 
 /* Error Codes */
-#define IGC_SUCCESS                            0
-#define IGC_ERR_NVM                            1
-#define IGC_ERR_PHY                            2
-#define IGC_ERR_CONFIG                         3

drivers/net/ethernet/intel/igc/igc_defines.h line 37

Quoted 10 lines
drivers/net/ethernet/intel/igc/igc_defines.h +7 -3
-#define IGC_ERR_PARAM                          4
-#define IGC_ERR_MAC_INIT                       5
-#define IGC_ERR_RESET                          9
+#define IGC_SUCCESS                    0
+#define IGC_ERR_NVM                    1
+#define IGC_ERR_PHY                    2
+#define IGC_ERR_CONFIG                 3
+#define IGC_ERR_PARAM                  4
+#define IGC_ERR_MAC_INIT               5
+#define IGC_ERR_RESET                  9

This change in indentation should be in patch 2, when the code was
first introduced.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20180815/3b99de62/attachment.asc>

#2 lore raw

PATCH v5 5/11 igc: Add support for Tx/Rx rings

Quoted 19 lines · Jeff Kirsher
Quoted 18 lines · Sasha Neftin
drivers/net/ethernet/intel/igc/igc_defines.h +2 -7
index 1ce997a..f9d1842 100644
@@ -28,13 +28,13 @@
  #define IGC_RAH_POOL_1         0x00040000
 
  /* Error Codes */
-#define IGC_SUCCESS                            0
-#define IGC_ERR_NVM                            1
-#define IGC_ERR_PHY                            2
-#define IGC_ERR_CONFIG                         3
-#define IGC_ERR_PARAM                          4
-#define IGC_ERR_MAC_INIT                       5
-#define IGC_ERR_RESET                          9
+#define IGC_SUCCESS                    0
+#define IGC_ERR_NVM                    1
Quoted 9 lines

drivers/net/ethernet/intel/igc/igc_defines.h line 37

Quoted 5 lines
drivers/net/ethernet/intel/igc/igc_defines.h +5 -0
+#define IGC_ERR_PHY                    2
+#define IGC_ERR_CONFIG                 3
+#define IGC_ERR_PARAM                  4
+#define IGC_ERR_MAC_INIT               5
+#define IGC_ERR_RESET                  9

This change in indentation should be in patch 2, when the code was first introduced.

Fix will be applied in next version.