summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-05-28 17:36:36 +0000
committerthompsa <thompsa@FreeBSD.org>2009-05-28 17:36:36 +0000
commitaf6fb4f3d2a2950c2a2c95bc3148ee16510149de (patch)
tree3036722a60a7a9ddd5122172e56736f3e128664b /sys/dev/usb/controller
parentd691011026fb63bdede5854aaa7547c7c019cd38 (diff)
downloadFreeBSD-src-af6fb4f3d2a2950c2a2c95bc3148ee16510149de.zip
FreeBSD-src-af6fb4f3d2a2950c2a2c95bc3148ee16510149de.tar.gz
s/usb2_/usb_/ on all C structs for the USB stack.
Diffstat (limited to 'sys/dev/usb/controller')
-rw-r--r--sys/dev/usb/controller/at91dci.c130
-rw-r--r--sys/dev/usb/controller/at91dci.h16
-rw-r--r--sys/dev/usb/controller/atmegadci.c104
-rw-r--r--sys/dev/usb/controller/atmegadci.h18
-rw-r--r--sys/dev/usb/controller/atmegadci_atmelarm.c4
-rw-r--r--sys/dev/usb/controller/avr32dci.c106
-rw-r--r--sys/dev/usb/controller/avr32dci.h18
-rw-r--r--sys/dev/usb/controller/ehci.c170
-rw-r--r--sys/dev/usb/controller/ehci.h48
-rw-r--r--sys/dev/usb/controller/musb_otg.c136
-rw-r--r--sys/dev/usb/controller/musb_otg.h18
-rw-r--r--sys/dev/usb/controller/ohci.c148
-rw-r--r--sys/dev/usb/controller/ohci.h46
-rw-r--r--sys/dev/usb/controller/uhci.c158
-rw-r--r--sys/dev/usb/controller/uhci.h56
-rw-r--r--sys/dev/usb/controller/usb_controller.c54
-rw-r--r--sys/dev/usb/controller/uss820dci.c134
-rw-r--r--sys/dev/usb/controller/uss820dci.h16
18 files changed, 690 insertions, 690 deletions
diff --git a/sys/dev/usb/controller/at91dci.c b/sys/dev/usb/controller/at91dci.c
index 63a589a..e50d8f9 100644
--- a/sys/dev/usb/controller/at91dci.c
+++ b/sys/dev/usb/controller/at91dci.c
@@ -82,19 +82,19 @@ SYSCTL_INT(_hw_usb_at91dci, OID_AUTO, debug, CTLFLAG_RW,
/* prototypes */
-struct usb2_bus_methods at91dci_bus_methods;
-struct usb2_pipe_methods at91dci_device_bulk_methods;
-struct usb2_pipe_methods at91dci_device_ctrl_methods;
-struct usb2_pipe_methods at91dci_device_intr_methods;
-struct usb2_pipe_methods at91dci_device_isoc_fs_methods;
+struct usb_bus_methods at91dci_bus_methods;
+struct usb_pipe_methods at91dci_device_bulk_methods;
+struct usb_pipe_methods at91dci_device_ctrl_methods;
+struct usb_pipe_methods at91dci_device_intr_methods;
+struct usb_pipe_methods at91dci_device_isoc_fs_methods;
static at91dci_cmd_t at91dci_setup_rx;
static at91dci_cmd_t at91dci_data_rx;
static at91dci_cmd_t at91dci_data_tx;
static at91dci_cmd_t at91dci_data_tx_sync;
-static void at91dci_device_done(struct usb2_xfer *, usb2_error_t);
-static void at91dci_do_poll(struct usb2_bus *);
-static void at91dci_standard_done(struct usb2_xfer *);
+static void at91dci_device_done(struct usb_xfer *, usb2_error_t);
+static void at91dci_do_poll(struct usb_bus *);
+static void at91dci_standard_done(struct usb_xfer *);
static void at91dci_root_intr(struct at91dci_softc *sc);
/*
@@ -116,7 +116,7 @@ static void at91dci_root_intr(struct at91dci_softc *sc);
* Here is a list of what the chip supports.
* Probably it supports more than listed here!
*/
-static const struct usb2_hw_ep_profile
+static const struct usb_hw_ep_profile
at91dci_ep_profile[AT91_UDP_EP_MAX] = {
[0] = {
@@ -181,8 +181,8 @@ static const struct usb2_hw_ep_profile
};
static void
-at91dci_get_hw_ep_profile(struct usb2_device *udev,
- const struct usb2_hw_ep_profile **ppf, uint8_t ep_addr)
+at91dci_get_hw_ep_profile(struct usb_device *udev,
+ const struct usb_hw_ep_profile **ppf, uint8_t ep_addr)
{
if (ep_addr < AT91_UDP_EP_MAX) {
*ppf = (at91dci_ep_profile + ep_addr);
@@ -278,7 +278,7 @@ static uint8_t
at91dci_setup_rx(struct at91dci_td *td)
{
struct at91dci_softc *sc;
- struct usb2_device_request req;
+ struct usb_device_request req;
uint32_t csr;
uint32_t temp;
uint16_t count;
@@ -372,7 +372,7 @@ not_complete:
static uint8_t
at91dci_data_rx(struct at91dci_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint32_t csr;
uint32_t temp;
uint16_t count;
@@ -499,7 +499,7 @@ repeat:
static uint8_t
at91dci_data_tx(struct at91dci_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint32_t csr;
uint32_t temp;
uint16_t count;
@@ -643,7 +643,7 @@ not_complete:
}
static uint8_t
-at91dci_xfer_do_fifo(struct usb2_xfer *xfer)
+at91dci_xfer_do_fifo(struct usb_xfer *xfer)
{
struct at91dci_softc *sc;
struct at91dci_td *td;
@@ -706,7 +706,7 @@ done:
static void
at91dci_interrupt_poll(struct at91dci_softc *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -854,7 +854,7 @@ at91dci_setup_standard_chain_sub(struct at91dci_std_temp *temp)
}
static void
-at91dci_setup_standard_chain(struct usb2_xfer *xfer)
+at91dci_setup_standard_chain(struct usb_xfer *xfer)
{
struct at91dci_std_temp temp;
struct at91dci_softc *sc;
@@ -1015,7 +1015,7 @@ at91dci_setup_standard_chain(struct usb2_xfer *xfer)
static void
at91dci_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTF("xfer=%p\n", xfer);
@@ -1026,7 +1026,7 @@ at91dci_timeout(void *arg)
}
static void
-at91dci_start_standard_chain(struct usb2_xfer *xfer)
+at91dci_start_standard_chain(struct usb_xfer *xfer)
{
DPRINTFN(9, "\n");
@@ -1071,7 +1071,7 @@ at91dci_root_intr(struct at91dci_softc *sc)
}
static usb2_error_t
-at91dci_standard_done_sub(struct usb2_xfer *xfer)
+at91dci_standard_done_sub(struct usb_xfer *xfer)
{
struct at91dci_td *td;
uint32_t len;
@@ -1135,7 +1135,7 @@ at91dci_standard_done_sub(struct usb2_xfer *xfer)
}
static void
-at91dci_standard_done(struct usb2_xfer *xfer)
+at91dci_standard_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -1184,7 +1184,7 @@ done:
* same USB transfer!
*------------------------------------------------------------------------*/
static void
-at91dci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+at91dci_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
struct at91dci_softc *sc = AT9100_DCI_BUS2SC(xfer->xroot->bus);
uint8_t ep_no;
@@ -1207,8 +1207,8 @@ at91dci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
}
static void
-at91dci_set_stall(struct usb2_device *udev, struct usb2_xfer *xfer,
- struct usb2_pipe *pipe)
+at91dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
+ struct usb_pipe *pipe)
{
struct at91dci_softc *sc;
uint32_t csr_val;
@@ -1235,7 +1235,7 @@ static void
at91dci_clear_stall_sub(struct at91dci_softc *sc, uint8_t ep_no,
uint8_t ep_type, uint8_t ep_dir)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
uint32_t csr_val;
uint32_t temp;
uint8_t csr_reg;
@@ -1328,10 +1328,10 @@ at91dci_clear_stall_sub(struct at91dci_softc *sc, uint8_t ep_no,
}
static void
-at91dci_clear_stall(struct usb2_device *udev, struct usb2_pipe *pipe)
+at91dci_clear_stall(struct usb_device *udev, struct usb_pipe *pipe)
{
struct at91dci_softc *sc;
- struct usb2_endpoint_descriptor *ed;
+ struct usb_endpoint_descriptor *ed;
DPRINTFN(5, "pipe=%p\n", pipe);
@@ -1455,7 +1455,7 @@ at91dci_resume(struct at91dci_softc *sc)
}
static void
-at91dci_do_poll(struct usb2_bus *bus)
+at91dci_do_poll(struct usb_bus *bus)
{
struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus);
@@ -1468,32 +1468,32 @@ at91dci_do_poll(struct usb2_bus *bus)
* at91dci bulk support
*------------------------------------------------------------------------*/
static void
-at91dci_device_bulk_open(struct usb2_xfer *xfer)
+at91dci_device_bulk_open(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_device_bulk_close(struct usb2_xfer *xfer)
+at91dci_device_bulk_close(struct usb_xfer *xfer)
{
at91dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-at91dci_device_bulk_enter(struct usb2_xfer *xfer)
+at91dci_device_bulk_enter(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_device_bulk_start(struct usb2_xfer *xfer)
+at91dci_device_bulk_start(struct usb_xfer *xfer)
{
/* setup TDs */
at91dci_setup_standard_chain(xfer);
at91dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods at91dci_device_bulk_methods =
+struct usb_pipe_methods at91dci_device_bulk_methods =
{
.open = at91dci_device_bulk_open,
.close = at91dci_device_bulk_close,
@@ -1505,32 +1505,32 @@ struct usb2_pipe_methods at91dci_device_bulk_methods =
* at91dci control support
*------------------------------------------------------------------------*/
static void
-at91dci_device_ctrl_open(struct usb2_xfer *xfer)
+at91dci_device_ctrl_open(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_device_ctrl_close(struct usb2_xfer *xfer)
+at91dci_device_ctrl_close(struct usb_xfer *xfer)
{
at91dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-at91dci_device_ctrl_enter(struct usb2_xfer *xfer)
+at91dci_device_ctrl_enter(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_device_ctrl_start(struct usb2_xfer *xfer)
+at91dci_device_ctrl_start(struct usb_xfer *xfer)
{
/* setup TDs */
at91dci_setup_standard_chain(xfer);
at91dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods at91dci_device_ctrl_methods =
+struct usb_pipe_methods at91dci_device_ctrl_methods =
{
.open = at91dci_device_ctrl_open,
.close = at91dci_device_ctrl_close,
@@ -1542,32 +1542,32 @@ struct usb2_pipe_methods at91dci_device_ctrl_methods =
* at91dci interrupt support
*------------------------------------------------------------------------*/
static void
-at91dci_device_intr_open(struct usb2_xfer *xfer)
+at91dci_device_intr_open(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_device_intr_close(struct usb2_xfer *xfer)
+at91dci_device_intr_close(struct usb_xfer *xfer)
{
at91dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-at91dci_device_intr_enter(struct usb2_xfer *xfer)
+at91dci_device_intr_enter(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_device_intr_start(struct usb2_xfer *xfer)
+at91dci_device_intr_start(struct usb_xfer *xfer)
{
/* setup TDs */
at91dci_setup_standard_chain(xfer);
at91dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods at91dci_device_intr_methods =
+struct usb_pipe_methods at91dci_device_intr_methods =
{
.open = at91dci_device_intr_open,
.close = at91dci_device_intr_close,
@@ -1579,19 +1579,19 @@ struct usb2_pipe_methods at91dci_device_intr_methods =
* at91dci full speed isochronous support
*------------------------------------------------------------------------*/
static void
-at91dci_device_isoc_fs_open(struct usb2_xfer *xfer)
+at91dci_device_isoc_fs_open(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_device_isoc_fs_close(struct usb2_xfer *xfer)
+at91dci_device_isoc_fs_close(struct usb_xfer *xfer)
{
at91dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-at91dci_device_isoc_fs_enter(struct usb2_xfer *xfer)
+at91dci_device_isoc_fs_enter(struct usb_xfer *xfer)
{
struct at91dci_softc *sc = AT9100_DCI_BUS2SC(xfer->xroot->bus);
uint32_t temp;
@@ -1643,13 +1643,13 @@ at91dci_device_isoc_fs_enter(struct usb2_xfer *xfer)
}
static void
-at91dci_device_isoc_fs_start(struct usb2_xfer *xfer)
+at91dci_device_isoc_fs_start(struct usb_xfer *xfer)
{
/* start TD chain */
at91dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods at91dci_device_isoc_fs_methods =
+struct usb_pipe_methods at91dci_device_isoc_fs_methods =
{
.open = at91dci_device_isoc_fs_open,
.close = at91dci_device_isoc_fs_close,
@@ -1663,8 +1663,8 @@ struct usb2_pipe_methods at91dci_device_isoc_fs_methods =
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/
-static const struct usb2_device_descriptor at91dci_devd = {
- .bLength = sizeof(struct usb2_device_descriptor),
+static const struct usb_device_descriptor at91dci_devd = {
+ .bLength = sizeof(struct usb_device_descriptor),
.bDescriptorType = UDESC_DEVICE,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1677,8 +1677,8 @@ static const struct usb2_device_descriptor at91dci_devd = {
.bNumConfigurations = 1,
};
-static const struct usb2_device_qualifier at91dci_odevd = {
- .bLength = sizeof(struct usb2_device_qualifier),
+static const struct usb_device_qualifier at91dci_odevd = {
+ .bLength = sizeof(struct usb_device_qualifier),
.bDescriptorType = UDESC_DEVICE_QUALIFIER,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1690,7 +1690,7 @@ static const struct usb2_device_qualifier at91dci_odevd = {
static const struct at91dci_config_desc at91dci_confd = {
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(at91dci_confd),
.bNumInterface = 1,
@@ -1700,7 +1700,7 @@ static const struct at91dci_config_desc at91dci_confd = {
.bMaxPower = 0,
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -1708,7 +1708,7 @@ static const struct at91dci_config_desc at91dci_confd = {
.bInterfaceProtocol = UIPROTO_HSHUBSTT,
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = (UE_DIR_IN | AT9100_DCI_INTR_ENDPT),
.bmAttributes = UE_INTERRUPT,
@@ -1717,7 +1717,7 @@ static const struct at91dci_config_desc at91dci_confd = {
},
};
-static const struct usb2_hub_descriptor_min at91dci_hubd = {
+static const struct usb_hub_descriptor_min at91dci_hubd = {
.bDescLength = sizeof(at91dci_hubd),
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 1,
@@ -1746,8 +1746,8 @@ USB_MAKE_STRING_DESC(STRING_VENDOR, at91dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, at91dci_product);
static usb2_error_t
-at91dci_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+at91dci_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
struct at91dci_softc *sc = AT9100_DCI_BUS2SC(udev->bus);
const void *ptr;
@@ -2143,11 +2143,11 @@ done:
}
static void
-at91dci_xfer_setup(struct usb2_setup_params *parm)
+at91dci_xfer_setup(struct usb_setup_params *parm)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
struct at91dci_softc *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t ntd;
uint32_t n;
@@ -2252,14 +2252,14 @@ at91dci_xfer_setup(struct usb2_setup_params *parm)
}
static void
-at91dci_xfer_unsetup(struct usb2_xfer *xfer)
+at91dci_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-at91dci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+at91dci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
struct at91dci_softc *sc = AT9100_DCI_BUS2SC(udev->bus);
@@ -2298,7 +2298,7 @@ at91dci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *ede
}
}
-struct usb2_bus_methods at91dci_bus_methods =
+struct usb_bus_methods at91dci_bus_methods =
{
.pipe_init = &at91dci_pipe_init,
.xfer_setup = &at91dci_xfer_setup,
diff --git a/sys/dev/usb/controller/at91dci.h b/sys/dev/usb/controller/at91dci.h
index 87cbc87..2d9bdcc 100644
--- a/sys/dev/usb/controller/at91dci.h
+++ b/sys/dev/usb/controller/at91dci.h
@@ -141,7 +141,7 @@ struct at91dci_td {
bus_space_handle_t io_hdl;
struct at91dci_td *obj_next;
at91dci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
uint32_t offset;
uint32_t remainder;
uint16_t max_packet_size;
@@ -157,7 +157,7 @@ struct at91dci_td {
struct at91dci_std_temp {
at91dci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
struct at91dci_td *td;
struct at91dci_td *td_next;
uint32_t len;
@@ -173,14 +173,14 @@ struct at91dci_std_temp {
};
struct at91dci_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union at91dci_hub_temp {
uWord wValue;
- struct usb2_port_status ps;
+ struct usb_port_status ps;
};
struct at91dci_ep_flags {
@@ -202,10 +202,10 @@ struct at91dci_flags {
};
struct at91dci_softc {
- struct usb2_bus sc_bus;
+ struct usb_bus sc_bus;
union at91dci_hub_temp sc_hub_temp;
- struct usb2_device *sc_devices[AT91_MAX_DEVICES];
+ struct usb_device *sc_devices[AT91_MAX_DEVICES];
struct resource *sc_io_res;
struct resource *sc_irq_res;
void *sc_intr_hdl;
diff --git a/sys/dev/usb/controller/atmegadci.c b/sys/dev/usb/controller/atmegadci.c
index df1fe78..5cbd7ba 100644
--- a/sys/dev/usb/controller/atmegadci.c
+++ b/sys/dev/usb/controller/atmegadci.c
@@ -74,23 +74,23 @@ SYSCTL_INT(_hw_usb_atmegadci, OID_AUTO, debug, CTLFLAG_RW,
/* prototypes */
-struct usb2_bus_methods atmegadci_bus_methods;
-struct usb2_pipe_methods atmegadci_device_non_isoc_methods;
-struct usb2_pipe_methods atmegadci_device_isoc_fs_methods;
+struct usb_bus_methods atmegadci_bus_methods;
+struct usb_pipe_methods atmegadci_device_non_isoc_methods;
+struct usb_pipe_methods atmegadci_device_isoc_fs_methods;
static atmegadci_cmd_t atmegadci_setup_rx;
static atmegadci_cmd_t atmegadci_data_rx;
static atmegadci_cmd_t atmegadci_data_tx;
static atmegadci_cmd_t atmegadci_data_tx_sync;
-static void atmegadci_device_done(struct usb2_xfer *, usb2_error_t);
-static void atmegadci_do_poll(struct usb2_bus *);
-static void atmegadci_standard_done(struct usb2_xfer *);
+static void atmegadci_device_done(struct usb_xfer *, usb2_error_t);
+static void atmegadci_do_poll(struct usb_bus *);
+static void atmegadci_standard_done(struct usb_xfer *);
static void atmegadci_root_intr(struct atmegadci_softc *sc);
/*
* Here is a list of what the chip supports:
*/
-static const struct usb2_hw_ep_profile
+static const struct usb_hw_ep_profile
atmegadci_ep_profile[2] = {
[0] = {
@@ -112,8 +112,8 @@ static const struct usb2_hw_ep_profile
};
static void
-atmegadci_get_hw_ep_profile(struct usb2_device *udev,
- const struct usb2_hw_ep_profile **ppf, uint8_t ep_addr)
+atmegadci_get_hw_ep_profile(struct usb_device *udev,
+ const struct usb_hw_ep_profile **ppf, uint8_t ep_addr)
{
if (ep_addr == 0)
*ppf = atmegadci_ep_profile;
@@ -223,7 +223,7 @@ static uint8_t
atmegadci_setup_rx(struct atmegadci_td *td)
{
struct atmegadci_softc *sc;
- struct usb2_device_request req;
+ struct usb_device_request req;
uint16_t count;
uint8_t temp;
@@ -308,7 +308,7 @@ static uint8_t
atmegadci_data_rx(struct atmegadci_td *td)
{
struct atmegadci_softc *sc;
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint16_t count;
uint8_t temp;
uint8_t to;
@@ -422,7 +422,7 @@ static uint8_t
atmegadci_data_tx(struct atmegadci_td *td)
{
struct atmegadci_softc *sc;
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint16_t count;
uint8_t to;
uint8_t temp;
@@ -549,7 +549,7 @@ not_complete:
}
static uint8_t
-atmegadci_xfer_do_fifo(struct usb2_xfer *xfer)
+atmegadci_xfer_do_fifo(struct usb_xfer *xfer)
{
struct atmegadci_td *td;
@@ -594,7 +594,7 @@ done:
static void
atmegadci_interrupt_poll(struct atmegadci_softc *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -757,7 +757,7 @@ atmegadci_setup_standard_chain_sub(struct atmegadci_std_temp *temp)
}
static void
-atmegadci_setup_standard_chain(struct usb2_xfer *xfer)
+atmegadci_setup_standard_chain(struct usb_xfer *xfer)
{
struct atmegadci_std_temp temp;
struct atmegadci_softc *sc;
@@ -910,7 +910,7 @@ atmegadci_setup_standard_chain(struct usb2_xfer *xfer)
static void
atmegadci_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTF("xfer=%p\n", xfer);
@@ -921,7 +921,7 @@ atmegadci_timeout(void *arg)
}
static void
-atmegadci_start_standard_chain(struct usb2_xfer *xfer)
+atmegadci_start_standard_chain(struct usb_xfer *xfer)
{
DPRINTFN(9, "\n");
@@ -954,7 +954,7 @@ atmegadci_root_intr(struct atmegadci_softc *sc)
}
static usb2_error_t
-atmegadci_standard_done_sub(struct usb2_xfer *xfer)
+atmegadci_standard_done_sub(struct usb_xfer *xfer)
{
struct atmegadci_td *td;
uint32_t len;
@@ -1018,7 +1018,7 @@ atmegadci_standard_done_sub(struct usb2_xfer *xfer)
}
static void
-atmegadci_standard_done(struct usb2_xfer *xfer)
+atmegadci_standard_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -1067,7 +1067,7 @@ done:
* same USB transfer!
*------------------------------------------------------------------------*/
static void
-atmegadci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+atmegadci_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
struct atmegadci_softc *sc = ATMEGA_BUS2SC(xfer->xroot->bus);
uint8_t ep_no;
@@ -1093,8 +1093,8 @@ atmegadci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
}
static void
-atmegadci_set_stall(struct usb2_device *udev, struct usb2_xfer *xfer,
- struct usb2_pipe *pipe)
+atmegadci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
+ struct usb_pipe *pipe)
{
struct atmegadci_softc *sc;
uint8_t ep_no;
@@ -1178,10 +1178,10 @@ atmegadci_clear_stall_sub(struct atmegadci_softc *sc, uint8_t ep_no,
}
static void
-atmegadci_clear_stall(struct usb2_device *udev, struct usb2_pipe *pipe)
+atmegadci_clear_stall(struct usb_device *udev, struct usb_pipe *pipe)
{
struct atmegadci_softc *sc;
- struct usb2_endpoint_descriptor *ed;
+ struct usb_endpoint_descriptor *ed;
DPRINTFN(5, "pipe=%p\n", pipe);
@@ -1344,7 +1344,7 @@ atmegadci_resume(struct atmegadci_softc *sc)
}
static void
-atmegadci_do_poll(struct usb2_bus *bus)
+atmegadci_do_poll(struct usb_bus *bus)
{
struct atmegadci_softc *sc = ATMEGA_BUS2SC(bus);
@@ -1359,32 +1359,32 @@ atmegadci_do_poll(struct usb2_bus *bus)
* at91dci interrupt support
*------------------------------------------------------------------------*/
static void
-atmegadci_device_non_isoc_open(struct usb2_xfer *xfer)
+atmegadci_device_non_isoc_open(struct usb_xfer *xfer)
{
return;
}
static void
-atmegadci_device_non_isoc_close(struct usb2_xfer *xfer)
+atmegadci_device_non_isoc_close(struct usb_xfer *xfer)
{
atmegadci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-atmegadci_device_non_isoc_enter(struct usb2_xfer *xfer)
+atmegadci_device_non_isoc_enter(struct usb_xfer *xfer)
{
return;
}
static void
-atmegadci_device_non_isoc_start(struct usb2_xfer *xfer)
+atmegadci_device_non_isoc_start(struct usb_xfer *xfer)
{
/* setup TDs */
atmegadci_setup_standard_chain(xfer);
atmegadci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods atmegadci_device_non_isoc_methods =
+struct usb_pipe_methods atmegadci_device_non_isoc_methods =
{
.open = atmegadci_device_non_isoc_open,
.close = atmegadci_device_non_isoc_close,
@@ -1396,19 +1396,19 @@ struct usb2_pipe_methods atmegadci_device_non_isoc_methods =
* at91dci full speed isochronous support
*------------------------------------------------------------------------*/
static void
-atmegadci_device_isoc_fs_open(struct usb2_xfer *xfer)
+atmegadci_device_isoc_fs_open(struct usb_xfer *xfer)
{
return;
}
static void
-atmegadci_device_isoc_fs_close(struct usb2_xfer *xfer)
+atmegadci_device_isoc_fs_close(struct usb_xfer *xfer)
{
atmegadci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-atmegadci_device_isoc_fs_enter(struct usb2_xfer *xfer)
+atmegadci_device_isoc_fs_enter(struct usb_xfer *xfer)
{
struct atmegadci_softc *sc = ATMEGA_BUS2SC(xfer->xroot->bus);
uint32_t temp;
@@ -1464,13 +1464,13 @@ atmegadci_device_isoc_fs_enter(struct usb2_xfer *xfer)
}
static void
-atmegadci_device_isoc_fs_start(struct usb2_xfer *xfer)
+atmegadci_device_isoc_fs_start(struct usb_xfer *xfer)
{
/* start TD chain */
atmegadci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods atmegadci_device_isoc_fs_methods =
+struct usb_pipe_methods atmegadci_device_isoc_fs_methods =
{
.open = atmegadci_device_isoc_fs_open,
.close = atmegadci_device_isoc_fs_close,
@@ -1484,8 +1484,8 @@ struct usb2_pipe_methods atmegadci_device_isoc_fs_methods =
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/
-static const struct usb2_device_descriptor atmegadci_devd = {
- .bLength = sizeof(struct usb2_device_descriptor),
+static const struct usb_device_descriptor atmegadci_devd = {
+ .bLength = sizeof(struct usb_device_descriptor),
.bDescriptorType = UDESC_DEVICE,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1498,8 +1498,8 @@ static const struct usb2_device_descriptor atmegadci_devd = {
.bNumConfigurations = 1,
};
-static const struct usb2_device_qualifier atmegadci_odevd = {
- .bLength = sizeof(struct usb2_device_qualifier),
+static const struct usb_device_qualifier atmegadci_odevd = {
+ .bLength = sizeof(struct usb_device_qualifier),
.bDescriptorType = UDESC_DEVICE_QUALIFIER,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1511,7 +1511,7 @@ static const struct usb2_device_qualifier atmegadci_odevd = {
static const struct atmegadci_config_desc atmegadci_confd = {
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(atmegadci_confd),
.bNumInterface = 1,
@@ -1521,7 +1521,7 @@ static const struct atmegadci_config_desc atmegadci_confd = {
.bMaxPower = 0,
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -1529,7 +1529,7 @@ static const struct atmegadci_config_desc atmegadci_confd = {
.bInterfaceProtocol = UIPROTO_HSHUBSTT,
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = (UE_DIR_IN | ATMEGA_INTR_ENDPT),
.bmAttributes = UE_INTERRUPT,
@@ -1538,7 +1538,7 @@ static const struct atmegadci_config_desc atmegadci_confd = {
},
};
-static const struct usb2_hub_descriptor_min atmegadci_hubd = {
+static const struct usb_hub_descriptor_min atmegadci_hubd = {
.bDescLength = sizeof(atmegadci_hubd),
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 1,
@@ -1567,8 +1567,8 @@ USB_MAKE_STRING_DESC(STRING_VENDOR, atmegadci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, atmegadci_product);
static usb2_error_t
-atmegadci_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+atmegadci_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
struct atmegadci_softc *sc = ATMEGA_BUS2SC(udev->bus);
const void *ptr;
@@ -1995,11 +1995,11 @@ done:
}
static void
-atmegadci_xfer_setup(struct usb2_setup_params *parm)
+atmegadci_xfer_setup(struct usb_setup_params *parm)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
struct atmegadci_softc *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t ntd;
uint32_t n;
@@ -2082,14 +2082,14 @@ atmegadci_xfer_setup(struct usb2_setup_params *parm)
}
static void
-atmegadci_xfer_unsetup(struct usb2_xfer *xfer)
+atmegadci_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-atmegadci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+atmegadci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
struct atmegadci_softc *sc = ATMEGA_BUS2SC(udev->bus);
@@ -2115,7 +2115,7 @@ atmegadci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *e
}
}
-struct usb2_bus_methods atmegadci_bus_methods =
+struct usb_bus_methods atmegadci_bus_methods =
{
.pipe_init = &atmegadci_pipe_init,
.xfer_setup = &atmegadci_xfer_setup,
diff --git a/sys/dev/usb/controller/atmegadci.h b/sys/dev/usb/controller/atmegadci.h
index 8f5a538..2e9e9f6 100644
--- a/sys/dev/usb/controller/atmegadci.h
+++ b/sys/dev/usb/controller/atmegadci.h
@@ -191,12 +191,12 @@
struct atmegadci_td;
typedef uint8_t (atmegadci_cmd_t)(struct atmegadci_td *td);
-typedef void (atmegadci_clocks_t)(struct usb2_bus *);
+typedef void (atmegadci_clocks_t)(struct usb_bus *);
struct atmegadci_td {
struct atmegadci_td *obj_next;
atmegadci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
uint32_t offset;
uint32_t remainder;
uint16_t max_packet_size;
@@ -210,7 +210,7 @@ struct atmegadci_td {
struct atmegadci_std_temp {
atmegadci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
struct atmegadci_td *td;
struct atmegadci_td *td_next;
uint32_t len;
@@ -226,14 +226,14 @@ struct atmegadci_std_temp {
};
struct atmegadci_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union atmegadci_hub_temp {
uWord wValue;
- struct usb2_port_status ps;
+ struct usb_port_status ps;
};
struct atmegadci_flags {
@@ -251,14 +251,14 @@ struct atmegadci_flags {
};
struct atmegadci_softc {
- struct usb2_bus sc_bus;
+ struct usb_bus sc_bus;
union atmegadci_hub_temp sc_hub_temp;
/* must be set by by the bus interface layer */
atmegadci_clocks_t *sc_clocks_on;
atmegadci_clocks_t *sc_clocks_off;
- struct usb2_device *sc_devices[ATMEGA_MAX_DEVICES];
+ struct usb_device *sc_devices[ATMEGA_MAX_DEVICES];
struct resource *sc_irq_res;
void *sc_intr_hdl;
struct resource *sc_io_res;
diff --git a/sys/dev/usb/controller/atmegadci_atmelarm.c b/sys/dev/usb/controller/atmegadci_atmelarm.c
index df305ac..6412851 100644
--- a/sys/dev/usb/controller/atmegadci_atmelarm.c
+++ b/sys/dev/usb/controller/atmegadci_atmelarm.c
@@ -49,13 +49,13 @@ struct atmegadci_super_softc {
};
static void
-atmegadci_clocks_on(struct usb2_bus *bus)
+atmegadci_clocks_on(struct usb_bus *bus)
{
/* TODO */
}
static void
-atmegadci_clocks_off(struct usb2_bus *bus)
+atmegadci_clocks_off(struct usb_bus *bus)
{
/* TODO */
}
diff --git a/sys/dev/usb/controller/avr32dci.c b/sys/dev/usb/controller/avr32dci.c
index 1836589..d54ff6f 100644
--- a/sys/dev/usb/controller/avr32dci.c
+++ b/sys/dev/usb/controller/avr32dci.c
@@ -74,23 +74,23 @@ SYSCTL_INT(_hw_usb_avr32dci, OID_AUTO, debug, CTLFLAG_RW,
/* prototypes */
-struct usb2_bus_methods avr32dci_bus_methods;
-struct usb2_pipe_methods avr32dci_device_non_isoc_methods;
-struct usb2_pipe_methods avr32dci_device_isoc_fs_methods;
+struct usb_bus_methods avr32dci_bus_methods;
+struct usb_pipe_methods avr32dci_device_non_isoc_methods;
+struct usb_pipe_methods avr32dci_device_isoc_fs_methods;
static avr32dci_cmd_t avr32dci_setup_rx;
static avr32dci_cmd_t avr32dci_data_rx;
static avr32dci_cmd_t avr32dci_data_tx;
static avr32dci_cmd_t avr32dci_data_tx_sync;
-static void avr32dci_device_done(struct usb2_xfer *, usb2_error_t);
-static void avr32dci_do_poll(struct usb2_bus *);
-static void avr32dci_standard_done(struct usb2_xfer *);
+static void avr32dci_device_done(struct usb_xfer *, usb2_error_t);
+static void avr32dci_do_poll(struct usb_bus *);
+static void avr32dci_standard_done(struct usb_xfer *);
static void avr32dci_root_intr(struct avr32dci_softc *sc);
/*
* Here is a list of what the chip supports:
*/
-static const struct usb2_hw_ep_profile
+static const struct usb_hw_ep_profile
avr32dci_ep_profile[4] = {
[0] = {
@@ -134,8 +134,8 @@ static const struct usb2_hw_ep_profile
};
static void
-avr32dci_get_hw_ep_profile(struct usb2_device *udev,
- const struct usb2_hw_ep_profile **ppf, uint8_t ep_addr)
+avr32dci_get_hw_ep_profile(struct usb_device *udev,
+ const struct usb_hw_ep_profile **ppf, uint8_t ep_addr)
{
if (ep_addr == 0)
*ppf = avr32dci_ep_profile;
@@ -254,7 +254,7 @@ static uint8_t
avr32dci_setup_rx(struct avr32dci_td *td)
{
struct avr32dci_softc *sc;
- struct usb2_device_request req;
+ struct usb_device_request req;
uint16_t count;
uint32_t temp;
@@ -329,7 +329,7 @@ static uint8_t
avr32dci_data_rx(struct avr32dci_td *td)
{
struct avr32dci_softc *sc;
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint16_t count;
uint32_t temp;
uint8_t to;
@@ -429,7 +429,7 @@ static uint8_t
avr32dci_data_tx(struct avr32dci_td *td)
{
struct avr32dci_softc *sc;
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint16_t count;
uint8_t to;
uint32_t temp;
@@ -538,7 +538,7 @@ not_complete:
}
static uint8_t
-avr32dci_xfer_do_fifo(struct usb2_xfer *xfer)
+avr32dci_xfer_do_fifo(struct usb_xfer *xfer)
{
struct avr32dci_td *td;
@@ -583,7 +583,7 @@ done:
static void
avr32dci_interrupt_poll(struct avr32dci_softc *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -727,7 +727,7 @@ avr32dci_setup_standard_chain_sub(struct avr32dci_std_temp *temp)
}
static void
-avr32dci_setup_standard_chain(struct usb2_xfer *xfer)
+avr32dci_setup_standard_chain(struct usb_xfer *xfer)
{
struct avr32dci_std_temp temp;
struct avr32dci_softc *sc;
@@ -878,7 +878,7 @@ avr32dci_setup_standard_chain(struct usb2_xfer *xfer)
static void
avr32dci_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTF("xfer=%p\n", xfer);
@@ -889,7 +889,7 @@ avr32dci_timeout(void *arg)
}
static void
-avr32dci_start_standard_chain(struct usb2_xfer *xfer)
+avr32dci_start_standard_chain(struct usb_xfer *xfer)
{
DPRINTFN(9, "\n");
@@ -925,7 +925,7 @@ avr32dci_root_intr(struct avr32dci_softc *sc)
}
static usb2_error_t
-avr32dci_standard_done_sub(struct usb2_xfer *xfer)
+avr32dci_standard_done_sub(struct usb_xfer *xfer)
{
struct avr32dci_td *td;
uint32_t len;
@@ -989,7 +989,7 @@ avr32dci_standard_done_sub(struct usb2_xfer *xfer)
}
static void
-avr32dci_standard_done(struct usb2_xfer *xfer)
+avr32dci_standard_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -1038,7 +1038,7 @@ done:
* same USB transfer!
*------------------------------------------------------------------------*/
static void
-avr32dci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+avr32dci_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
struct avr32dci_softc *sc = AVR32_BUS2SC(xfer->xroot->bus);
uint8_t ep_no;
@@ -1061,8 +1061,8 @@ avr32dci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
}
static void
-avr32dci_set_stall(struct usb2_device *udev, struct usb2_xfer *xfer,
- struct usb2_pipe *pipe)
+avr32dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
+ struct usb_pipe *pipe)
{
struct avr32dci_softc *sc;
uint8_t ep_no;
@@ -1086,7 +1086,7 @@ static void
avr32dci_clear_stall_sub(struct avr32dci_softc *sc, uint8_t ep_no,
uint8_t ep_type, uint8_t ep_dir)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
uint32_t temp;
uint32_t epsize;
uint8_t n;
@@ -1148,10 +1148,10 @@ avr32dci_clear_stall_sub(struct avr32dci_softc *sc, uint8_t ep_no,
}
static void
-avr32dci_clear_stall(struct usb2_device *udev, struct usb2_pipe *pipe)
+avr32dci_clear_stall(struct usb_device *udev, struct usb_pipe *pipe)
{
struct avr32dci_softc *sc;
- struct usb2_endpoint_descriptor *ed;
+ struct usb_endpoint_descriptor *ed;
DPRINTFN(5, "pipe=%p\n", pipe);
@@ -1279,7 +1279,7 @@ avr32dci_resume(struct avr32dci_softc *sc)
}
static void
-avr32dci_do_poll(struct usb2_bus *bus)
+avr32dci_do_poll(struct usb_bus *bus)
{
struct avr32dci_softc *sc = AVR32_BUS2SC(bus);
@@ -1294,32 +1294,32 @@ avr32dci_do_poll(struct usb2_bus *bus)
* at91dci interrupt support
*------------------------------------------------------------------------*/
static void
-avr32dci_device_non_isoc_open(struct usb2_xfer *xfer)
+avr32dci_device_non_isoc_open(struct usb_xfer *xfer)
{
return;
}
static void
-avr32dci_device_non_isoc_close(struct usb2_xfer *xfer)
+avr32dci_device_non_isoc_close(struct usb_xfer *xfer)
{
avr32dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-avr32dci_device_non_isoc_enter(struct usb2_xfer *xfer)
+avr32dci_device_non_isoc_enter(struct usb_xfer *xfer)
{
return;
}
static void
-avr32dci_device_non_isoc_start(struct usb2_xfer *xfer)
+avr32dci_device_non_isoc_start(struct usb_xfer *xfer)
{
/* setup TDs */
avr32dci_setup_standard_chain(xfer);
avr32dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods avr32dci_device_non_isoc_methods =
+struct usb_pipe_methods avr32dci_device_non_isoc_methods =
{
.open = avr32dci_device_non_isoc_open,
.close = avr32dci_device_non_isoc_close,
@@ -1331,19 +1331,19 @@ struct usb2_pipe_methods avr32dci_device_non_isoc_methods =
* at91dci full speed isochronous support
*------------------------------------------------------------------------*/
static void
-avr32dci_device_isoc_fs_open(struct usb2_xfer *xfer)
+avr32dci_device_isoc_fs_open(struct usb_xfer *xfer)
{
return;
}
static void
-avr32dci_device_isoc_fs_close(struct usb2_xfer *xfer)
+avr32dci_device_isoc_fs_close(struct usb_xfer *xfer)
{
avr32dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-avr32dci_device_isoc_fs_enter(struct usb2_xfer *xfer)
+avr32dci_device_isoc_fs_enter(struct usb_xfer *xfer)
{
struct avr32dci_softc *sc = AVR32_BUS2SC(xfer->xroot->bus);
uint32_t temp;
@@ -1398,13 +1398,13 @@ avr32dci_device_isoc_fs_enter(struct usb2_xfer *xfer)
}
static void
-avr32dci_device_isoc_fs_start(struct usb2_xfer *xfer)
+avr32dci_device_isoc_fs_start(struct usb_xfer *xfer)
{
/* start TD chain */
avr32dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods avr32dci_device_isoc_fs_methods =
+struct usb_pipe_methods avr32dci_device_isoc_fs_methods =
{
.open = avr32dci_device_isoc_fs_open,
.close = avr32dci_device_isoc_fs_close,
@@ -1418,8 +1418,8 @@ struct usb2_pipe_methods avr32dci_device_isoc_fs_methods =
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/
-static const struct usb2_device_descriptor avr32dci_devd = {
- .bLength = sizeof(struct usb2_device_descriptor),
+static const struct usb_device_descriptor avr32dci_devd = {
+ .bLength = sizeof(struct usb_device_descriptor),
.bDescriptorType = UDESC_DEVICE,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1432,8 +1432,8 @@ static const struct usb2_device_descriptor avr32dci_devd = {
.bNumConfigurations = 1,
};
-static const struct usb2_device_qualifier avr32dci_odevd = {
- .bLength = sizeof(struct usb2_device_qualifier),
+static const struct usb_device_qualifier avr32dci_odevd = {
+ .bLength = sizeof(struct usb_device_qualifier),
.bDescriptorType = UDESC_DEVICE_QUALIFIER,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1445,7 +1445,7 @@ static const struct usb2_device_qualifier avr32dci_odevd = {
static const struct avr32dci_config_desc avr32dci_confd = {
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(avr32dci_confd),
.bNumInterface = 1,
@@ -1455,7 +1455,7 @@ static const struct avr32dci_config_desc avr32dci_confd = {
.bMaxPower = 0,
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -1463,7 +1463,7 @@ static const struct avr32dci_config_desc avr32dci_confd = {
.bInterfaceProtocol = UIPROTO_HSHUBSTT,
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = (UE_DIR_IN | AVR32_INTR_ENDPT),
.bmAttributes = UE_INTERRUPT,
@@ -1472,7 +1472,7 @@ static const struct avr32dci_config_desc avr32dci_confd = {
},
};
-static const struct usb2_hub_descriptor_min avr32dci_hubd = {
+static const struct usb_hub_descriptor_min avr32dci_hubd = {
.bDescLength = sizeof(avr32dci_hubd),
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 1,
@@ -1501,8 +1501,8 @@ USB_MAKE_STRING_DESC(STRING_VENDOR, avr32dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, avr32dci_product);
static usb2_error_t
-avr32dci_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+avr32dci_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
struct avr32dci_softc *sc = AVR32_BUS2SC(udev->bus);
const void *ptr;
@@ -1928,11 +1928,11 @@ done:
}
static void
-avr32dci_xfer_setup(struct usb2_setup_params *parm)
+avr32dci_xfer_setup(struct usb_setup_params *parm)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
struct avr32dci_softc *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t ntd;
uint32_t n;
@@ -2019,14 +2019,14 @@ avr32dci_xfer_setup(struct usb2_setup_params *parm)
}
static void
-avr32dci_xfer_unsetup(struct usb2_xfer *xfer)
+avr32dci_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-avr32dci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+avr32dci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
struct avr32dci_softc *sc = AVR32_BUS2SC(udev->bus);
@@ -2053,7 +2053,7 @@ avr32dci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *ed
}
}
-struct usb2_bus_methods avr32dci_bus_methods =
+struct usb_bus_methods avr32dci_bus_methods =
{
.pipe_init = &avr32dci_pipe_init,
.xfer_setup = &avr32dci_xfer_setup,
diff --git a/sys/dev/usb/controller/avr32dci.h b/sys/dev/usb/controller/avr32dci.h
index 6a9895f..5e2daf5 100644
--- a/sys/dev/usb/controller/avr32dci.h
+++ b/sys/dev/usb/controller/avr32dci.h
@@ -157,12 +157,12 @@
struct avr32dci_td;
typedef uint8_t (avr32dci_cmd_t)(struct avr32dci_td *td);
-typedef void (avr32dci_clocks_t)(struct usb2_bus *);
+typedef void (avr32dci_clocks_t)(struct usb_bus *);
struct avr32dci_td {
struct avr32dci_td *obj_next;
avr32dci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
uint32_t offset;
uint32_t remainder;
uint16_t max_packet_size;
@@ -176,7 +176,7 @@ struct avr32dci_td {
struct avr32dci_std_temp {
avr32dci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
struct avr32dci_td *td;
struct avr32dci_td *td_next;
uint32_t len;
@@ -193,14 +193,14 @@ struct avr32dci_std_temp {
};
struct avr32dci_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union avr32dci_hub_temp {
uWord wValue;
- struct usb2_port_status ps;
+ struct usb_port_status ps;
};
struct avr32dci_flags {
@@ -218,14 +218,14 @@ struct avr32dci_flags {
};
struct avr32dci_softc {
- struct usb2_bus sc_bus;
+ struct usb_bus sc_bus;
union avr32dci_hub_temp sc_hub_temp;
/* must be set by by the bus interface layer */
avr32dci_clocks_t *sc_clocks_on;
avr32dci_clocks_t *sc_clocks_off;
- struct usb2_device *sc_devices[AVR32_MAX_DEVICES];
+ struct usb_device *sc_devices[AVR32_MAX_DEVICES];
struct resource *sc_irq_res;
void *sc_intr_hdl;
struct resource *sc_io_res;
diff --git a/sys/dev/usb/controller/ehci.c b/sys/dev/usb/controller/ehci.c
index c3b7ba4..69889e7 100644
--- a/sys/dev/usb/controller/ehci.c
+++ b/sys/dev/usb/controller/ehci.c
@@ -86,22 +86,22 @@ static void ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *sqh);
#define EHCI_INTR_ENDPT 1
-extern struct usb2_bus_methods ehci_bus_methods;
-extern struct usb2_pipe_methods ehci_device_bulk_methods;
-extern struct usb2_pipe_methods ehci_device_ctrl_methods;
-extern struct usb2_pipe_methods ehci_device_intr_methods;
-extern struct usb2_pipe_methods ehci_device_isoc_fs_methods;
-extern struct usb2_pipe_methods ehci_device_isoc_hs_methods;
-
-static void ehci_do_poll(struct usb2_bus *bus);
-static void ehci_device_done(struct usb2_xfer *xfer, usb2_error_t error);
-static uint8_t ehci_check_transfer(struct usb2_xfer *xfer);
+extern struct usb_bus_methods ehci_bus_methods;
+extern struct usb_pipe_methods ehci_device_bulk_methods;
+extern struct usb_pipe_methods ehci_device_ctrl_methods;
+extern struct usb_pipe_methods ehci_device_intr_methods;
+extern struct usb_pipe_methods ehci_device_isoc_fs_methods;
+extern struct usb_pipe_methods ehci_device_isoc_hs_methods;
+
+static void ehci_do_poll(struct usb_bus *bus);
+static void ehci_device_done(struct usb_xfer *xfer, usb2_error_t error);
+static uint8_t ehci_check_transfer(struct usb_xfer *xfer);
static void ehci_timeout(void *arg);
static void ehci_root_intr(ehci_softc_t *sc);
struct ehci_std_temp {
ehci_softc_t *sc;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
ehci_qtd_t *td;
ehci_qtd_t *td_next;
uint32_t average;
@@ -115,7 +115,7 @@ struct ehci_std_temp {
};
void
-ehci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb)
+ehci_iterate_hw_softc(struct usb_bus *bus, usb2_bus_mem_sub_cb_t *cb)
{
ehci_softc_t *sc = EHCI_BUS2SC(bus);
uint32_t i;
@@ -208,7 +208,7 @@ ehci_hcreset(ehci_softc_t *sc)
usb2_error_t
ehci_init(ehci_softc_t *sc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint32_t version;
uint32_t sparams;
uint32_t cparams;
@@ -570,7 +570,7 @@ ehci_suspend(ehci_softc_t *sc)
void
ehci_resume(ehci_softc_t *sc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint32_t cmd;
uint32_t hcr;
uint8_t i;
@@ -952,7 +952,7 @@ ehci_dump_isoc(ehci_softc_t *sc)
#endif
static void
-ehci_transfer_intr_enqueue(struct usb2_xfer *xfer)
+ehci_transfer_intr_enqueue(struct usb_xfer *xfer)
{
/* check for early completion */
if (ehci_check_transfer(xfer)) {
@@ -1121,7 +1121,7 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_t *last)
}
static usb2_error_t
-ehci_non_isoc_done_sub(struct usb2_xfer *xfer)
+ehci_non_isoc_done_sub(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
ehci_qtd_t *td;
@@ -1214,7 +1214,7 @@ ehci_non_isoc_done_sub(struct usb2_xfer *xfer)
}
static void
-ehci_non_isoc_done(struct usb2_xfer *xfer)
+ehci_non_isoc_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -1272,9 +1272,9 @@ done:
* Else: USB transfer is finished
*------------------------------------------------------------------------*/
static uint8_t
-ehci_check_transfer(struct usb2_xfer *xfer)
+ehci_check_transfer(struct usb_xfer *xfer)
{
- struct usb2_pipe_methods *methods = xfer->pipe->methods;
+ struct usb_pipe_methods *methods = xfer->pipe->methods;
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
uint32_t status;
@@ -1408,7 +1408,7 @@ ehci_pcd_enable(ehci_softc_t *sc)
static void
ehci_interrupt_poll(ehci_softc_t *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -1499,7 +1499,7 @@ done:
static void
ehci_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTF("xfer=%p\n", xfer);
@@ -1510,7 +1510,7 @@ ehci_timeout(void *arg)
}
static void
-ehci_do_poll(struct usb2_bus *bus)
+ehci_do_poll(struct usb_bus *bus)
{
ehci_softc_t *sc = EHCI_BUS2SC(bus);
@@ -1522,7 +1522,7 @@ ehci_do_poll(struct usb2_bus *bus)
static void
ehci_setup_standard_chain_sub(struct ehci_std_temp *temp)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
ehci_qtd_t *td;
ehci_qtd_t *td_next;
ehci_qtd_t *td_alt_next;
@@ -1705,10 +1705,10 @@ restart:
}
static void
-ehci_setup_standard_chain(struct usb2_xfer *xfer, ehci_qh_t **qh_last)
+ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_qh_t **qh_last)
{
struct ehci_std_temp temp;
- struct usb2_pipe_methods *methods;
+ struct usb_pipe_methods *methods;
ehci_qh_t *qh;
ehci_qtd_t *td;
uint32_t qh_endp;
@@ -1990,7 +1990,7 @@ ehci_root_intr(ehci_softc_t *sc)
}
static void
-ehci_isoc_fs_done(ehci_softc_t *sc, struct usb2_xfer *xfer)
+ehci_isoc_fs_done(ehci_softc_t *sc, struct usb_xfer *xfer)
{
uint32_t nframes = xfer->nframes;
uint32_t status;
@@ -2043,7 +2043,7 @@ ehci_isoc_fs_done(ehci_softc_t *sc, struct usb2_xfer *xfer)
}
static void
-ehci_isoc_hs_done(ehci_softc_t *sc, struct usb2_xfer *xfer)
+ehci_isoc_hs_done(ehci_softc_t *sc, struct usb_xfer *xfer)
{
uint32_t nframes = xfer->nframes;
uint32_t status;
@@ -2111,9 +2111,9 @@ ehci_isoc_hs_done(ehci_softc_t *sc, struct usb2_xfer *xfer)
* from close and from interrupt
*/
static void
-ehci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+ehci_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
- struct usb2_pipe_methods *methods = xfer->pipe->methods;
+ struct usb_pipe_methods *methods = xfer->pipe->methods;
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
@@ -2162,25 +2162,25 @@ ehci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
* ehci bulk support
*------------------------------------------------------------------------*/
static void
-ehci_device_bulk_open(struct usb2_xfer *xfer)
+ehci_device_bulk_open(struct usb_xfer *xfer)
{
return;
}
static void
-ehci_device_bulk_close(struct usb2_xfer *xfer)
+ehci_device_bulk_close(struct usb_xfer *xfer)
{
ehci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-ehci_device_bulk_enter(struct usb2_xfer *xfer)
+ehci_device_bulk_enter(struct usb_xfer *xfer)
{
return;
}
static void
-ehci_device_bulk_start(struct usb2_xfer *xfer)
+ehci_device_bulk_start(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
uint32_t temp;
@@ -2200,7 +2200,7 @@ ehci_device_bulk_start(struct usb2_xfer *xfer)
EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD);
}
-struct usb2_pipe_methods ehci_device_bulk_methods =
+struct usb_pipe_methods ehci_device_bulk_methods =
{
.open = ehci_device_bulk_open,
.close = ehci_device_bulk_close,
@@ -2212,25 +2212,25 @@ struct usb2_pipe_methods ehci_device_bulk_methods =
* ehci control support
*------------------------------------------------------------------------*/
static void
-ehci_device_ctrl_open(struct usb2_xfer *xfer)
+ehci_device_ctrl_open(struct usb_xfer *xfer)
{
return;
}
static void
-ehci_device_ctrl_close(struct usb2_xfer *xfer)
+ehci_device_ctrl_close(struct usb_xfer *xfer)
{
ehci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-ehci_device_ctrl_enter(struct usb2_xfer *xfer)
+ehci_device_ctrl_enter(struct usb_xfer *xfer)
{
return;
}
static void
-ehci_device_ctrl_start(struct usb2_xfer *xfer)
+ehci_device_ctrl_start(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
@@ -2241,7 +2241,7 @@ ehci_device_ctrl_start(struct usb2_xfer *xfer)
ehci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ehci_device_ctrl_methods =
+struct usb_pipe_methods ehci_device_ctrl_methods =
{
.open = ehci_device_ctrl_open,
.close = ehci_device_ctrl_close,
@@ -2253,7 +2253,7 @@ struct usb2_pipe_methods ehci_device_ctrl_methods =
* ehci interrupt support
*------------------------------------------------------------------------*/
static void
-ehci_device_intr_open(struct usb2_xfer *xfer)
+ehci_device_intr_open(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
uint16_t best;
@@ -2306,7 +2306,7 @@ ehci_device_intr_open(struct usb2_xfer *xfer)
}
static void
-ehci_device_intr_close(struct usb2_xfer *xfer)
+ehci_device_intr_close(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
uint8_t slot;
@@ -2320,13 +2320,13 @@ ehci_device_intr_close(struct usb2_xfer *xfer)
}
static void
-ehci_device_intr_enter(struct usb2_xfer *xfer)
+ehci_device_intr_enter(struct usb_xfer *xfer)
{
return;
}
static void
-ehci_device_intr_start(struct usb2_xfer *xfer)
+ehci_device_intr_start(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
@@ -2337,7 +2337,7 @@ ehci_device_intr_start(struct usb2_xfer *xfer)
ehci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ehci_device_intr_methods =
+struct usb_pipe_methods ehci_device_intr_methods =
{
.open = ehci_device_intr_open,
.close = ehci_device_intr_close,
@@ -2349,7 +2349,7 @@ struct usb2_pipe_methods ehci_device_intr_methods =
* ehci full speed isochronous support
*------------------------------------------------------------------------*/
static void
-ehci_device_isoc_fs_open(struct usb2_xfer *xfer)
+ehci_device_isoc_fs_open(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
ehci_sitd_t *td;
@@ -2390,19 +2390,19 @@ ehci_device_isoc_fs_open(struct usb2_xfer *xfer)
}
static void
-ehci_device_isoc_fs_close(struct usb2_xfer *xfer)
+ehci_device_isoc_fs_close(struct usb_xfer *xfer)
{
ehci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-ehci_device_isoc_fs_enter(struct usb2_xfer *xfer)
+ehci_device_isoc_fs_enter(struct usb_xfer *xfer)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
- struct usb2_fs_isoc_schedule *fss_start;
- struct usb2_fs_isoc_schedule *fss_end;
- struct usb2_fs_isoc_schedule *fss;
+ struct usb_fs_isoc_schedule *fss_start;
+ struct usb_fs_isoc_schedule *fss_end;
+ struct usb_fs_isoc_schedule *fss;
ehci_sitd_t *td;
ehci_sitd_t *td_last = NULL;
ehci_sitd_t **pp_last;
@@ -2614,13 +2614,13 @@ ehci_device_isoc_fs_enter(struct usb2_xfer *xfer)
}
static void
-ehci_device_isoc_fs_start(struct usb2_xfer *xfer)
+ehci_device_isoc_fs_start(struct usb_xfer *xfer)
{
/* put transfer on interrupt queue */
ehci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ehci_device_isoc_fs_methods =
+struct usb_pipe_methods ehci_device_isoc_fs_methods =
{
.open = ehci_device_isoc_fs_open,
.close = ehci_device_isoc_fs_close,
@@ -2632,7 +2632,7 @@ struct usb2_pipe_methods ehci_device_isoc_fs_methods =
* ehci high speed isochronous support
*------------------------------------------------------------------------*/
static void
-ehci_device_isoc_hs_open(struct usb2_xfer *xfer)
+ehci_device_isoc_hs_open(struct usb_xfer *xfer)
{
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
ehci_itd_t *td;
@@ -2679,15 +2679,15 @@ ehci_device_isoc_hs_open(struct usb2_xfer *xfer)
}
static void
-ehci_device_isoc_hs_close(struct usb2_xfer *xfer)
+ehci_device_isoc_hs_close(struct usb_xfer *xfer)
{
ehci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-ehci_device_isoc_hs_enter(struct usb2_xfer *xfer)
+ehci_device_isoc_hs_enter(struct usb_xfer *xfer)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
ehci_itd_t *td;
ehci_itd_t *td_last = NULL;
@@ -2880,13 +2880,13 @@ ehci_device_isoc_hs_enter(struct usb2_xfer *xfer)
}
static void
-ehci_device_isoc_hs_start(struct usb2_xfer *xfer)
+ehci_device_isoc_hs_start(struct usb_xfer *xfer)
{
/* put transfer on interrupt queue */
ehci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ehci_device_isoc_hs_methods =
+struct usb_pipe_methods ehci_device_isoc_hs_methods =
{
.open = ehci_device_isoc_hs_open,
.close = ehci_device_isoc_hs_close,
@@ -2901,9 +2901,9 @@ struct usb2_pipe_methods ehci_device_isoc_hs_methods =
*------------------------------------------------------------------------*/
static const
-struct usb2_device_descriptor ehci_devd =
+struct usb_device_descriptor ehci_devd =
{
- sizeof(struct usb2_device_descriptor),
+ sizeof(struct usb_device_descriptor),
UDESC_DEVICE, /* type */
{0x00, 0x02}, /* USB version */
UDCLASS_HUB, /* class */
@@ -2916,9 +2916,9 @@ struct usb2_device_descriptor ehci_devd =
};
static const
-struct usb2_device_qualifier ehci_odevd =
+struct usb_device_qualifier ehci_odevd =
{
- sizeof(struct usb2_device_qualifier),
+ sizeof(struct usb_device_qualifier),
UDESC_DEVICE_QUALIFIER, /* type */
{0x00, 0x02}, /* USB version */
UDCLASS_HUB, /* class */
@@ -2931,7 +2931,7 @@ struct usb2_device_qualifier ehci_odevd =
static const struct ehci_config_desc ehci_confd = {
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(ehci_confd),
.bNumInterface = 1,
@@ -2941,7 +2941,7 @@ static const struct ehci_config_desc ehci_confd = {
.bMaxPower = 0 /* max power */
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -2950,7 +2950,7 @@ static const struct ehci_config_desc ehci_confd = {
0
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | EHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
@@ -2960,7 +2960,7 @@ static const struct ehci_config_desc ehci_confd = {
};
static const
-struct usb2_hub_descriptor ehci_hubd =
+struct usb_hub_descriptor ehci_hubd =
{
0, /* dynamic length */
UDESC_HUB,
@@ -2985,8 +2985,8 @@ ehci_disown(ehci_softc_t *sc, uint16_t index, uint8_t lowspeed)
}
static usb2_error_t
-ehci_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+ehci_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
ehci_softc_t *sc = EHCI_BUS2SC(udev->bus);
const char *str_ptr;
@@ -3378,12 +3378,12 @@ done:
}
static void
-ehci_xfer_setup(struct usb2_setup_params *parm)
+ehci_xfer_setup(struct usb_setup_params *parm)
{
- struct usb2_page_search page_info;
- struct usb2_page_cache *pc;
+ struct usb_page_search page_info;
+ struct usb_page_cache *pc;
ehci_softc_t *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t nqtd;
uint32_t nqh;
@@ -3629,14 +3629,14 @@ alloc_dma_set:
}
static void
-ehci_xfer_unsetup(struct usb2_xfer *xfer)
+ehci_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-ehci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+ehci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
ehci_softc_t *sc = EHCI_BUS2SC(udev->bus);
@@ -3688,7 +3688,7 @@ done:
}
static void
-ehci_get_dma_delay(struct usb2_bus *bus, uint32_t *pus)
+ehci_get_dma_delay(struct usb_bus *bus, uint32_t *pus)
{
/*
* Wait until the hardware has finished any possible use of
@@ -3698,11 +3698,11 @@ ehci_get_dma_delay(struct usb2_bus *bus, uint32_t *pus)
}
static void
-ehci_device_resume(struct usb2_device *udev)
+ehci_device_resume(struct usb_device *udev)
{
ehci_softc_t *sc = EHCI_BUS2SC(udev->bus);
- struct usb2_xfer *xfer;
- struct usb2_pipe_methods *methods;
+ struct usb_xfer *xfer;
+ struct usb_pipe_methods *methods;
DPRINTF("\n");
@@ -3732,11 +3732,11 @@ ehci_device_resume(struct usb2_device *udev)
}
static void
-ehci_device_suspend(struct usb2_device *udev)
+ehci_device_suspend(struct usb_device *udev)
{
ehci_softc_t *sc = EHCI_BUS2SC(udev->bus);
- struct usb2_xfer *xfer;
- struct usb2_pipe_methods *methods;
+ struct usb_xfer *xfer;
+ struct usb_pipe_methods *methods;
DPRINTF("\n");
@@ -3766,7 +3766,7 @@ ehci_device_suspend(struct usb2_device *udev)
}
static void
-ehci_set_hw_power(struct usb2_bus *bus)
+ehci_set_hw_power(struct usb_bus *bus)
{
ehci_softc_t *sc = EHCI_BUS2SC(bus);
uint32_t temp;
@@ -3799,7 +3799,7 @@ ehci_set_hw_power(struct usb2_bus *bus)
return;
}
-struct usb2_bus_methods ehci_bus_methods =
+struct usb_bus_methods ehci_bus_methods =
{
.pipe_init = ehci_pipe_init,
.xfer_setup = ehci_xfer_setup,
diff --git a/sys/dev/usb/controller/ehci.h b/sys/dev/usb/controller/ehci.h
index b8c59ef..f23be4e 100644
--- a/sys/dev/usb/controller/ehci.h
+++ b/sys/dev/usb/controller/ehci.h
@@ -253,7 +253,7 @@ struct ehci_itd {
struct ehci_itd *next;
struct ehci_itd *prev;
struct ehci_itd *obj_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
} __aligned(EHCI_ITD_ALIGN);
typedef struct ehci_itd ehci_itd_t;
@@ -301,7 +301,7 @@ struct ehci_sitd {
struct ehci_sitd *next;
struct ehci_sitd *prev;
struct ehci_sitd *obj_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
} __aligned(EHCI_SITD_ALIGN);
typedef struct ehci_sitd ehci_sitd_t;
@@ -347,7 +347,7 @@ struct ehci_qtd {
*/
struct ehci_qtd *alt_next;
struct ehci_qtd *obj_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
uint32_t qtd_self;
uint16_t len;
} __aligned(EHCI_QTD_ALIGN);
@@ -409,7 +409,7 @@ struct ehci_qh {
struct ehci_qh *next;
struct ehci_qh *prev;
struct ehci_qh *obj_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
uint32_t qh_self;
} __aligned(EHCI_QH_ALIGN);
@@ -424,39 +424,39 @@ struct ehci_fstn {
typedef struct ehci_fstn ehci_fstn_t;
struct ehci_hw_softc {
- struct usb2_page_cache pframes_pc;
- struct usb2_page_cache async_start_pc;
- struct usb2_page_cache intr_start_pc[EHCI_VIRTUAL_FRAMELIST_COUNT];
- struct usb2_page_cache isoc_hs_start_pc[EHCI_VIRTUAL_FRAMELIST_COUNT];
- struct usb2_page_cache isoc_fs_start_pc[EHCI_VIRTUAL_FRAMELIST_COUNT];
-
- struct usb2_page pframes_pg;
- struct usb2_page async_start_pg;
- struct usb2_page intr_start_pg[EHCI_VIRTUAL_FRAMELIST_COUNT];
- struct usb2_page isoc_hs_start_pg[EHCI_VIRTUAL_FRAMELIST_COUNT];
- struct usb2_page isoc_fs_start_pg[EHCI_VIRTUAL_FRAMELIST_COUNT];
+ struct usb_page_cache pframes_pc;
+ struct usb_page_cache async_start_pc;
+ struct usb_page_cache intr_start_pc[EHCI_VIRTUAL_FRAMELIST_COUNT];
+ struct usb_page_cache isoc_hs_start_pc[EHCI_VIRTUAL_FRAMELIST_COUNT];
+ struct usb_page_cache isoc_fs_start_pc[EHCI_VIRTUAL_FRAMELIST_COUNT];
+
+ struct usb_page pframes_pg;
+ struct usb_page async_start_pg;
+ struct usb_page intr_start_pg[EHCI_VIRTUAL_FRAMELIST_COUNT];
+ struct usb_page isoc_hs_start_pg[EHCI_VIRTUAL_FRAMELIST_COUNT];
+ struct usb_page isoc_fs_start_pg[EHCI_VIRTUAL_FRAMELIST_COUNT];
};
struct ehci_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union ehci_hub_desc {
- struct usb2_status stat;
- struct usb2_port_status ps;
- struct usb2_hub_descriptor hubd;
+ struct usb_status stat;
+ struct usb_port_status ps;
+ struct usb_hub_descriptor hubd;
uint8_t temp[128];
};
typedef struct ehci_softc {
struct ehci_hw_softc sc_hw;
- struct usb2_bus sc_bus; /* base device */
- struct usb2_callout sc_tmo_pcd;
+ struct usb_bus sc_bus; /* base device */
+ struct usb_callout sc_tmo_pcd;
union ehci_hub_desc sc_hub_desc;
- struct usb2_device *sc_devices[EHCI_MAX_DEVICES];
+ struct usb_device *sc_devices[EHCI_MAX_DEVICES];
struct resource *sc_io_res;
struct resource *sc_irq_res;
struct ehci_qh *sc_async_p_last;
diff --git a/sys/dev/usb/controller/musb_otg.c b/sys/dev/usb/controller/musb_otg.c
index 6b867d5..9001e69 100644
--- a/sys/dev/usb/controller/musb_otg.c
+++ b/sys/dev/usb/controller/musb_otg.c
@@ -74,11 +74,11 @@ SYSCTL_INT(_hw_usb_musbotg, OID_AUTO, debug, CTLFLAG_RW,
/* prototypes */
-struct usb2_bus_methods musbotg_bus_methods;
-struct usb2_pipe_methods musbotg_device_bulk_methods;
-struct usb2_pipe_methods musbotg_device_ctrl_methods;
-struct usb2_pipe_methods musbotg_device_intr_methods;
-struct usb2_pipe_methods musbotg_device_isoc_methods;
+struct usb_bus_methods musbotg_bus_methods;
+struct usb_pipe_methods musbotg_device_bulk_methods;
+struct usb_pipe_methods musbotg_device_ctrl_methods;
+struct usb_pipe_methods musbotg_device_intr_methods;
+struct usb_pipe_methods musbotg_device_isoc_methods;
static musbotg_cmd_t musbotg_setup_rx;
static musbotg_cmd_t musbotg_setup_data_rx;
@@ -86,16 +86,16 @@ static musbotg_cmd_t musbotg_setup_data_tx;
static musbotg_cmd_t musbotg_setup_status;
static musbotg_cmd_t musbotg_data_rx;
static musbotg_cmd_t musbotg_data_tx;
-static void musbotg_device_done(struct usb2_xfer *, usb2_error_t);
-static void musbotg_do_poll(struct usb2_bus *);
-static void musbotg_standard_done(struct usb2_xfer *);
+static void musbotg_device_done(struct usb_xfer *, usb2_error_t);
+static void musbotg_do_poll(struct usb_bus *);
+static void musbotg_standard_done(struct usb_xfer *);
static void musbotg_interrupt_poll(struct musbotg_softc *);
static void musbotg_root_intr(struct musbotg_softc *);
/*
* Here is a configuration that the chip supports.
*/
-static const struct usb2_hw_ep_profile musbotg_ep_profile[1] = {
+static const struct usb_hw_ep_profile musbotg_ep_profile[1] = {
[0] = {
.max_in_frame_size = 64,/* fixed */
@@ -106,8 +106,8 @@ static const struct usb2_hw_ep_profile musbotg_ep_profile[1] = {
};
static void
-musbotg_get_hw_ep_profile(struct usb2_device *udev,
- const struct usb2_hw_ep_profile **ppf, uint8_t ep_addr)
+musbotg_get_hw_ep_profile(struct usb_device *udev,
+ const struct usb_hw_ep_profile **ppf, uint8_t ep_addr)
{
struct musbotg_softc *sc;
@@ -228,7 +228,7 @@ static uint8_t
musbotg_setup_rx(struct musbotg_td *td)
{
struct musbotg_softc *sc;
- struct usb2_device_request req;
+ struct usb_device_request req;
uint16_t count;
uint8_t csr;
@@ -337,7 +337,7 @@ not_complete:
static uint8_t
musbotg_setup_data_rx(struct musbotg_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
struct musbotg_softc *sc;
uint16_t count;
uint8_t csr;
@@ -480,7 +480,7 @@ musbotg_setup_data_rx(struct musbotg_td *td)
static uint8_t
musbotg_setup_data_tx(struct musbotg_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
struct musbotg_softc *sc;
uint16_t count;
uint8_t csr;
@@ -632,7 +632,7 @@ musbotg_setup_status(struct musbotg_td *td)
static uint8_t
musbotg_data_rx(struct musbotg_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
struct musbotg_softc *sc;
uint16_t count;
uint8_t csr;
@@ -771,7 +771,7 @@ repeat:
static uint8_t
musbotg_data_tx(struct musbotg_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
struct musbotg_softc *sc;
uint16_t count;
uint8_t csr;
@@ -887,7 +887,7 @@ repeat:
}
static uint8_t
-musbotg_xfer_do_fifo(struct usb2_xfer *xfer)
+musbotg_xfer_do_fifo(struct usb_xfer *xfer)
{
struct musbotg_softc *sc;
struct musbotg_td *td;
@@ -936,7 +936,7 @@ done:
static void
musbotg_interrupt_poll(struct musbotg_softc *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -1105,7 +1105,7 @@ musbotg_setup_standard_chain_sub(struct musbotg_std_temp *temp)
}
static void
-musbotg_setup_standard_chain(struct usb2_xfer *xfer)
+musbotg_setup_standard_chain(struct usb_xfer *xfer)
{
struct musbotg_std_temp temp;
struct musbotg_softc *sc;
@@ -1234,7 +1234,7 @@ musbotg_setup_standard_chain(struct usb2_xfer *xfer)
static void
musbotg_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTFN(1, "xfer=%p\n", xfer);
@@ -1245,7 +1245,7 @@ musbotg_timeout(void *arg)
}
static void
-musbotg_ep_int_set(struct usb2_xfer *xfer, uint8_t on)
+musbotg_ep_int_set(struct usb_xfer *xfer, uint8_t on)
{
struct musbotg_softc *sc = MUSBOTG_BUS2SC(xfer->xroot->bus);
uint16_t temp;
@@ -1285,7 +1285,7 @@ musbotg_ep_int_set(struct usb2_xfer *xfer, uint8_t on)
}
static void
-musbotg_start_standard_chain(struct usb2_xfer *xfer)
+musbotg_start_standard_chain(struct usb_xfer *xfer)
{
DPRINTFN(8, "\n");
@@ -1322,7 +1322,7 @@ musbotg_root_intr(struct musbotg_softc *sc)
}
static usb2_error_t
-musbotg_standard_done_sub(struct usb2_xfer *xfer)
+musbotg_standard_done_sub(struct usb_xfer *xfer)
{
struct musbotg_td *td;
uint32_t len;
@@ -1386,7 +1386,7 @@ musbotg_standard_done_sub(struct usb2_xfer *xfer)
}
static void
-musbotg_standard_done(struct usb2_xfer *xfer)
+musbotg_standard_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -1435,7 +1435,7 @@ done:
* same USB transfer!
*------------------------------------------------------------------------*/
static void
-musbotg_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+musbotg_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
@@ -1453,8 +1453,8 @@ musbotg_device_done(struct usb2_xfer *xfer, usb2_error_t error)
}
static void
-musbotg_set_stall(struct usb2_device *udev, struct usb2_xfer *xfer,
- struct usb2_pipe *pipe)
+musbotg_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
+ struct usb_pipe *pipe)
{
struct musbotg_softc *sc;
uint8_t ep_no;
@@ -1636,10 +1636,10 @@ musbotg_clear_stall_sub(struct musbotg_softc *sc, uint16_t wMaxPacket,
}
static void
-musbotg_clear_stall(struct usb2_device *udev, struct usb2_pipe *pipe)
+musbotg_clear_stall(struct usb_device *udev, struct usb_pipe *pipe)
{
struct musbotg_softc *sc;
- struct usb2_endpoint_descriptor *ed;
+ struct usb_endpoint_descriptor *ed;
DPRINTFN(4, "pipe=%p\n", pipe);
@@ -1667,7 +1667,7 @@ musbotg_clear_stall(struct usb2_device *udev, struct usb2_pipe *pipe)
usb2_error_t
musbotg_init(struct musbotg_softc *sc)
{
- struct usb2_hw_ep_profile *pf;
+ struct usb_hw_ep_profile *pf;
uint8_t nrx;
uint8_t ntx;
uint8_t temp;
@@ -1855,7 +1855,7 @@ musbotg_resume(struct musbotg_softc *sc)
}
static void
-musbotg_do_poll(struct usb2_bus *bus)
+musbotg_do_poll(struct usb_bus *bus)
{
struct musbotg_softc *sc = MUSBOTG_BUS2SC(bus);
@@ -1868,32 +1868,32 @@ musbotg_do_poll(struct usb2_bus *bus)
* musbotg bulk support
*------------------------------------------------------------------------*/
static void
-musbotg_device_bulk_open(struct usb2_xfer *xfer)
+musbotg_device_bulk_open(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_device_bulk_close(struct usb2_xfer *xfer)
+musbotg_device_bulk_close(struct usb_xfer *xfer)
{
musbotg_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-musbotg_device_bulk_enter(struct usb2_xfer *xfer)
+musbotg_device_bulk_enter(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_device_bulk_start(struct usb2_xfer *xfer)
+musbotg_device_bulk_start(struct usb_xfer *xfer)
{
/* setup TDs */
musbotg_setup_standard_chain(xfer);
musbotg_start_standard_chain(xfer);
}
-struct usb2_pipe_methods musbotg_device_bulk_methods =
+struct usb_pipe_methods musbotg_device_bulk_methods =
{
.open = musbotg_device_bulk_open,
.close = musbotg_device_bulk_close,
@@ -1905,32 +1905,32 @@ struct usb2_pipe_methods musbotg_device_bulk_methods =
* musbotg control support
*------------------------------------------------------------------------*/
static void
-musbotg_device_ctrl_open(struct usb2_xfer *xfer)
+musbotg_device_ctrl_open(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_device_ctrl_close(struct usb2_xfer *xfer)
+musbotg_device_ctrl_close(struct usb_xfer *xfer)
{
musbotg_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-musbotg_device_ctrl_enter(struct usb2_xfer *xfer)
+musbotg_device_ctrl_enter(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_device_ctrl_start(struct usb2_xfer *xfer)
+musbotg_device_ctrl_start(struct usb_xfer *xfer)
{
/* setup TDs */
musbotg_setup_standard_chain(xfer);
musbotg_start_standard_chain(xfer);
}
-struct usb2_pipe_methods musbotg_device_ctrl_methods =
+struct usb_pipe_methods musbotg_device_ctrl_methods =
{
.open = musbotg_device_ctrl_open,
.close = musbotg_device_ctrl_close,
@@ -1942,32 +1942,32 @@ struct usb2_pipe_methods musbotg_device_ctrl_methods =
* musbotg interrupt support
*------------------------------------------------------------------------*/
static void
-musbotg_device_intr_open(struct usb2_xfer *xfer)
+musbotg_device_intr_open(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_device_intr_close(struct usb2_xfer *xfer)
+musbotg_device_intr_close(struct usb_xfer *xfer)
{
musbotg_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-musbotg_device_intr_enter(struct usb2_xfer *xfer)
+musbotg_device_intr_enter(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_device_intr_start(struct usb2_xfer *xfer)
+musbotg_device_intr_start(struct usb_xfer *xfer)
{
/* setup TDs */
musbotg_setup_standard_chain(xfer);
musbotg_start_standard_chain(xfer);
}
-struct usb2_pipe_methods musbotg_device_intr_methods =
+struct usb_pipe_methods musbotg_device_intr_methods =
{
.open = musbotg_device_intr_open,
.close = musbotg_device_intr_close,
@@ -1979,19 +1979,19 @@ struct usb2_pipe_methods musbotg_device_intr_methods =
* musbotg full speed isochronous support
*------------------------------------------------------------------------*/
static void
-musbotg_device_isoc_open(struct usb2_xfer *xfer)
+musbotg_device_isoc_open(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_device_isoc_close(struct usb2_xfer *xfer)
+musbotg_device_isoc_close(struct usb_xfer *xfer)
{
musbotg_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-musbotg_device_isoc_enter(struct usb2_xfer *xfer)
+musbotg_device_isoc_enter(struct usb_xfer *xfer)
{
struct musbotg_softc *sc = MUSBOTG_BUS2SC(xfer->xroot->bus);
uint32_t temp;
@@ -2050,13 +2050,13 @@ musbotg_device_isoc_enter(struct usb2_xfer *xfer)
}
static void
-musbotg_device_isoc_start(struct usb2_xfer *xfer)
+musbotg_device_isoc_start(struct usb_xfer *xfer)
{
/* start TD chain */
musbotg_start_standard_chain(xfer);
}
-struct usb2_pipe_methods musbotg_device_isoc_methods =
+struct usb_pipe_methods musbotg_device_isoc_methods =
{
.open = musbotg_device_isoc_open,
.close = musbotg_device_isoc_close,
@@ -2070,8 +2070,8 @@ struct usb2_pipe_methods musbotg_device_isoc_methods =
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/
-static const struct usb2_device_descriptor musbotg_devd = {
- .bLength = sizeof(struct usb2_device_descriptor),
+static const struct usb_device_descriptor musbotg_devd = {
+ .bLength = sizeof(struct usb_device_descriptor),
.bDescriptorType = UDESC_DEVICE,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -2084,8 +2084,8 @@ static const struct usb2_device_descriptor musbotg_devd = {
.bNumConfigurations = 1,
};
-static const struct usb2_device_qualifier musbotg_odevd = {
- .bLength = sizeof(struct usb2_device_qualifier),
+static const struct usb_device_qualifier musbotg_odevd = {
+ .bLength = sizeof(struct usb_device_qualifier),
.bDescriptorType = UDESC_DEVICE_QUALIFIER,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -2097,7 +2097,7 @@ static const struct usb2_device_qualifier musbotg_odevd = {
static const struct musbotg_config_desc musbotg_confd = {
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(musbotg_confd),
.bNumInterface = 1,
@@ -2107,7 +2107,7 @@ static const struct musbotg_config_desc musbotg_confd = {
.bMaxPower = 0,
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -2115,7 +2115,7 @@ static const struct musbotg_config_desc musbotg_confd = {
.bInterfaceProtocol = UIPROTO_HSHUBSTT,
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = (UE_DIR_IN | MUSBOTG_INTR_ENDPT),
.bmAttributes = UE_INTERRUPT,
@@ -2124,7 +2124,7 @@ static const struct musbotg_config_desc musbotg_confd = {
},
};
-static const struct usb2_hub_descriptor_min musbotg_hubd = {
+static const struct usb_hub_descriptor_min musbotg_hubd = {
.bDescLength = sizeof(musbotg_hubd),
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 1,
@@ -2154,8 +2154,8 @@ USB_MAKE_STRING_DESC(STRING_VENDOR, musbotg_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, musbotg_product);
static usb2_error_t
-musbotg_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+musbotg_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
struct musbotg_softc *sc = MUSBOTG_BUS2SC(udev->bus);
const void *ptr;
@@ -2554,11 +2554,11 @@ done:
}
static void
-musbotg_xfer_setup(struct usb2_setup_params *parm)
+musbotg_xfer_setup(struct usb_setup_params *parm)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
struct musbotg_softc *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t ntd;
uint32_t n;
@@ -2661,14 +2661,14 @@ musbotg_xfer_setup(struct usb2_setup_params *parm)
}
static void
-musbotg_xfer_unsetup(struct usb2_xfer *xfer)
+musbotg_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-musbotg_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+musbotg_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
struct musbotg_softc *sc = MUSBOTG_BUS2SC(udev->bus);
@@ -2708,7 +2708,7 @@ musbotg_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *ede
}
}
-struct usb2_bus_methods musbotg_bus_methods =
+struct usb_bus_methods musbotg_bus_methods =
{
.pipe_init = &musbotg_pipe_init,
.xfer_setup = &musbotg_xfer_setup,
diff --git a/sys/dev/usb/controller/musb_otg.h b/sys/dev/usb/controller/musb_otg.h
index f687921..7bba73f 100644
--- a/sys/dev/usb/controller/musb_otg.h
+++ b/sys/dev/usb/controller/musb_otg.h
@@ -305,7 +305,7 @@ struct musbotg_dma {
struct musbotg_td {
struct musbotg_td *obj_next;
musbotg_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
uint32_t offset;
uint32_t remainder;
uint16_t max_frame_size; /* packet_size * mult */
@@ -320,7 +320,7 @@ struct musbotg_td {
struct musbotg_std_temp {
musbotg_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
struct musbotg_td *td;
struct musbotg_td *td_next;
uint32_t len;
@@ -336,14 +336,14 @@ struct musbotg_std_temp {
};
struct musbotg_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union musbotg_hub_temp {
uWord wValue;
- struct usb2_port_status ps;
+ struct usb_port_status ps;
};
struct musbotg_flags {
@@ -362,11 +362,11 @@ struct musbotg_flags {
};
struct musbotg_softc {
- struct usb2_bus sc_bus;
+ struct usb_bus sc_bus;
union musbotg_hub_temp sc_hub_temp;
- struct usb2_hw_ep_profile sc_hw_ep_profile[16];
+ struct usb_hw_ep_profile sc_hw_ep_profile[16];
- struct usb2_device *sc_devices[MUSB2_MAX_DEVICES];
+ struct usb_device *sc_devices[MUSB2_MAX_DEVICES];
struct resource *sc_io_res;
struct resource *sc_irq_res;
void *sc_intr_hdl;
diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c
index 4b407ab..0377179 100644
--- a/sys/dev/usb/controller/ohci.c
+++ b/sys/dev/usb/controller/ohci.c
@@ -87,20 +87,20 @@ static void ohci_dump_itds(ohci_itd_t *);
#define OHCI_INTR_ENDPT 1
-extern struct usb2_bus_methods ohci_bus_methods;
-extern struct usb2_pipe_methods ohci_device_bulk_methods;
-extern struct usb2_pipe_methods ohci_device_ctrl_methods;
-extern struct usb2_pipe_methods ohci_device_intr_methods;
-extern struct usb2_pipe_methods ohci_device_isoc_methods;
-
-static void ohci_do_poll(struct usb2_bus *bus);
-static void ohci_device_done(struct usb2_xfer *xfer, usb2_error_t error);
+extern struct usb_bus_methods ohci_bus_methods;
+extern struct usb_pipe_methods ohci_device_bulk_methods;
+extern struct usb_pipe_methods ohci_device_ctrl_methods;
+extern struct usb_pipe_methods ohci_device_intr_methods;
+extern struct usb_pipe_methods ohci_device_isoc_methods;
+
+static void ohci_do_poll(struct usb_bus *bus);
+static void ohci_device_done(struct usb_xfer *xfer, usb2_error_t error);
static void ohci_timeout(void *arg);
-static uint8_t ohci_check_transfer(struct usb2_xfer *xfer);
+static uint8_t ohci_check_transfer(struct usb_xfer *xfer);
static void ohci_root_intr(ohci_softc_t *sc);
struct ohci_std_temp {
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
ohci_td_t *td;
ohci_td_t *td_next;
uint32_t average;
@@ -120,7 +120,7 @@ ohci_get_hcca(ohci_softc_t *sc)
}
void
-ohci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb)
+ohci_iterate_hw_softc(struct usb_bus *bus, usb2_bus_mem_sub_cb_t *cb)
{
struct ohci_softc *sc = OHCI_BUS2SC(bus);
uint32_t i;
@@ -146,7 +146,7 @@ ohci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb)
static usb2_error_t
ohci_controller_init(ohci_softc_t *sc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint32_t i;
uint32_t ctl;
uint32_t ival;
@@ -273,9 +273,9 @@ reset:
}
static struct ohci_ed *
-ohci_init_ed(struct usb2_page_cache *pc)
+ohci_init_ed(struct usb_page_cache *pc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
struct ohci_ed *ed;
usb2_get_page(pc, 0, &buf_res);
@@ -292,7 +292,7 @@ ohci_init_ed(struct usb2_page_cache *pc)
usb2_error_t
ohci_init(ohci_softc_t *sc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint16_t i;
uint16_t bit;
uint16_t x;
@@ -653,7 +653,7 @@ ohci_dump_ed(ohci_ed_t *sed)
#endif
static void
-ohci_transfer_intr_enqueue(struct usb2_xfer *xfer)
+ohci_transfer_intr_enqueue(struct usb_xfer *xfer)
{
/* check for early completion */
if (ohci_check_transfer(xfer)) {
@@ -731,7 +731,7 @@ _ohci_remove_qh(ohci_ed_t *sed, ohci_ed_t *last)
}
static void
-ohci_isoc_done(struct usb2_xfer *xfer)
+ohci_isoc_done(struct usb_xfer *xfer)
{
uint8_t nframes;
uint32_t *plen = xfer->frlengths;
@@ -813,7 +813,7 @@ static const char *const
#endif
static usb2_error_t
-ohci_non_isoc_done_sub(struct usb2_xfer *xfer)
+ohci_non_isoc_done_sub(struct usb_xfer *xfer)
{
ohci_td_t *td;
ohci_td_t *td_alt_next;
@@ -906,7 +906,7 @@ ohci_non_isoc_done_sub(struct usb2_xfer *xfer)
}
static void
-ohci_non_isoc_done(struct usb2_xfer *xfer)
+ohci_non_isoc_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -958,7 +958,7 @@ done:
* ohci_check_transfer_sub
*------------------------------------------------------------------------*/
static void
-ohci_check_transfer_sub(struct usb2_xfer *xfer)
+ohci_check_transfer_sub(struct usb_xfer *xfer)
{
ohci_td_t *td;
ohci_ed_t *ed;
@@ -1042,7 +1042,7 @@ ohci_check_transfer_sub(struct usb2_xfer *xfer)
* Else: USB transfer is finished
*------------------------------------------------------------------------*/
static uint8_t
-ohci_check_transfer(struct usb2_xfer *xfer)
+ohci_check_transfer(struct usb_xfer *xfer)
{
ohci_ed_t *ed;
uint32_t ed_headp;
@@ -1104,7 +1104,7 @@ ohci_rhsc_enable(ohci_softc_t *sc)
static void
ohci_interrupt_poll(ohci_softc_t *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -1240,7 +1240,7 @@ done:
static void
ohci_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTF("xfer=%p\n", xfer);
@@ -1251,7 +1251,7 @@ ohci_timeout(void *arg)
}
static void
-ohci_do_poll(struct usb2_bus *bus)
+ohci_do_poll(struct usb_bus *bus)
{
struct ohci_softc *sc = OHCI_BUS2SC(bus);
@@ -1263,7 +1263,7 @@ ohci_do_poll(struct usb2_bus *bus)
static void
ohci_setup_standard_chain_sub(struct ohci_std_temp *temp)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
ohci_td_t *td;
ohci_td_t *td_next;
ohci_td_t *td_alt_next;
@@ -1405,10 +1405,10 @@ restart:
}
static void
-ohci_setup_standard_chain(struct usb2_xfer *xfer, ohci_ed_t **ed_last)
+ohci_setup_standard_chain(struct usb_xfer *xfer, ohci_ed_t **ed_last)
{
struct ohci_std_temp temp;
- struct usb2_pipe_methods *methods;
+ struct usb_pipe_methods *methods;
ohci_ed_t *ed;
ohci_td_t *td;
uint32_t ed_flags;
@@ -1645,9 +1645,9 @@ ohci_root_intr(ohci_softc_t *sc)
* from close and from interrupt
*/
static void
-ohci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+ohci_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
- struct usb2_pipe_methods *methods = xfer->pipe->methods;
+ struct usb_pipe_methods *methods = xfer->pipe->methods;
ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
ohci_ed_t *ed;
@@ -1684,25 +1684,25 @@ ohci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
* ohci bulk support
*------------------------------------------------------------------------*/
static void
-ohci_device_bulk_open(struct usb2_xfer *xfer)
+ohci_device_bulk_open(struct usb_xfer *xfer)
{
return;
}
static void
-ohci_device_bulk_close(struct usb2_xfer *xfer)
+ohci_device_bulk_close(struct usb_xfer *xfer)
{
ohci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-ohci_device_bulk_enter(struct usb2_xfer *xfer)
+ohci_device_bulk_enter(struct usb_xfer *xfer)
{
return;
}
static void
-ohci_device_bulk_start(struct usb2_xfer *xfer)
+ohci_device_bulk_start(struct usb_xfer *xfer)
{
ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
@@ -1713,7 +1713,7 @@ ohci_device_bulk_start(struct usb2_xfer *xfer)
ohci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ohci_device_bulk_methods =
+struct usb_pipe_methods ohci_device_bulk_methods =
{
.open = ohci_device_bulk_open,
.close = ohci_device_bulk_close,
@@ -1725,25 +1725,25 @@ struct usb2_pipe_methods ohci_device_bulk_methods =
* ohci control support
*------------------------------------------------------------------------*/
static void
-ohci_device_ctrl_open(struct usb2_xfer *xfer)
+ohci_device_ctrl_open(struct usb_xfer *xfer)
{
return;
}
static void
-ohci_device_ctrl_close(struct usb2_xfer *xfer)
+ohci_device_ctrl_close(struct usb_xfer *xfer)
{
ohci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-ohci_device_ctrl_enter(struct usb2_xfer *xfer)
+ohci_device_ctrl_enter(struct usb_xfer *xfer)
{
return;
}
static void
-ohci_device_ctrl_start(struct usb2_xfer *xfer)
+ohci_device_ctrl_start(struct usb_xfer *xfer)
{
ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
@@ -1754,7 +1754,7 @@ ohci_device_ctrl_start(struct usb2_xfer *xfer)
ohci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ohci_device_ctrl_methods =
+struct usb_pipe_methods ohci_device_ctrl_methods =
{
.open = ohci_device_ctrl_open,
.close = ohci_device_ctrl_close,
@@ -1766,7 +1766,7 @@ struct usb2_pipe_methods ohci_device_ctrl_methods =
* ohci interrupt support
*------------------------------------------------------------------------*/
static void
-ohci_device_intr_open(struct usb2_xfer *xfer)
+ohci_device_intr_open(struct usb_xfer *xfer)
{
ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
uint16_t best;
@@ -1799,7 +1799,7 @@ ohci_device_intr_open(struct usb2_xfer *xfer)
}
static void
-ohci_device_intr_close(struct usb2_xfer *xfer)
+ohci_device_intr_close(struct usb_xfer *xfer)
{
ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
@@ -1809,13 +1809,13 @@ ohci_device_intr_close(struct usb2_xfer *xfer)
}
static void
-ohci_device_intr_enter(struct usb2_xfer *xfer)
+ohci_device_intr_enter(struct usb_xfer *xfer)
{
return;
}
static void
-ohci_device_intr_start(struct usb2_xfer *xfer)
+ohci_device_intr_start(struct usb_xfer *xfer)
{
ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
@@ -1826,7 +1826,7 @@ ohci_device_intr_start(struct usb2_xfer *xfer)
ohci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ohci_device_intr_methods =
+struct usb_pipe_methods ohci_device_intr_methods =
{
.open = ohci_device_intr_open,
.close = ohci_device_intr_close,
@@ -1838,22 +1838,22 @@ struct usb2_pipe_methods ohci_device_intr_methods =
* ohci isochronous support
*------------------------------------------------------------------------*/
static void
-ohci_device_isoc_open(struct usb2_xfer *xfer)
+ohci_device_isoc_open(struct usb_xfer *xfer)
{
return;
}
static void
-ohci_device_isoc_close(struct usb2_xfer *xfer)
+ohci_device_isoc_close(struct usb_xfer *xfer)
{
/**/
ohci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-ohci_device_isoc_enter(struct usb2_xfer *xfer)
+ohci_device_isoc_enter(struct usb_xfer *xfer)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
ohci_softc_t *sc = OHCI_BUS2SC(xfer->xroot->bus);
struct ohci_hcca *hcca;
uint32_t buf_offset;
@@ -2028,13 +2028,13 @@ ohci_device_isoc_enter(struct usb2_xfer *xfer)
}
static void
-ohci_device_isoc_start(struct usb2_xfer *xfer)
+ohci_device_isoc_start(struct usb_xfer *xfer)
{
/* put transfer on interrupt queue */
ohci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods ohci_device_isoc_methods =
+struct usb_pipe_methods ohci_device_isoc_methods =
{
.open = ohci_device_isoc_open,
.close = ohci_device_isoc_close,
@@ -2049,9 +2049,9 @@ struct usb2_pipe_methods ohci_device_isoc_methods =
*------------------------------------------------------------------------*/
static const
-struct usb2_device_descriptor ohci_devd =
+struct usb_device_descriptor ohci_devd =
{
- sizeof(struct usb2_device_descriptor),
+ sizeof(struct usb_device_descriptor),
UDESC_DEVICE, /* type */
{0x00, 0x01}, /* USB version */
UDCLASS_HUB, /* class */
@@ -2067,7 +2067,7 @@ static const
struct ohci_config_desc ohci_confd =
{
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(ohci_confd),
.bNumInterface = 1,
@@ -2077,7 +2077,7 @@ struct ohci_config_desc ohci_confd =
.bMaxPower = 0, /* max power */
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -2085,7 +2085,7 @@ struct ohci_config_desc ohci_confd =
.bInterfaceProtocol = UIPROTO_FSHUB,
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | OHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
@@ -2095,7 +2095,7 @@ struct ohci_config_desc ohci_confd =
};
static const
-struct usb2_hub_descriptor ohci_hubd =
+struct usb_hub_descriptor ohci_hubd =
{
0, /* dynamic length */
UDESC_HUB,
@@ -2107,8 +2107,8 @@ struct usb2_hub_descriptor ohci_hubd =
};
static usb2_error_t
-ohci_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+ohci_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
ohci_softc_t *sc = OHCI_BUS2SC(udev->bus);
const void *ptr;
@@ -2399,12 +2399,12 @@ done:
}
static void
-ohci_xfer_setup(struct usb2_setup_params *parm)
+ohci_xfer_setup(struct usb_setup_params *parm)
{
- struct usb2_page_search page_info;
- struct usb2_page_cache *pc;
+ struct usb_page_search page_info;
+ struct usb_page_cache *pc;
ohci_softc_t *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t ntd;
uint32_t nitd;
@@ -2563,8 +2563,8 @@ alloc_dma_set:
}
static void
-ohci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+ohci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
ohci_softc_t *sc = OHCI_BUS2SC(udev->bus);
@@ -2603,13 +2603,13 @@ ohci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
}
static void
-ohci_xfer_unsetup(struct usb2_xfer *xfer)
+ohci_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-ohci_get_dma_delay(struct usb2_bus *bus, uint32_t *pus)
+ohci_get_dma_delay(struct usb_bus *bus, uint32_t *pus)
{
/*
* Wait until hardware has finished any possible use of the
@@ -2619,11 +2619,11 @@ ohci_get_dma_delay(struct usb2_bus *bus, uint32_t *pus)
}
static void
-ohci_device_resume(struct usb2_device *udev)
+ohci_device_resume(struct usb_device *udev)
{
struct ohci_softc *sc = OHCI_BUS2SC(udev->bus);
- struct usb2_xfer *xfer;
- struct usb2_pipe_methods *methods;
+ struct usb_xfer *xfer;
+ struct usb_pipe_methods *methods;
ohci_ed_t *ed;
DPRINTF("\n");
@@ -2657,11 +2657,11 @@ ohci_device_resume(struct usb2_device *udev)
}
static void
-ohci_device_suspend(struct usb2_device *udev)
+ohci_device_suspend(struct usb_device *udev)
{
struct ohci_softc *sc = OHCI_BUS2SC(udev->bus);
- struct usb2_xfer *xfer;
- struct usb2_pipe_methods *methods;
+ struct usb_xfer *xfer;
+ struct usb_pipe_methods *methods;
ohci_ed_t *ed;
DPRINTF("\n");
@@ -2693,7 +2693,7 @@ ohci_device_suspend(struct usb2_device *udev)
}
static void
-ohci_set_hw_power(struct usb2_bus *bus)
+ohci_set_hw_power(struct usb_bus *bus)
{
struct ohci_softc *sc = OHCI_BUS2SC(bus);
uint32_t temp;
@@ -2727,7 +2727,7 @@ ohci_set_hw_power(struct usb2_bus *bus)
return;
}
-struct usb2_bus_methods ohci_bus_methods =
+struct usb_bus_methods ohci_bus_methods =
{
.pipe_init = ohci_pipe_init,
.xfer_setup = ohci_xfer_setup,
diff --git a/sys/dev/usb/controller/ohci.h b/sys/dev/usb/controller/ohci.h
index b4759aa..3f3537f 100644
--- a/sys/dev/usb/controller/ohci.h
+++ b/sys/dev/usb/controller/ohci.h
@@ -196,7 +196,7 @@ struct ohci_ed {
struct ohci_ed *next;
struct ohci_ed *prev;
struct ohci_ed *obj_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
uint32_t ed_self;
} __aligned(OHCI_ED_ALIGN);
@@ -230,7 +230,7 @@ struct ohci_td {
*/
struct ohci_td *obj_next;
struct ohci_td *alt_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
uint32_t td_self;
uint16_t len;
} __aligned(OHCI_TD_ALIGN);
@@ -262,7 +262,7 @@ struct ohci_itd {
* Extra information needed:
*/
struct ohci_itd *obj_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
uint32_t itd_self;
uint8_t frames;
} __aligned(OHCI_ITD_ALIGN);
@@ -290,39 +290,39 @@ typedef struct ohci_itd ohci_itd_t;
#define OHCI_NO_EDS (2*OHCI_NO_INTRS)
struct ohci_hw_softc {
- struct usb2_page_cache hcca_pc;
- struct usb2_page_cache ctrl_start_pc;
- struct usb2_page_cache bulk_start_pc;
- struct usb2_page_cache isoc_start_pc;
- struct usb2_page_cache intr_start_pc[OHCI_NO_EDS];
-
- struct usb2_page hcca_pg;
- struct usb2_page ctrl_start_pg;
- struct usb2_page bulk_start_pg;
- struct usb2_page isoc_start_pg;
- struct usb2_page intr_start_pg[OHCI_NO_EDS];
+ struct usb_page_cache hcca_pc;
+ struct usb_page_cache ctrl_start_pc;
+ struct usb_page_cache bulk_start_pc;
+ struct usb_page_cache isoc_start_pc;
+ struct usb_page_cache intr_start_pc[OHCI_NO_EDS];
+
+ struct usb_page hcca_pg;
+ struct usb_page ctrl_start_pg;
+ struct usb_page bulk_start_pg;
+ struct usb_page isoc_start_pg;
+ struct usb_page intr_start_pg[OHCI_NO_EDS];
};
struct ohci_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union ohci_hub_desc {
- struct usb2_status stat;
- struct usb2_port_status ps;
- struct usb2_hub_descriptor hubd;
+ struct usb_status stat;
+ struct usb_port_status ps;
+ struct usb_hub_descriptor hubd;
uint8_t temp[128];
};
typedef struct ohci_softc {
struct ohci_hw_softc sc_hw;
- struct usb2_bus sc_bus; /* base device */
- struct usb2_callout sc_tmo_rhsc;
+ struct usb_bus sc_bus; /* base device */
+ struct usb_callout sc_tmo_rhsc;
union ohci_hub_desc sc_hub_desc;
- struct usb2_device *sc_devices[OHCI_MAX_DEVICES];
+ struct usb_device *sc_devices[OHCI_MAX_DEVICES];
struct resource *sc_io_res;
struct resource *sc_irq_res;
struct ohci_hcca *sc_hcca_p;
diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c
index 7a6ba16..c145588 100644
--- a/sys/dev/usb/controller/uhci.c
+++ b/sys/dev/usb/controller/uhci.c
@@ -100,11 +100,11 @@ static void uhci_dump_tds(uhci_td_t *td);
struct uhci_mem_layout {
- struct usb2_page_search buf_res;
- struct usb2_page_search fix_res;
+ struct usb_page_search buf_res;
+ struct usb_page_search fix_res;
- struct usb2_page_cache *buf_pc;
- struct usb2_page_cache *fix_pc;
+ struct usb_page_cache *buf_pc;
+ struct usb_page_cache *fix_pc;
uint32_t buf_offset;
@@ -126,22 +126,22 @@ struct uhci_std_temp {
uint8_t last_frame;
};
-extern struct usb2_bus_methods uhci_bus_methods;
-extern struct usb2_pipe_methods uhci_device_bulk_methods;
-extern struct usb2_pipe_methods uhci_device_ctrl_methods;
-extern struct usb2_pipe_methods uhci_device_intr_methods;
-extern struct usb2_pipe_methods uhci_device_isoc_methods;
+extern struct usb_bus_methods uhci_bus_methods;
+extern struct usb_pipe_methods uhci_device_bulk_methods;
+extern struct usb_pipe_methods uhci_device_ctrl_methods;
+extern struct usb_pipe_methods uhci_device_intr_methods;
+extern struct usb_pipe_methods uhci_device_isoc_methods;
static uint8_t uhci_restart(uhci_softc_t *sc);
-static void uhci_do_poll(struct usb2_bus *);
-static void uhci_device_done(struct usb2_xfer *, usb2_error_t);
-static void uhci_transfer_intr_enqueue(struct usb2_xfer *);
+static void uhci_do_poll(struct usb_bus *);
+static void uhci_device_done(struct usb_xfer *, usb2_error_t);
+static void uhci_transfer_intr_enqueue(struct usb_xfer *);
static void uhci_timeout(void *);
-static uint8_t uhci_check_transfer(struct usb2_xfer *);
+static uint8_t uhci_check_transfer(struct usb_xfer *);
static void uhci_root_intr(uhci_softc_t *sc);
void
-uhci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb)
+uhci_iterate_hw_softc(struct usb_bus *bus, usb2_bus_mem_sub_cb_t *cb)
{
struct uhci_softc *sc = UHCI_BUS2SC(bus);
uint32_t i;
@@ -178,7 +178,7 @@ uhci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb)
}
static void
-uhci_mem_layout_init(struct uhci_mem_layout *ml, struct usb2_xfer *xfer)
+uhci_mem_layout_init(struct uhci_mem_layout *ml, struct usb_xfer *xfer)
{
ml->buf_pc = xfer->frbuffers + 0;
ml->fix_pc = xfer->buf_fixup;
@@ -255,7 +255,7 @@ uhci_mem_layout_fixup(struct uhci_mem_layout *ml, struct uhci_td *td)
static uint8_t
uhci_restart(uhci_softc_t *sc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED);
@@ -387,9 +387,9 @@ uhci_start(uhci_softc_t *sc)
}
static struct uhci_qh *
-uhci_init_qh(struct usb2_page_cache *pc)
+uhci_init_qh(struct usb_page_cache *pc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
struct uhci_qh *qh;
usb2_get_page(pc, 0, &buf_res);
@@ -406,9 +406,9 @@ uhci_init_qh(struct usb2_page_cache *pc)
}
static struct uhci_td *
-uhci_init_td(struct usb2_page_cache *pc)
+uhci_init_td(struct usb_page_cache *pc)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
struct uhci_td *td;
usb2_get_page(pc, 0, &buf_res);
@@ -591,7 +591,7 @@ uhci_init(uhci_softc_t *sc)
td_lst->td_buffer = htole32(0);
}
if (1) {
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint32_t *pframes;
usb2_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res);
@@ -896,7 +896,7 @@ uhci_rem_loop(uhci_softc_t *sc)
}
static void
-uhci_transfer_intr_enqueue(struct usb2_xfer *xfer)
+uhci_transfer_intr_enqueue(struct usb_xfer *xfer)
{
/* check for early completion */
if (uhci_check_transfer(xfer)) {
@@ -1023,9 +1023,9 @@ _uhci_remove_qh(uhci_qh_t *sqh, uhci_qh_t *last)
}
static void
-uhci_isoc_done(uhci_softc_t *sc, struct usb2_xfer *xfer)
+uhci_isoc_done(uhci_softc_t *sc, struct usb_xfer *xfer)
{
- struct usb2_page_search res;
+ struct usb_page_search res;
uint32_t nframes = xfer->nframes;
uint32_t status;
uint32_t offset = 0;
@@ -1090,9 +1090,9 @@ uhci_isoc_done(uhci_softc_t *sc, struct usb2_xfer *xfer)
}
static usb2_error_t
-uhci_non_isoc_done_sub(struct usb2_xfer *xfer)
+uhci_non_isoc_done_sub(struct usb_xfer *xfer)
{
- struct usb2_page_search res;
+ struct usb_page_search res;
uhci_td_t *td;
uhci_td_t *td_alt_next;
uint32_t status;
@@ -1203,7 +1203,7 @@ uhci_non_isoc_done_sub(struct usb2_xfer *xfer)
}
static void
-uhci_non_isoc_done(struct usb2_xfer *xfer)
+uhci_non_isoc_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -1261,7 +1261,7 @@ done:
* in case it is wrong.
*------------------------------------------------------------------------*/
static void
-uhci_check_transfer_sub(struct usb2_xfer *xfer)
+uhci_check_transfer_sub(struct usb_xfer *xfer)
{
uhci_qh_t *qh;
uhci_td_t *td;
@@ -1321,7 +1321,7 @@ skip:
* Else: USB transfer is finished
*------------------------------------------------------------------------*/
static uint8_t
-uhci_check_transfer(struct usb2_xfer *xfer)
+uhci_check_transfer(struct usb_xfer *xfer)
{
uint32_t status;
uint32_t token;
@@ -1419,7 +1419,7 @@ transferred:
static void
uhci_interrupt_poll(uhci_softc_t *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -1514,7 +1514,7 @@ done:
static void
uhci_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTF("xfer=%p\n", xfer);
@@ -1525,7 +1525,7 @@ uhci_timeout(void *arg)
}
static void
-uhci_do_poll(struct usb2_bus *bus)
+uhci_do_poll(struct usb_bus *bus)
{
struct uhci_softc *sc = UHCI_BUS2SC(bus);
@@ -1676,7 +1676,7 @@ restart:
}
static uhci_td_t *
-uhci_setup_standard_chain(struct usb2_xfer *xfer)
+uhci_setup_standard_chain(struct usb_xfer *xfer)
{
struct uhci_std_temp temp;
uhci_td_t *td;
@@ -1857,9 +1857,9 @@ uhci_setup_standard_chain(struct usb2_xfer *xfer)
*/
static void
-uhci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+uhci_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
- struct usb2_pipe_methods *methods = xfer->pipe->methods;
+ struct usb_pipe_methods *methods = xfer->pipe->methods;
uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus);
uhci_qh_t *qh;
@@ -1909,25 +1909,25 @@ uhci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
* uhci bulk support
*------------------------------------------------------------------------*/
static void
-uhci_device_bulk_open(struct usb2_xfer *xfer)
+uhci_device_bulk_open(struct usb_xfer *xfer)
{
return;
}
static void
-uhci_device_bulk_close(struct usb2_xfer *xfer)
+uhci_device_bulk_close(struct usb_xfer *xfer)
{
uhci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-uhci_device_bulk_enter(struct usb2_xfer *xfer)
+uhci_device_bulk_enter(struct usb_xfer *xfer)
{
return;
}
static void
-uhci_device_bulk_start(struct usb2_xfer *xfer)
+uhci_device_bulk_start(struct usb_xfer *xfer)
{
uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus);
uhci_td_t *td;
@@ -1954,7 +1954,7 @@ uhci_device_bulk_start(struct usb2_xfer *xfer)
uhci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods uhci_device_bulk_methods =
+struct usb_pipe_methods uhci_device_bulk_methods =
{
.open = uhci_device_bulk_open,
.close = uhci_device_bulk_close,
@@ -1966,25 +1966,25 @@ struct usb2_pipe_methods uhci_device_bulk_methods =
* uhci control support
*------------------------------------------------------------------------*/
static void
-uhci_device_ctrl_open(struct usb2_xfer *xfer)
+uhci_device_ctrl_open(struct usb_xfer *xfer)
{
return;
}
static void
-uhci_device_ctrl_close(struct usb2_xfer *xfer)
+uhci_device_ctrl_close(struct usb_xfer *xfer)
{
uhci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-uhci_device_ctrl_enter(struct usb2_xfer *xfer)
+uhci_device_ctrl_enter(struct usb_xfer *xfer)
{
return;
}
static void
-uhci_device_ctrl_start(struct usb2_xfer *xfer)
+uhci_device_ctrl_start(struct usb_xfer *xfer)
{
uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus);
uhci_qh_t *qh;
@@ -2016,7 +2016,7 @@ uhci_device_ctrl_start(struct usb2_xfer *xfer)
uhci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods uhci_device_ctrl_methods =
+struct usb_pipe_methods uhci_device_ctrl_methods =
{
.open = uhci_device_ctrl_open,
.close = uhci_device_ctrl_close,
@@ -2028,7 +2028,7 @@ struct usb2_pipe_methods uhci_device_ctrl_methods =
* uhci interrupt support
*------------------------------------------------------------------------*/
static void
-uhci_device_intr_open(struct usb2_xfer *xfer)
+uhci_device_intr_open(struct usb_xfer *xfer)
{
uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus);
uint16_t best;
@@ -2061,7 +2061,7 @@ uhci_device_intr_open(struct usb2_xfer *xfer)
}
static void
-uhci_device_intr_close(struct usb2_xfer *xfer)
+uhci_device_intr_close(struct usb_xfer *xfer)
{
uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus);
@@ -2071,13 +2071,13 @@ uhci_device_intr_close(struct usb2_xfer *xfer)
}
static void
-uhci_device_intr_enter(struct usb2_xfer *xfer)
+uhci_device_intr_enter(struct usb_xfer *xfer)
{
return;
}
static void
-uhci_device_intr_start(struct usb2_xfer *xfer)
+uhci_device_intr_start(struct usb_xfer *xfer)
{
uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus);
uhci_qh_t *qh;
@@ -2103,7 +2103,7 @@ uhci_device_intr_start(struct usb2_xfer *xfer)
uhci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods uhci_device_intr_methods =
+struct usb_pipe_methods uhci_device_intr_methods =
{
.open = uhci_device_intr_open,
.close = uhci_device_intr_close,
@@ -2115,7 +2115,7 @@ struct usb2_pipe_methods uhci_device_intr_methods =
* uhci isochronous support
*------------------------------------------------------------------------*/
static void
-uhci_device_isoc_open(struct usb2_xfer *xfer)
+uhci_device_isoc_open(struct usb_xfer *xfer)
{
uhci_td_t *td;
uint32_t td_token;
@@ -2144,13 +2144,13 @@ uhci_device_isoc_open(struct usb2_xfer *xfer)
}
static void
-uhci_device_isoc_close(struct usb2_xfer *xfer)
+uhci_device_isoc_close(struct usb_xfer *xfer)
{
uhci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-uhci_device_isoc_enter(struct usb2_xfer *xfer)
+uhci_device_isoc_enter(struct usb_xfer *xfer)
{
struct uhci_mem_layout ml;
uhci_softc_t *sc = UHCI_BUS2SC(xfer->xroot->bus);
@@ -2305,13 +2305,13 @@ uhci_device_isoc_enter(struct usb2_xfer *xfer)
}
static void
-uhci_device_isoc_start(struct usb2_xfer *xfer)
+uhci_device_isoc_start(struct usb_xfer *xfer)
{
/* put transfer on interrupt queue */
uhci_transfer_intr_enqueue(xfer);
}
-struct usb2_pipe_methods uhci_device_isoc_methods =
+struct usb_pipe_methods uhci_device_isoc_methods =
{
.open = uhci_device_isoc_open,
.close = uhci_device_isoc_close,
@@ -2326,9 +2326,9 @@ struct usb2_pipe_methods uhci_device_isoc_methods =
*------------------------------------------------------------------------*/
static const
-struct usb2_device_descriptor uhci_devd =
+struct usb_device_descriptor uhci_devd =
{
- sizeof(struct usb2_device_descriptor),
+ sizeof(struct usb_device_descriptor),
UDESC_DEVICE, /* type */
{0x00, 0x01}, /* USB version */
UDCLASS_HUB, /* class */
@@ -2342,7 +2342,7 @@ struct usb2_device_descriptor uhci_devd =
static const struct uhci_config_desc uhci_confd = {
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(uhci_confd),
.bNumInterface = 1,
@@ -2352,7 +2352,7 @@ static const struct uhci_config_desc uhci_confd = {
.bMaxPower = 0 /* max power */
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -2360,7 +2360,7 @@ static const struct uhci_config_desc uhci_confd = {
.bInterfaceProtocol = UIPROTO_FSHUB,
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = UE_DIR_IN | UHCI_INTR_ENDPT,
.bmAttributes = UE_INTERRUPT,
@@ -2370,7 +2370,7 @@ static const struct uhci_config_desc uhci_confd = {
};
static const
-struct usb2_hub_descriptor_min uhci_hubd_piix =
+struct usb_hub_descriptor_min uhci_hubd_piix =
{
sizeof(uhci_hubd_piix),
UDESC_HUB,
@@ -2494,8 +2494,8 @@ done:
}
static usb2_error_t
-uhci_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+uhci_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
uhci_softc_t *sc = UHCI_BUS2SC(udev->bus);
const void *ptr;
@@ -2847,12 +2847,12 @@ uhci_root_intr(uhci_softc_t *sc)
}
static void
-uhci_xfer_setup(struct usb2_setup_params *parm)
+uhci_xfer_setup(struct usb_setup_params *parm)
{
- struct usb2_page_search page_info;
- struct usb2_page_cache *pc;
+ struct usb_page_search page_info;
+ struct usb_page_cache *pc;
uhci_softc_t *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t ntd;
uint32_t nqh;
@@ -3043,8 +3043,8 @@ alloc_dma_set:
}
static void
-uhci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+uhci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
uhci_softc_t *sc = UHCI_BUS2SC(udev->bus);
@@ -3083,13 +3083,13 @@ uhci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
}
static void
-uhci_xfer_unsetup(struct usb2_xfer *xfer)
+uhci_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-uhci_get_dma_delay(struct usb2_bus *bus, uint32_t *pus)
+uhci_get_dma_delay(struct usb_bus *bus, uint32_t *pus)
{
/*
* Wait until hardware has finished any possible use of the
@@ -3099,11 +3099,11 @@ uhci_get_dma_delay(struct usb2_bus *bus, uint32_t *pus)
}
static void
-uhci_device_resume(struct usb2_device *udev)
+uhci_device_resume(struct usb_device *udev)
{
struct uhci_softc *sc = UHCI_BUS2SC(udev->bus);
- struct usb2_xfer *xfer;
- struct usb2_pipe_methods *methods;
+ struct usb_xfer *xfer;
+ struct usb_pipe_methods *methods;
uhci_qh_t *qh;
DPRINTF("\n");
@@ -3141,11 +3141,11 @@ uhci_device_resume(struct usb2_device *udev)
}
static void
-uhci_device_suspend(struct usb2_device *udev)
+uhci_device_suspend(struct usb_device *udev)
{
struct uhci_softc *sc = UHCI_BUS2SC(udev->bus);
- struct usb2_xfer *xfer;
- struct usb2_pipe_methods *methods;
+ struct usb_xfer *xfer;
+ struct usb_pipe_methods *methods;
uhci_qh_t *qh;
DPRINTF("\n");
@@ -3185,7 +3185,7 @@ uhci_device_suspend(struct usb2_device *udev)
}
static void
-uhci_set_hw_power(struct usb2_bus *bus)
+uhci_set_hw_power(struct usb_bus *bus)
{
struct uhci_softc *sc = UHCI_BUS2SC(bus);
uint32_t flags;
@@ -3222,7 +3222,7 @@ uhci_set_hw_power(struct usb2_bus *bus)
}
-struct usb2_bus_methods uhci_bus_methods =
+struct usb_bus_methods uhci_bus_methods =
{
.pipe_init = uhci_pipe_init,
.xfer_setup = uhci_xfer_setup,
diff --git a/sys/dev/usb/controller/uhci.h b/sys/dev/usb/controller/uhci.h
index ae3e0e3..ff4a640 100644
--- a/sys/dev/usb/controller/uhci.h
+++ b/sys/dev/usb/controller/uhci.h
@@ -174,8 +174,8 @@ struct uhci_td {
struct uhci_td *next;
struct uhci_td *prev;
struct uhci_td *obj_next;
- struct usb2_page_cache *page_cache;
- struct usb2_page_cache *fix_pc;
+ struct usb_page_cache *page_cache;
+ struct usb_page_cache *fix_pc;
uint32_t td_self;
uint16_t len;
} __aligned(UHCI_TD_ALIGN);
@@ -213,7 +213,7 @@ struct uhci_qh {
struct uhci_qh *h_prev;
struct uhci_qh *obj_next;
struct uhci_td *e_next;
- struct usb2_page_cache *page_cache;
+ struct usb_page_cache *page_cache;
uint32_t qh_self;
uint16_t intr_pos;
} __aligned(UHCI_QH_ALIGN);
@@ -235,44 +235,44 @@ typedef struct uhci_qh uhci_qh_t;
#endif
struct uhci_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union uhci_hub_desc {
- struct usb2_status stat;
- struct usb2_port_status ps;
+ struct usb_status stat;
+ struct usb_port_status ps;
uint8_t temp[128];
};
struct uhci_hw_softc {
- struct usb2_page_cache pframes_pc;
- struct usb2_page_cache isoc_start_pc[UHCI_VFRAMELIST_COUNT];
- struct usb2_page_cache intr_start_pc[UHCI_IFRAMELIST_COUNT];
- struct usb2_page_cache ls_ctl_start_pc;
- struct usb2_page_cache fs_ctl_start_pc;
- struct usb2_page_cache bulk_start_pc;
- struct usb2_page_cache last_qh_pc;
- struct usb2_page_cache last_td_pc;
-
- struct usb2_page pframes_pg;
- struct usb2_page isoc_start_pg[UHCI_VFRAMELIST_COUNT];
- struct usb2_page intr_start_pg[UHCI_IFRAMELIST_COUNT];
- struct usb2_page ls_ctl_start_pg;
- struct usb2_page fs_ctl_start_pg;
- struct usb2_page bulk_start_pg;
- struct usb2_page last_qh_pg;
- struct usb2_page last_td_pg;
+ struct usb_page_cache pframes_pc;
+ struct usb_page_cache isoc_start_pc[UHCI_VFRAMELIST_COUNT];
+ struct usb_page_cache intr_start_pc[UHCI_IFRAMELIST_COUNT];
+ struct usb_page_cache ls_ctl_start_pc;
+ struct usb_page_cache fs_ctl_start_pc;
+ struct usb_page_cache bulk_start_pc;
+ struct usb_page_cache last_qh_pc;
+ struct usb_page_cache last_td_pc;
+
+ struct usb_page pframes_pg;
+ struct usb_page isoc_start_pg[UHCI_VFRAMELIST_COUNT];
+ struct usb_page intr_start_pg[UHCI_IFRAMELIST_COUNT];
+ struct usb_page ls_ctl_start_pg;
+ struct usb_page fs_ctl_start_pg;
+ struct usb_page bulk_start_pg;
+ struct usb_page last_qh_pg;
+ struct usb_page last_td_pg;
};
typedef struct uhci_softc {
struct uhci_hw_softc sc_hw;
- struct usb2_bus sc_bus; /* base device */
+ struct usb_bus sc_bus; /* base device */
union uhci_hub_desc sc_hub_desc;
- struct usb2_callout sc_root_intr;
+ struct usb_callout sc_root_intr;
- struct usb2_device *sc_devices[UHCI_MAX_DEVICES];
+ struct usb_device *sc_devices[UHCI_MAX_DEVICES];
/* pointer to last TD for isochronous */
struct uhci_td *sc_isoc_p_last[UHCI_VFRAMELIST_COUNT];
/* pointer to last QH for interrupt */
diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c
index 93e9c32..d9ee3e7 100644
--- a/sys/dev/usb/controller/usb_controller.c
+++ b/sys/dev/usb/controller/usb_controller.c
@@ -47,7 +47,7 @@ static device_probe_t usb2_probe;
static device_attach_t usb2_attach;
static device_detach_t usb2_detach;
-static void usb2_attach_sub(device_t, struct usb2_bus *);
+static void usb2_attach_sub(device_t, struct usb_bus *);
static void usb2_post_init(void *);
/* static variables */
@@ -104,7 +104,7 @@ usb2_probe(device_t dev)
static int
usb2_attach(device_t dev)
{
- struct usb2_bus *bus = device_get_ivars(dev);
+ struct usb_bus *bus = device_get_ivars(dev);
DPRINTF("\n");
@@ -131,7 +131,7 @@ usb2_attach(device_t dev)
static int
usb2_detach(device_t dev)
{
- struct usb2_bus *bus = device_get_softc(dev);
+ struct usb_bus *bus = device_get_softc(dev);
DPRINTF("\n");
@@ -182,12 +182,12 @@ usb2_detach(device_t dev)
* This function is used to explore the device tree from the root.
*------------------------------------------------------------------------*/
static void
-usb2_bus_explore(struct usb2_proc_msg *pm)
+usb2_bus_explore(struct usb_proc_msg *pm)
{
- struct usb2_bus *bus;
- struct usb2_device *udev;
+ struct usb_bus *bus;
+ struct usb_device *udev;
- bus = ((struct usb2_bus_msg *)pm)->bus;
+ bus = ((struct usb_bus_msg *)pm)->bus;
udev = bus->devices[USB_ROOT_HUB_ADDR];
if (udev && udev->hub) {
@@ -230,13 +230,13 @@ usb2_bus_explore(struct usb2_proc_msg *pm)
* This function is used to detach the device tree from the root.
*------------------------------------------------------------------------*/
static void
-usb2_bus_detach(struct usb2_proc_msg *pm)
+usb2_bus_detach(struct usb_proc_msg *pm)
{
- struct usb2_bus *bus;
- struct usb2_device *udev;
+ struct usb_bus *bus;
+ struct usb_device *udev;
device_t dev;
- bus = ((struct usb2_bus_msg *)pm)->bus;
+ bus = ((struct usb_bus_msg *)pm)->bus;
udev = bus->devices[USB_ROOT_HUB_ADDR];
dev = bus->bdev;
/* clear the softc */
@@ -264,7 +264,7 @@ usb2_bus_detach(struct usb2_proc_msg *pm)
static void
usb2_power_wdog(void *arg)
{
- struct usb2_bus *bus = arg;
+ struct usb_bus *bus = arg;
USB_BUS_LOCK_ASSERT(bus, MA_OWNED);
@@ -284,15 +284,15 @@ usb2_power_wdog(void *arg)
* This function attaches USB in context of the explore thread.
*------------------------------------------------------------------------*/
static void
-usb2_bus_attach(struct usb2_proc_msg *pm)
+usb2_bus_attach(struct usb_proc_msg *pm)
{
- struct usb2_bus *bus;
- struct usb2_device *child;
+ struct usb_bus *bus;
+ struct usb_device *child;
device_t dev;
usb2_error_t err;
enum usb_dev_speed speed;
- bus = ((struct usb2_bus_msg *)pm)->bus;
+ bus = ((struct usb_bus_msg *)pm)->bus;
dev = bus->bdev;
DPRINTF("\n");
@@ -382,7 +382,7 @@ usb2_bus_attach(struct usb2_proc_msg *pm)
* "usb2_attach()" method.
*------------------------------------------------------------------------*/
static void
-usb2_attach_sub(device_t dev, struct usb2_bus *bus)
+usb2_attach_sub(device_t dev, struct usb_bus *bus)
{
const char *pname = device_get_nameunit(dev);
@@ -440,7 +440,7 @@ usb2_attach_sub(device_t dev, struct usb2_bus *bus)
static void
usb2_post_init(void *arg)
{
- struct usb2_bus *bus;
+ struct usb_bus *bus;
devclass_t dc;
device_t dev;
int max;
@@ -484,8 +484,8 @@ SYSUNINIT(usb2_bus_unload, SI_SUB_KLD, SI_ORDER_ANY, usb2_bus_unload, NULL);
*------------------------------------------------------------------------*/
#if USB_HAVE_BUSDMA
static void
-usb2_bus_mem_flush_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc,
- struct usb2_page *pg, uint32_t size, uint32_t align)
+usb2_bus_mem_flush_all_cb(struct usb_bus *bus, struct usb_page_cache *pc,
+ struct usb_page *pg, uint32_t size, uint32_t align)
{
usb2_pc_cpu_flush(pc);
}
@@ -496,7 +496,7 @@ usb2_bus_mem_flush_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc,
*------------------------------------------------------------------------*/
#if USB_HAVE_BUSDMA
void
-usb2_bus_mem_flush_all(struct usb2_bus *bus, usb2_bus_mem_cb_t *cb)
+usb2_bus_mem_flush_all(struct usb_bus *bus, usb2_bus_mem_cb_t *cb)
{
if (cb) {
cb(bus, &usb2_bus_mem_flush_all_cb);
@@ -509,8 +509,8 @@ usb2_bus_mem_flush_all(struct usb2_bus *bus, usb2_bus_mem_cb_t *cb)
*------------------------------------------------------------------------*/
#if USB_HAVE_BUSDMA
static void
-usb2_bus_mem_alloc_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc,
- struct usb2_page *pg, uint32_t size, uint32_t align)
+usb2_bus_mem_alloc_all_cb(struct usb_bus *bus, struct usb_page_cache *pc,
+ struct usb_page *pg, uint32_t size, uint32_t align)
{
/* need to initialize the page cache */
pc->tag_parent = bus->dma_parent_tag;
@@ -529,7 +529,7 @@ usb2_bus_mem_alloc_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc,
* Else: Failure
*------------------------------------------------------------------------*/
uint8_t
-usb2_bus_mem_alloc_all(struct usb2_bus *bus, bus_dma_tag_t dmat,
+usb2_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat,
usb2_bus_mem_cb_t *cb)
{
bus->alloc_failed = 0;
@@ -569,8 +569,8 @@ usb2_bus_mem_alloc_all(struct usb2_bus *bus, bus_dma_tag_t dmat,
*------------------------------------------------------------------------*/
#if USB_HAVE_BUSDMA
static void
-usb2_bus_mem_free_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc,
- struct usb2_page *pg, uint32_t size, uint32_t align)
+usb2_bus_mem_free_all_cb(struct usb_bus *bus, struct usb_page_cache *pc,
+ struct usb_page *pg, uint32_t size, uint32_t align)
{
usb2_pc_free_mem(pc);
}
@@ -580,7 +580,7 @@ usb2_bus_mem_free_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc,
* usb2_bus_mem_free_all - factored out code
*------------------------------------------------------------------------*/
void
-usb2_bus_mem_free_all(struct usb2_bus *bus, usb2_bus_mem_cb_t *cb)
+usb2_bus_mem_free_all(struct usb_bus *bus, usb2_bus_mem_cb_t *cb)
{
#if USB_HAVE_BUSDMA
if (cb) {
diff --git a/sys/dev/usb/controller/uss820dci.c b/sys/dev/usb/controller/uss820dci.c
index 05389c4..ce99746 100644
--- a/sys/dev/usb/controller/uss820dci.c
+++ b/sys/dev/usb/controller/uss820dci.c
@@ -71,20 +71,20 @@ SYSCTL_INT(_hw_usb_uss820dci, OID_AUTO, debug, CTLFLAG_RW,
/* prototypes */
-struct usb2_bus_methods uss820dci_bus_methods;
-struct usb2_pipe_methods uss820dci_device_bulk_methods;
-struct usb2_pipe_methods uss820dci_device_ctrl_methods;
-struct usb2_pipe_methods uss820dci_device_intr_methods;
-struct usb2_pipe_methods uss820dci_device_isoc_fs_methods;
+struct usb_bus_methods uss820dci_bus_methods;
+struct usb_pipe_methods uss820dci_device_bulk_methods;
+struct usb_pipe_methods uss820dci_device_ctrl_methods;
+struct usb_pipe_methods uss820dci_device_intr_methods;
+struct usb_pipe_methods uss820dci_device_isoc_fs_methods;
static uss820dci_cmd_t uss820dci_setup_rx;
static uss820dci_cmd_t uss820dci_data_rx;
static uss820dci_cmd_t uss820dci_data_tx;
static uss820dci_cmd_t uss820dci_data_tx_sync;
-static void uss820dci_device_done(struct usb2_xfer *, usb2_error_t);
-static void uss820dci_do_poll(struct usb2_bus *);
-static void uss820dci_standard_done(struct usb2_xfer *);
-static void uss820dci_intr_set(struct usb2_xfer *, uint8_t);
+static void uss820dci_device_done(struct usb_xfer *, usb2_error_t);
+static void uss820dci_do_poll(struct usb_bus *);
+static void uss820dci_standard_done(struct usb_xfer *);
+static void uss820dci_intr_set(struct usb_xfer *, uint8_t);
static void uss820dci_update_shared_1(struct uss820dci_softc *, uint8_t,
uint8_t, uint8_t);
static void uss820dci_root_intr(struct uss820dci_softc *);
@@ -94,7 +94,7 @@ static void uss820dci_root_intr(struct uss820dci_softc *);
* limitation is that the sum of the buffer sizes must be less than
* 1120 bytes.
*/
-static const struct usb2_hw_ep_profile
+static const struct usb_hw_ep_profile
uss820dci_ep_profile[] = {
[0] = {
@@ -149,8 +149,8 @@ uss820dci_update_shared_1(struct uss820dci_softc *sc, uint8_t reg,
}
static void
-uss820dci_get_hw_ep_profile(struct usb2_device *udev,
- const struct usb2_hw_ep_profile **ppf, uint8_t ep_addr)
+uss820dci_get_hw_ep_profile(struct usb_device *udev,
+ const struct usb_hw_ep_profile **ppf, uint8_t ep_addr)
{
if (ep_addr == 0) {
*ppf = uss820dci_ep_profile + 0;
@@ -223,7 +223,7 @@ static uint8_t
uss820dci_setup_rx(struct uss820dci_td *td)
{
struct uss820dci_softc *sc;
- struct usb2_device_request req;
+ struct usb_device_request req;
uint16_t count;
uint8_t rx_stat;
uint8_t temp;
@@ -353,7 +353,7 @@ not_complete:
static uint8_t
uss820dci_data_rx(struct uss820dci_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint16_t count;
uint8_t rx_flag;
uint8_t rx_stat;
@@ -486,7 +486,7 @@ repeat:
static uint8_t
uss820dci_data_tx(struct uss820dci_td *td)
{
- struct usb2_page_search buf_res;
+ struct usb_page_search buf_res;
uint16_t count;
uint16_t count_copy;
uint8_t rx_stat;
@@ -640,7 +640,7 @@ uss820dci_data_tx_sync(struct uss820dci_td *td)
}
static uint8_t
-uss820dci_xfer_do_fifo(struct usb2_xfer *xfer)
+uss820dci_xfer_do_fifo(struct usb_xfer *xfer)
{
struct uss820dci_td *td;
@@ -685,7 +685,7 @@ done:
static void
uss820dci_interrupt_poll(struct uss820dci_softc *sc)
{
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
repeat:
TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
@@ -820,7 +820,7 @@ uss820dci_setup_standard_chain_sub(struct uss820_std_temp *temp)
}
static void
-uss820dci_setup_standard_chain(struct usb2_xfer *xfer)
+uss820dci_setup_standard_chain(struct usb_xfer *xfer)
{
struct uss820_std_temp temp;
struct uss820dci_softc *sc;
@@ -965,7 +965,7 @@ uss820dci_setup_standard_chain(struct usb2_xfer *xfer)
static void
uss820dci_timeout(void *arg)
{
- struct usb2_xfer *xfer = arg;
+ struct usb_xfer *xfer = arg;
DPRINTF("xfer=%p\n", xfer);
@@ -976,7 +976,7 @@ uss820dci_timeout(void *arg)
}
static void
-uss820dci_intr_set(struct usb2_xfer *xfer, uint8_t set)
+uss820dci_intr_set(struct usb_xfer *xfer, uint8_t set)
{
struct uss820dci_softc *sc = USS820_DCI_BUS2SC(xfer->xroot->bus);
uint8_t ep_no = (xfer->endpoint & UE_ADDR);
@@ -1015,7 +1015,7 @@ uss820dci_intr_set(struct usb2_xfer *xfer, uint8_t set)
}
static void
-uss820dci_start_standard_chain(struct usb2_xfer *xfer)
+uss820dci_start_standard_chain(struct usb_xfer *xfer)
{
DPRINTFN(9, "\n");
@@ -1055,7 +1055,7 @@ uss820dci_root_intr(struct uss820dci_softc *sc)
}
static usb2_error_t
-uss820dci_standard_done_sub(struct usb2_xfer *xfer)
+uss820dci_standard_done_sub(struct usb_xfer *xfer)
{
struct uss820dci_td *td;
uint32_t len;
@@ -1119,7 +1119,7 @@ uss820dci_standard_done_sub(struct usb2_xfer *xfer)
}
static void
-uss820dci_standard_done(struct usb2_xfer *xfer)
+uss820dci_standard_done(struct usb_xfer *xfer)
{
usb2_error_t err = 0;
@@ -1168,7 +1168,7 @@ done:
* same USB transfer!
*------------------------------------------------------------------------*/
static void
-uss820dci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
+uss820dci_device_done(struct usb_xfer *xfer, usb2_error_t error)
{
USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED);
@@ -1183,8 +1183,8 @@ uss820dci_device_done(struct usb2_xfer *xfer, usb2_error_t error)
}
static void
-uss820dci_set_stall(struct usb2_device *udev, struct usb2_xfer *xfer,
- struct usb2_pipe *pipe)
+uss820dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer,
+ struct usb_pipe *pipe)
{
struct uss820dci_softc *sc;
uint8_t ep_no;
@@ -1271,10 +1271,10 @@ uss820dci_clear_stall_sub(struct uss820dci_softc *sc,
}
static void
-uss820dci_clear_stall(struct usb2_device *udev, struct usb2_pipe *pipe)
+uss820dci_clear_stall(struct usb_device *udev, struct usb_pipe *pipe)
{
struct uss820dci_softc *sc;
- struct usb2_endpoint_descriptor *ed;
+ struct usb_endpoint_descriptor *ed;
USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED);
@@ -1301,7 +1301,7 @@ uss820dci_clear_stall(struct usb2_device *udev, struct usb2_pipe *pipe)
usb2_error_t
uss820dci_init(struct uss820dci_softc *sc)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
uint8_t n;
uint8_t temp;
@@ -1499,7 +1499,7 @@ uss820dci_resume(struct uss820dci_softc *sc)
}
static void
-uss820dci_do_poll(struct usb2_bus *bus)
+uss820dci_do_poll(struct usb_bus *bus)
{
struct uss820dci_softc *sc = USS820_DCI_BUS2SC(bus);
@@ -1512,32 +1512,32 @@ uss820dci_do_poll(struct usb2_bus *bus)
* at91dci bulk support
*------------------------------------------------------------------------*/
static void
-uss820dci_device_bulk_open(struct usb2_xfer *xfer)
+uss820dci_device_bulk_open(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_device_bulk_close(struct usb2_xfer *xfer)
+uss820dci_device_bulk_close(struct usb_xfer *xfer)
{
uss820dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-uss820dci_device_bulk_enter(struct usb2_xfer *xfer)
+uss820dci_device_bulk_enter(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_device_bulk_start(struct usb2_xfer *xfer)
+uss820dci_device_bulk_start(struct usb_xfer *xfer)
{
/* setup TDs */
uss820dci_setup_standard_chain(xfer);
uss820dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods uss820dci_device_bulk_methods =
+struct usb_pipe_methods uss820dci_device_bulk_methods =
{
.open = uss820dci_device_bulk_open,
.close = uss820dci_device_bulk_close,
@@ -1549,32 +1549,32 @@ struct usb2_pipe_methods uss820dci_device_bulk_methods =
* at91dci control support
*------------------------------------------------------------------------*/
static void
-uss820dci_device_ctrl_open(struct usb2_xfer *xfer)
+uss820dci_device_ctrl_open(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_device_ctrl_close(struct usb2_xfer *xfer)
+uss820dci_device_ctrl_close(struct usb_xfer *xfer)
{
uss820dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-uss820dci_device_ctrl_enter(struct usb2_xfer *xfer)
+uss820dci_device_ctrl_enter(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_device_ctrl_start(struct usb2_xfer *xfer)
+uss820dci_device_ctrl_start(struct usb_xfer *xfer)
{
/* setup TDs */
uss820dci_setup_standard_chain(xfer);
uss820dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods uss820dci_device_ctrl_methods =
+struct usb_pipe_methods uss820dci_device_ctrl_methods =
{
.open = uss820dci_device_ctrl_open,
.close = uss820dci_device_ctrl_close,
@@ -1586,32 +1586,32 @@ struct usb2_pipe_methods uss820dci_device_ctrl_methods =
* at91dci interrupt support
*------------------------------------------------------------------------*/
static void
-uss820dci_device_intr_open(struct usb2_xfer *xfer)
+uss820dci_device_intr_open(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_device_intr_close(struct usb2_xfer *xfer)
+uss820dci_device_intr_close(struct usb_xfer *xfer)
{
uss820dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-uss820dci_device_intr_enter(struct usb2_xfer *xfer)
+uss820dci_device_intr_enter(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_device_intr_start(struct usb2_xfer *xfer)
+uss820dci_device_intr_start(struct usb_xfer *xfer)
{
/* setup TDs */
uss820dci_setup_standard_chain(xfer);
uss820dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods uss820dci_device_intr_methods =
+struct usb_pipe_methods uss820dci_device_intr_methods =
{
.open = uss820dci_device_intr_open,
.close = uss820dci_device_intr_close,
@@ -1623,19 +1623,19 @@ struct usb2_pipe_methods uss820dci_device_intr_methods =
* at91dci full speed isochronous support
*------------------------------------------------------------------------*/
static void
-uss820dci_device_isoc_fs_open(struct usb2_xfer *xfer)
+uss820dci_device_isoc_fs_open(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_device_isoc_fs_close(struct usb2_xfer *xfer)
+uss820dci_device_isoc_fs_close(struct usb_xfer *xfer)
{
uss820dci_device_done(xfer, USB_ERR_CANCELLED);
}
static void
-uss820dci_device_isoc_fs_enter(struct usb2_xfer *xfer)
+uss820dci_device_isoc_fs_enter(struct usb_xfer *xfer)
{
struct uss820dci_softc *sc = USS820_DCI_BUS2SC(xfer->xroot->bus);
uint32_t temp;
@@ -1687,13 +1687,13 @@ uss820dci_device_isoc_fs_enter(struct usb2_xfer *xfer)
}
static void
-uss820dci_device_isoc_fs_start(struct usb2_xfer *xfer)
+uss820dci_device_isoc_fs_start(struct usb_xfer *xfer)
{
/* start TD chain */
uss820dci_start_standard_chain(xfer);
}
-struct usb2_pipe_methods uss820dci_device_isoc_fs_methods =
+struct usb_pipe_methods uss820dci_device_isoc_fs_methods =
{
.open = uss820dci_device_isoc_fs_open,
.close = uss820dci_device_isoc_fs_close,
@@ -1707,8 +1707,8 @@ struct usb2_pipe_methods uss820dci_device_isoc_fs_methods =
* Simulate a hardware HUB by handling all the necessary requests.
*------------------------------------------------------------------------*/
-static const struct usb2_device_descriptor uss820dci_devd = {
- .bLength = sizeof(struct usb2_device_descriptor),
+static const struct usb_device_descriptor uss820dci_devd = {
+ .bLength = sizeof(struct usb_device_descriptor),
.bDescriptorType = UDESC_DEVICE,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1721,8 +1721,8 @@ static const struct usb2_device_descriptor uss820dci_devd = {
.bNumConfigurations = 1,
};
-static const struct usb2_device_qualifier uss820dci_odevd = {
- .bLength = sizeof(struct usb2_device_qualifier),
+static const struct usb_device_qualifier uss820dci_odevd = {
+ .bLength = sizeof(struct usb_device_qualifier),
.bDescriptorType = UDESC_DEVICE_QUALIFIER,
.bcdUSB = {0x00, 0x02},
.bDeviceClass = UDCLASS_HUB,
@@ -1734,7 +1734,7 @@ static const struct usb2_device_qualifier uss820dci_odevd = {
static const struct uss820dci_config_desc uss820dci_confd = {
.confd = {
- .bLength = sizeof(struct usb2_config_descriptor),
+ .bLength = sizeof(struct usb_config_descriptor),
.bDescriptorType = UDESC_CONFIG,
.wTotalLength[0] = sizeof(uss820dci_confd),
.bNumInterface = 1,
@@ -1744,7 +1744,7 @@ static const struct uss820dci_config_desc uss820dci_confd = {
.bMaxPower = 0,
},
.ifcd = {
- .bLength = sizeof(struct usb2_interface_descriptor),
+ .bLength = sizeof(struct usb_interface_descriptor),
.bDescriptorType = UDESC_INTERFACE,
.bNumEndpoints = 1,
.bInterfaceClass = UICLASS_HUB,
@@ -1753,7 +1753,7 @@ static const struct uss820dci_config_desc uss820dci_confd = {
},
.endpd = {
- .bLength = sizeof(struct usb2_endpoint_descriptor),
+ .bLength = sizeof(struct usb_endpoint_descriptor),
.bDescriptorType = UDESC_ENDPOINT,
.bEndpointAddress = (UE_DIR_IN | USS820_DCI_INTR_ENDPT),
.bmAttributes = UE_INTERRUPT,
@@ -1762,7 +1762,7 @@ static const struct uss820dci_config_desc uss820dci_confd = {
},
};
-static const struct usb2_hub_descriptor_min uss820dci_hubd = {
+static const struct usb_hub_descriptor_min uss820dci_hubd = {
.bDescLength = sizeof(uss820dci_hubd),
.bDescriptorType = UDESC_HUB,
.bNbrPorts = 1,
@@ -1791,8 +1791,8 @@ USB_MAKE_STRING_DESC(STRING_VENDOR, uss820dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, uss820dci_product);
static usb2_error_t
-uss820dci_roothub_exec(struct usb2_device *udev,
- struct usb2_device_request *req, const void **pptr, uint16_t *plength)
+uss820dci_roothub_exec(struct usb_device *udev,
+ struct usb_device_request *req, const void **pptr, uint16_t *plength)
{
struct uss820dci_softc *sc = USS820_DCI_BUS2SC(udev->bus);
const void *ptr;
@@ -2179,11 +2179,11 @@ done:
}
static void
-uss820dci_xfer_setup(struct usb2_setup_params *parm)
+uss820dci_xfer_setup(struct usb_setup_params *parm)
{
- const struct usb2_hw_ep_profile *pf;
+ const struct usb_hw_ep_profile *pf;
struct uss820dci_softc *sc;
- struct usb2_xfer *xfer;
+ struct usb_xfer *xfer;
void *last_obj;
uint32_t ntd;
uint32_t n;
@@ -2287,14 +2287,14 @@ uss820dci_xfer_setup(struct usb2_setup_params *parm)
}
static void
-uss820dci_xfer_unsetup(struct usb2_xfer *xfer)
+uss820dci_xfer_unsetup(struct usb_xfer *xfer)
{
return;
}
static void
-uss820dci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *edesc,
- struct usb2_pipe *pipe)
+uss820dci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
+ struct usb_pipe *pipe)
{
struct uss820dci_softc *sc = USS820_DCI_BUS2SC(udev->bus);
@@ -2333,7 +2333,7 @@ uss820dci_pipe_init(struct usb2_device *udev, struct usb2_endpoint_descriptor *e
}
}
-struct usb2_bus_methods uss820dci_bus_methods =
+struct usb_bus_methods uss820dci_bus_methods =
{
.pipe_init = &uss820dci_pipe_init,
.xfer_setup = &uss820dci_xfer_setup,
diff --git a/sys/dev/usb/controller/uss820dci.h b/sys/dev/usb/controller/uss820dci.h
index 08bbb6a..8e51caf 100644
--- a/sys/dev/usb/controller/uss820dci.h
+++ b/sys/dev/usb/controller/uss820dci.h
@@ -270,7 +270,7 @@ struct uss820dci_td {
bus_space_handle_t io_hdl;
struct uss820dci_td *obj_next;
uss820dci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
uint32_t offset;
uint32_t remainder;
uint16_t max_packet_size;
@@ -285,7 +285,7 @@ struct uss820dci_td {
struct uss820_std_temp {
uss820dci_cmd_t *func;
- struct usb2_page_cache *pc;
+ struct usb_page_cache *pc;
struct uss820dci_td *td;
struct uss820dci_td *td_next;
uint32_t len;
@@ -301,14 +301,14 @@ struct uss820_std_temp {
};
struct uss820dci_config_desc {
- struct usb2_config_descriptor confd;
- struct usb2_interface_descriptor ifcd;
- struct usb2_endpoint_descriptor endpd;
+ struct usb_config_descriptor confd;
+ struct usb_interface_descriptor ifcd;
+ struct usb_endpoint_descriptor endpd;
} __packed;
union uss820_hub_temp {
uWord wValue;
- struct usb2_port_status ps;
+ struct usb_port_status ps;
};
struct uss820_flags {
@@ -325,10 +325,10 @@ struct uss820_flags {
};
struct uss820dci_softc {
- struct usb2_bus sc_bus;
+ struct usb_bus sc_bus;
union uss820_hub_temp sc_hub_temp;
- struct usb2_device *sc_devices[USS820_MAX_DEVICES];
+ struct usb_device *sc_devices[USS820_MAX_DEVICES];
struct resource *sc_io_res;
struct resource *sc_irq_res;
void *sc_intr_hdl;
OpenPOWER on IntegriCloud