/* * USB Debug cable 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. */ #include #include #include #include #include #include #define USB_DEBUG_MAX_PACKET_SIZE 8 #define USB_DEBUG_BRK_SIZE 8 static const char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = { 0x00, 0xff, 0x01, 0xfe, 0x00, 0xfe, 0x01, 0xff, }; static const struct usb_device_id id_table[] = { { USB_DEVICE(0x0525, 0x127a) }, { }, }; static const struct usb_device_id dbc_id_table[] = { { USB_DEVICE(0x1d6b, 0x0010) }, { USB_DEVICE(0x1d6b, 0x0011) }, { }, }; static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(0x0525, 0x127a) }, { USB_DEVICE(0x1d6b, 0x0010) }, { USB_DEVICE(0x1d6b, 0x0011) }, { }, }; MODULE_DEVICE_TABLE(usb, id_table_combined); /* This HW really does not support a serial break, so one will be * emulated when ever the break state is set to true. */ static void usb_debug_break_ctl(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; if (!break_state) return; usb_serial_generic_write(tty, port, USB_DEBUG_BRK, USB_DEBUG_BRK_SIZE); } static void usb_debug_process_read_urb(struct urb *urb) { struct usb_serial_port *port = urb->context; if (urb->actual_length == USB_DEBUG_BRK_SIZE && memcmp(urb->transfer_buffer, USB_DEBUG_BRK, USB_DEBUG_BRK_SIZE) == 0) { usb_serial_handle_break(port); return; } usb_serial_generic_process_read_urb(urb); } static struct usb_serial_driver debug_device = { .driver = { .owner = THIS_MODULE, .name = "debug", }, .id_table = id_table, .num_ports = 1, .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE, .break_ctl = usb_debug_break_ctl, .process_read_urb = usb_debug_process_read_urb, }; static struct usb_serial_driver dbc_device = { .driver = { .owner = THIS_MODULE, .name = "xhci_dbc", }, .id_table = dbc_id_table, .num_ports = 1, .break_ctl = usb_debug_break_ctl, .process_read_urb = usb_debug_process_read_urb, }; static struct usb_serial_driver * const serial_drivers[] = { &debug_device, &dbc_device, NULL }; module_usb_serial_driver(serial_drivers, id_table_combined); MODULE_LICENSE("GPL"); on value='linux-2.6.38.y'>linux-2.6.38.y Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
0f2455c32653140775662b40c2b1f1b2efa'>net: fix proc_fs init handling in af_packet and tls
AgeCommit message (Expand)Author
2010-11-18lib: Add generic exponentially weighted moving average (EWMA) functionBruno Randolf
2010-08-09Merge branch 'async' of macbook:git/btrfs-unstableDavid Woodhouse
2010-07-14lmb: rename to memblockYinghai Lu
2010-03-07Revert "lib: build list_sort() only if needed"Linus Torvalds
2010-03-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfsLinus Torvalds
2010-03-06lib: build list_sort() only if neededDon Mullis
2010-01-11Add LZO compression support for initramfs and old-style initrdAlbin Tonnerre
2009-11-20[LogFS] add new flash file systemJoern Engel
2009-10-29md: Factor out RAID6 algorithms into lib/David Woodhouse
2009-10-01The DRBD driverPhilipp Reisner
2009-06-15lib: Provide generic atomic64_t implementationPaul Mackerras
2009-06-11lib: isolate rational fractions helper functionOskar Schirmer
2009-03-28Merge branch 'linus' into core/printkIngo Molnar
2009-03-27Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2Ingo Molnar
2009-03-26Merge branch 'sched-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/g...Linus Torvalds
2009-03-06vsprintf: add binary printfLai Jiangshan
2009-03-04netlink: Move netlink attribute parsing support to libGeert Uytterhoeven
2009-01-16sched: make plist a library facilityPeter Zijlstra
2009-01-07bzip2/lzma: DECOMPRESS_GZIP should select ZLIB_INFLATEH. Peter Anvin
2009-01-05bzip2/lzma: proper Kconfig dependencies for the ramdisk optionsH. Peter Anvin
2009-01-01cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONSRusty Russell
2009-01-01bitmap: find_last_bit()Rusty Russell
2008-12-30Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torval...Rusty Russell
2008-12-25libcrc32c: Select CRYPTO in KconfigHerbert Xu
2008-12-25libcrc32c: Move implementation to crypto crc32cHerbert Xu
2008-12-13cpumask: Add CONFIG_CPUMASK_OFFSTACKRusty Russell
2008-10-16Kconfig: eliminate "def_bool n" constructsJan Beulich
2008-07-12[SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRCMartin K. Petersen
Yonatan Linik
2020-11-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski
2020-11-23net/packet: fix packet receive on L3 devices without visible hard headerEyal Birger
2020-11-23net: don't include ethtool.h from netdevice.hJakub Kicinski
2020-11-09net/packet: make packet_fanout.arr size configurable up to 64KTanner Love
2020-09-19net/packet: Fix a comment about network_headerXie He
2020-09-17net/packet: Fix a comment about mac_headerXie He
2020-09-14net/packet: Fix a comment about hard_header_len and headroom allocationXie He
2020-09-06net/packet: Remove unused macro BLOCK_PRIVWang Hai
2020-09-04net/packet: fix overflow in tpacket_rcvOr Cohen
2020-08-23treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva
2020-08-13af_packet: TPACKET_V3: fix fill status rwlock imbalanceJohn Ogness
2020-07-24net: pass a sockptr_t into ->setsockoptChristoph Hellwig
2020-07-24net: switch copy_bpf_fprog_from_user to sockptr_tChristoph Hellwig
2020-07-19net: make ->{get,set}sockopt in proto_ops optionalChristoph Hellwig
2020-07-19net: simplify cBPF setsockopt compat handlingChristoph Hellwig
2020-07-16af_packet: TPACKET_V3: replace busy-wait loopJohn Ogness
2020-07-01net/packet: remove redundant initialization of variable errColin Ian King
2020-03-15net/packet: tpacket_rcv: avoid a producer race conditionWillem de Bruijn
2020-03-11net/packet: tpacket_rcv: do not increment ring index on dropWillem de Bruijn
2020-01-29Merge tag 'y2038-drivers-for-v5.6-signed' of git://git.kernel.org:/pub/scm/li...Linus Torvalds
2019-12-26af_packet: refactoring code for prb_calc_retire_blk_tmoMao Wenan
2019-12-18packet: clarify timestamp overflowArnd Bergmann
2019-12-09af_packet: set defaule value for tmoMao Wenan