Diff for /src/sys/bus/usb/ehci.c between versions 1.3 and 1.4

version 1.3, 2004/01/08 18:12:59 version 1.4, 2004/02/11 15:17:26
Line 66 Line 66
 #if defined(__NetBSD__) || defined(__OpenBSD__)  #if defined(__NetBSD__) || defined(__OpenBSD__)
 #include <sys/device.h>  #include <sys/device.h>
 #include <sys/select.h>  #include <sys/select.h>
#elif defined(__FreeBSD__)#elif defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/endian.h>  #include <sys/endian.h>
 #include <sys/module.h>  #include <sys/module.h>
 #include <sys/bus.h>  #include <sys/bus.h>
 #include <machine/bus_pio.h>  #include <machine/bus_pio.h>
 #include <machine/bus_memio.h>  #include <machine/bus_memio.h>
 #include <sys/lock.h>  #include <sys/lock.h>
#if defined(DIAGNOSTIC) && defined(__i386__) && defined(__FreeBSD__)#if defined(DIAGNOSTIC) && defined(__i386__)
 #include <machine/cpu.h>  #include <machine/cpu.h>
 #endif  #endif
 #endif  #endif
Line 93 Line 93
 #include <bus/usb/ehcireg.h>  #include <bus/usb/ehcireg.h>
 #include <bus/usb/ehcivar.h>  #include <bus/usb/ehcivar.h>
   
#if defined(__FreeBSD__)#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <machine/clock.h>  #include <machine/clock.h>
   
 #define delay(d)                DELAY(d)  #define delay(d)                DELAY(d)
Line 2140  ehci_alloc_sqtd_chain(struct ehci_pipe * Line 2140  ehci_alloc_sqtd_chain(struct ehci_pipe *
                     EHCI_QTD_NBUFFERS * EHCI_PAGE_SIZE) {                      EHCI_QTD_NBUFFERS * EHCI_PAGE_SIZE) {
                         /* we can handle it in this QTD */                          /* we can handle it in this QTD */
                         curlen = len;                          curlen = len;
#elif defined(__FreeBSD__)#elif defined(__FreeBSD__) || defined(__DragonFly__)
                 /* XXX This is pretty broken: Because we do not allocate                  /* XXX This is pretty broken: Because we do not allocate
                  * a contiguous buffer (contiguous in physical pages) we                   * a contiguous buffer (contiguous in physical pages) we
                  * can only transfer one page in one go.                   * can only transfer one page in one go.
Line 2166  ehci_alloc_sqtd_chain(struct ehci_pipe * Line 2166  ehci_alloc_sqtd_chain(struct ehci_pipe *
                                 curlen = len;                                  curlen = len;
                         }                          }
 #endif  #endif
#elif defined(__FreeBSD__)#elif defined(__FreeBSD__) || defined(__DragonFly__)
                         /* See comment above (XXX) */                          /* See comment above (XXX) */
                         curlen = EHCI_PAGE_SIZE -                          curlen = EHCI_PAGE_SIZE -
                                  EHCI_PAGE_MASK(dataphys);                                   EHCI_PAGE_MASK(dataphys);

Removed from v.1.3  
changed lines
  Added in v.1.4