summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl_qbman/qman_low.h
diff options
context:
space:
mode:
authorRoy Pledge <Roy.Pledge@freescale.com>2013-04-24 18:00:49 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-05-15 20:48:41 (GMT)
commit8e35431b2e5f14e63e58b9296789e5fdc26c377e (patch)
tree74bfe75974f682cc480de72fe7ae586488d8093d /drivers/staging/fsl_qbman/qman_low.h
parentbe15459f1ce3fa4cce4c5794961446953cd39f28 (diff)
downloadlinux-fsl-qoriq-8e35431b2e5f14e63e58b9296789e5fdc26c377e.tar.xz
Fix pool channel ID checking so it works based on the global
pool channel ID variable Signed-off-by: Roy Pledge <Roy.Pledge@freescale.com> Change-Id: I076964896bd1a54cf72aa16a25270a978c7d73d3 Reviewed-on: http://git.am.freescale.net:8181/2493 Reviewed-by: Thorpe Geoff-R01361 <Geoff.Thorpe@freescale.com> Reviewed-by: Wang Haiying-R54964 <Haiying.Wang@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/staging/fsl_qbman/qman_low.h')
-rw-r--r--drivers/staging/fsl_qbman/qman_low.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/staging/fsl_qbman/qman_low.h b/drivers/staging/fsl_qbman/qman_low.h
index 26641b6..e210f6a 100644
--- a/drivers/staging/fsl_qbman/qman_low.h
+++ b/drivers/staging/fsl_qbman/qman_low.h
@@ -1235,13 +1235,21 @@ static inline int qm_shutdown_fq(struct qm_portal *portal, u32 fqid)
/* Flag that we need to drain FQ */
drain = 1;
- if (channel >= 0x400 && channel < 0x410) {
+ if (channel >= qm_channel_pool1 &&
+ channel < (qm_channel_pool1 + 15)) {
/* Pool channel, enable the bit in the portal */
- dequeue_wq = (channel-0x400)<<4 | wq;
- } else if (channel < 0x400) {
+ dequeue_wq = (channel -
+ qm_channel_pool1 + 1)<<4 | wq;
+ } else if (channel < qm_channel_pool1) {
/* Dedicated channel */
dequeue_wq = wq;
+ } else {
+ pr_info("Cannot recover FQ 0x%x, it is "
+ "scheduled on channel 0x%x",
+ fqid, channel);
+ return -EBUSY;
}
+
while (!found_fqrn) {
/* Keep draining DQRR while checking the MR*/
qm_dqrr_sdqcr_set(portal,