]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: macb: remove gap in MACB_CAPS_* flags
authorThéo Lebrun <theo.lebrun@bootlin.com>
Tue, 14 Oct 2025 15:25:04 +0000 (17:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Oct 2025 23:59:24 +0000 (16:59 -0700)
MACB_CAPS_* are bit constants that get used in bp->caps. They occupy
bits 0..12 + 24..31. Remove 11..23 gap by moving bits 24..31 to 13..20.

Occupation bitfields:

   31  29  27  25  23  21  19  17  15  13  11  09  07  05  03  01
     30  28  26  24  22  20  18  16  14  12  10  08  06  04  02  00
   -- Before ------------------------------------------------------
    1 1 1 1 1 1 1 1                       1 1 1 1 1 1 1 1 1 1 1 1 1
                    0 0 0 0 0 0 0 0 0 0 0
   -- After -------------------------------------------------------
                          1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
    0 0 0 0 0 0 0 0 0 0 0

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://patch.msgid.link/20251014-macb-cleanup-v1-3-31cd266e22cd@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb.h

index 869d02284707cb771233276a073e1afdeeba43ce..9d21ec482c8c62da28f9d5ff35d5ca46f293eb64 100644 (file)
 #define MACB_CAPS_NEED_TSUCLK                  BIT(10)
 #define MACB_CAPS_QUEUE_DISABLE                        BIT(11)
 #define MACB_CAPS_QBV                          BIT(12)
-#define MACB_CAPS_PCS                          BIT(24)
-#define MACB_CAPS_HIGH_SPEED                   BIT(25)
-#define MACB_CAPS_CLK_HW_CHG                   BIT(26)
-#define MACB_CAPS_MACB_IS_EMAC                 BIT(27)
-#define MACB_CAPS_FIFO_MODE                    BIT(28)
-#define MACB_CAPS_GIGABIT_MODE_AVAILABLE       BIT(29)
-#define MACB_CAPS_SG_DISABLED                  BIT(30)
-#define MACB_CAPS_MACB_IS_GEM                  BIT(31)
+#define MACB_CAPS_PCS                          BIT(13)
+#define MACB_CAPS_HIGH_SPEED                   BIT(14)
+#define MACB_CAPS_CLK_HW_CHG                   BIT(15)
+#define MACB_CAPS_MACB_IS_EMAC                 BIT(16)
+#define MACB_CAPS_FIFO_MODE                    BIT(17)
+#define MACB_CAPS_GIGABIT_MODE_AVAILABLE       BIT(18)
+#define MACB_CAPS_SG_DISABLED                  BIT(19)
+#define MACB_CAPS_MACB_IS_GEM                  BIT(20)
 
 /* LSO settings */
 #define MACB_LSO_UFO_ENABLE                    0x01