Date: Thu, 10 Mar 2016 20:36:32 +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: r296624 - head/sys/dev/cxgbe Message-ID: <201603102036.u2AKaW8h097597@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Mar 10 20:36:32 2016 New Revision: 296624 URL: https://svnweb.freebsd.org/changeset/base/296624 Log: cxgbe(4): Fix bug in r296603. The memory window needs to be repositioned if the start address isn't in the window already. One of the bounds check used the end address instead. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Mar 10 20:15:27 2016 (r296623) +++ head/sys/dev/cxgbe/t4_main.c Thu Mar 10 20:36:32 2016 (r296624) @@ -2084,7 +2084,7 @@ rw_via_memwin(struct adapter *sc, int id while (len > 0) { rw_rlock(&mw->mw_lock); mw_end = mw->mw_curpos + mw->mw_aperture; - if (addr >= mw_end || addr + len <= mw->mw_curpos) { + if (addr >= mw_end || addr < mw->mw_curpos) { /* Will need to reposition the window */ if (!rw_try_upgrade(&mw->mw_lock)) { rw_runlock(&mw->mw_lock);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603102036.u2AKaW8h097597>