[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1544433144-7563-2-git-send-email-wesley.sheng@microchip.com>
Date: Mon, 10 Dec 2018 17:12:20 +0800
From: Wesley Sheng <wesley.sheng@...rochip.com>
To: <kurt.schwemmer@...rosemi.com>, <logang@...tatee.com>,
<bhelgaas@...gle.com>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: <wesleyshenggit@...a.com>, <wesley.sheng@...rochip.com>
Subject: [PATCH 1/5] switchtec: Remove immediate status check after submit a MRPC command
From: Kelvin Cao <kelvin.cao@...rochip.com>
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 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 the MemRd TLP that's affected by the above
limitation.
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: 080b47def5e5 ("MicroSemi Switchtec management interface driver")
Signed-off-by: Kelvin Cao <kelvin.cao@...rochip.com>
Signed-off-by: Wesley Sheng <wesley.sheng@...rochip.com>
Reviewed-by: Logan Gunthorpe <logang@...tatee.com>
---
drivers/pci/switch/switchtec.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 54a8b30..d2bca2d 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -134,10 +134,6 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev)
stuser->data, stuser->data_len);
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,
msecs_to_jiffies(500));
}
--
2.7.4
Powered by blists - more mailing lists