aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller/ehci.c
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2009-03-20 21:50:54 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2009-03-20 21:50:54 +0000
commit578d0eff90183f6bb6a9c529ca7ef67f01a17662 (patch)
tree2c0305c112077574481c91ab5419d169d6341a3b /sys/dev/usb/controller/ehci.c
parentbdc081c60ff09707a85971b94c9177d16cc72033 (diff)
downloadsrc-578d0eff90183f6bb6a9c529ca7ef67f01a17662.tar.gz
src-578d0eff90183f6bb6a9c529ca7ef67f01a17662.zip
MFp4 //depot/projects/usb @159431,159437,159438
- start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky
Notes
Notes: svn path=/head/; revision=190181
Diffstat (limited to 'sys/dev/usb/controller/ehci.c')
-rw-r--r--sys/dev/usb/controller/ehci.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index 42f41ff37e46..b82fcd5d163a 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -66,8 +66,9 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_bus.h>
#include <dev/usb/controller/ehci.h>
-#define EHCI_BUS2SC(bus) ((ehci_softc_t *)(((uint8_t *)(bus)) - \
- USB_P2U(&(((ehci_softc_t *)0)->sc_bus))))
+#define EHCI_BUS2SC(bus) \
+ ((ehci_softc_t *)(((uint8_t *)(bus)) - \
+ ((uint8_t *)&(((ehci_softc_t *)0)->sc_bus))))
#if USB_DEBUG
static int ehcidebug = 0;
@@ -1729,7 +1730,7 @@ ehci_setup_standard_chain(struct usb2_xfer *xfer, ehci_qh_t **qh_last)
xfer->address, UE_GET_ADDR(xfer->endpoint),
xfer->sumlen, usb2_get_speed(xfer->xroot->udev));
- temp.average = xfer->max_usb2_frame_size;
+ temp.average = xfer->max_hc_frame_size;
temp.max_frame_size = xfer->max_frame_size;
temp.sc = EHCI_BUS2SC(xfer->xroot->bus);
@@ -3563,7 +3564,7 @@ ehci_xfer_setup(struct usb2_setup_params *parm)
nqh = 1;
nqtd = ((2 * xfer->nframes) + 1 /* STATUS */
- + (xfer->max_data_length / xfer->max_usb2_frame_size));
+ + (xfer->max_data_length / xfer->max_hc_frame_size));
} else if (parm->methods == &ehci_device_bulk_methods) {
@@ -3576,7 +3577,7 @@ ehci_xfer_setup(struct usb2_setup_params *parm)
nqh = 1;
nqtd = ((2 * xfer->nframes)
- + (xfer->max_data_length / xfer->max_usb2_frame_size));
+ + (xfer->max_data_length / xfer->max_hc_frame_size));
} else if (parm->methods == &ehci_device_intr_methods) {
@@ -3598,7 +3599,7 @@ ehci_xfer_setup(struct usb2_setup_params *parm)
nqh = 1;
nqtd = ((2 * xfer->nframes)
- + (xfer->max_data_length / xfer->max_usb2_frame_size));
+ + (xfer->max_data_length / xfer->max_hc_frame_size));
} else if (parm->methods == &ehci_device_isoc_fs_methods) {