• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/usb/wusbcore/

Lines Matching defs:wusbhc

24  * Creation/destruction of wusbhc is split in two parts; that that
34 #include "wusbhc.h"
37 * Extract the wusbhc that corresponds to a USB Host Controller class device
40 * wusbhc.usb_hcd.self->class_dev; otherwise, you loose.
42 static struct wusbhc *usbhc_dev_to_wusbhc(struct device *dev)
60 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
62 return scnprintf(buf, PAGE_SIZE, "%u\n", wusbhc->trust_timeout);
69 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
78 wusbhc->trust_timeout = trust_timeout;
79 cancel_delayed_work(&wusbhc->keep_alive_timer);
81 queue_delayed_work(wusbd, &wusbhc->keep_alive_timer,
95 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
99 if (wusbhc->wuie_host_info != NULL)
100 chid = &wusbhc->wuie_host_info->CHID;
122 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
144 result = wusbhc_chid_set(wusbhc, &chid);
154 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
156 return sprintf(buf, "%d\n", wusbhc->phy_rate);
163 struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
173 wusbhc->phy_rate = phy_rate;
192 * Create a wusbhc instance
196 * - assumes *wusbhc has been zeroed and wusbhc->usb_hcd has been
201 * - fill out wusbhc->uwb_rc and refcount it before calling
202 * - fill out the wusbhc->sec_modes array
204 int wusbhc_create(struct wusbhc *wusbhc)
208 wusbhc->trust_timeout = WUSB_TRUST_TIMEOUT_MS;
209 wusbhc->phy_rate = UWB_PHY_RATE_INVALID - 1;
211 mutex_init(&wusbhc->mutex);
212 result = wusbhc_mmcie_create(wusbhc);
215 result = wusbhc_devconnect_create(wusbhc);
218 result = wusbhc_rh_create(wusbhc);
221 result = wusbhc_sec_create(wusbhc);
227 wusbhc_rh_destroy(wusbhc);
229 wusbhc_devconnect_destroy(wusbhc);
231 wusbhc_mmcie_destroy(wusbhc);
237 static inline struct kobject *wusbhc_kobj(struct wusbhc *wusbhc)
239 return &wusbhc->usb_hcd.self.controller->kobj;
243 * Phase B of a wusbhc instance creation
245 * Creates fields that depend on wusbhc->usb_hcd having been
249 * NOTE: Assumes wusbhc->usb_hcd has been already added by the upper
252 int wusbhc_b_create(struct wusbhc *wusbhc)
255 struct device *dev = wusbhc->usb_hcd.self.controller;
257 result = sysfs_create_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group);
263 result = wusbhc_pal_register(wusbhc);
269 sysfs_remove_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group);
275 void wusbhc_b_destroy(struct wusbhc *wusbhc)
277 wusbhc_pal_unregister(wusbhc);
278 sysfs_remove_group(wusbhc_kobj(wusbhc), &wusbhc_attr_group);
282 void wusbhc_destroy(struct wusbhc *wusbhc)
284 wusbhc_sec_destroy(wusbhc);
285 wusbhc_rh_destroy(wusbhc);
286 wusbhc_devconnect_destroy(wusbhc);
287 wusbhc_mmcie_destroy(wusbhc);
352 * @wusbhc: the host controller the URB is from.
366 void wusbhc_giveback_urb(struct wusbhc *wusbhc, struct urb *urb, int status)
368 struct wusb_dev *wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev);
381 usb_hcd_giveback_urb(&wusbhc->usb_hcd, urb, status);
387 * @wusbhc: the host controller to reset.
392 void wusbhc_reset_all(struct wusbhc *wusbhc)
394 uwb_rc_reset_all(wusbhc->uwb_rc);