diff options
author | Shannon Nelson <shannon.nelson@amd.com> | 2023-12-11 10:57:57 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-13 12:35:54 +0000 |
commit | 24f110240c03c6b5368f1203bac72883d511e606 (patch) | |
tree | fcdb7baeb4b6f7640294559727cbc94e70a41e13 /drivers/net/ethernet/pensando/ionic/ionic_dev.c | |
parent | e5bc1f4c6554b464005d52b940630bb4d276137a (diff) |
ionic: pass opcode to devcmd_wait
Don't rely on the PCI memory for the devcmd opcode because we
read a 0xff value if the PCI bus is broken, which can cause us
to report a bogus dev_cmd opcode later.
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_dev.c')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_dev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c index bb9245d933e4..c0b347dd6bae 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c @@ -321,6 +321,7 @@ void ionic_dev_cmd_comp(struct ionic_dev *idev, union ionic_dev_cmd_comp *comp) void ionic_dev_cmd_go(struct ionic_dev *idev, union ionic_dev_cmd *cmd) { + idev->opcode = cmd->cmd.opcode; memcpy_toio(&idev->dev_cmd_regs->cmd, cmd, sizeof(*cmd)); iowrite32(0, &idev->dev_cmd_regs->done); iowrite32(1, &idev->dev_cmd_regs->doorbell); |