Lines Matching +full:dsr +full:- +full:override
1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2009 - 2013
7 * Copyright (C) 1999 - 2001
8 * Greg Kroah-Hartman (greg@kroah.com)
13 * See Documentation/usb/usb-serial.txt for more information on using this
16 * See http://ftdi-usb-sio.sourceforge.net for up to date testing info
24 /* Bill Ryder - bryder@sgi.com - wrote the FTDI_SIO implementation */
28 assimilated :-) */
46 #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober …
57 u16 last_set_data_value; /* the last data state set - needed for doing
67 speed_t force_baud; /* if non-zero, force the baud rate to
69 int force_rtscts; /* if non-zero, force RTS-CTS to always
117 * - it can support MUCH higher baudrates; up to:
121 * - it has a two byte status code.
122 * - it returns characters every 16ms (the FTDI does it every 40ms)
135 * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report.
1011 /* ICP DAS I-756xU devices */
1027 /* U-Blox devices */
1049 [FTX] = "FT-X"
1182 /* hi-speed baud rate is 10-bit sampling instead of 16-bit */ in ftdi_2232h_baud_base_to_divisor()
1213 struct device *dev = &port->dev; in update_mctrl()
1218 dev_dbg(dev, "%s - DTR|RTS not being set|cleared\n", __func__); in update_mctrl()
1232 rv = usb_control_msg(port->serial->dev, in update_mctrl()
1233 usb_sndctrlpipe(port->serial->dev, 0), in update_mctrl()
1236 value, priv->interface, in update_mctrl()
1245 dev_dbg(dev, "%s - DTR %s, RTS %s\n", __func__, in update_mctrl()
1249 priv->last_dtr_rts = (priv->last_dtr_rts & ~clear) | set; in update_mctrl()
1259 struct device *dev = &port->dev; in get_ftdi_divisor()
1265 dev_dbg(dev, "%s - tty_get_baud_rate reports speed %d\n", __func__, baud); in get_ftdi_divisor()
1268 * Observe deprecated async-compatible custom_divisor hack, update in get_ftdi_divisor()
1272 ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) && in get_ftdi_divisor()
1273 (priv->custom_divisor)) { in get_ftdi_divisor()
1274 baud = priv->baud_base / priv->custom_divisor; in get_ftdi_divisor()
1275 dev_dbg(dev, "%s - custom divisor %d sets baud rate to %d\n", in get_ftdi_divisor()
1276 __func__, priv->custom_divisor, baud); in get_ftdi_divisor()
1281 switch (priv->chip_type) { in get_ftdi_divisor()
1296 dev_dbg(dev, "%s - Baudrate (%d) requested is not supported\n", in get_ftdi_divisor()
1307 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1316 case FTX: /* FT-X series */ in get_ftdi_divisor()
1319 port->serial->dev->descriptor.idProduct); in get_ftdi_divisor()
1330 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1344 dev_dbg(dev, "%s - Baud rate too high!\n", __func__); in get_ftdi_divisor()
1350 } /* priv->chip_type */ in get_ftdi_divisor()
1353 dev_dbg(dev, "%s - Baud rate set to %d (divisor 0x%lX) on chip %s\n", in get_ftdi_divisor()
1355 ftdi_chip_name[priv->chip_type]); in get_ftdi_divisor()
1373 if ((priv->chip_type == FT2232C) || (priv->chip_type == FT2232H) || in change_speed()
1374 (priv->chip_type == FT4232H) || (priv->chip_type == FT232H)) { in change_speed()
1377 index = (u16)((index << 8) | priv->interface); in change_speed()
1380 rv = usb_control_msg(port->serial->dev, in change_speed()
1381 usb_sndctrlpipe(port->serial->dev, 0), in change_speed()
1392 struct usb_device *udev = port->serial->dev; in write_latency_timer()
1394 int l = priv->latency; in write_latency_timer()
1396 if (priv->chip_type == SIO || priv->chip_type == FT8U232AM) in write_latency_timer()
1397 return -EINVAL; in write_latency_timer()
1399 if (priv->flags & ASYNC_LOW_LATENCY) in write_latency_timer()
1402 dev_dbg(&port->dev, "%s: setting latency timer = %i\n", __func__, l); in write_latency_timer()
1408 l, priv->interface, in write_latency_timer()
1411 dev_err(&port->dev, "Unable to write latency timer: %i\n", rv); in write_latency_timer()
1418 struct usb_device *udev = port->serial->dev; in _read_latency_timer()
1424 return -ENOMEM; in _read_latency_timer()
1430 0, priv->interface, in _read_latency_timer()
1434 rv = -EIO; in _read_latency_timer()
1449 if (priv->chip_type == SIO || priv->chip_type == FT8U232AM) in read_latency_timer()
1450 return -EINVAL; in read_latency_timer()
1454 dev_err(&port->dev, "Unable to read latency timer: %i\n", rv); in read_latency_timer()
1458 priv->latency = rv; in read_latency_timer()
1470 tmp.flags = priv->flags; in get_serial_info()
1471 tmp.baud_base = priv->baud_base; in get_serial_info()
1472 tmp.custom_divisor = priv->custom_divisor; in get_serial_info()
1474 return -EFAULT; in get_serial_info()
1486 return -EFAULT; in set_serial_info()
1488 mutex_lock(&priv->cfg_lock); in set_serial_info()
1494 if ((new_serial.flags ^ priv->flags) & ~ASYNC_USR_MASK) { in set_serial_info()
1495 mutex_unlock(&priv->cfg_lock); in set_serial_info()
1496 return -EPERM; in set_serial_info()
1498 priv->flags = ((priv->flags & ~ASYNC_USR_MASK) | in set_serial_info()
1500 priv->custom_divisor = new_serial.custom_divisor; in set_serial_info()
1504 if (new_serial.baud_base != priv->baud_base) { in set_serial_info()
1505 mutex_unlock(&priv->cfg_lock); in set_serial_info()
1506 return -EINVAL; in set_serial_info()
1509 /* Make the changes - these are privileged changes! */ in set_serial_info()
1511 priv->flags = ((priv->flags & ~ASYNC_FLAGS) | in set_serial_info()
1513 priv->custom_divisor = new_serial.custom_divisor; in set_serial_info()
1518 if ((priv->flags ^ old_priv.flags) & ASYNC_SPD_MASK || in set_serial_info()
1519 ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST && in set_serial_info()
1520 priv->custom_divisor != old_priv.custom_divisor)) { in set_serial_info()
1523 if (priv->flags & ASYNC_SPD_MASK) in set_serial_info()
1524 dev_warn_ratelimited(&port->dev, "use of SPD flags is deprecated\n"); in set_serial_info()
1527 mutex_unlock(&priv->cfg_lock); in set_serial_info()
1530 mutex_unlock(&priv->cfg_lock); in set_serial_info()
1540 if (priv->transmit_empty) in get_lsr_info()
1544 return -EFAULT; in get_lsr_info()
1553 struct usb_serial *serial = port->serial; in ftdi_determine_type()
1554 struct usb_device *udev = serial->dev; in ftdi_determine_type()
1559 priv->baud_base = 48000000 / 2; in ftdi_determine_type()
1561 version = le16_to_cpu(udev->descriptor.bcdDevice); in ftdi_determine_type()
1562 interfaces = udev->actconfig->desc.bNumInterfaces; in ftdi_determine_type()
1563 dev_dbg(&port->dev, "%s: bcdDevice = 0x%x, bNumInterfaces = %u\n", __func__, in ftdi_determine_type()
1570 priv->chip_type = FT4232H; in ftdi_determine_type()
1571 /* Hi-speed - baud clock runs at 120MHz */ in ftdi_determine_type()
1572 priv->baud_base = 120000000 / 2; in ftdi_determine_type()
1574 priv->chip_type = FT2232H; in ftdi_determine_type()
1575 /* Hi-speed - baud clock runs at 120MHz */ in ftdi_determine_type()
1576 priv->baud_base = 120000000 / 2; in ftdi_determine_type()
1578 priv->chip_type = FT2232C; in ftdi_determine_type()
1581 inter = serial->interface->altsetting->desc.bInterfaceNumber; in ftdi_determine_type()
1583 priv->interface = INTERFACE_A; in ftdi_determine_type()
1585 priv->interface = INTERFACE_B; in ftdi_determine_type()
1587 priv->interface = INTERFACE_C; in ftdi_determine_type()
1589 priv->interface = INTERFACE_D; in ftdi_determine_type()
1591 /* BM-type devices have a bug where bcdDevice gets set in ftdi_determine_type()
1594 dev_dbg(&port->dev, in ftdi_determine_type()
1595 "%s: something fishy - bcdDevice too low for multi-interface device\n", in ftdi_determine_type()
1600 priv->chip_type = SIO; in ftdi_determine_type()
1601 priv->baud_base = 12000000 / 16; in ftdi_determine_type()
1604 priv->chip_type = FT8U232AM; in ftdi_determine_type()
1610 if (udev->descriptor.iSerialNumber == 0 && in ftdi_determine_type()
1612 dev_dbg(&port->dev, in ftdi_determine_type()
1615 priv->chip_type = FT232BM; in ftdi_determine_type()
1619 priv->chip_type = FT232BM; in ftdi_determine_type()
1622 priv->chip_type = FT232RL; in ftdi_determine_type()
1625 priv->chip_type = FT232H; in ftdi_determine_type()
1627 /* Assume it's an FT-X series device */ in ftdi_determine_type()
1628 priv->chip_type = FTX; in ftdi_determine_type()
1631 dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]); in ftdi_determine_type()
1643 struct usb_interface *interface = port->serial->interface; in ftdi_set_max_packet_size()
1648 num_endpoints = interface->cur_altsetting->desc.bNumEndpoints; in ftdi_set_max_packet_size()
1654 * with an endpoint size of 0 - not good. In this case, we in ftdi_set_max_packet_size()
1655 * want to override the endpoint descriptor setting and use a in ftdi_set_max_packet_size()
1659 ep_desc = &interface->cur_altsetting->endpoint[i].desc; in ftdi_set_max_packet_size()
1660 if (!ep_desc->wMaxPacketSize) { in ftdi_set_max_packet_size()
1661 ep_desc->wMaxPacketSize = cpu_to_le16(0x40); in ftdi_set_max_packet_size()
1662 dev_warn(&port->dev, "Overriding wMaxPacketSize on endpoint %d\n", in ftdi_set_max_packet_size()
1668 priv->max_packet_size = usb_endpoint_maxp(ep_desc); in ftdi_set_max_packet_size()
1683 if (priv->flags & ASYNC_LOW_LATENCY) in latency_timer_show()
1686 return sprintf(buf, "%i\n", priv->latency); in latency_timer_show()
1700 return -EINVAL; in latency_timer_store()
1702 priv->latency = v; in latency_timer_store()
1705 return -EIO; in latency_timer_store()
1717 struct usb_device *udev = port->serial->dev; in event_char_store()
1722 return -EINVAL; in event_char_store()
1724 dev_dbg(&port->dev, "%s: setting event char = 0x%03x\n", __func__, v); in event_char_store()
1730 v, priv->interface, in event_char_store()
1733 dev_dbg(&port->dev, "Unable to write event character: %i\n", rv); in event_char_store()
1734 return -EIO; in event_char_store()
1748 if (priv->chip_type != SIO) { in create_sysfs_attrs()
1749 dev_dbg(&port->dev, "sysfs attributes for %s\n", ftdi_chip_name[priv->chip_type]); in create_sysfs_attrs()
1750 retval = device_create_file(&port->dev, &dev_attr_event_char); in create_sysfs_attrs()
1752 (priv->chip_type == FT232BM || in create_sysfs_attrs()
1753 priv->chip_type == FT2232C || in create_sysfs_attrs()
1754 priv->chip_type == FT232RL || in create_sysfs_attrs()
1755 priv->chip_type == FT2232H || in create_sysfs_attrs()
1756 priv->chip_type == FT4232H || in create_sysfs_attrs()
1757 priv->chip_type == FT232H || in create_sysfs_attrs()
1758 priv->chip_type == FTX)) { in create_sysfs_attrs()
1759 retval = device_create_file(&port->dev, in create_sysfs_attrs()
1771 if (priv->chip_type != SIO) { in remove_sysfs_attrs()
1772 device_remove_file(&port->dev, &dev_attr_event_char); in remove_sysfs_attrs()
1773 if (priv->chip_type == FT232BM || in remove_sysfs_attrs()
1774 priv->chip_type == FT2232C || in remove_sysfs_attrs()
1775 priv->chip_type == FT232RL || in remove_sysfs_attrs()
1776 priv->chip_type == FT2232H || in remove_sysfs_attrs()
1777 priv->chip_type == FT4232H || in remove_sysfs_attrs()
1778 priv->chip_type == FT232H || in remove_sysfs_attrs()
1779 priv->chip_type == FTX) { in remove_sysfs_attrs()
1780 device_remove_file(&port->dev, &dev_attr_latency_timer); in remove_sysfs_attrs()
1797 (struct ftdi_sio_quirk *)id->driver_info; in ftdi_sio_probe()
1799 if (quirk && quirk->probe) { in ftdi_sio_probe()
1800 int ret = quirk->probe(serial); in ftdi_sio_probe()
1805 usb_set_serial_data(serial, (void *)id->driver_info); in ftdi_sio_probe()
1813 const struct ftdi_sio_quirk *quirk = usb_get_serial_data(port->serial); in ftdi_sio_port_probe()
1818 return -ENOMEM; in ftdi_sio_port_probe()
1820 mutex_init(&priv->cfg_lock); in ftdi_sio_port_probe()
1822 if (quirk && quirk->port_probe) in ftdi_sio_port_probe()
1823 quirk->port_probe(priv); in ftdi_sio_port_probe()
1830 priv->latency = 16; in ftdi_sio_port_probe()
1836 /* Setup for the USB-UIRT device, which requires hardwired
1841 priv->flags |= ASYNC_SPD_CUST; in ftdi_USB_UIRT_setup()
1842 priv->custom_divisor = 77; in ftdi_USB_UIRT_setup()
1843 priv->force_baud = 38400; in ftdi_USB_UIRT_setup()
1846 /* Setup for the HE-TIRA1 device, which requires hardwired
1847 * baudrate (38400 gets mapped to 100000) and RTS-CTS enabled. */
1851 priv->flags |= ASYNC_SPD_CUST; in ftdi_HE_TIRA1_setup()
1852 priv->custom_divisor = 240; in ftdi_HE_TIRA1_setup()
1853 priv->force_baud = 38400; in ftdi_HE_TIRA1_setup()
1854 priv->force_rtscts = 1; in ftdi_HE_TIRA1_setup()
1858 * Module parameter to control latency timer for NDI FTDI-based USB devices.
1864 /* Setup for the NDI FTDI-based USB devices, which requires hardwired
1871 struct usb_device *udev = serial->dev; in ftdi_NDI_device_setup()
1879 dev_dbg(&udev->dev, "%s setting NDI device latency to %d\n", __func__, latency); in ftdi_NDI_device_setup()
1880 dev_info(&udev->dev, "NDI device with a latency value of %d\n", latency); in ftdi_NDI_device_setup()
1891 * First port on JTAG adaptors such as Olimex arm-usb-ocd or the FIC/OpenMoko
1897 struct usb_device *udev = serial->dev; in ftdi_jtag_probe()
1898 struct usb_interface *interface = serial->interface; in ftdi_jtag_probe()
1900 if (interface == udev->actconfig->interface[0]) { in ftdi_jtag_probe()
1901 dev_info(&udev->dev, in ftdi_jtag_probe()
1903 return -ENODEV; in ftdi_jtag_probe()
1911 struct usb_device *udev = serial->dev; in ftdi_8u2232c_probe()
1913 if (udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems")) in ftdi_8u2232c_probe()
1916 if (udev->product && in ftdi_8u2232c_probe()
1917 (!strcmp(udev->product, "Arrow USB Blaster") || in ftdi_8u2232c_probe()
1918 !strcmp(udev->product, "BeagleBone/XDS100V2") || in ftdi_8u2232c_probe()
1919 !strcmp(udev->product, "SNAP Connect E10"))) in ftdi_8u2232c_probe()
1927 * ST Micro Connect Lite are reserved for JTAG or other non-UART interfaces and
1930 * a conventional RS-232 UART.
1934 struct usb_device *udev = serial->dev; in ftdi_stmclite_probe()
1935 struct usb_interface *interface = serial->interface; in ftdi_stmclite_probe()
1937 if (interface == udev->actconfig->interface[0] || in ftdi_stmclite_probe()
1938 interface == udev->actconfig->interface[1]) { in ftdi_stmclite_probe()
1939 dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n"); in ftdi_stmclite_probe()
1940 return -ENODEV; in ftdi_stmclite_probe()
1959 struct usb_device *dev = port->serial->dev; in ftdi_open()
1967 priv->interface, NULL, 0, WDR_TIMEOUT); in ftdi_open()
1970 port->tty->termios - this would lose speed settings, etc. in ftdi_open()
1971 This is same behaviour as serial.c/rs_open() - Kuba */ in ftdi_open()
1986 if (usb_control_msg(port->serial->dev, in ftdi_dtr_rts()
1987 usb_sndctrlpipe(port->serial->dev, 0), in ftdi_dtr_rts()
1990 0, priv->interface, NULL, 0, in ftdi_dtr_rts()
1992 dev_err(&port->dev, "error from flowcontrol urb\n"); in ftdi_dtr_rts()
2018 if (priv->chip_type == SIO) { in ftdi_prepare_write_buffer()
2023 spin_lock_irqsave(&port->lock, flags); in ftdi_prepare_write_buffer()
2024 for (i = 0; i < size - 1; i += priv->max_packet_size) { in ftdi_prepare_write_buffer()
2025 len = min_t(int, size - i, priv->max_packet_size) - 1; in ftdi_prepare_write_buffer()
2026 c = kfifo_out(&port->write_fifo, &buffer[i + 1], len); in ftdi_prepare_write_buffer()
2029 port->icount.tx += c; in ftdi_prepare_write_buffer()
2033 spin_unlock_irqrestore(&port->lock, flags); in ftdi_prepare_write_buffer()
2035 count = kfifo_out_locked(&port->write_fifo, dest, size, in ftdi_prepare_write_buffer()
2036 &port->lock); in ftdi_prepare_write_buffer()
2037 port->icount.tx += count; in ftdi_prepare_write_buffer()
2053 dev_dbg(&port->dev, "malformed packet\n"); in ftdi_process_packet()
2061 if (status != priv->prev_status) { in ftdi_process_packet()
2062 char diff_status = status ^ priv->prev_status; in ftdi_process_packet()
2065 port->icount.cts++; in ftdi_process_packet()
2067 port->icount.dsr++; in ftdi_process_packet()
2069 port->icount.rng++; in ftdi_process_packet()
2073 port->icount.dcd++; in ftdi_process_packet()
2074 tty = tty_port_tty_get(&port->port); in ftdi_process_packet()
2081 wake_up_interruptible(&port->port.delta_msr_wait); in ftdi_process_packet()
2082 priv->prev_status = status; in ftdi_process_packet()
2087 priv->transmit_empty = 1; in ftdi_process_packet()
2089 priv->transmit_empty = 0; in ftdi_process_packet()
2096 * data payload to avoid over-reporting. in ftdi_process_packet()
2104 port->icount.brk++; in ftdi_process_packet()
2108 port->icount.parity++; in ftdi_process_packet()
2111 port->icount.frame++; in ftdi_process_packet()
2115 port->icount.overrun++; in ftdi_process_packet()
2116 tty_insert_flip_char(&port->port, 0, TTY_OVERRUN); in ftdi_process_packet()
2120 port->icount.rx += len - 2; in ftdi_process_packet()
2122 if (port->port.console && port->sysrq) { in ftdi_process_packet()
2126 tty_insert_flip_char(&port->port, buf[i], flag); in ftdi_process_packet()
2129 tty_insert_flip_string_fixed_flag(&port->port, buf + 2, flag, in ftdi_process_packet()
2130 len - 2); in ftdi_process_packet()
2133 return len - 2; in ftdi_process_packet()
2138 struct usb_serial_port *port = urb->context; in ftdi_process_read_urb()
2140 char *data = (char *)urb->transfer_buffer; in ftdi_process_read_urb()
2145 for (i = 0; i < urb->actual_length; i += priv->max_packet_size) { in ftdi_process_read_urb()
2146 len = min_t(int, urb->actual_length - i, priv->max_packet_size); in ftdi_process_read_urb()
2151 tty_flip_buffer_push(&port->port); in ftdi_process_read_urb()
2156 struct usb_serial_port *port = tty->driver_data; in ftdi_break_ctl()
2160 /* break_state = -1 to turn on break, and 0 to turn off break */ in ftdi_break_ctl()
2165 value = priv->last_set_data_value | FTDI_SIO_SET_BREAK; in ftdi_break_ctl()
2167 value = priv->last_set_data_value; in ftdi_break_ctl()
2169 if (usb_control_msg(port->serial->dev, in ftdi_break_ctl()
2170 usb_sndctrlpipe(port->serial->dev, 0), in ftdi_break_ctl()
2173 value , priv->interface, in ftdi_break_ctl()
2175 dev_err(&port->dev, "%s FAILED to enable/disable break state (state was %d)\n", in ftdi_break_ctl()
2179 dev_dbg(&port->dev, "%s break state is %d - urb is %d\n", __func__, in ftdi_break_ctl()
2198 /* old_termios contains the original termios settings and tty->termios contains
2205 struct usb_device *dev = port->serial->dev; in ftdi_set_termios()
2206 struct device *ddev = &port->dev; in ftdi_set_termios()
2208 struct ktermios *termios = &tty->termios; in ftdi_set_termios()
2209 unsigned int cflag = termios->c_cflag; in ftdi_set_termios()
2215 if (priv->force_baud && ((termios->c_cflag & CBAUD) != B0)) { in ftdi_set_termios()
2217 tty_encode_baud_rate(tty, priv->force_baud, in ftdi_set_termios()
2218 priv->force_baud); in ftdi_set_termios()
2221 /* Force RTS-CTS if this device requires it. */ in ftdi_set_termios()
2222 if (priv->force_rtscts) { in ftdi_set_termios()
2224 termios->c_cflag |= CRTSCTS; in ftdi_set_termios()
2244 termios->c_cflag &= ~CSIZE; in ftdi_set_termios()
2246 termios->c_cflag |= old_termios->c_cflag & CSIZE; in ftdi_set_termios()
2248 termios->c_cflag |= CS8; in ftdi_set_termios()
2251 cflag = termios->c_cflag; in ftdi_set_termios()
2256 if (old_termios->c_cflag == termios->c_cflag in ftdi_set_termios()
2257 && old_termios->c_ispeed == termios->c_ispeed in ftdi_set_termios()
2258 && old_termios->c_ospeed == termios->c_ospeed) in ftdi_set_termios()
2262 ftdi_sio_read_bulk_callback - need to examine what this means - in ftdi_set_termios()
2265 if ((old_termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)) == in ftdi_set_termios()
2266 (termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB))) in ftdi_set_termios()
2303 - but is or'ed with this value */ in ftdi_set_termios()
2304 priv->last_set_data_value = value; in ftdi_set_termios()
2309 value , priv->interface, in ftdi_set_termios()
2322 0, priv->interface, in ftdi_set_termios()
2331 mutex_lock(&priv->cfg_lock); in ftdi_set_termios()
2334 mutex_unlock(&priv->cfg_lock); in ftdi_set_termios()
2336 if (old_termios && (old_termios->c_cflag & CBAUD) == B0) in ftdi_set_termios()
2341 /* Set hardware-assisted flow control */ in ftdi_set_termios()
2345 dev_dbg(&port->dev, "enabling rts/cts flow control\n"); in ftdi_set_termios()
2348 dev_dbg(&port->dev, "enabling xon/xoff flow control\n"); in ftdi_set_termios()
2352 dev_dbg(&port->dev, "disabling flow control\n"); in ftdi_set_termios()
2356 index |= priv->interface; in ftdi_set_termios()
2363 dev_err(&port->dev, "failed to set flow control: %d\n", ret); in ftdi_set_termios()
2367 * Get modem-control status.
2382 return -ENOMEM; in ftdi_get_modem_status()
2387 switch (priv->chip_type) { in ftdi_get_modem_status()
2402 ret = -EFAULT; in ftdi_get_modem_status()
2406 ret = usb_control_msg(port->serial->dev, in ftdi_get_modem_status()
2407 usb_rcvctrlpipe(port->serial->dev, 0), in ftdi_get_modem_status()
2410 0, priv->interface, in ftdi_get_modem_status()
2415 dev_err(&port->dev, "failed to get modem status: %d\n", ret); in ftdi_get_modem_status()
2417 ret = -EIO; in ftdi_get_modem_status()
2428 dev_dbg(&port->dev, "%s - 0x%02x%02x\n", __func__, status[0], in ftdi_get_modem_status()
2438 struct usb_serial_port *port = tty->driver_data; in ftdi_tiocmget()
2451 priv->last_dtr_rts; in ftdi_tiocmget()
2459 struct usb_serial_port *port = tty->driver_data; in ftdi_tiocmset()
2467 struct usb_serial_port *port = tty->driver_data; in ftdi_ioctl()
2481 return -ENOIOCTLCMD; in ftdi_ioctl()
2491 MODULE_PARM_DESC(ndi_latency_timer, "NDI device latency timer override");