net: wangxun: Fix vector length of interrupt cause
authorJiawen Wu <jiawenwu@trustnetic.com>
Wed, 22 Mar 2023 10:36:32 +0000 (18:36 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 24 Mar 2023 17:37:31 +0000 (10:37 -0700)
There is 64-bit interrupt cause register for txgbe. Fix to clear upper
32 bits.

Fixes: 3f703186113f ("net: libwx: Add irq flow functions")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230322103632.132011-1-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/libwx/wx_type.h
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c

index 77d8d7f1707e9678e04869109a728388f221b620..97e2c1e13b8067864f5a6800bca146b1e977b3f1 100644 (file)
 #define WX_PX_INTA                   0x110
 #define WX_PX_GPIE                   0x118
 #define WX_PX_GPIE_MODEL             BIT(0)
-#define WX_PX_IC                     0x120
+#define WX_PX_IC(_i)                 (0x120 + (_i) * 4)
 #define WX_PX_IMS(_i)                (0x140 + (_i) * 4)
 #define WX_PX_IMC(_i)                (0x150 + (_i) * 4)
 #define WX_PX_ISB_ADDR_L             0x160
index 5b564d348c091a9f91346fb4e49c566b922ec4d0..17412e5282dedd094dea634d7a3de0fc1329facf 100644 (file)
@@ -352,7 +352,7 @@ static void ngbe_up(struct wx *wx)
        netif_tx_start_all_queues(wx->netdev);
 
        /* clear any pending interrupts, may auto mask */
-       rd32(wx, WX_PX_IC);
+       rd32(wx, WX_PX_IC(0));
        rd32(wx, WX_PX_MISC_IC);
        ngbe_irq_enable(wx, true);
        if (wx->gpio_ctrl)
index 6c0a982305576997459682b19f4c62936005be70..a58ce5463686a34f37b2b47c1641ea420b55ff58 100644 (file)
@@ -229,7 +229,8 @@ static void txgbe_up_complete(struct wx *wx)
        wx_napi_enable_all(wx);
 
        /* clear any pending interrupts, may auto mask */
-       rd32(wx, WX_PX_IC);
+       rd32(wx, WX_PX_IC(0));
+       rd32(wx, WX_PX_IC(1));
        rd32(wx, WX_PX_MISC_IC);
        txgbe_irq_enable(wx, true);