source: mainline/uspace/drv/usbhub/usbhub.h@ 44b1674

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 44b1674 was 46e078a, checked in by Vojtech Horky <vojtechhorky@…>, 14 years ago

USBHC iface: remove default address reservation

This functionality is now handled via endpoint registration.

Also removed references to this function from hub driver. Either they
were unreachable or would break things anyway.

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[4317827]1/*
2 * Copyright (c) 2010 Vojtech Horky
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
[281ebae]29/** @addtogroup drvusbhub
[4317827]30 * @{
31 */
32/** @file
33 * @brief Hub driver.
34 */
35#ifndef DRV_USBHUB_USBHUB_H
36#define DRV_USBHUB_USBHUB_H
37
[28cb8bf7]38#include <ipc/devman.h>
[eb1a2f4]39#include <ddf/driver.h>
[4317827]40
[6bb83c7]41#include <usb/hub.h>
[6c399765]42#include <usb/classes/hub.h>
[b5ec347]43
[d81ef61c]44#include <usb/pipes.h>
[09daa8b]45#include <usb/devdrv.h>
46
[3e490eb]47#include <fibril_synch.h>
48
[1e1b1a9]49#define NAME "usbhub"
[3e490eb]50
[1e1b1a9]51#include "ports.h"
[3e490eb]52
53
54
[b5ec347]55/** Information about attached hub. */
[b79c31f9]56struct usb_hub_info_t{
[b5ec347]57 /** Number of ports. */
[3e490eb]58 size_t port_count;
[09daa8b]59
[d81ef61c]60 /** attached device handles, for each port one */
[3e490eb]61 usb_hub_port_t *ports;
[195890b]62
[d81ef61c]63 /** connection to hcd */
[6bb83c7]64 usb_hc_connection_t connection;
[a83e138]65
[09daa8b]66 /** default address is used indicator
67 *
68 * If default address is requested by this device, it cannot
69 * be requested by the same hub again, otherwise a deadlock will occur.
70 */
[a83e138]71 bool is_default_address_used;
[09daa8b]72
73 /** convenience pointer to status change pipe
74 *
75 * Status change pipe is initialized in usb_device structure. This is
76 * pointer into this structure, so that it does not have to be
77 * searched again and again for the 'right pipe'.
78 */
[a372663]79 usb_pipe_t * status_change_pipe;
[09daa8b]80
81 /** convenience pointer to control pipe
82 *
83 * Control pipe is initialized in usb_device structure. This is
84 * pointer into this structure, so that it does not have to be
85 * searched again and again for the 'right pipe'.
86 */
[a372663]87 usb_pipe_t * control_pipe;
[09daa8b]88
89 /** generic usb device data*/
90 usb_device_t * usb_device;
[b79c31f9]91};
[b5ec347]92
[3e490eb]93//int usb_hub_control_loop(void * hub_info_param);
[4c74ac3]94
[a209648]95int usb_hub_add_device(usb_device_t * usb_dev);
96
[3e490eb]97bool hub_port_changes_callback(usb_device_t *dev,
98 uint8_t *change_bitmap, size_t change_bitmap_size, void *arg);
[1e1b1a9]99
[4317827]100#endif
101/**
102 * @}
103 */
Note: See TracBrowser for help on using the repository browser.