diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-03-20 21:50:54 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-03-20 21:50:54 +0000 |
commit | a6782e2e3827f260d7a6ebc061218843605ef765 (patch) | |
tree | 2c0305c112077574481c91ab5419d169d6341a3b /sys/dev/usb/controller | |
parent | e14295c787e7990fac7af1c1f196f279396b88a7 (diff) | |
download | FreeBSD-src-a6782e2e3827f260d7a6ebc061218843605ef765.zip FreeBSD-src-a6782e2e3827f260d7a6ebc061218843605ef765.tar.gz |
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
Diffstat (limited to 'sys/dev/usb/controller')
-rw-r--r-- | sys/dev/usb/controller/at91dci.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/controller/atmegadci.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/controller/ehci.c | 13 | ||||
-rw-r--r-- | sys/dev/usb/controller/ohci.c | 13 | ||||
-rw-r--r-- | sys/dev/usb/controller/uhci.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/controller/uss820dci.c | 2 |
6 files changed, 20 insertions, 17 deletions
diff --git a/sys/dev/usb/controller/at91dci.c b/sys/dev/usb/controller/at91dci.c index 807f899..ae18c28 100644 --- a/sys/dev/usb/controller/at91dci.c +++ b/sys/dev/usb/controller/at91dci.c @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #define AT9100_DCI_BUS2SC(bus) \ ((struct at91dci_softc *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((struct at91dci_softc *)0)->sc_bus)))) + ((uint8_t *)&(((struct at91dci_softc *)0)->sc_bus)))) #define AT9100_DCI_PC2SC(pc) \ AT9100_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) diff --git a/sys/dev/usb/controller/atmegadci.c b/sys/dev/usb/controller/atmegadci.c index 425cfbc..55ab088 100644 --- a/sys/dev/usb/controller/atmegadci.c +++ b/sys/dev/usb/controller/atmegadci.c @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #define ATMEGA_BUS2SC(bus) \ ((struct atmegadci_softc *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((struct atmegadci_softc *)0)->sc_bus)))) + ((uint8_t *)&(((struct atmegadci_softc *)0)->sc_bus)))) #define ATMEGA_PC2SC(pc) \ ATMEGA_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c index 42f41ff..b82fcd5 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) { diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c index d453de8..9a25b3a 100644 --- a/sys/dev/usb/controller/ohci.c +++ b/sys/dev/usb/controller/ohci.c @@ -55,8 +55,9 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/usb_bus.h> #include <dev/usb/controller/ohci.h> -#define OHCI_BUS2SC(bus) ((ohci_softc_t *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((ohci_softc_t *)0)->sc_bus)))) +#define OHCI_BUS2SC(bus) \ + ((ohci_softc_t *)(((uint8_t *)(bus)) - \ + ((uint8_t *)&(((ohci_softc_t *)0)->sc_bus)))) #if USB_DEBUG static int ohcidebug = 0; @@ -1410,7 +1411,7 @@ ohci_setup_standard_chain(struct usb2_xfer *xfer, ohci_ed_t **ed_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; /* toggle the DMA set we are using */ @@ -2528,7 +2529,7 @@ ohci_xfer_setup(struct usb2_setup_params *parm) nitd = 0; ntd = ((2 * xfer->nframes) + 1 /* STATUS */ - + (xfer->max_data_length / xfer->max_usb2_frame_size)); + + (xfer->max_data_length / xfer->max_hc_frame_size)); nqh = 1; } else if (parm->methods == &ohci_device_bulk_methods) { @@ -2538,7 +2539,7 @@ ohci_xfer_setup(struct usb2_setup_params *parm) nitd = 0; ntd = ((2 * xfer->nframes) - + (xfer->max_data_length / xfer->max_usb2_frame_size)); + + (xfer->max_data_length / xfer->max_hc_frame_size)); nqh = 1; } else if (parm->methods == &ohci_device_intr_methods) { @@ -2548,7 +2549,7 @@ ohci_xfer_setup(struct usb2_setup_params *parm) nitd = 0; ntd = ((2 * xfer->nframes) - + (xfer->max_data_length / xfer->max_usb2_frame_size)); + + (xfer->max_data_length / xfer->max_hc_frame_size)); nqh = 1; } else if (parm->methods == &ohci_device_isoc_methods) { diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c index de4026d..fcf1a4a 100644 --- a/sys/dev/usb/controller/uhci.c +++ b/sys/dev/usb/controller/uhci.c @@ -59,8 +59,9 @@ __FBSDID("$FreeBSD$"); #include <dev/usb/controller/uhci.h> #define alt_next next -#define UHCI_BUS2SC(bus) ((uhci_softc_t *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((uhci_softc_t *)0)->sc_bus)))) +#define UHCI_BUS2SC(bus) \ + ((uhci_softc_t *)(((uint8_t *)(bus)) - \ + ((uint8_t *)&(((uhci_softc_t *)0)->sc_bus)))) #if USB_DEBUG static int uhcidebug = 0; diff --git a/sys/dev/usb/controller/uss820dci.c b/sys/dev/usb/controller/uss820dci.c index a5144ca..8d8e0e4 100644 --- a/sys/dev/usb/controller/uss820dci.c +++ b/sys/dev/usb/controller/uss820dci.c @@ -55,7 +55,7 @@ #define USS820_DCI_BUS2SC(bus) \ ((struct uss820dci_softc *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((struct uss820dci_softc *)0)->sc_bus)))) + ((uint8_t *)&(((struct uss820dci_softc *)0)->sc_bus)))) #define USS820_DCI_PC2SC(pc) \ USS820_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) |