aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/fsl/qbman/qman.c
diff options
context:
space:
mode:
authorRoy Pledge <roy.pledge@nxp.com>2019-08-01 20:16:57 +0000
committerLi Yang <leoyang.li@nxp.com>2019-08-15 16:41:47 -0500
commitc5501aa92a881e599e1dc80f387d27763d07f67c (patch)
treeb63ad6e714f67ba0d1162c1c8907a526adce64d9 /drivers/soc/fsl/qbman/qman.c
parent0505d00c8dbaf06cb71e7a16818313ce1959e6d7 (diff)
downloadlinux-c5501aa92a881e599e1dc80f387d27763d07f67c.tar.gz
soc/fsl/qbman: Cleanup QMan queues if device was already initialized
If the QMan device was previously initialized make sure all the frame queues are out of service once all the portals are probed. This handles the case where the kernel is restarted without the SoC being reset (kexec for example) Signed-off-by: Roy Pledge <roy.pledge@nxp.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc/fsl/qbman/qman.c')
-rw-r--r--drivers/soc/fsl/qbman/qman.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index 636f83f781f5..f10f77dc04b9 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -2581,7 +2581,7 @@ static int _qm_dqrr_consume_and_match(struct qm_portal *p, u32 fqid, int s,
#define qm_dqrr_drain_nomatch(p) \
_qm_dqrr_consume_and_match(p, 0, 0, false)
-static int qman_shutdown_fq(u32 fqid)
+int qman_shutdown_fq(u32 fqid)
{
struct qman_portal *p;
struct device *dev;
@@ -2754,7 +2754,7 @@ static int qman_shutdown_fq(u32 fqid)
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) ==
QM_MCR_VERB_ALTER_OOS);
- if (mcr->result) {
+ if (mcr->result != QM_MCR_RESULT_OK) {
dev_err(dev, "OOS fail: FQ 0x%x (0x%x)\n",
fqid, mcr->result);
ret = -EIO;