/* * Navman Serial USB driver * * Copyright (C) 2006 Greg Kroah-Hartman * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * * TODO: * Add termios method that uses copy_hw but also kills all echo * flags as the navman is rx only so cannot echo. */ #include #include #include #include #include #include #include static const struct usb_device_id id_table[] = { { USB_DEVICE(0x0a99, 0x0001) }, /* Talon Technology device */ { USB_DEVICE(0x0df7, 0x0900) }, /* Mobile Action i-gotU */ { }, }; MODULE_DEVICE_TABLE(usb, id_table); static void navman_read_int_callback(struct urb *urb) { struct usb_serial_port *port = urb->context; unsigned char *data = urb->transfer_buffer; int status = urb->status; int result; switch (status) { case 0: /* success */ break; case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: /* this urb is terminated, clean up */ dev_dbg(&port->dev, "%s - urb shutting down with status: %d\n", __func__, status); return; default: dev_dbg(&port->dev, "%s - nonzero urb status received: %d\n", __func__, status); goto exit; } usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data); if (urb->actual_length) { tty_insert_flip_string(&port->port, data, urb->actual_length); tty_flip_buffer_push(&port->port); } exit: result = usb_submit_urb(urb, GFP_ATOMIC); if (result) dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n", __func__, result); } static int navman_open(struct tty_struct *tty, struct usb_serial_port *port) { int result = 0; if (port->interrupt_in_urb) { dev_dbg(&port->dev, "%s - adding interrupt input for treo\n", __func__); result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); if (result) dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n", __func__, result); } return result; } static void navman_close(struct usb_serial_port *port) { usb_kill_urb(port->interrupt_in_urb); } static int navman_write(struct tty_struct *tty, struct usb_serial_port *port, const unsigned char *buf, int count) { /* * This device can't write any data, only read from the device */ return -EOPNOTSUPP; } static struct usb_serial_driver navman_device = { .driver = { .owner = THIS_MODULE, .name = "navman", }, .id_table = id_table, .num_ports = 1, .open = navman_open, .close = navman_close, .write = navman_write, .read_int_callback = navman_read_int_callback, }; static struct usb_serial_driver * const serial_drivers[] = { &navman_device, NULL }; module_usb_serial_driver(serial_drivers, id_table); MODULE_LICENSE("GPL"); ove&id=8fcdcc42a5268f298ac91962a5e816294435006f'>root/sound/soc/mxs/Kconfig
r>
AgeCommit message (Expand)AuthorFilesLines
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-01 11:52:27 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-01 11:52:27 -0800
commit6d04dfc8966019b8b0977b2cb942351f13d2b178 (patch)
tree2d4f239c1daff620704b77a992c1e70ce1ce6b08 /drivers/usb/dwc2/gadget.c
parent2883aaea363f7a897ff06d2e6c73ae7aae285bcb (diff)
parent06425c308b92eaf60767bc71d359f4cbc7a561f8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix handling of interrupt status in stmmac driver. Just because we have masked the event from generating interrupts, doesn't mean the bit won't still be set in the interrupt status register. From Alexey Brodkin. 2) Fix DMA API debugging splats in gianfar driver, from Arseny Solokha. 3) Fix off-by-one error in __ip6_append_data(), from Vlad Yasevich. 4) cls_flow does not match on icmpv6 codes properly, from Simon Horman. 5) Initial MAC address can be set incorrectly in some scenerios, from Ivan Vecera. 6) Packet header pointer arithmetic fix in ip6_tnl_parse_tlv_end_lim(), from Dan Carpenter. 7) Fix divide by zero in __tcp_select_window(), from Eric Dumazet. 8) Fix crash in iwlwifi when unregistering thermal zone, from Jens Axboe. 9) Check for DMA mapping errors in starfire driver, from Alexey Khoroshilov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (31 commits) tcp: fix 0 divide in __tcp_select_window() ipv6: pointer math error in ip6_tnl_parse_tlv_enc_lim() net: fix ndo_features_check/ndo_fix_features comment ordering net/sched: matchall: Fix configuration race be2net: fix initial MAC setting ipv6: fix flow labels when the traffic class is non-0 net: thunderx: avoid dereferencing xcv when NULL net/sched: cls_flower: Correct matching on ICMPv6 code ipv6: Paritially checksum full MTU frames net/mlx4_core: Avoid command timeouts during VF driver device shutdown gianfar: synchronize DMA API usage by free_skb_rx_queue w/ gfar_new_page net: ethtool: add support for 2500BaseT and 5000BaseT link modes can: bcm: fix hrtimer/tasklet termination in bcm op removal net: adaptec: starfire: add checks for dma mapping errors net: phy: micrel: KSZ8795 do not set SUPPORTED_[Asym_]Pause can: Fix kernel panic at security_sock_rcv_skb net: macb: Fix 64 bit addressing support for GEM stmmac: Discard masked flags in interrupt status register net/mlx5e: Check ets capability before ets query FW command net/mlx5e: Fix update of hash function/key via ethtool ...
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')