]> Git Repo - linux.git/commitdiff
Merge tag 'tty-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
authorLinus Torvalds <[email protected]>
Tue, 3 Dec 2019 22:09:14 +0000 (14:09 -0800)
committerLinus Torvalds <[email protected]>
Tue, 3 Dec 2019 22:09:14 +0000 (14:09 -0800)
Pull tty/serial updates from Greg KH:
 "Here is the "big" tty and serial driver patches for 5.5-rc1.

  It's a bit later in the merge window than normal as I wanted to make
  sure some last-minute patches applied to it were all sane. They seem
  to be :)

  There's a lot of little stuff in here, for the tty core, and for lots
  of serial drivers:

   - reverts of uartlite serial driver patches that were wrong

   - msm-serial driver fixes

   - serial core updates and fixes

   - tty core fixes

   - serial driver dma mapping api changes

   - lots of other tiny fixes and updates for serial drivers

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'tty-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (58 commits)
  Revert "serial/8250: Add support for NI-Serial PXI/PXIe+485 devices"
  vcs: prevent write access to vcsu devices
  tty: vt: keyboard: reject invalid keycodes
  tty: don't crash in tty_init_dev when missing tty_port
  serial: stm32: fix clearing interrupt error flags
  tty: Fix Kconfig indentation, continued
  serial: serial_core: Perform NULL checks for break_ctl ops
  tty: remove unused argument from tty_open_by_driver()
  tty: Fix Kconfig indentation
  {tty: serial, nand: onenand}: samsung: rename to fix build warning
  serial: ifx6x60: add missed pm_runtime_disable
  serial: pl011: Fix DMA ->flush_buffer()
  Revert "serial-uartlite: Move the uart register"
  Revert "serial-uartlite: Add get serial id if not provided"
  Revert "serial-uartlite: Do not use static struct uart_driver out of probe()"
  Revert "serial-uartlite: Add runtime support"
  Revert "serial-uartlite: Change logic how console_port is setup"
  Revert "serial-uartlite: Use allocated structure instead of static ones"
  tty: serial: msm_serial: Use dma_request_chan() directly for channel request
  tty: serial: tegra: Use dma_request_chan() directly for channel request
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
drivers/tty/hvc/Kconfig
drivers/tty/serial/8250/8250_pci.c
drivers/tty/serial/Kconfig
drivers/tty/tty_io.c

index 4f34799e0576124aee37cc2624b646f537f49128,6dbd871493afda255289020f0835715c137c1a0b..5a92d89a1bd4ebc2c7d4ec9863c18ceb42fcfd5e
                        no delay (0).
                        Format: integer
  
 -      bootmem_debug   [KNL] Enable bootmem allocator debug messages.
 -
        bert_disable    [ACPI]
                        Disable BERT OS support on buggy BIOSes.
  
  
        earlycon=       [KNL] Output early console device and options.
  
 -                      [ARM64] The early console is determined by the
 -                      stdout-path property in device tree's chosen node,
 -                      or determined by the ACPI SPCR table.
 -
 -                      [X86] When used with no options the early console is
 -                      determined by the ACPI SPCR table.
 +                      When used with no options, the early console is
 +                      determined by stdout-path property in device tree's
 +                      chosen node or the ACPI SPCR table if supported by
 +                      the platform.
  
                cdns,<addr>[,options]
                        Start an early, polled-mode console on a Cadence
                        mapped with the correct attributes.
  
                linflex,<addr>
