提交 52618040 编写于 作者: K Kelvin Cao 提交者: Bjorn Helgaas

switchtec: Remove immediate status check after submitting MRPC command

After submitting a Firmware Download MRPC command, Switchtec firmware will
delay Management EP BAR MemRd TLP responses by more than 10ms.  This is a
firmware limitation.  Delayed MemRd completions are a problem for systems
with a low Completion Timeout (CTO).

The current driver checks the MRPC status immediately after submitting an
MRPC command, which results in a delayed MemRd completion that may cause a
Completion Timeout.

Remove the immediate status check and rely on the check after receiving an
interrupt or timing out.

This is only a software workaround to the READ issue and a proper fix of
this should be done in firmware.

Fixes: 080b47de ("MicroSemi Switchtec management interface driver")
Signed-off-by: NKelvin Cao <kelvin.cao@microchip.com>
Signed-off-by: NWesley Sheng <wesley.sheng@microchip.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NLogan Gunthorpe <logang@deltatee.com>
上级 65102238
...@@ -134,10 +134,6 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev) ...@@ -134,10 +134,6 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev)
stuser->data, stuser->data_len); stuser->data, stuser->data_len);
iowrite32(stuser->cmd, &stdev->mmio_mrpc->cmd); iowrite32(stuser->cmd, &stdev->mmio_mrpc->cmd);
stuser->status = ioread32(&stdev->mmio_mrpc->status);
if (stuser->status != SWITCHTEC_MRPC_STATUS_INPROGRESS)
mrpc_complete_cmd(stdev);
schedule_delayed_work(&stdev->mrpc_timeout, schedule_delayed_work(&stdev->mrpc_timeout,
msecs_to_jiffies(500)); msecs_to_jiffies(500));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册