From owner-svn-src-head@FreeBSD.ORG Sat Aug 2 01:48:26 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4D49BC0; Sat, 2 Aug 2014 01:48:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A19DE2561; Sat, 2 Aug 2014 01:48:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s721mQYC042174; Sat, 2 Aug 2014 01:48:26 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s721mQb0042172; Sat, 2 Aug 2014 01:48:26 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201408020148.s721mQb0042172@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 2 Aug 2014 01:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269413 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2014 01:48:26 -0000 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 */