Module Name: src Committed By: skrll Date: Sun Feb 1 08:39:43 UTC 2015
Modified Files: src/sys/dev/usb [nick-nhusb]: ehcireg.h Log Message: Define and use EHCI_PAGE_MASK To generate a diff of this commit: cvs rdiff -u -r1.34.14.2 -r1.34.14.3 src/sys/dev/usb/ehcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/ehcireg.h diff -u src/sys/dev/usb/ehcireg.h:1.34.14.2 src/sys/dev/usb/ehcireg.h:1.34.14.3 --- src/sys/dev/usb/ehcireg.h:1.34.14.2 Sun Nov 30 13:46:00 2014 +++ src/sys/dev/usb/ehcireg.h Sun Feb 1 08:39:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ehcireg.h,v 1.34.14.2 2014/11/30 13:46:00 skrll Exp $ */ +/* $NetBSD: ehcireg.h,v 1.34.14.3 2015/02/01 08:39:43 skrll Exp $ */ /* * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. @@ -189,8 +189,9 @@ /* No data structure may cross a page boundary. */ #define EHCI_PAGE_SIZE 0x1000 -#define EHCI_PAGE(x) ((x) &~ 0xfff) -#define EHCI_PAGE_OFFSET(x) ((x) & 0xfff) +#define EHCI_PAGE_MASK (EHCI_PAGE_SIZE - 1) +#define EHCI_PAGE(x) ((x) & ~EHCI_PAGE_MASK) +#define EHCI_PAGE_OFFSET(x) ((x) & EHCI_PAGE_MASK) typedef uint32_t ehci_link_t; #define EHCI_LINK_TERMINATE 0x00000001