net: stmmac: Fix misuses of GENMASK macro
authorJoe Perches <joe@perches.com>
Wed, 10 Jul 2019 05:04:21 +0000 (22:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jul 2019 21:30:07 +0000 (14:30 -0700)
Arguments are supposed to be ordered high then low.

Fixes: 293e4365a1ad ("stmmac: change descriptor layout")
Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/descs.h
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c

index 10429b05f932d9bd27ff4321e30966566dcd04ec..9f0b9a9e63b3b312658e9f4b181a377bbf27da33 100644 (file)
 #define        ETDES1_BUFFER2_SIZE_SHIFT       16
 
 /* Extended Receive descriptor definitions */
-#define        ERDES4_IP_PAYLOAD_TYPE_MASK     GENMASK(2, 6)
+#define        ERDES4_IP_PAYLOAD_TYPE_MASK     GENMASK(6, 2)
 #define        ERDES4_IP_HDR_ERR               BIT(3)
 #define        ERDES4_IP_PAYLOAD_ERR           BIT(4)
 #define        ERDES4_IP_CSUM_BYPASSED         BIT(5)
index 2856f3fe526656273747d7245db810c009ef4390..4083019c547a4b1b04509738ac4a6cb4ee0808e5 100644 (file)
@@ -192,7 +192,7 @@ static const struct emac_variant emac_variant_h6 = {
 
 /* Used in RX_CTL1*/
 #define EMAC_RX_MD              BIT(1)
-#define EMAC_RX_TH_MASK                GENMASK(4, 5)
+#define EMAC_RX_TH_MASK                GENMASK(5, 4)
 #define EMAC_RX_TH_32          0
 #define EMAC_RX_TH_64          (0x1 << 4)
 #define EMAC_RX_TH_96          (0x2 << 4)
@@ -203,7 +203,7 @@ static const struct emac_variant emac_variant_h6 = {
 /* Used in TX_CTL1*/
 #define EMAC_TX_MD              BIT(1)
 #define EMAC_TX_NEXT_FRM        BIT(2)
-#define EMAC_TX_TH_MASK                GENMASK(8, 10)
+#define EMAC_TX_TH_MASK                GENMASK(10, 8)
 #define EMAC_TX_TH_64          0
 #define EMAC_TX_TH_128         (0x1 << 8)
 #define EMAC_TX_TH_192         (0x2 << 8)