Skip to content

Commit

Permalink
mt76: mt7921: fix MT7921E reset failure
Browse files Browse the repository at this point in the history
There is a missing mt7921e_driver_own in the MT7921E reset procedure
since the mt7921 mcu.c has been refactored for MT7921S, that will
result in MT7921E reset failure, so add it back now.

Fixes: dfc7743de1eb ("mt76: mt7921: refactor mcu.c to be bus independent")
Reported-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
moore-bros authored and nbd168 committed Nov 12, 2021
1 parent f5ad840 commit 29a8a08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions mt7921/mt7921.h
Expand Up @@ -446,6 +446,7 @@ int mt7921_mcu_restart(struct mt76_dev *dev);

void mt7921e_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
struct sk_buff *skb);
int mt7921e_driver_own(struct mt7921_dev *dev);
int mt7921e_mac_reset(struct mt7921_dev *dev);
int mt7921e_mcu_init(struct mt7921_dev *dev);
int mt7921s_wfsys_reset(struct mt7921_dev *dev);
Expand Down
4 changes: 4 additions & 0 deletions mt7921/pci_mac.c
Expand Up @@ -321,6 +321,10 @@ int mt7921e_mac_reset(struct mt7921_dev *dev)
MT_INT_MCU_CMD);
mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);

err = mt7921e_driver_own(dev);
if (err)
return err;

err = mt7921_run_firmware(dev);
if (err)
goto out;
Expand Down
2 changes: 1 addition & 1 deletion mt7921/pci_mcu.c
Expand Up @@ -4,7 +4,7 @@
#include "mt7921.h"
#include "mcu.h"

static int mt7921e_driver_own(struct mt7921_dev *dev)
int mt7921e_driver_own(struct mt7921_dev *dev)
{
u32 reg = mt7921_reg_map_l1(dev, MT_TOP_LPCR_HOST_BAND0);

Expand Down

0 comments on commit 29a8a08

Please sign in to comment.