]> git.baikalelectronics.ru Git - kernel.git/commitdiff
sfc: extend bitfield macros up to POPULATE_DWORD_13
authorEdward Cree <ecree@solarflare.com>
Mon, 29 Jun 2020 13:33:03 +0000 (14:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jun 2020 00:37:48 +0000 (17:37 -0700)
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/bitfield.h

index 1b59e9fe58b44f5424316f2264465554ed735bb4..2590cab53e543d0e9d84aff0f8d4b864e73ee0da 100644 (file)
@@ -282,7 +282,10 @@ typedef union efx_oword {
                                 field7, value7,                        \
                                 field8, value8,                        \
                                 field9, value9,                        \
-                                field10, value10)                      \
+                                field10, value10,                      \
+                                field11, value11,                      \
+                                field12, value12,                      \
+                                field13, value13)                      \
        (EFX_INSERT_FIELD_NATIVE((min), (max), field1, (value1)) |      \
         EFX_INSERT_FIELD_NATIVE((min), (max), field2, (value2)) |      \
         EFX_INSERT_FIELD_NATIVE((min), (max), field3, (value3)) |      \
@@ -292,7 +295,10 @@ typedef union efx_oword {
         EFX_INSERT_FIELD_NATIVE((min), (max), field7, (value7)) |      \
         EFX_INSERT_FIELD_NATIVE((min), (max), field8, (value8)) |      \
         EFX_INSERT_FIELD_NATIVE((min), (max), field9, (value9)) |      \
-        EFX_INSERT_FIELD_NATIVE((min), (max), field10, (value10)))
+        EFX_INSERT_FIELD_NATIVE((min), (max), field10, (value10)) |    \
+        EFX_INSERT_FIELD_NATIVE((min), (max), field11, (value11)) |    \
+        EFX_INSERT_FIELD_NATIVE((min), (max), field12, (value12)) |    \
+        EFX_INSERT_FIELD_NATIVE((min), (max), field13, (value13)))
 
 #define EFX_INSERT_FIELDS64(...)                               \
        cpu_to_le64(EFX_INSERT_FIELDS_NATIVE(__VA_ARGS__))
@@ -334,7 +340,13 @@ typedef union efx_oword {
 #endif
 
 /* Populate an octword field with various numbers of arguments */
-#define EFX_POPULATE_OWORD_10 EFX_POPULATE_OWORD
+#define EFX_POPULATE_OWORD_13 EFX_POPULATE_OWORD
+#define EFX_POPULATE_OWORD_12(oword, ...) \
+       EFX_POPULATE_OWORD_13(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
+#define EFX_POPULATE_OWORD_11(oword, ...) \
+       EFX_POPULATE_OWORD_12(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
+#define EFX_POPULATE_OWORD_10(oword, ...) \
+       EFX_POPULATE_OWORD_11(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 #define EFX_POPULATE_OWORD_9(oword, ...) \
        EFX_POPULATE_OWORD_10(oword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 #define EFX_POPULATE_OWORD_8(oword, ...) \
@@ -363,7 +375,13 @@ typedef union efx_oword {
                             EFX_DWORD_3, 0xffffffff)
 
 /* Populate a quadword field with various numbers of arguments */
-#define EFX_POPULATE_QWORD_10 EFX_POPULATE_QWORD
+#define EFX_POPULATE_QWORD_13 EFX_POPULATE_QWORD
+#define EFX_POPULATE_QWORD_12(qword, ...) \
+       EFX_POPULATE_QWORD_13(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
+#define EFX_POPULATE_QWORD_11(qword, ...) \
+       EFX_POPULATE_QWORD_12(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
+#define EFX_POPULATE_QWORD_10(qword, ...) \
+       EFX_POPULATE_QWORD_11(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 #define EFX_POPULATE_QWORD_9(qword, ...) \
        EFX_POPULATE_QWORD_10(qword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 #define EFX_POPULATE_QWORD_8(qword, ...) \
@@ -390,7 +408,13 @@ typedef union efx_oword {
                             EFX_DWORD_1, 0xffffffff)
 
 /* Populate a dword field with various numbers of arguments */
-#define EFX_POPULATE_DWORD_10 EFX_POPULATE_DWORD
+#define EFX_POPULATE_DWORD_13 EFX_POPULATE_DWORD
+#define EFX_POPULATE_DWORD_12(dword, ...) \
+       EFX_POPULATE_DWORD_13(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
+#define EFX_POPULATE_DWORD_11(dword, ...) \
+       EFX_POPULATE_DWORD_12(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
+#define EFX_POPULATE_DWORD_10(dword, ...) \
+       EFX_POPULATE_DWORD_11(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 #define EFX_POPULATE_DWORD_9(dword, ...) \
        EFX_POPULATE_DWORD_10(dword, EFX_DUMMY_FIELD, 0, __VA_ARGS__)
 #define EFX_POPULATE_DWORD_8(dword, ...) \