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:
Garrett Wollman 1996-01-30 19:04:09 +00:00
parent 3addba4f55
commit 8ca67119ca

View File

@ -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))