mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
Fix a logic error in determining whether something is page-aligned
that became evident while I was thinking about something else. (No, I am not working on the wd driver itself.)
This commit is contained in:
parent
3addba4f55
commit
8ca67119ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13759
@ -26,7 +26,7 @@
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: wd82371.c,v 1.1 1996/01/28 22:15:47 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "pci.h"
|
||||
@ -190,7 +190,7 @@ piix_dmasetup(void *xcp, char *vaddr, u_long count, int dir)
|
||||
* Deal with transfers that don't start on a page
|
||||
* boundary.
|
||||
*/
|
||||
pgresid = (u_long)vaddr & ~NBPG;
|
||||
pgresid = (u_long)vaddr % NBPG;
|
||||
if (pgresid) {
|
||||
prd[i].prd_base = vtophys(vaddr);
|
||||
if (count >= (NBPG - pgresid))
|
||||
|
Loading…
Reference in New Issue
Block a user