Skip to content

Commit

Permalink
mt76: improve mcu error logging
Browse files Browse the repository at this point in the history
Dump mcu command code in hex and related prefix to help debugging

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Apr 17, 2021
1 parent 459940c commit 0a094b1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions mt7603/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ mt7603_mcu_parse_response(struct mt76_dev *mdev, int cmd,
struct mt7603_mcu_rxd *rxd;

if (!skb) {
dev_err(mdev->dev,
"MCU message %d (seq %d) timed out\n",
cmd, seq);
dev_err(mdev->dev, "MCU message %02x (seq %d) timed out\n",
abs(cmd), seq);
dev->mcu_hang = MT7603_WATCHDOG_TIMEOUT;
return -ETIMEDOUT;
}
Expand Down
4 changes: 2 additions & 2 deletions mt7615/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ int mt7615_mcu_parse_response(struct mt76_dev *mdev, int cmd,
int ret = 0;

if (!skb) {
dev_err(mdev->dev, "Message %ld (seq %d) timeout\n",
cmd & MCU_CMD_MASK, seq);
dev_err(mdev->dev, "Message %08x (seq %d) timeout\n",
cmd, seq);
return -ETIMEDOUT;
}

Expand Down
5 changes: 2 additions & 3 deletions mt76x02_mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ int mt76x02_mcu_parse_response(struct mt76_dev *mdev, int cmd,
u32 *rxfce;

if (!skb) {
dev_err(mdev->dev,
"MCU message %d (seq %d) timed out\n", cmd,
seq);
dev_err(mdev->dev, "MCU message %02x (seq %d) timed out\n",
abs(cmd), seq);
dev->mcu_timeout = 1;
return -ETIMEDOUT;
}
Expand Down
2 changes: 1 addition & 1 deletion mt7915/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ mt7915_mcu_parse_response(struct mt76_dev *mdev, int cmd,
int ret = 0;

if (!skb) {
dev_err(mdev->dev, "Message %d (seq %d) timeout\n",
dev_err(mdev->dev, "Message %08x (seq %d) timeout\n",
cmd, seq);
return -ETIMEDOUT;
}
Expand Down
2 changes: 1 addition & 1 deletion mt7921/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ mt7921_mcu_parse_response(struct mt76_dev *mdev, int cmd,
int ret = 0;

if (!skb) {
dev_err(mdev->dev, "Message %d (seq %d) timeout\n",
dev_err(mdev->dev, "Message %08x (seq %d) timeout\n",
cmd, seq);
return -ETIMEDOUT;
}
Expand Down

0 comments on commit 0a094b1

Please sign in to comment.