diff options
Diffstat (limited to 'sys/pci/ide_pci.c')
-rw-r--r-- | sys/pci/ide_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c index 1449b3e..6114b4f 100644 --- a/sys/pci/ide_pci.c +++ b/sys/pci/ide_pci.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ide_pci.c,v 1.36 1999/07/20 22:43:53 julian Exp $ + * $Id: ide_pci.c,v 1.37 1999/07/21 02:28:35 peter Exp $ */ #include "wd.h" @@ -1835,7 +1835,7 @@ ide_pci_dmasetup(void *xcp, char *vaddr, u_long vcount, int dir) /* Generate first PRD entry, which may be non-aligned. */ - firstpage = DMA_PG_SZ - ((uintptr_t)vaddr & DMA_PG_SZ); + firstpage = DMA_PG_SZ - ((uintptr_t)vaddr & (DMA_PG_SZ - 1)); prd_base = vtophys(vaddr); prd_count = MIN(count, firstpage); |