-                       Use early console provided by Freescale LinFlex UART
+                       Use early console provided by Freescale LINFlexD UART
                        serial driver for NXP S32V234 SoCs. A valid base
                        address must be provided, and the serial port must
                        already be setup and configured.
                        Format: {"off" | "on" | "skip[mbr]"}
  
        efi=            [EFI]
 -                      Format: { "old_map", "nochunk", "noruntime", "debug" }
 +                      Format: { "old_map", "nochunk", "noruntime", "debug",
 +                                "nosoftreserve" }
                        old_map [X86-64]: switch to the old ioremap-based EFI
                        runtime services mapping. 32-bit still uses this one by
                        default.
                        firmware implementations.
                        noruntime : disable EFI runtime services support
                        debug: enable misc debug output
 +                      nosoftreserve: The EFI_MEMORY_SP (Specific Purpose)
 +                      attribute may cause the kernel to reserve the
 +                      memory range for a memory mapping driver to
 +                      claim. Specify efi=nosoftreserve to disable this
 +                      reservation and treat the memory by its base type
 +                      (i.e. EFI_CONVENTIONAL_MEMORY / "System RAM").
  
        efi_no_storage_paranoia [EFI; X86]
                        Using this parameter you can use more than 50% of
                        updating original EFI memory map.
                        Region of memory which aa attribute is added to is
                        from ss to ss+nn.
 +
                        If efi_fake_mem=2G@4G:0x10000,2G@0x10a0000000:0x10000
                        is specified, EFI_MEMORY_MORE_RELIABLE(0x10000)
                        attribute is added to range 0x100000000-0x180000000 and
                        0x10a0000000-0x1120000000.
  
 +                      If efi_fake_mem=8G@9G:0x40000 is specified, the
 +                      EFI_MEMORY_SP(0x40000) attribute is added to
 +                      range 0x240000000-0x43fffffff.
 +
                        Using this parameter you can do debugging of EFI memmap
 -                      related feature. For example, you can do debugging of
 +                      related features. For example, you can do debugging of
                        Address Range Mirroring feature even if your box
 -                      doesn't support it.
 +                      doesn't support it, or mark specific memory as
 +                      "soft reserved".
  
        efivar_ssdt=    [EFI; X86] Name of an EFI variable that contains an SSDT
                        that is to be dynamically loaded by Linux. If there are
                        KVM MMU at runtime.
                        Default is 0 (off)
  
 +      kvm.nx_huge_pages=
 +                      [KVM] Controls the software workaround for the
 +                      X86_BUG_ITLB_MULTIHIT bug.
 +                      force   : Always deploy workaround.
 +                      off     : Never deploy workaround.
 +                      auto    : Deploy workaround based on the presence of
 +                                X86_BUG_ITLB_MULTIHIT.
 +
 +                      Default is 'auto'.
 +
 +                      If the software workaround is enabled for the host,
 +                      guests do need not to enable it for nested guests.
 +
 +      kvm.nx_huge_pages_recovery_ratio=
 +                      [KVM] Controls how many 4KiB pages are periodically zapped
 +                      back to huge pages.  0 disables the recovery, otherwise if
 +                      the value is N KVM will zap 1/Nth of the 4KiB pages every
 +                      minute.  The default is 60.
 +
        kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM.
                        Default is 1 (enabled)
  
                                     SMT on vulnerable CPUs
                        off        - Unconditionally disable MDS mitigation
  
 +                      On TAA-affected machines, mds=off can be prevented by
 +                      an active TAA mitigation as both vulnerabilities are
 +                      mitigated with the same mechanism so in order to disable
 +                      this mitigation, you need to specify tsx_async_abort=off
 +                      too.
 +
                        Not specifying this option is equivalent to
                        mds=full.
  
                                               ssbd=force-off [ARM64]
                                               l1tf=off [X86]
                                               mds=off [X86]
 +                                             tsx_async_abort=off [X86]
 +                                             kvm.nx_huge_pages=off [X86]
 +
 +                              Exceptions:
 +                                             This does not have any effect on
 +                                             kvm.nx_huge_pages when
 +                                             kvm.nx_huge_pages=force.
  
                        auto (default)
                                Mitigate all CPU vulnerabilities, but leave SMT
                                be fully mitigated, even if it means losing SMT.
                                Equivalent to: l1tf=flush,nosmt [X86]
                                               mds=full,nosmt [X86]
 +                                             tsx_async_abort=full,nosmt [X86]
  
        mminit_loglevel=
                        [KNL] When CONFIG_DEBUG_MEMORY_INIT is set, this
                        [X86,PV_OPS] Disable paravirtualized VMware scheduler
                        clock and use the default one.
  
 -      no-steal-acc    [X86,KVM] Disable paravirtualized steal time accounting.
 -                      steal time is computed, but won't influence scheduler
 -                      behaviour
 +      no-steal-acc    [X86,KVM,ARM64] Disable paravirtualized steal time
 +                      accounting. steal time is computed, but won't
 +                      influence scheduler behaviour
  
        nolapic         [X86-32,APIC] Do not enable or use the local APIC.
  
                        This can be set from sysctl after boot.
                        See Documentation/admin-guide/sysctl/vm.rst for details.
  
 +      of_devlink      [OF, KNL] Create device links between consumer and
 +                      supplier devices by scanning the devictree to infer the
 +                      consumer/supplier relationships.  A consumer device
 +                      will not be probed until all the supplier devices have
 +                      probed successfully.
 +
        ohci1394_dma=early      [HW] enable debugging via the ohci1394 driver.
                        See Documentation/debugging-via-ohci1394.txt for more
                        info.
                hpiosize=nn[KMG]        The fixed amount of bus space which is
                                reserved for hotplug bridge's IO window.
                                Default size is 256 bytes.
 +              hpmmiosize=nn[KMG]      The fixed amount of bus space which is
 +                              reserved for hotplug bridge's MMIO window.
 +                              Default size is 2 megabytes.
 +              hpmmioprefsize=nn[KMG]  The fixed amount of bus space which is
 +                              reserved for hotplug bridge's MMIO_PREF window.
 +                              Default size is 2 megabytes.
                hpmemsize=nn[KMG]       The fixed amount of bus space which is
 -                              reserved for hotplug bridge's memory window.
 +                              reserved for hotplug bridge's MMIO and
 +                              MMIO_PREF window.
                                Default size is 2 megabytes.
                hpbussize=nn    The minimum amount of additional bus numbers
                                reserved for buses below a hotplug bridge.
                        even if the platform doesn't give the OS permission to
                        use them.  This may cause conflicts if the platform
                        also tries to use these services.
 +              dpc-native      Use native PCIe service for DPC only.  May
 +                              cause conflicts if firmware uses AER or DPC.
                compat  Disable native PCIe services (PME, AER, DPC, PCIe
                        hotplug).
  
                        interruptions from clocksource watchdog are not
                        acceptable).
  
 +      tsx=            [X86] Control Transactional Synchronization
 +                      Extensions (TSX) feature in Intel processors that
 +                      support TSX control.
 +
 +                      This parameter controls the TSX feature. The options are:
 +
 +                      on      - Enable TSX on the system. Although there are
 +                              mitigations for all known security vulnerabilities,
 +                              TSX has been known to be an accelerator for
 +                              several previous speculation-related CVEs, and
 +                              so there may be unknown security risks associated
 +                              with leaving it enabled.
 +
 +                      off     - Disable TSX on the system. (Note that this
 +                              option takes effect only on newer CPUs which are
 +                              not vulnerable to MDS, i.e., have
 +                              MSR_IA32_ARCH_CAPABILITIES.MDS_NO=1 and which get
 +                              the new IA32_TSX_CTRL MSR through a microcode
 +                              update. This new MSR allows for the reliable
 +                              deactivation of the TSX functionality.)
 +
 +                      auto    - Disable TSX if X86_BUG_TAA is present,
 +                                otherwise enable TSX on the system.
 +
 +                      Not specifying this option is equivalent to tsx=off.
 +
 +                      See Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
 +                      for more details.
 +
 +      tsx_async_abort= [X86,INTEL] Control mitigation for the TSX Async
 +                      Abort (TAA) vulnerability.
 +
 +                      Similar to Micro-architectural Data Sampling (MDS)
 +                      certain CPUs that support Transactional
 +                      Synchronization Extensions (TSX) are vulnerable to an
 +                      exploit against CPU internal buffers which can forward
 +                      information to a disclosure gadget under certain
 +                      conditions.
 +
 +                      In vulnerable processors, the speculatively forwarded
 +                      data can be used in a cache side channel attack, to
 +                      access data to which the attacker does not have direct
 +                      access.
 +
 +                      This parameter controls the TAA mitigation.  The
 +                      options are:
 +
 +                      full       - Enable TAA mitigation on vulnerable CPUs
 +                                   if TSX is enabled.
 +
 +                      full,nosmt - Enable TAA mitigation and disable SMT on
 +                                   vulnerable CPUs. If TSX is disabled, SMT
 +                                   is not disabled because CPU is not
 +                                   vulnerable to cross-thread TAA attacks.
 +                      off        - Unconditionally disable TAA mitigation
 +
 +                      On MDS-affected machines, tsx_async_abort=off can be
 +                      prevented by an active MDS mitigation as both vulnerabilities
 +                      are mitigated with the same mechanism so in order to disable
 +                      this mitigation, you need to specify mds=off too.
 +
 +                      Not specifying this option is equivalent to
 +                      tsx_async_abort=full.  On CPUs which are MDS affected
 +                      and deploy MDS mitigation, TAA mitigation is not
 +                      required and doesn't provide any additional
 +                      mitigation.
 +
 +                      For details see:
 +                      Documentation/admin-guide/hw-vuln/tsx_async_abort.rst
 +
        turbografx.map[2|3]=    [HW,JOY]
                        TurboGraFX parallel port interface
                        Format:
                        Flags is a set of characters, each corresponding
                        to a common usb-storage quirk flag as follows:
                                a = SANE_SENSE (collect more than 18 bytes
 -                                      of sense data);
 +                                      of sense data, not on uas);
                                b = BAD_SENSE (don't collect more than 18
 -                                      bytes of sense data);
 +                                      bytes of sense data, not on uas);
                                c = FIX_CAPACITY (decrease the reported
                                        device capacity by one sector);
                                d = NO_READ_DISC_INFO (don't use
 -                                      READ_DISC_INFO command);
 +                                      READ_DISC_INFO command, not on uas);
                                e = NO_READ_CAPACITY_16 (don't use
                                        READ_CAPACITY_16 command);
                                f = NO_REPORT_OPCODES (don't use report opcodes
                                j = NO_REPORT_LUNS (don't use report luns
                                        command, uas only);
                                l = NOT_LOCKABLE (don't try to lock and
 -                                      unlock ejectable media);
 +                                      unlock ejectable media, not on uas);
                                m = MAX_SECTORS_64 (don't transfer more
 -                                      than 64 sectors = 32 KB at a time);
 +                                      than 64 sectors = 32 KB at a time,
 +                                      not on uas);
                                n = INITIAL_READ10 (force a retry of the
 -                                      initial READ(10) command);
 +                                      initial READ(10) command, not on uas);
                                o = CAPACITY_OK (accept the capacity
 -                                      reported by the device);
 +                                      reported by the device, not on uas);
                                p = WRITE_CACHE (the device cache is ON
 -                                      by default);
 +                                      by default, not on uas);
                                r = IGNORE_RESIDUE (the device reports
 -                                      bogus residue values);
 +                                      bogus residue values, not on uas);
                                s = SINGLE_LUN (the device has only one
                                        Logical Unit);
                                t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
                                w = NO_WP_DETECT (don't test whether the
                                        medium is write-protected).
                                y = ALWAYS_SYNC (issue a SYNCHRONIZE_CACHE
 -                                      even if the device claims no cache)
 +                                      even if the device claims no cache,
 +                                      not on uas)
                        Example: quirks=0419:aaf5:rl,0421:0433:rc
  
        user_debug=     [KNL,ARM]
