Date: Sat, 2 Aug 2014 01:48:26 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269413 - head/sys/dev/cxgbe Message-ID: <201408020148.s721mQb0042172@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Sat Aug 2 01:48:25 2014 New Revision: 269413 URL: http://svnweb.freebsd.org/changeset/base/269413 Log: cxgbe(4): Fix an off by one error when looking for the BAR2 doorbell address of an egress queue. MFC after: 2 weeks Modified: head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- head/sys/dev/cxgbe/t4_netmap.c Sat Aug 2 01:28:01 2014 (r269412) +++ head/sys/dev/cxgbe/t4_netmap.c Sat Aug 2 01:48:25 2014 (r269413) @@ -390,7 +390,7 @@ alloc_nm_txq_hwq(struct port_info *pi, s udb = sc->udbs_base + UDBS_DB_OFFSET; udb += (nm_txq->cntxt_id >> s_qpp) << PAGE_SHIFT; nm_txq->udb_qid = nm_txq->cntxt_id & mask; - if (nm_txq->udb_qid > PAGE_SIZE / UDBS_SEG_SIZE) + if (nm_txq->udb_qid >= PAGE_SIZE / UDBS_SEG_SIZE) clrbit(&nm_txq->doorbells, DOORBELL_WCWR); else { udb += nm_txq->udb_qid << UDBS_SEG_SHIFT; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Sat Aug 2 01:28:01 2014 (r269412) +++ head/sys/dev/cxgbe/t4_sge.c Sat Aug 2 01:48:25 2014 (r269413) @@ -2985,7 +2985,7 @@ alloc_eq(struct adapter *sc, struct port udb = sc->udbs_base + UDBS_DB_OFFSET; udb += (eq->cntxt_id >> s_qpp) << PAGE_SHIFT; /* pg offset */ eq->udb_qid = eq->cntxt_id & mask; /* id in page */ - if (eq->udb_qid > PAGE_SIZE / UDBS_SEG_SIZE) + if (eq->udb_qid >= PAGE_SIZE / UDBS_SEG_SIZE) clrbit(&eq->doorbells, DOORBELL_WCWR); else { udb += eq->udb_qid << UDBS_SEG_SHIFT; /* seg offset */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408020148.s721mQb0042172>