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

Lines Matching refs:hso_dev

336 			     struct hso_device *hso_dev);
341 static int hso_start_serial_device(struct hso_device *hso_dev, gfp_t flags);
342 static int hso_stop_serial_device(struct hso_device *hso_dev);
343 static int hso_start_net_device(struct hso_device *hso_dev);
345 static int hso_stop_net_device(struct hso_device *hso_dev);
351 static int hso_put_activity(struct hso_device *hso_dev);
352 static int hso_get_activity(struct hso_device *hso_dev);
361 static inline struct hso_net *dev2net(struct hso_device *hso_dev)
363 return hso_dev->port_data.dev_net;
366 static inline struct hso_serial *dev2ser(struct hso_device *hso_dev)
368 return hso_dev->port_data.dev_serial;
500 struct hso_device *hso_dev = dev_get_drvdata(dev);
503 if (!hso_dev)
506 switch (hso_dev->port_spec & HSO_PORT_MASK) {
674 struct hso_device *hso_dev)
708 if (hso_dev)
709 schedule_work(&hso_dev->reset_device);
2114 static void hso_log_port(struct hso_device *hso_dev)
2119 switch (hso_dev->port_spec & HSO_PORT_MASK) {
2154 if ((hso_dev->port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK) {
2155 sprintf(port_dev, "%s", dev2net(hso_dev)->net->name);
2158 dev2ser(hso_dev)->minor);
2160 dev_dbg(&hso_dev->interface->dev, "HSO: Found %s port %s\n",
2164 static int hso_start_net_device(struct hso_device *hso_dev)
2167 struct hso_net *hso_net = dev2net(hso_dev);
2177 hso_dev->usb,
2178 usb_rcvbulkpipe(hso_dev->usb,
2189 dev_warn(&hso_dev->usb->dev,
2197 static int hso_stop_net_device(struct hso_device *hso_dev)
2200 struct hso_net *hso_net = dev2net(hso_dev);
2216 static int hso_start_serial_device(struct hso_device *hso_dev, gfp_t flags)
2219 struct hso_serial *serial = dev2ser(hso_dev);
2251 hso_dev->usb, flags);
2263 static int hso_stop_serial_device(struct hso_device *hso_dev)
2266 struct hso_serial *serial = dev2ser(hso_dev);
2403 struct hso_device *hso_dev;
2405 hso_dev = kzalloc(sizeof(*hso_dev), GFP_ATOMIC);
2406 if (!hso_dev)
2409 hso_dev->port_spec = port_spec;
2410 hso_dev->usb = interface_to_usbdev(intf);
2411 hso_dev->interface = intf;
2412 kref_init(&hso_dev->ref);
2413 mutex_init(&hso_dev->mutex);
2415 INIT_WORK(&hso_dev->async_get_intf, async_get_intf);
2416 INIT_WORK(&hso_dev->async_put_intf, async_put_intf);
2417 INIT_WORK(&hso_dev->reset_device, reset_device);
2419 return hso_dev;
2423 static int remove_net_device(struct hso_device *hso_dev)
2428 if (network_table[i] == hso_dev) {
2439 static void hso_free_net_device(struct hso_device *hso_dev)
2442 struct hso_net *hso_net = dev2net(hso_dev);
2464 kfree(hso_dev);
2495 static int add_net_device(struct hso_device *hso_dev)
2501 network_table[i] = hso_dev;
2512 struct hso_device *hso_dev = data;
2516 mutex_lock(&hso_dev->mutex);
2517 if (hso_dev->usb_gone)
2520 rv = usb_control_msg(hso_dev->usb, usb_rcvctrlpipe(hso_dev->usb, 0),
2523 mutex_unlock(&hso_dev->mutex);
2532 static void hso_create_rfkill(struct hso_device *hso_dev,
2535 struct hso_net *hso_net = dev2net(hso_dev);
2549 &hso_rfkill_ops, hso_dev);
2575 struct hso_device *hso_dev;
2577 hso_dev = hso_create_device(interface, port_spec);
2578 if (!hso_dev)
2591 hso_dev->port_data.dev_net = hso_net;
2593 hso_net->parent = hso_dev;
2642 add_net_device(hso_dev);
2644 hso_log_port(hso_dev);
2646 hso_create_rfkill(hso_dev, interface);
2648 return hso_dev;
2650 hso_free_net_device(hso_dev);
2669 static void hso_free_serial_device(struct hso_device *hso_dev)
2671 struct hso_serial *serial = dev2ser(hso_dev);
2688 kfree(hso_dev);
2695 struct hso_device *hso_dev;
2700 hso_dev = hso_create_device(interface, port);
2701 if (!hso_dev)
2708 serial->parent = hso_dev;
2709 hso_dev->port_data.dev_serial = serial;
2759 hso_log_port(hso_dev);
2762 return hso_dev;
2769 kfree(hso_dev);
2779 struct hso_device *hso_dev;
2790 hso_dev = hso_create_device(interface, port_spec);
2791 if (!hso_dev)
2798 hso_dev->port_data.dev_serial = serial;
2799 serial->parent = hso_dev;
2817 hso_log_port(hso_dev);
2820 return hso_dev;
2827 if (hso_dev)
2828 kfree(hso_dev);
2950 struct hso_device *hso_dev = NULL;
2979 hso_dev = hso_create_net_device(interface,
2981 if (!hso_dev)
2983 tmp_dev = hso_dev;
2997 hso_dev = hso_create_mux_serial_device(
2999 if (!hso_dev)
3005 hso_dev = tmp_dev;
3012 hso_dev = hso_create_net_device(interface, port_spec);
3014 hso_dev =
3016 if (!hso_dev)
3024 usb_set_intfdata(interface, hso_dev);
3044 struct hso_device *hso_dev =
3046 usb_autopm_get_interface(hso_dev->interface);
3051 struct hso_device *hso_dev =
3053 usb_autopm_put_interface(hso_dev->interface);
3056 static int hso_get_activity(struct hso_device *hso_dev)
3058 if (hso_dev->usb->state == USB_STATE_SUSPENDED) {
3059 if (!hso_dev->is_active) {
3060 hso_dev->is_active = 1;
3061 schedule_work(&hso_dev->async_get_intf);
3065 if (hso_dev->usb->state != USB_STATE_CONFIGURED)
3068 usb_mark_last_busy(hso_dev->usb);
3073 static int hso_put_activity(struct hso_device *hso_dev)
3075 if (hso_dev->usb->state != USB_STATE_SUSPENDED) {
3076 if (hso_dev->is_active) {
3077 hso_dev->is_active = 0;
3078 schedule_work(&hso_dev->async_put_intf);
3082 hso_dev->is_active = 0;
3162 struct hso_device *hso_dev =
3164 struct usb_device *usb = hso_dev->usb;
3167 if (hso_dev->usb_gone) {
3170 result = usb_lock_device_for_reset(usb, hso_dev->interface);
3182 struct hso_device *hso_dev = container_of(ref, struct hso_device, ref);
3184 hso_free_serial_device(hso_dev);
3189 struct hso_serial *hso_dev;
3196 hso_dev = dev2ser(serial_table[i]);
3197 spin_lock_irq(&hso_dev->serial_lock);
3198 tty = tty_kref_get(hso_dev->tty);
3199 spin_unlock_irq(&hso_dev->serial_lock);
3202 mutex_lock(&hso_dev->parent->mutex);
3204 hso_dev->parent->usb_gone = 1;
3205 mutex_unlock(&hso_dev->parent->mutex);