diff --combined drivers/tty/hvc/Kconfig
index 4487a6b9acc8c5ebbed5602f263c992788318021,79823d631493c56a4fd63dfacd8fac242b116d81..6a3c97d345a0121bb778d88889918cee0b573664
@@@ -70,26 -70,26 +70,26 @@@ config HVC_XEN_FRONTEN
          Xen driver for secondary virtual consoles
  
  config HVC_UDBG
-        bool "udbg based fake hypervisor console"
-        depends on PPC
-        select HVC_DRIVER
-        help
-          This is meant to be used during HW bring up or debugging when
-        no other console mechanism exist but udbg, to get you a quick
-        console for userspace. Do NOT enable in production kernels. 
+       bool "udbg based fake hypervisor console"
+       depends on PPC
+       select HVC_DRIVER
+       help
+         This is meant to be used during HW bring up or debugging when
+         no other console mechanism exist but udbg, to get you a quick
+         console for userspace. Do NOT enable in production kernels.
  
  config HVC_DCC
-        bool "ARM JTAG DCC console"
-        depends on ARM || ARM64
-        select HVC_DRIVER
-        help
-          This console uses the JTAG DCC on ARM to create a console under the HVC
-        driver. This console is used through a JTAG only on ARM. If you don't have
-        a JTAG then you probably don't want this option.
+       bool "ARM JTAG DCC console"
+       depends on ARM || ARM64
+       select HVC_DRIVER
+       help
+         This console uses the JTAG DCC on ARM to create a console under the HVC
+         driver. This console is used through a JTAG only on ARM. If you don't have
+         a JTAG then you probably don't want this option.
  
  config HVC_RISCV_SBI
        bool "RISC-V SBI console support"
 -      depends on RISCV
 +      depends on RISCV_SBI
        select HVC_DRIVER
        help
          This enables support for console output via RISC-V SBI calls, which
