Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver updates for 4.15-rc1. There is the usual amount of gadget and xhci driver updates, along with phy and chipidea enhancements. There's also a lot of SPDX tags and license boilerplate cleanups as well, which provide some churn in the diffstat. Other major thing is the typec code that moved out of staging and into the "real" part of the drivers/usb/ tree, which was nice to see happen. All of these have been in linux-next with no reported issues for a while" * tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) usb: gadget: f_fs: Fix use-after-free in ffs_free_inst USB: usbfs: compute urb->actual_length for isochronous usb: core: message: remember to reset 'ret' to 0 when necessary USB: typec: Remove remaining redundant license text USB: typec: add SPDX identifiers to some files USB: renesas_usbhs: rcar?.h: add SPDX tags USB: chipidea: ci_hdrc_tegra.c: add SPDX line USB: host: xhci-debugfs: add SPDX lines USB: add SPDX identifiers to all remaining Makefiles usb: host: isp1362-hcd: remove a couple of redundant assignments USB: adutux: remove redundant variable minor usb: core: add a new usb_get_ptm_status() helper usb: core: add a 'type' parameter to usb_get_status() usb: core: introduce a new usb_get_std_status() helper usb: core: rename usb_get_status() 'type' argument to 'recip' usb: core: add Status Type definitions USB: gadget: Remove redundant license text USB: gadget: function: Remove redundant license text USB: gadget: udc: Remove redundant license text USB: gadget: legacy: Remove redundant license text ...
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
# some rules to handle the quirks of the 'as31' assembler, like
|
||||
# insisting upon fixed suffixes for the input and output files,
|
||||
|
@@ -1,13 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* AIRcable USB Bluetooth Dongle Driver.
|
||||
*
|
||||
* Copyright (C) 2010 Johan Hovold <jhovold@gmail.com>
|
||||
* Copyright (C) 2006 Manuel Francisco Naranjo (naranjo.manuel@gmail.com)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The device works as an standard CDC device, it has 2 interfaces, the first
|
||||
* one is for firmware access and the second is the serial one.
|
||||
* The protocol is very simply, there are two possibilities reading or writing.
|
||||
@@ -161,4 +158,4 @@ module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2009 by Bart Hartgers (bart.hartgers+ark3116@gmail.com)
|
||||
* Original version:
|
||||
@@ -15,11 +16,6 @@
|
||||
* into the old ark3116.c driver and suddenly realized the ark3116 is
|
||||
* a 16450 with a USB interface glued to it. See comments at the
|
||||
* bottom of this file.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Belkin USB Serial Adapter Driver
|
||||
*
|
||||
@@ -9,11 +10,6 @@
|
||||
* and associated source files. Please see the usb/serial files for
|
||||
* individual credits and copyrights.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Definitions for Belkin USB Serial Adapter Driver
|
||||
*
|
||||
@@ -8,11 +9,6 @@
|
||||
* and associated source files. Please see the usb/serial files for
|
||||
* individual credits and copyrights.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
|
@@ -1,11 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB Serial Converter Bus specific functions
|
||||
*
|
||||
* Copyright (C) 2002 Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright 2007, Frank A Kingswood <frank@kingswood-consulting.co.uk>
|
||||
* Copyright 2007, Werner Cornelius <werner@cornelius-consult.de>
|
||||
@@ -9,10 +10,6 @@
|
||||
* serial port, an IEEE-1284 parallel printer port or a memory-like
|
||||
* interface. In all cases the CH341 supports an I2C interface as well.
|
||||
* This driver only supports the asynchronous serial interface.
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
@@ -644,4 +641,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB Serial Console driver
|
||||
*
|
||||
* Copyright (C) 2001 - 2002 Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Thanks to Randy Dunlap for the original version of this code.
|
||||
*
|
||||
*/
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Silicon Laboratories CP210x USB to RS232 serial adaptor driver
|
||||
*
|
||||
* Copyright (C) 2005 Craig Shelley (craig@microtron.org.uk)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Support to set flow control line levels using TIOCMGET and TIOCMSET
|
||||
* thanks to Karl Hiramoto karl@hiramoto.org. RTSCTS hardware flow
|
||||
* control thanks to Munir Nassar nassarmu@real-time.com
|
||||
@@ -1529,4 +1526,4 @@ static void cp210x_release(struct usb_serial *serial)
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* REINER SCT cyberJack pinpad/e-com USB Chipcard Reader Driver
|
||||
*
|
||||
@@ -10,11 +11,6 @@
|
||||
* and associated source files. Please see the usb/serial files for
|
||||
* individual credits and copyrights.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Thanks to Greg Kroah-Hartman (greg@kroah.com) for his help and
|
||||
* patience.
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB Cypress M8 driver
|
||||
*
|
||||
@@ -6,11 +7,6 @@
|
||||
* Copyright (C) 2003,2004
|
||||
* Neil Whelchel (koyama@firstlight.net)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
|
@@ -1,13 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Digi AccelePort USB-4 and USB-2 Serial Converters
|
||||
*
|
||||
* Copyright 2000 by Digi International
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Shamelessly based on Brian Warner's keyspan_pda.c and Greg Kroah-Hartman's
|
||||
* usb-serial driver.
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB Empeg empeg-car player driver
|
||||
*
|
||||
@@ -7,10 +8,6 @@
|
||||
* Copyright (C) 1999 - 2001
|
||||
* Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, as published by
|
||||
* the Free Software Foundation, version 2.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*/
|
||||
@@ -126,4 +123,4 @@ module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,13 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Fintek F81232 USB to serial adaptor driver
|
||||
*
|
||||
* Copyright (C) 2012 Greg Kroah-Hartman (gregkh@linuxfoundation.org)
|
||||
* Copyright (C) 2012 Linux Foundation
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* F81532/F81534 USB to Serial Ports Bridge
|
||||
*
|
||||
* F81532 => 2 Serial Ports
|
||||
* F81534 => 4 Serial Ports
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Copyright (C) 2016 Feature Integration Technology Inc., (Fintek)
|
||||
* Copyright (C) 2016 Tom Tsai (Tom_Tsai@fintek.com.tw)
|
||||
* Copyright (C) 2016 Peter Hong (Peter_Hong@fintek.com.tw)
|
||||
@@ -39,9 +35,11 @@
|
||||
#define F81534_UART_OFFSET 0x10
|
||||
#define F81534_DIVISOR_LSB_REG (0x00 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_DIVISOR_MSB_REG (0x01 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_INTERRUPT_ENABLE_REG (0x01 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_FIFO_CONTROL_REG (0x02 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_LINE_CONTROL_REG (0x03 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_MODEM_CONTROL_REG (0x04 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_LINE_STATUS_REG (0x05 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_MODEM_STATUS_REG (0x06 + F81534_UART_BASE_ADDRESS)
|
||||
#define F81534_CONFIG1_REG (0x09 + F81534_UART_BASE_ADDRESS)
|
||||
|
||||
@@ -126,9 +124,13 @@ struct f81534_serial_private {
|
||||
|
||||
struct f81534_port_private {
|
||||
struct mutex mcr_mutex;
|
||||
struct mutex lcr_mutex;
|
||||
struct work_struct lsr_work;
|
||||
struct usb_serial_port *port;
|
||||
unsigned long tx_empty;
|
||||
spinlock_t msr_lock;
|
||||
u8 shadow_mcr;
|
||||
u8 shadow_lcr;
|
||||
u8 shadow_msr;
|
||||
u8 phy_num;
|
||||
};
|
||||
@@ -461,6 +463,7 @@ static u32 f81534_calc_baud_divisor(u32 baudrate, u32 clockrate)
|
||||
static int f81534_set_port_config(struct usb_serial_port *port, u32 baudrate,
|
||||
u8 lcr)
|
||||
{
|
||||
struct f81534_port_private *port_priv = usb_get_serial_port_data(port);
|
||||
u32 divisor;
|
||||
int status;
|
||||
u8 value;
|
||||
@@ -489,35 +492,65 @@ static int f81534_set_port_config(struct usb_serial_port *port, u32 baudrate,
|
||||
}
|
||||
|
||||
divisor = f81534_calc_baud_divisor(baudrate, F81534_MAX_BAUDRATE);
|
||||
|
||||
mutex_lock(&port_priv->lcr_mutex);
|
||||
|
||||
value = UART_LCR_DLAB;
|
||||
status = f81534_set_port_register(port, F81534_LINE_CONTROL_REG,
|
||||
value);
|
||||
if (status) {
|
||||
dev_err(&port->dev, "%s: set LCR failed\n", __func__);
|
||||
return status;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
value = divisor & 0xff;
|
||||
status = f81534_set_port_register(port, F81534_DIVISOR_LSB_REG, value);
|
||||
if (status) {
|
||||
dev_err(&port->dev, "%s: set DLAB LSB failed\n", __func__);
|
||||
return status;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
value = (divisor >> 8) & 0xff;
|
||||
status = f81534_set_port_register(port, F81534_DIVISOR_MSB_REG, value);
|
||||
if (status) {
|
||||
dev_err(&port->dev, "%s: set DLAB MSB failed\n", __func__);
|
||||
return status;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
status = f81534_set_port_register(port, F81534_LINE_CONTROL_REG, lcr);
|
||||
value = lcr | (port_priv->shadow_lcr & UART_LCR_SBC);
|
||||
status = f81534_set_port_register(port, F81534_LINE_CONTROL_REG,
|
||||
value);
|
||||
if (status) {
|
||||
dev_err(&port->dev, "%s: set LCR failed\n", __func__);
|
||||
return status;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
return 0;
|
||||
port_priv->shadow_lcr = value;
|
||||
out_unlock:
|
||||
mutex_unlock(&port_priv->lcr_mutex);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void f81534_break_ctl(struct tty_struct *tty, int break_state)
|
||||
{
|
||||
struct usb_serial_port *port = tty->driver_data;
|
||||
struct f81534_port_private *port_priv = usb_get_serial_port_data(port);
|
||||
int status;
|
||||
|
||||
mutex_lock(&port_priv->lcr_mutex);
|
||||
|
||||
if (break_state)
|
||||
port_priv->shadow_lcr |= UART_LCR_SBC;
|
||||
else
|
||||
port_priv->shadow_lcr &= ~UART_LCR_SBC;
|
||||
|
||||
status = f81534_set_port_register(port, F81534_LINE_CONTROL_REG,
|
||||
port_priv->shadow_lcr);
|
||||
if (status)
|
||||
dev_err(&port->dev, "set break failed: %d\n", status);
|
||||
|
||||
mutex_unlock(&port_priv->lcr_mutex);
|
||||
}
|
||||
|
||||
static int f81534_update_mctrl(struct usb_serial_port *port, unsigned int set,
|
||||
@@ -1015,6 +1048,8 @@ static void f81534_process_per_serial_block(struct usb_serial_port *port,
|
||||
tty_insert_flip_char(&port->port, 0,
|
||||
TTY_OVERRUN);
|
||||
}
|
||||
|
||||
schedule_work(&port_priv->lsr_work);
|
||||
}
|
||||
|
||||
if (port->port.console && port->sysrq) {
|
||||
@@ -1162,6 +1197,21 @@ static int f81534_attach(struct usb_serial *serial)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void f81534_lsr_worker(struct work_struct *work)
|
||||
{
|
||||
struct f81534_port_private *port_priv;
|
||||
struct usb_serial_port *port;
|
||||
int status;
|
||||
u8 tmp;
|
||||
|
||||
port_priv = container_of(work, struct f81534_port_private, lsr_work);
|
||||
port = port_priv->port;
|
||||
|
||||
status = f81534_get_port_register(port, F81534_LINE_STATUS_REG, &tmp);
|
||||
if (status)
|
||||
dev_warn(&port->dev, "read LSR failed: %d\n", status);
|
||||
}
|
||||
|
||||
static int f81534_port_probe(struct usb_serial_port *port)
|
||||
{
|
||||
struct f81534_port_private *port_priv;
|
||||
@@ -1173,6 +1223,8 @@ static int f81534_port_probe(struct usb_serial_port *port)
|
||||
|
||||
spin_lock_init(&port_priv->msr_lock);
|
||||
mutex_init(&port_priv->mcr_mutex);
|
||||
mutex_init(&port_priv->lcr_mutex);
|
||||
INIT_WORK(&port_priv->lsr_work, f81534_lsr_worker);
|
||||
|
||||
/* Assign logic-to-phy mapping */
|
||||
ret = f81534_logic_to_phy_port(port->serial, port);
|
||||
@@ -1180,10 +1232,30 @@ static int f81534_port_probe(struct usb_serial_port *port)
|
||||
return ret;
|
||||
|
||||
port_priv->phy_num = ret;
|
||||
port_priv->port = port;
|
||||
usb_set_serial_port_data(port, port_priv);
|
||||
dev_dbg(&port->dev, "%s: port_number: %d, phy_num: %d\n", __func__,
|
||||
port->port_number, port_priv->phy_num);
|
||||
|
||||
/*
|
||||
* The F81532/534 will hang-up when enable LSR interrupt in IER and
|
||||
* occur data overrun. So we'll disable the LSR interrupt in probe()
|
||||
* and submit the LSR worker to clear LSR state when reported LSR error
|
||||
* bit with bulk-in data in f81534_process_per_serial_block().
|
||||
*/
|
||||
ret = f81534_set_port_register(port, F81534_INTERRUPT_ENABLE_REG,
|
||||
UART_IER_RDI | UART_IER_THRI | UART_IER_MSI);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int f81534_port_remove(struct usb_serial_port *port)
|
||||
{
|
||||
struct f81534_port_private *port_priv = usb_get_serial_port_data(port);
|
||||
|
||||
flush_work(&port_priv->lsr_work);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1317,6 +1389,8 @@ static struct usb_serial_driver f81534_device = {
|
||||
.calc_num_ports = f81534_calc_num_ports,
|
||||
.attach = f81534_attach,
|
||||
.port_probe = f81534_port_probe,
|
||||
.port_remove = f81534_port_remove,
|
||||
.break_ctl = f81534_break_ctl,
|
||||
.dtr_rts = f81534_dtr_rts,
|
||||
.process_read_urb = f81534_process_read_urb,
|
||||
.ioctl = f81534_ioctl,
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB FTDI SIO driver
|
||||
*
|
||||
@@ -9,11 +10,6 @@
|
||||
* Copyright (C) 2002
|
||||
* Kuba Ober (kuba@mareimbrium.org)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Garmin GPS driver
|
||||
*
|
||||
@@ -7,20 +8,6 @@
|
||||
* http://sourceforge.net/projects/garmin-gps/
|
||||
*
|
||||
* This driver has been derived from v2.1 of the visor driver.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
@@ -138,6 +125,7 @@ struct garmin_data {
|
||||
__u8 privpkt[4*6];
|
||||
spinlock_t lock;
|
||||
struct list_head pktlist;
|
||||
struct usb_anchor write_urbs;
|
||||
};
|
||||
|
||||
|
||||
@@ -875,43 +863,39 @@ static int garmin_clear(struct garmin_data *garmin_data_p)
|
||||
|
||||
static int garmin_init_session(struct usb_serial_port *port)
|
||||
{
|
||||
struct usb_serial *serial = port->serial;
|
||||
struct garmin_data *garmin_data_p = usb_get_serial_port_data(port);
|
||||
int status = 0;
|
||||
int i = 0;
|
||||
int status;
|
||||
int i;
|
||||
|
||||
if (status == 0) {
|
||||
usb_kill_urb(port->interrupt_in_urb);
|
||||
usb_kill_urb(port->interrupt_in_urb);
|
||||
|
||||
dev_dbg(&serial->dev->dev, "%s - adding interrupt input\n", __func__);
|
||||
status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
|
||||
if (status)
|
||||
dev_err(&serial->dev->dev,
|
||||
"%s - failed submitting interrupt urb, error %d\n",
|
||||
__func__, status);
|
||||
status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
|
||||
if (status) {
|
||||
dev_err(&port->dev, "failed to submit interrupt urb: %d\n",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* using the initialization method from gpsbabel. See comments in
|
||||
* gpsbabel/jeeps/gpslibusb.c gusb_reset_toggles()
|
||||
*/
|
||||
if (status == 0) {
|
||||
dev_dbg(&serial->dev->dev, "%s - starting session ...\n", __func__);
|
||||
garmin_data_p->state = STATE_ACTIVE;
|
||||
dev_dbg(&port->dev, "%s - starting session ...\n", __func__);
|
||||
garmin_data_p->state = STATE_ACTIVE;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
status = garmin_write_bulk(port,
|
||||
GARMIN_START_SESSION_REQ,
|
||||
sizeof(GARMIN_START_SESSION_REQ), 0);
|
||||
|
||||
if (status < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (status > 0)
|
||||
status = 0;
|
||||
for (i = 0; i < 3; i++) {
|
||||
status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
|
||||
sizeof(GARMIN_START_SESSION_REQ), 0);
|
||||
if (status < 0)
|
||||
goto err_kill_urbs;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_kill_urbs:
|
||||
usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
|
||||
usb_kill_urb(port->interrupt_in_urb);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -930,7 +914,6 @@ static int garmin_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
spin_unlock_irqrestore(&garmin_data_p->lock, flags);
|
||||
|
||||
/* shutdown any bulk reads that might be going on */
|
||||
usb_kill_urb(port->write_urb);
|
||||
usb_kill_urb(port->read_urb);
|
||||
|
||||
if (garmin_data_p->state == STATE_RESET)
|
||||
@@ -953,7 +936,7 @@ static void garmin_close(struct usb_serial_port *port)
|
||||
|
||||
/* shutdown our urbs */
|
||||
usb_kill_urb(port->read_urb);
|
||||
usb_kill_urb(port->write_urb);
|
||||
usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
|
||||
|
||||
/* keep reset state so we know that we must start a new session */
|
||||
if (garmin_data_p->state != STATE_RESET)
|
||||
@@ -1037,12 +1020,14 @@ static int garmin_write_bulk(struct usb_serial_port *port,
|
||||
}
|
||||
|
||||
/* send it down the pipe */
|
||||
usb_anchor_urb(urb, &garmin_data_p->write_urbs);
|
||||
status = usb_submit_urb(urb, GFP_ATOMIC);
|
||||
if (status) {
|
||||
dev_err(&port->dev,
|
||||
"%s - usb_submit_urb(write bulk) failed with status = %d\n",
|
||||
__func__, status);
|
||||
count = status;
|
||||
usb_unanchor_urb(urb);
|
||||
kfree(buffer);
|
||||
}
|
||||
|
||||
@@ -1370,9 +1355,9 @@ static void garmin_unthrottle(struct tty_struct *tty)
|
||||
* the tty in cases where the protocol provides no own handshaking
|
||||
* to initiate the transfer.
|
||||
*/
|
||||
static void timeout_handler(unsigned long data)
|
||||
static void timeout_handler(struct timer_list *t)
|
||||
{
|
||||
struct garmin_data *garmin_data_p = (struct garmin_data *) data;
|
||||
struct garmin_data *garmin_data_p = from_timer(garmin_data_p, t, timer);
|
||||
|
||||
/* send the next queued packet to the tty port */
|
||||
if (garmin_data_p->mode == MODE_NATIVE)
|
||||
@@ -1391,19 +1376,23 @@ static int garmin_port_probe(struct usb_serial_port *port)
|
||||
if (!garmin_data_p)
|
||||
return -ENOMEM;
|
||||
|
||||
init_timer(&garmin_data_p->timer);
|
||||
timer_setup(&garmin_data_p->timer, timeout_handler, 0);
|
||||
spin_lock_init(&garmin_data_p->lock);
|
||||
INIT_LIST_HEAD(&garmin_data_p->pktlist);
|
||||
/* garmin_data_p->timer.expires = jiffies + session_timeout; */
|
||||
garmin_data_p->timer.data = (unsigned long)garmin_data_p;
|
||||
garmin_data_p->timer.function = timeout_handler;
|
||||
garmin_data_p->port = port;
|
||||
garmin_data_p->state = 0;
|
||||
garmin_data_p->flags = 0;
|
||||
garmin_data_p->count = 0;
|
||||
init_usb_anchor(&garmin_data_p->write_urbs);
|
||||
usb_set_serial_port_data(port, garmin_data_p);
|
||||
|
||||
status = garmin_init_session(port);
|
||||
if (status)
|
||||
goto err_free;
|
||||
|
||||
return 0;
|
||||
err_free:
|
||||
kfree(garmin_data_p);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -1413,6 +1402,7 @@ static int garmin_port_remove(struct usb_serial_port *port)
|
||||
{
|
||||
struct garmin_data *garmin_data_p = usb_get_serial_port_data(port);
|
||||
|
||||
usb_kill_anchored_urbs(&garmin_data_p->write_urbs);
|
||||
usb_kill_urb(port->interrupt_in_urb);
|
||||
del_timer_sync(&garmin_data_p->timer);
|
||||
kfree(garmin_data_p);
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB Serial Converter Generic functions
|
||||
*
|
||||
* Copyright (C) 2010 - 2013 Johan Hovold (jhovold@gmail.com)
|
||||
* Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/************************************************************************
|
||||
*
|
||||
* 16654.H Definitions for 16C654 UART used on EdgePorts
|
||||
*
|
||||
* Copyright (C) 1998 Inside Out Networks, Inc.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Edgeport USB Serial Converter driver
|
||||
*
|
||||
* Copyright (C) 2000 Inside Out Networks, All rights reserved.
|
||||
* Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Supports the following devices:
|
||||
* Edgeport/4
|
||||
* Edgeport/4t
|
||||
|
@@ -1,15 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/************************************************************************
|
||||
*
|
||||
* io_edgeport.h Edgeport Linux Interface definitions
|
||||
*
|
||||
* Copyright (C) 2000 Inside Out Networks, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#if !defined(_IO_EDGEPORT_H_)
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/************************************************************************
|
||||
*
|
||||
* IONSP.H Definitions for I/O Networks Serial Protocol
|
||||
*
|
||||
* Copyright (C) 1997-1998 Inside Out Networks, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* These definitions are used by both kernel-mode driver and the
|
||||
* peripheral firmware and MUST be kept in sync.
|
||||
*
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Edgeport USB Serial Converter driver
|
||||
*
|
||||
* Copyright (C) 2000-2002 Inside Out Networks, All rights reserved.
|
||||
* Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Supports the following devices:
|
||||
* EP/1 EP/2 EP/4 EP/21 EP/22 EP/221 EP/42 EP/421 WATCHPORT
|
||||
*
|
||||
|
@@ -1,13 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Copyright (C) 1997-2002 Inside Out Networks, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* Feb-16-2001 DMI Added I2C structure definitions
|
||||
* May-29-2002 gkh Ported to Linux
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/************************************************************************
|
||||
*
|
||||
* USBVEND.H Vendor-specific USB definitions
|
||||
@@ -8,10 +9,6 @@
|
||||
************************************************************************
|
||||
*
|
||||
* Copyright (C) 1998 Inside Out Networks, Inc.
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
|
@@ -1,13 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB Compaq iPAQ driver
|
||||
*
|
||||
* Copyright (C) 2001 - 2002
|
||||
* Ganesh Varadarajan <ganesh@veritas.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* IPWireless 3G UMTS TDD Modem driver (USB connected)
|
||||
*
|
||||
* Copyright (C) 2004 Roelf Diedericks <roelfd@inet.co.za>
|
||||
* Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* All information about the device was acquired using SnoopyPro
|
||||
* on MSFT's O/S, and examing the MSFT drivers' debug output
|
||||
* (insanely left _on_ in the enduser version)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB IR Dongle driver
|
||||
*
|
||||
@@ -5,11 +6,6 @@
|
||||
* Copyright (C) 2002 Gary Brubaker (xavyer@ix.netcom.com)
|
||||
* Copyright (C) 2010 Johan Hovold (jhovold@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This driver allows a USB IrDA device to be used as a "dumb" serial device.
|
||||
* This can be useful if you do not have access to a full IrDA stack on the
|
||||
* other side of the connection. If you do have an IrDA stack on both devices,
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Infinity Unlimited USB Phoenix driver
|
||||
*
|
||||
@@ -7,13 +8,7 @@
|
||||
*
|
||||
* Original code taken from iuutool (Copyright (C) 2006 Juan Carlos Borrás)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* And tested with help of WB Electronics
|
||||
*
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Infinity Unlimited USB Phoenix driver
|
||||
*
|
||||
@@ -6,13 +7,7 @@
|
||||
*
|
||||
* Original code taken from iuutool ( Copyright (C) 2006 Juan Carlos Borrás )
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* And tested with help of WB Electronics
|
||||
*
|
||||
*/
|
||||
|
||||
#define IUU_USB_VENDOR_ID 0x104f
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
Keyspan USB to Serial Converter driver
|
||||
|
||||
(C) Copyright (C) 2000-2001 Hugh Blemings <hugh@blemings.org>
|
||||
(C) Copyright (C) 2002 Greg Kroah-Hartman <greg@kroah.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
See http://blemings.org/hugh/keyspan.html for more information.
|
||||
|
||||
Code in this driver inspired by and in a number of places taken
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB Keyspan PDA / Xircom / Entrega Converter driver
|
||||
*
|
||||
@@ -5,11 +6,6 @@
|
||||
* Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com>
|
||||
* Copyright (C) 2000 Al Borchers <borchers@steinerpoint.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*/
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* KLSI KL5KUSB105 chip RS232 converter driver
|
||||
*
|
||||
* Copyright (C) 2010 Johan Hovold <jhovold@gmail.com>
|
||||
* Copyright (C) 2001 Utz-Uwe Haus <haus@uuhaus.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* All information about the device was acquired using SniffUSB ans snoopUSB
|
||||
* on Windows98.
|
||||
* It was written out of frustration with the PalmConnect USB Serial adapter
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* KOBIL USB Smart Card Terminal Driver
|
||||
*
|
||||
@@ -10,11 +11,6 @@
|
||||
* and associated source files. Please see the usb/serial files for
|
||||
* individual credits and copyrights.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Thanks to Greg Kroah-Hartman (greg@kroah.com) for his help and
|
||||
* patience.
|
||||
*
|
||||
@@ -491,6 +487,7 @@ static void kobil_set_termios(struct tty_struct *tty,
|
||||
break;
|
||||
default:
|
||||
speed = 9600;
|
||||
/* fall through */
|
||||
case 9600:
|
||||
urb_val = SUSBCR_SBR_9600;
|
||||
break;
|
||||
|
@@ -1,13 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* MCT (Magic Control Technology Corp.) USB RS232 Converter Driver
|
||||
*
|
||||
* Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is largely derived from the Belkin USB Serial Adapter Driver
|
||||
* (see belkin_sa.[ch]). All of the information about the device was acquired
|
||||
* by using SniffUSB on Windows98. For technical details see mct_u232.h.
|
||||
|
@@ -1,13 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Definitions for MCT (Magic Control Technology) USB-RS232 Converter Driver
|
||||
*
|
||||
* Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This driver is for the device MCT USB-RS232 Converter (25 pin, Model No.
|
||||
* U232-P25) from Magic Control Technology Corp. (there is also a 9 pin
|
||||
* Model No. U232-P9). See http://www.mct.com.tw/products/product_us232.html
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
Some of this code is credited to Linux USB open source files that are
|
||||
distributed with Linux.
|
||||
@@ -54,21 +55,33 @@ MODULE_DEVICE_TABLE(usb, id_table);
|
||||
#define UNI_CMD_OPEN 0x80
|
||||
#define UNI_CMD_CLOSE 0xFF
|
||||
|
||||
static inline int metrousb_is_unidirectional_mode(struct usb_serial_port *port)
|
||||
static int metrousb_is_unidirectional_mode(struct usb_serial *serial)
|
||||
{
|
||||
__u16 product_id = le16_to_cpu(
|
||||
port->serial->dev->descriptor.idProduct);
|
||||
u16 product_id = le16_to_cpu(serial->dev->descriptor.idProduct);
|
||||
|
||||
return product_id == FOCUS_PRODUCT_ID_UNI;
|
||||
}
|
||||
|
||||
static int metrousb_calc_num_ports(struct usb_serial *serial,
|
||||
struct usb_serial_endpoints *epds)
|
||||
{
|
||||
if (metrousb_is_unidirectional_mode(serial)) {
|
||||
if (epds->num_interrupt_out == 0) {
|
||||
dev_err(&serial->interface->dev, "interrupt-out endpoint missing\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int metrousb_send_unidirectional_cmd(u8 cmd, struct usb_serial_port *port)
|
||||
{
|
||||
int ret;
|
||||
int actual_len;
|
||||
u8 *buffer_cmd = NULL;
|
||||
|
||||
if (!metrousb_is_unidirectional_mode(port))
|
||||
if (!metrousb_is_unidirectional_mode(port->serial))
|
||||
return 0;
|
||||
|
||||
buffer_cmd = kzalloc(sizeof(cmd), GFP_KERNEL);
|
||||
@@ -161,13 +174,6 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
unsigned long flags = 0;
|
||||
int result = 0;
|
||||
|
||||
/* Make sure the urb is initialized. */
|
||||
if (!port->interrupt_in_urb) {
|
||||
dev_err(&port->dev, "%s - interrupt urb not initialized\n",
|
||||
__func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Set the private data information for the port. */
|
||||
spin_lock_irqsave(&metro_priv->lock, flags);
|
||||
metro_priv->control_state = 0;
|
||||
@@ -189,7 +195,7 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
dev_err(&port->dev,
|
||||
"%s - failed submitting interrupt in urb, error code=%d\n",
|
||||
__func__, result);
|
||||
goto exit;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Send activate cmd to device */
|
||||
@@ -198,9 +204,14 @@ static int metrousb_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
dev_err(&port->dev,
|
||||
"%s - failed to configure device, error code=%d\n",
|
||||
__func__, result);
|
||||
goto exit;
|
||||
goto err_kill_urb;
|
||||
}
|
||||
exit:
|
||||
|
||||
return 0;
|
||||
|
||||
err_kill_urb:
|
||||
usb_kill_urb(port->interrupt_in_urb);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -337,7 +348,8 @@ static struct usb_serial_driver metrousb_device = {
|
||||
},
|
||||
.description = "Metrologic USB to Serial",
|
||||
.id_table = id_table,
|
||||
.num_ports = 1,
|
||||
.num_interrupt_in = 1,
|
||||
.calc_num_ports = metrousb_calc_num_ports,
|
||||
.open = metrousb_open,
|
||||
.close = metrousb_cleanup,
|
||||
.read_int_callback = metrousb_read_int_callback,
|
||||
@@ -356,7 +368,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Philip Nicastro");
|
||||
MODULE_AUTHOR("Aleksey Babahin <tamerlan311@gmail.com>");
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
|
@@ -1,13 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* mos7720.c
|
||||
* Controls the Moschip 7720 usb to dual port serial converter
|
||||
*
|
||||
* Copyright 2006 Moschip Semiconductor Tech. Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 2 of the License.
|
||||
*
|
||||
* Developed by:
|
||||
* Vijaya Kumar <vijaykumar.gn@gmail.com>
|
||||
* Ajay Kumar <naanuajay@yahoo.com>
|
||||
@@ -2043,4 +2040,4 @@ module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,18 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Clean ups from Moschip version and a few ioctl implementations by:
|
||||
* Paul B Schroeder <pschroeder "at" uplogix "dot" com>
|
||||
*
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* mxuport.c - MOXA UPort series driver
|
||||
*
|
||||
* Copyright (c) 2006 Moxa Technologies Co., Ltd.
|
||||
* Copyright (c) 2013 Andrew Lunn <andrew@lunn.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Supports the following Moxa USB to serial converters:
|
||||
* 2 ports : UPort 1250, UPort 1250I
|
||||
* 4 ports : UPort 1410, UPort 1450, UPort 1450I
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Navman Serial USB driver
|
||||
*
|
||||
* Copyright (C) 2006 Greg Kroah-Hartman <gregkh@suse.de>
|
||||
*
|
||||
* 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.
|
||||
@@ -115,4 +112,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB ZyXEL omni.net LCD PLUS driver
|
||||
*
|
||||
* Copyright (C) 2013,2017 Johan Hovold <johan@kernel.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
@@ -179,4 +176,4 @@ module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Opticon USB barcode to serial driver
|
||||
*
|
||||
@@ -5,10 +6,6 @@
|
||||
* Copyright (C) 2011 Martin Jansen <martin.jansen@opticon.com>
|
||||
* Copyright (C) 2008 - 2009 Greg Kroah-Hartman <gregkh@suse.de>
|
||||
* Copyright (C) 2008 - 2009 Novell Inc.
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
@@ -420,4 +417,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
USB Driver for GSM modems
|
||||
|
||||
Copyright (C) 2005 Matthias Urlichs <smurf@smurf.noris.de>
|
||||
|
||||
This driver is free software; you can redistribute it and/or modify
|
||||
it under the terms of Version 2 of the GNU General Public License as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
Portions copied from the Keyspan driver by Hugh Blemings <hugh@blemings.org>
|
||||
|
||||
History: see the git log.
|
||||
@@ -2206,4 +2203,4 @@ static void option_instat_callback(struct urb *urb)
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Ours Technology Inc. OTi-6858 USB to serial adapter driver.
|
||||
*
|
||||
@@ -21,10 +22,6 @@
|
||||
* So, THIS CODE CAN DESTROY OTi-6858 AND ANY OTHER DEVICES, THAT ARE
|
||||
* CONNECTED TO IT!
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
@@ -847,4 +844,4 @@ module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_DESCRIPTION(OTI6858_DESCRIPTION);
|
||||
MODULE_AUTHOR(OTI6858_AUTHOR);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,10 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Ours Technology Inc. OTi-6858 USB to serial adapter driver.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
#ifndef __LINUX_USB_SERIAL_OTI6858_H
|
||||
#define __LINUX_USB_SERIAL_OTI6858_H
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Prolific PL2303 USB to serial adaptor driver
|
||||
*
|
||||
@@ -6,10 +7,6 @@
|
||||
*
|
||||
* Original driver for 2.2.x by anonymous
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*/
|
||||
@@ -1025,4 +1022,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_DESCRIPTION("Prolific PL2303 USB to serial adaptor driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,11 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Prolific PL2303 USB to serial adaptor driver header file
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#define BENQ_VENDOR_ID 0x04a5
|
||||
|
@@ -1,13 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Qualcomm USB Auxiliary Serial Port driver
|
||||
*
|
||||
* Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com>
|
||||
* Copyright (C) 2010 Dan Williams <dcbw@redhat.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Devices listed here usually provide a CDC ACM port on which normal modem
|
||||
* AT commands and PPP can be used. But when that port is in-use by PPP it
|
||||
* cannot be used simultaneously for status or signal strength. Instead, the
|
||||
@@ -87,4 +84,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
};
|
||||
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Qualcomm Serial USB driver
|
||||
*
|
||||
* Copyright (c) 2008 QUALCOMM Incorporated.
|
||||
* Copyright (c) 2009 Greg Kroah-Hartman <gregkh@suse.de>
|
||||
* Copyright (c) 2009 Novell Inc.
|
||||
*
|
||||
* 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 <linux/tty.h>
|
||||
@@ -148,6 +144,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{DEVICE_SWI(0x1199, 0x68a2)}, /* Sierra Wireless MC7710 */
|
||||
{DEVICE_SWI(0x1199, 0x68c0)}, /* Sierra Wireless MC7304/MC7354 */
|
||||
{DEVICE_SWI(0x1199, 0x901c)}, /* Sierra Wireless EM7700 */
|
||||
{DEVICE_SWI(0x1199, 0x901e)}, /* Sierra Wireless EM7355 QDL */
|
||||
{DEVICE_SWI(0x1199, 0x901f)}, /* Sierra Wireless EM7355 */
|
||||
{DEVICE_SWI(0x1199, 0x9040)}, /* Sierra Wireless Modem */
|
||||
{DEVICE_SWI(0x1199, 0x9041)}, /* Sierra Wireless MC7305/MC7355 */
|
||||
|
@@ -1,13 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* usb-serial driver for Quatech USB 2 devices
|
||||
*
|
||||
* Copyright (C) 2012 Bill Pemberton (wfp5p@virginia.edu)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* These devices all have only 1 bulk in and 1 bulk out that is shared
|
||||
* for all serial ports.
|
||||
*
|
||||
@@ -1027,4 +1023,4 @@ static struct usb_serial_driver *const serial_drivers[] = {
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Safe Encapsulated USB Serial Driver
|
||||
*
|
||||
@@ -5,11 +6,6 @@
|
||||
* Copyright (C) 2001 Lineo
|
||||
* Copyright (C) 2001 Hewlett-Packard
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* By:
|
||||
* Stuart Lynne <sl@lineo.com>, Tom Rushworth <tbr@lineo.com>
|
||||
*/
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
USB Driver for Sierra Wireless
|
||||
|
||||
@@ -9,10 +10,6 @@
|
||||
IMPORTANT DISCLAIMER: This driver is not commercially supported by
|
||||
Sierra Wireless. Use at your own risk.
|
||||
|
||||
This driver is free software; you can redistribute it and/or modify
|
||||
it under the terms of Version 2 of the GNU General Public License as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
Portions based on the option driver by Matthias Urlichs <smurf@smurf.noris.de>
|
||||
Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
|
||||
*/
|
||||
@@ -1078,7 +1075,7 @@ module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
||||
module_param(nmea, bool, S_IRUGO | S_IWUSR);
|
||||
MODULE_PARM_DESC(nmea, "NMEA streaming");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* spcp8x5 USB to serial adaptor driver
|
||||
*
|
||||
@@ -8,11 +9,6 @@
|
||||
* Original driver for 2.6.10 pl2303 driver by
|
||||
* Greg Kroah-Hartman (greg@kroah.com)
|
||||
* Changes for 2.6.20 by Harald Klein <hari@vt100.at>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* usb-serial driver for Quatech SSU-100
|
||||
*
|
||||
@@ -576,4 +577,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,13 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Symbol USB barcode to serial driver
|
||||
*
|
||||
* Copyright (C) 2013 Johan Hovold <jhovold@gmail.com>
|
||||
* Copyright (C) 2009 Greg Kroah-Hartman <gregkh@suse.de>
|
||||
* Copyright (C) 2009 Novell Inc.
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
@@ -194,4 +191,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* TI 3410/5052 USB Serial Driver
|
||||
*
|
||||
@@ -7,11 +8,6 @@
|
||||
* Copyright (C) 2000-2002 Inside Out Networks
|
||||
* Copyright (C) 2001-2002 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 as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* For questions or problems with this driver, contact Texas Instruments
|
||||
* technical support, or Al Borchers <alborchers@steinerpoint.com>, or
|
||||
* Peter Berger <pberger@brimson.com>.
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Renesas Electronics uPD78F0730 USB to serial converter driver
|
||||
*
|
||||
* Copyright (C) 2014,2016 Maksim Salau <maksim.salau@gmail.com>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Protocol of the adaptor is described in the application note U19660EJ1V0AN00
|
||||
* μPD78F0730 8-bit Single-Chip Microcontroller
|
||||
* USB-to-Serial Conversion Software
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB Serial "Simple" driver
|
||||
*
|
||||
@@ -8,10 +9,6 @@
|
||||
* Copyright (C) 2010 Zilogic Systems <code@zilogic.com>
|
||||
* Copyright (C) 2013 Wei Shuai <cpuwolf@gmail.com>
|
||||
* Copyright (C) 2013 Linux Foundation
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
@@ -134,4 +131,4 @@ static const struct usb_device_id id_table[] = {
|
||||
MODULE_DEVICE_TABLE(usb, id_table);
|
||||
|
||||
module_usb_serial_driver(serial_drivers, id_table);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB Serial Converter driver
|
||||
*
|
||||
@@ -6,10 +7,6 @@
|
||||
* Copyright (C) 2000 Peter Berger (pberger@brimson.com)
|
||||
* Copyright (C) 2000 Al Borchers (borchers@steinerpoint.com)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This driver was originally based on the ACM driver by Armin Fuerst (which was
|
||||
* based on a driver by Brad Keryan)
|
||||
*
|
||||
@@ -1201,17 +1198,6 @@ static const struct tty_operations serial_ops = {
|
||||
|
||||
struct tty_driver *usb_serial_tty_driver;
|
||||
|
||||
/* Driver structure we register with the USB core */
|
||||
static struct usb_driver usb_serial_driver = {
|
||||
.name = "usbserial",
|
||||
.probe = usb_serial_probe,
|
||||
.disconnect = usb_serial_disconnect,
|
||||
.suspend = usb_serial_suspend,
|
||||
.resume = usb_serial_resume,
|
||||
.no_dynamic_id = 1,
|
||||
.supports_autosuspend = 1,
|
||||
};
|
||||
|
||||
static int __init usb_serial_init(void)
|
||||
{
|
||||
int result;
|
||||
@@ -1247,13 +1233,6 @@ static int __init usb_serial_init(void)
|
||||
goto exit_reg_driver;
|
||||
}
|
||||
|
||||
/* register the USB driver */
|
||||
result = usb_register(&usb_serial_driver);
|
||||
if (result < 0) {
|
||||
pr_err("%s - usb_register failed\n", __func__);
|
||||
goto exit_tty;
|
||||
}
|
||||
|
||||
/* register the generic driver, if we should */
|
||||
result = usb_serial_generic_register();
|
||||
if (result < 0) {
|
||||
@@ -1264,9 +1243,6 @@ static int __init usb_serial_init(void)
|
||||
return result;
|
||||
|
||||
exit_generic:
|
||||
usb_deregister(&usb_serial_driver);
|
||||
|
||||
exit_tty:
|
||||
tty_unregister_driver(usb_serial_tty_driver);
|
||||
|
||||
exit_reg_driver:
|
||||
@@ -1285,7 +1261,6 @@ static void __exit usb_serial_exit(void)
|
||||
|
||||
usb_serial_generic_deregister();
|
||||
|
||||
usb_deregister(&usb_serial_driver);
|
||||
tty_unregister_driver(usb_serial_tty_driver);
|
||||
put_tty_driver(usb_serial_tty_driver);
|
||||
bus_unregister(&usb_serial_bus_type);
|
||||
@@ -1460,4 +1435,4 @@ EXPORT_SYMBOL_GPL(usb_serial_deregister_drivers);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,11 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB Debug cable driver
|
||||
*
|
||||
* Copyright (C) 2006 Greg Kroah-Hartman <greg@kroah.com>
|
||||
*
|
||||
* 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 <linux/gfp.h>
|
||||
@@ -34,13 +31,13 @@ static const struct usb_device_id id_table[] = {
|
||||
};
|
||||
|
||||
static const struct usb_device_id dbc_id_table[] = {
|
||||
{ USB_DEVICE(0x1d6b, 0x0004) },
|
||||
{ USB_DEVICE(0x1d6b, 0x0011) },
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct usb_device_id id_table_combined[] = {
|
||||
{ USB_DEVICE(0x0525, 0x127a) },
|
||||
{ USB_DEVICE(0x1d6b, 0x0004) },
|
||||
{ USB_DEVICE(0x1d6b, 0x0011) },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, id_table_combined);
|
||||
@@ -98,4 +95,4 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
||||
};
|
||||
|
||||
module_usb_serial_driver(serial_drivers, id_table_combined);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
USB Driver layer for GSM modems
|
||||
|
||||
Copyright (C) 2005 Matthias Urlichs <smurf@smurf.noris.de>
|
||||
|
||||
This driver is free software; you can redistribute it and/or modify
|
||||
it under the terms of Version 2 of the GNU General Public License as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
Portions copied from the Keyspan driver by Hugh Blemings <hugh@blemings.org>
|
||||
|
||||
History: see the git log.
|
||||
@@ -723,4 +720,4 @@ EXPORT_SYMBOL(usb_wwan_resume);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* USB HandSpring Visor, Palm m50x, and Sony Clie driver
|
||||
* (supports all of the Palm OS USB devices)
|
||||
@@ -5,10 +6,6 @@
|
||||
* Copyright (C) 1999 - 2004
|
||||
* Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
@@ -579,4 +576,4 @@ module_usb_serial_driver(serial_drivers, id_table_combined);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@@ -1,14 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB HandSpring Visor driver
|
||||
*
|
||||
* Copyright (C) 1999 - 2003
|
||||
* Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver.
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB ConnectTech WhiteHEAT driver
|
||||
*
|
||||
@@ -7,11 +8,6 @@
|
||||
* Copyright (C) 1999 - 2001
|
||||
* Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*/
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB ConnectTech WhiteHEAT driver
|
||||
*
|
||||
@@ -7,11 +8,6 @@
|
||||
* Copyright (C) 1999, 2000
|
||||
* Greg Kroah-Hartman (greg@kroah.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this
|
||||
* driver
|
||||
*
|
||||
|
@@ -1,13 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* USB Wishbone-Serial adapter driver
|
||||
*
|
||||
* Copyright (C) 2013 Wesley W. Terpstra <w.terpstra@gsi.de>
|
||||
* Copyright (C) 2013 GSI Helmholtz Centre for Heavy Ion Research GmbH
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@@ -1,11 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Xsens MT USB driver
|
||||
*
|
||||
* Copyright (C) 2013 Xsens <info@xsens.com>
|
||||
*
|
||||
* 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 <linux/kernel.h>
|
||||
@@ -69,4 +66,4 @@ module_usb_serial_driver(serial_drivers, id_table);
|
||||
|
||||
MODULE_AUTHOR("Frans Klaver <frans.klaver@xsens.com>");
|
||||
MODULE_DESCRIPTION("USB-serial driver for Xsens motion trackers");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
Reference in New Issue
Block a user