index 0b8784cd6d71837374435dc61e85ba8a5b54d641,8a01d034f9d118f9127c9834f08af92a6d45507d..022924d5ad545306699598bbb9655df16418641c
@@@ -48,6 -48,8 +48,6 @@@ struct f815xxa_data 
        int idx;
  };
  
 -#define PCI_NUM_BAR_RESOURCES 6
 -
  struct serial_private {
        struct pci_dev          *dev;
        unsigned int            nr;
@@@ -87,7 -89,7 +87,7 @@@ setup_port(struct serial_private *priv
  {
        struct pci_dev *dev = priv->dev;
  
 -      if (bar >= PCI_NUM_BAR_RESOURCES)
 +      if (bar >= PCI_STD_NUM_BARS)
                return -EINVAL;
  
        if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
@@@ -743,16 -745,8 +743,8 @@@ static int pci_ni8430_init(struct pci_d
  }
  
  /* UART Port Control Register */
- #define NI16550_PCR_OFFSET    0x0f
- #define NI16550_PCR_RS422     0x00
- #define NI16550_PCR_ECHO_RS485        0x01
- #define NI16550_PCR_DTR_RS485 0x02
- #define NI16550_PCR_AUTO_RS485        0x03
- #define NI16550_PCR_WIRE_MODE_MASK    0x03
- #define NI16550_PCR_TXVR_ENABLE_BIT   BIT(3)
- #define NI16550_PCR_RS485_TERMINATION_BIT     BIT(6)
- #define NI16550_ACR_DTR_AUTO_DTR      (0x2 << 3)
- #define NI16550_ACR_DTR_MANUAL_DTR    (0x0 << 3)
+ #define NI8430_PORTCON        0x0f
+ #define NI8430_PORTCON_TXVR_ENABLE    (1 << 3)
  
  static int
  pci_ni8430_setup(struct serial_private *priv,
                return -ENOMEM;
  
        /* enable the transceiver */
-       writeb(readb(p + offset + NI16550_PCR_OFFSET) | NI16550_PCR_TXVR_ENABLE_BIT,
-              p + offset + NI16550_PCR_OFFSET);
+       writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,
+              p + offset + NI8430_PORTCON);
  
        iounmap(p);
  
        return setup_port(priv, port, bar, offset, board->reg_shift);
  }
  
- static int pci_ni8431_config_rs485(struct uart_port *port,
-       struct serial_rs485 *rs485)
- {
-       u8 pcr, acr;
-       struct uart_8250_port *up;
-       up = container_of(port, struct uart_8250_port, port);
-       acr = up->acr;
-       pcr = port->serial_in(port, NI16550_PCR_OFFSET);
-       pcr &= ~NI16550_PCR_WIRE_MODE_MASK;
-       if (rs485->flags & SER_RS485_ENABLED) {
-               /* RS-485 */
-               if ((rs485->flags & SER_RS485_RX_DURING_TX) &&
-                       (rs485->flags & SER_RS485_RTS_ON_SEND)) {
-                       dev_dbg(port->dev, "Invalid 2-wire mode\n");
-                       return -EINVAL;
-               }
-               if (rs485->flags & SER_RS485_RX_DURING_TX) {
-                       /* Echo */
-                       dev_vdbg(port->dev, "2-wire DTR with echo\n");
-                       pcr |= NI16550_PCR_ECHO_RS485;
-                       acr |= NI16550_ACR_DTR_MANUAL_DTR;
-               } else {
-                       /* Auto or DTR */
-                       if (rs485->flags & SER_RS485_RTS_ON_SEND) {
-                               /* Auto */
-                               dev_vdbg(port->dev, "2-wire Auto\n");
-                               pcr |= NI16550_PCR_AUTO_RS485;
-                               acr |= NI16550_ACR_DTR_AUTO_DTR;
-                       } else {
-                               /* DTR-controlled */
-                               /* No Echo */
-                               dev_vdbg(port->dev, "2-wire DTR no echo\n");
-                               pcr |= NI16550_PCR_DTR_RS485;
-                               acr |= NI16550_ACR_DTR_MANUAL_DTR;
-                       }
-               }
-       } else {
-               /* RS-422 */
-               dev_vdbg(port->dev, "4-wire\n");
-               pcr |= NI16550_PCR_RS422;
-               acr |= NI16550_ACR_DTR_MANUAL_DTR;
-       }
-       dev_dbg(port->dev, "write pcr: 0x%08x\n", pcr);
-       port->serial_out(port, NI16550_PCR_OFFSET, pcr);
-       up->acr = acr;
-       port->serial_out(port, UART_SCR, UART_ACR);
-       port->serial_out(port, UART_ICR, up->acr);
-       /* Update the cache. */
-       port->rs485 = *rs485;
-       return 0;
- }
- static int pci_ni8431_setup(struct serial_private *priv,
-                const struct pciserial_board *board,
-                struct uart_8250_port *uart, int idx)
- {
-       u8 pcr, acr;
-       struct pci_dev *dev = priv->dev;
-       void __iomem *addr;
-       unsigned int bar, offset = board->first_offset;
-       if (idx >= board->num_ports)
-               return 1;
-       bar = FL_GET_BASE(board->flags);
-       offset += idx * board->uart_offset;
-       addr = pci_ioremap_bar(dev, bar);
-       if (!addr)
-               return -ENOMEM;
-       /* enable the transceiver */
-       writeb(readb(addr + NI16550_PCR_OFFSET) | NI16550_PCR_TXVR_ENABLE_BIT,
-               addr + NI16550_PCR_OFFSET);
-       pcr = readb(addr + NI16550_PCR_OFFSET);
-       pcr &= ~NI16550_PCR_WIRE_MODE_MASK;
-       /* set wire mode to default RS-422 */
-       pcr |= NI16550_PCR_RS422;
-       acr = NI16550_ACR_DTR_MANUAL_DTR;
-       /* write port configuration to register */
-       writeb(pcr, addr + NI16550_PCR_OFFSET);
-       /* access and write to UART acr register */
-       writeb(UART_ACR, addr + UART_SCR);
-       writeb(acr, addr + UART_ICR);
-       uart->port.rs485_config = &pci_ni8431_config_rs485;
-       iounmap(addr);
-       return setup_port(priv, uart, bar, offset, board->reg_shift);
- }
  static int pci_netmos_9900_setup(struct serial_private *priv,
                                const struct pciserial_board *board,
                                struct uart_8250_port *port, int idx)
@@@ -2021,15 -1912,6 +1910,6 @@@ pci_moxa_setup(struct serial_private *p
  #define PCI_DEVICE_ID_ACCESIO_PCIE_COM_8SM    0x10E9
  #define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4SM    0x11D8
  
- #define PCIE_DEVICE_ID_NI_PXIE8430_2328       0x74C2
- #define PCIE_DEVICE_ID_NI_PXIE8430_23216      0x74C1
- #define PCI_DEVICE_ID_NI_PXI8431_4852 0x7081
- #define PCI_DEVICE_ID_NI_PXI8431_4854 0x70DE
- #define PCI_DEVICE_ID_NI_PXI8431_4858 0x70E3
- #define PCI_DEVICE_ID_NI_PXI8433_4852 0x70E9
- #define PCI_DEVICE_ID_NI_PXI8433_4854 0x70ED
- #define PCIE_DEVICE_ID_NI_PXIE8431_4858       0x74C4
- #define PCIE_DEVICE_ID_NI_PXIE8431_48516      0x74C3
  
  #define       PCI_DEVICE_ID_MOXA_CP102E       0x1024
  #define       PCI_DEVICE_ID_MOXA_CP102EL      0x1025
@@@ -2267,87 -2149,6 +2147,6 @@@ static struct pci_serial_quirk pci_seri
                .setup          = pci_ni8430_setup,
                .exit           = pci_ni8430_exit,
        },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCIE_DEVICE_ID_NI_PXIE8430_2328,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8430_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCIE_DEVICE_ID_NI_PXIE8430_23216,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8430_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCI_DEVICE_ID_NI_PXI8431_4852,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8431_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCI_DEVICE_ID_NI_PXI8431_4854,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8431_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCI_DEVICE_ID_NI_PXI8431_4858,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8431_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCI_DEVICE_ID_NI_PXI8433_4852,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8431_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCI_DEVICE_ID_NI_PXI8433_4854,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8431_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCIE_DEVICE_ID_NI_PXIE8431_4858,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8431_setup,
-               .exit           = pci_ni8430_exit,
-       },
-       {
-               .vendor         = PCI_VENDOR_ID_NI,
-               .device         = PCIE_DEVICE_ID_NI_PXIE8431_48516,
-               .subvendor      = PCI_ANY_ID,
-               .subdevice      = PCI_ANY_ID,
-               .init           = pci_ni8430_init,
-               .setup          = pci_ni8431_setup,
-               .exit           = pci_ni8430_exit,
-       },
        /* Quatech */
        {
                .vendor         = PCI_VENDOR_ID_QUATECH,
@@@ -3104,13 -2905,6 +2903,6 @@@ enum pci_board_num_t 
        pbn_ni8430_4,
        pbn_ni8430_8,
        pbn_ni8430_16,
-       pbn_ni8430_pxie_8,
-       pbn_ni8430_pxie_16,
-       pbn_ni8431_2,
-       pbn_ni8431_4,
-       pbn_ni8431_8,
-       pbn_ni8431_pxie_8,
-       pbn_ni8431_pxie_16,
        pbn_ADDIDATA_PCIe_1_3906250,
        pbn_ADDIDATA_PCIe_2_3906250,
        pbn_ADDIDATA_PCIe_4_3906250,
@@@ -3763,55 -3557,6 +3555,6 @@@ static struct pciserial_board pci_board
                .uart_offset    = 0x10,
                .first_offset   = 0x800,
        },
-       [pbn_ni8430_pxie_16] = {
-               .flags          = FL_BASE0,
-               .num_ports      = 16,
-               .base_baud      = 3125000,
-               .uart_offset    = 0x10,
-               .first_offset   = 0x800,
-       },
-       [pbn_ni8430_pxie_8] = {
-               .flags          = FL_BASE0,
-               .num_ports      = 8,
-               .base_baud      = 3125000,
-               .uart_offset    = 0x10,
-               .first_offset   = 0x800,
-       },
-       [pbn_ni8431_8] = {
-               .flags          = FL_BASE0,
-               .num_ports      = 8,
-               .base_baud      = 3686400,
-               .uart_offset    = 0x10,
-               .first_offset   = 0x800,
-       },
-       [pbn_ni8431_4] = {
-               .flags          = FL_BASE0,
-               .num_ports      = 4,
-               .base_baud      = 3686400,
-               .uart_offset    = 0x10,
-               .first_offset   = 0x800,
-       },
-       [pbn_ni8431_2] = {
-               .flags          = FL_BASE0,
-               .num_ports      = 2,
-               .base_baud      = 3686400,
-               .uart_offset    = 0x10,
-               .first_offset   = 0x800,
-       },
-       [pbn_ni8431_pxie_16] = {
-               .flags          = FL_BASE0,
-               .num_ports      = 16,
-               .base_baud      = 3125000,
-               .uart_offset    = 0x10,
-               .first_offset   = 0x800,
-       },
-       [pbn_ni8431_pxie_8] = {
-               .flags          = FL_BASE0,
-               .num_ports      = 8,
-               .base_baud      = 3125000,
-               .uart_offset    = 0x10,
-               .first_offset   = 0x800,
-       },
        /*
         * ADDI-DATA GmbH PCI-Express communication cards <[email protected]>
         */
@@@ -4058,7 -3803,7 +3801,7 @@@ serial_pci_guess_board(struct pci_dev *
                return -ENODEV;
  
        num_iomem = num_port = 0;
 -      for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
 +      for (i = 0; i < PCI_STD_NUM_BARS; i++) {
                if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
                        num_port++;
                        if (first_port == -1)
         */
        first_port = -1;
        num_port = 0;
 -      for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
 +      for (i = 0; i < PCI_STD_NUM_BARS; i++) {
                if (pci_resource_flags(dev, i) & IORESOURCE_IO &&
                    pci_resource_len(dev, i) == 8 &&
                    (first_port == -1 || (first_port + num_port) == i)) {
@@@ -5565,33 -5310,6 +5308,6 @@@ static const struct pci_device_id seria
        {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2324,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                pbn_ni8430_4 },
-       {       PCI_VENDOR_ID_NI, PCIE_DEVICE_ID_NI_PXIE8430_2328,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8430_pxie_8 },
-       {       PCI_VENDOR_ID_NI, PCIE_DEVICE_ID_NI_PXIE8430_23216,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8430_pxie_16 },
-       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8431_4852,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8431_2 },
-       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8431_4854,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8431_4 },
-       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8431_4858,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8431_8 },
-       {       PCI_VENDOR_ID_NI, PCIE_DEVICE_ID_NI_PXIE8431_4858,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8431_pxie_8 },
-       {       PCI_VENDOR_ID_NI, PCIE_DEVICE_ID_NI_PXIE8431_48516,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8431_pxie_16 },
-       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8433_4852,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8431_2 },
-       {       PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8433_4854,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-               pbn_ni8431_4 },
  
        /*
         * MOXA
index 540142c5b7b3d7bdbaa738fdda39b29b4aa98147,f0931099e6f9bad2acf68d3ea3681500240c764e..99f5da3bf913f8fb02134beba2a6184d6f4bf399
@@@ -88,7 -88,7 +88,7 @@@ config SERIAL_EARLYCON_ARM_SEMIHOS
  
  config SERIAL_EARLYCON_RISCV_SBI
        bool "Early console using RISC-V SBI"
 -      depends on RISCV
 +      depends on RISCV_SBI
        select SERIAL_CORE
        select SERIAL_CORE_CONSOLE
        select SERIAL_EARLYCON
@@@ -287,26 -287,26 +287,26 @@@ config SERIAL_SAMSUNG_CONSOL
          boot time.)
  
  config SERIAL_SIRFSOC
-         tristate "SiRF SoC Platform Serial port support"
-         depends on ARCH_SIRF
-         select SERIAL_CORE
-         help
-           Support for the on-chip UART on the CSR SiRFprimaII series,
-           providing /dev/ttySiRF0, 1 and 2 (note, some machines may not
-           provide all of these ports, depending on how the serial port
-           pins are configured).
+       tristate "SiRF SoC Platform Serial port support"
+       depends on ARCH_SIRF
+       select SERIAL_CORE
+       help
+         Support for the on-chip UART on the CSR SiRFprimaII series,
+         providing /dev/ttySiRF0, 1 and 2 (note, some machines may not
+         provide all of these ports, depending on how the serial port
+         pins are configured).
  
  config SERIAL_SIRFSOC_CONSOLE
-         bool "Support for console on SiRF SoC serial port"
-         depends on SERIAL_SIRFSOC=y
-         select SERIAL_CORE_CONSOLE
-         help
-           Even if you say Y here, the currently visible virtual console
-           (/dev/tty0) will still be used as the system console by default, but
-           you can alter that using a kernel command line option such as
-           "console=ttySiRFx". (Try "man bootparam" or see the documentation of
-           your boot loader about how to pass options to the kernel at
-           boot time.)
+       bool "Support for console on SiRF SoC serial port"
+       depends on SERIAL_SIRFSOC=y
+       select SERIAL_CORE_CONSOLE
+       help
+         Even if you say Y here, the currently visible virtual console
+         (/dev/tty0) will still be used as the system console by default, but
+         you can alter that using a kernel command line option such as
+         "console=ttySiRFx". (Try "man bootparam" or see the documentation of
+         your boot loader about how to pass options to the kernel at
+         boot time.)
  
  config SERIAL_TEGRA
        tristate "NVIDIA Tegra20/30 SoC serial controller"
@@@ -1078,41 -1078,41 +1078,41 @@@ config SERIAL_SCCNXP_CONSOL
          Support for console on SCCNXP serial ports.
  
  config SERIAL_SC16IS7XX_CORE
-         tristate
+       tristate
  
  config SERIAL_SC16IS7XX
-         tristate "SC16IS7xx serial support"
-         select SERIAL_CORE
-         depends on (SPI_MASTER && !I2C) || I2C
-         help
-           This selects support for SC16IS7xx serial ports.
-           Supported ICs are SC16IS740, SC16IS741, SC16IS750, SC16IS752,
-           SC16IS760 and SC16IS762. Select supported buses using options below.
+       tristate "SC16IS7xx serial support"
+       select SERIAL_CORE
+       depends on (SPI_MASTER && !I2C) || I2C
+       help
+         This selects support for SC16IS7xx serial ports.
+         Supported ICs are SC16IS740, SC16IS741, SC16IS750, SC16IS752,
+         SC16IS760 and SC16IS762. Select supported buses using options below.
  
  config SERIAL_SC16IS7XX_I2C
-         bool "SC16IS7xx for I2C interface"
-         depends on SERIAL_SC16IS7XX
-         depends on I2C
-         select SERIAL_SC16IS7XX_CORE if SERIAL_SC16IS7XX
-         select REGMAP_I2C if I2C
-         default y
-         help
-           Enable SC16IS7xx driver on I2C bus,
-           If required say y, and say n to i2c if not required,
-           Enabled by default to support oldconfig.
-           You must select at least one bus for the driver to be built.
+       bool "SC16IS7xx for I2C interface"
+       depends on SERIAL_SC16IS7XX
+       depends on I2C
+       select SERIAL_SC16IS7XX_CORE if SERIAL_SC16IS7XX
+       select REGMAP_I2C if I2C
+       default y
+       help
+         Enable SC16IS7xx driver on I2C bus,
+         If required say y, and say n to i2c if not required,
+         Enabled by default to support oldconfig.
+         You must select at least one bus for the driver to be built.
  
  config SERIAL_SC16IS7XX_SPI
-         bool "SC16IS7xx for spi interface"
-         depends on SERIAL_SC16IS7XX
-         depends on SPI_MASTER
-         select SERIAL_SC16IS7XX_CORE if SERIAL_SC16IS7XX
-         select REGMAP_SPI if SPI_MASTER
-         help
-           Enable SC16IS7xx driver on SPI bus,
-           If required say y, and say n to spi if not required,
-           This is additional support to exsisting driver.
-           You must select at least one bus for the driver to be built.
+       bool "SC16IS7xx for spi interface"
+       depends on SERIAL_SC16IS7XX
+       depends on SPI_MASTER
+       select SERIAL_SC16IS7XX_CORE if SERIAL_SC16IS7XX
+       select REGMAP_SPI if SPI_MASTER
+       help
+         Enable SC16IS7xx driver on SPI bus,
+         If required say y, and say n to spi if not required,
+         This is additional support to exsisting driver.
+         You must select at least one bus for the driver to be built.
  
  config SERIAL_TIMBERDALE
        tristate "Support for timberdale UART"
@@@ -1212,7 -1212,7 +1212,7 @@@ config SERIAL_ALTERA_UART_CONSOL
          Enable a Altera UART port to be the system console.
  
  config SERIAL_IFX6X60
-         tristate "SPI protocol driver for Infineon 6x60 modem (EXPERIMENTAL)"
+       tristate "SPI protocol driver for Infineon 6x60 modem (EXPERIMENTAL)"
        depends on GPIOLIB || COMPILE_TEST
        depends on SPI && HAS_DMA
        help
@@@ -1392,19 -1392,19 +1392,19 @@@ config SERIAL_FSL_LPUART_CONSOL
          you can make it the console by answering Y to this option.
  
  config SERIAL_FSL_LINFLEXUART
-       tristate "Freescale linflexuart serial port support"
+       tristate "Freescale LINFlexD UART serial port support"
        depends on PRINTK
        select SERIAL_CORE
        help
-         Support for the on-chip linflexuart on some Freescale SOCs.
+         Support for the on-chip LINFlexD UART on some Freescale SOCs.
  
  config SERIAL_FSL_LINFLEXUART_CONSOLE
-       bool "Console on Freescale linflexuart serial port"
+       bool "Console on Freescale LINFlexD UART serial port"
        depends on SERIAL_FSL_LINFLEXUART=y
        select SERIAL_CORE_CONSOLE
        select SERIAL_EARLYCON
        help
-         If you have enabled the linflexuart serial port on the Freescale
+         If you have enabled the LINFlexD UART serial port on the Freescale
          SoCs, you can make it the console by answering Y to this option.
  
  config SERIAL_CONEXANT_DIGICOLOR
diff --combined drivers/tty/tty_io.c
index a81807b394d1013c53844d27e7cc0f41bbe6af15,f16257fdcd4527246fadbfe13c1548f3244784ff..d9f54c7d94f29e3d1266d9a9c4858a45a5f110c8
@@@ -87,7 -87,6 +87,7 @@@
  #include <linux/string.h>
  #include <linux/slab.h>
  #include <linux/poll.h>
 +#include <linux/ppp-ioctl.h>
  #include <linux/proc_fs.h>
  #include <linux/init.h>
  #include <linux/module.h>
@@@ -1345,9 -1344,12 +1345,12 @@@ struct tty_struct *tty_init_dev(struct 
        if (!tty->port)
                tty->port = driver->ports[idx];
  
-       WARN_RATELIMIT(!tty->port,
-                       "%s: %s driver does not set tty->port. This will crash the kernel later. Fix the driver!\n",
-                       __func__, tty->driver->name);
+       if (WARN_RATELIMIT(!tty->port,
+                       "%s: %s driver does not set tty->port. This would crash the kernel. Fix the driver!\n",
+                       __func__, tty->driver->name)) {
+               retval = -EINVAL;
+               goto err_release_lock;
+       }
  
        retval = tty_ldisc_lock(tty, 5 * HZ);
        if (retval)
@@@ -1925,7 -1927,6 +1928,6 @@@ EXPORT_SYMBOL_GPL(tty_kopen)
  /**
   *    tty_open_by_driver      -       open a tty device
   *    @device: dev_t of device to open
-  *    @inode: inode of device file
   *    @filp: file pointer to tty
   *
   *    Performs the driver lookup, checks for a reopen, or otherwise
   *      - concurrent tty driver removal w/ lookup
   *      - concurrent tty removal from driver table
   */
- static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
+ static struct tty_struct *tty_open_by_driver(dev_t device,
                                             struct file *filp)
  {
        struct tty_struct *tty;
@@@ -2030,7 -2031,7 +2032,7 @@@ retry_open
  
        tty = tty_open_current_tty(device, filp);
        if (!tty)
-               tty = tty_open_by_driver(device, inode, filp);
+               tty = tty_open_by_driver(device, filp);
  
        if (IS_ERR(tty)) {
                tty_free_file(filp);
@@@ -2756,7 -2757,6 +2758,7 @@@ static long tty_compat_ioctl(struct fil
        int retval = -ENOIOCTLCMD;
  
        switch (cmd) {
 +      case TIOCOUTQ:
        case TIOCSTI:
        case TIOCGWINSZ:
        case TIOCSWINSZ:
  #endif
        case TIOCGSOFTCAR:
        case TIOCSSOFTCAR:
 +
 +      case PPPIOCGCHAN:
 +      case PPPIOCGUNIT:
                return tty_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
        case TIOCCONS:
        case TIOCEXCL:
This page took 0.211932 seconds and 4 git commands to generate.