21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have MODULE_LICENCE("GPL*") inside which was used in the initial
    scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

11 Feb, 2019

1 commit

  • In the original code before 181bf1e815a2 the loop was continuing until
    it finds the first matching superios[i].io and p->base.
    But after 181bf1e815a2 the logic changed and the loop now returns the
    pointer to the first mismatched array element which is then used in
    get_superio_dma() and get_superio_irq() and thus returning the wrong
    value.
    Fix the condition so that it now returns the correct pointer.

    Fixes: 181bf1e815a2 ("parport_pc: clean up the modified while loops using for")
    Cc: Alan Cox
    Cc: stable@vger.kernel.org
    Signed-off-by: QiaoChong
    [rewrite the commit message]
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    QiaoChong
     

27 Nov, 2018

1 commit


15 Mar, 2018

1 commit


28 Aug, 2017

1 commit

  • The kernel adds newline automatically between printk calls, we must use
    pr_cont if we want multiple printk strings on the same line.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Mikulas Patocka
     

20 Apr, 2017

1 commit

  • When the kernel is running in secure boot mode, we lock down the kernel to
    prevent userspace from modifying the running kernel image. Whilst this
    includes prohibiting access to things like /dev/mem, it must also prevent
    access by means of configuring driver modules in such a way as to cause a
    device to access or modify the kernel image.

    To this end, annotate module_param* statements that refer to hardware
    configuration and indicate for future reference what type of parameter they
    specify. The parameter parser in the core sees this information and can
    skip such parameters with an error message if the kernel is locked down.
    The module initialisation then runs as normal, but just sees whatever the
    default values for those parameters is.

    Note that we do still need to do the module initialisation because some
    drivers have viable defaults set in case parameters aren't specified and
    some drivers support automatic configuration (e.g. PNP or PCI) in addition
    to manually coded parameters.

    This patch annotates drivers in drivers/parport/.

    Suggested-by: Alan Cox
    Signed-off-by: David Howells
    cc: Sudip Mukherjee

    David Howells
     

02 Mar, 2017

1 commit


28 Feb, 2017

1 commit


01 Jun, 2015

1 commit

  • parport subsystem starts using the device-model. Drivers using the
    device-model has to define devmodel as true and should register the
    device with parport using parport_register_dev_model().

    Tested-by: Jean Delvare
    Tested-by: Alan Cox
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Sudip Mukherjee
     

15 Dec, 2014

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the big char/misc driver update for 3.19-rc1

    Lots of little things all over the place in different drivers, and a
    new subsystem, "coresight" has been added. Full details are in the
    shortlog"

    * tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
    parport: parport_pc, do not remove parent devices early
    spmi: Remove shutdown/suspend/resume kernel-doc
    carma-fpga-program: drop videobuf dependency
    carma-fpga: drop videobuf dependency
    carma-fpga-program.c: fix compile errors
    i8k: Fix temperature bug handling in i8k_get_temp()
    cxl: Name interrupts in /proc/interrupt
    CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
    coresight-replicator: remove .owner field for driver
    coresight: fixed comments in coresight.h
    coresight: fix typo in comment in coresight-priv.h
    coresight: bindings for coresight drivers
    coresight: Adding ABI documentation
    w1: support auto-load of w1_bq27000 module.
    w1: avoid potential u16 overflow
    cn: verify msg->len before making callback
    mei: export fw status registers through sysfs
    mei: read and print all six FW status registers
    mei: txe: add cherrytrail device id
    mei: kill cached host and me csr values
    ...

    Linus Torvalds
     

27 Nov, 2014

1 commit

  • When the parport_pc module is removed from the system, all parport
    devices are iterated in parport_pc_exit and removed by a call to
    parport_pc_unregister_port. Note that some parport devices have its
    'struct device' parent, known as port->dev. And when port->dev is a
    platform device, it is destroyed in parport_pc_exit too.

    Now, when parport_pc_unregister_port is called for a going port,
    drv->detach(port) is called for every parport driver in the system.
    ppdev can be one of them. ppdev's detach() tears down its per-port
    sysfs directory, which established port->dev as a parent earlier.

    But since parport_pc_exit kills port->dev parents before unregisters
    ports proper, ppdev's sysfs directory has no living parent anymore.
    This results in the following warning:

    WARNING: CPU: 1 PID: 785 at fs/sysfs/group.c:219 sysfs_remove_group+0x9b/0xa0
    sysfs group ffffffff81c69e20 not found for kobject 'parport1'
    Modules linked in: parport_pc(E-) ppdev(E) [last unloaded: ppdev]
    CPU: 1 PID: 785 Comm: rmmod Tainted: G W E 3.18.0-rc5-next-20141120+ #824
    ...
    Call Trace:
    ...
    [] warn_slowpath_fmt+0x46/0x50
    [] sysfs_remove_group+0x9b/0xa0
    [] dpm_sysfs_remove+0x57/0x60
    [] device_del+0x49/0x240
    [] device_unregister+0x22/0x70
    [] device_destroy+0x3c/0x50
    [] pp_detach+0x4a/0x60 [ppdev]
    [] parport_remove_port+0x11d/0x150
    [] parport_pc_unregister_port+0x28/0xf0 [parport_pc]
    [] parport_pc_exit+0x76/0x468 [parport_pc]
    [] SyS_delete_module+0x18c/0x230

    It is also easily reproducible on qemu with two dummy ports '-parallel
    /dev/null -parallel /dev/null'.

    So switch the order of killing the two structures. But since port is
    freed by parport_pc_unregister_port, we have to remember port->dev
    in a local variable.

    Perhaps nothing worse than the warning happens thanks to the device
    refcounting. We *should* be on the safe side.

    Signed-off-by: Jiri Slaby
    Reviewed-by: Takashi Iwai
    Tested-by: Martin Pluskal
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

20 Oct, 2014

1 commit


24 Sep, 2014

2 commits

  • We definitely know that only x86 (32-bit) architecture is affected by the issue, so implement a stub instead of the actual check for other architectures.

    We also know that motherboard LPT chipset is affected, so the port is either come from
    parport_pc_init (when `io' module param is used) or
    parport_pc_find_isa_ports (when default LPT ports are probbed: 0x378, 0x278, 0x3bc).
    In both cases the port considered as 'legacy' and `dev' member of struct parport is NULL. See also comments for `struct parport' in parport.h

    Signed-off-by: Matwey V. Kornilov
    Signed-off-by: Greg Kroah-Hartman

    Matwey V. Kornilov
     
  • Put the code to check present of the Intel bug from parport_EPP_supported
    into new intel_bug_present function. The later also return ECR register
    to the state it has before function call.

    Signed-off-by: Matwey V. Kornilov
    Signed-off-by: Greg Kroah-Hartman

    Matwey V. Kornilov
     

11 Dec, 2013

3 commits

  • In commit 85747f ("PATCH] parport: add NetMOS 9805 support") Max added
    the PCI ID for NetMOS 9805 based on a Debian bug report from 2k4 which
    was at the v2.4.26 time frame. The patch made into 2.6.14.
    Shortly before that patch akpm merged commit 296d3c783b ("[PATCH] Support
    NetMOS based PCI cards providing serial and parallel ports") which made
    into v2.6.9-rc1.
    Now we have two different entries for the same PCI id.
    I have here the NetMos 9805 which claims to support SPP/EPP/ECP mode.
    This patch takes Max's entry for titan_1284p1 (base != -1 specifies the
    ioport for ECP mode) and replaces akpm's entry for netmos_9805 which
    specified -1 (=none). Both share the same PCI-ID (my card has subsystem
    0x1000 / 0x0020 so it should match PCI_ANY).

    While here I also drop the entry for titan_1284p2 which is the same as
    netmos_9815.

    Cc: Maximilian Attems
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Andrew Morton
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     
  • The driver core clears the driver data to NULL after device_release
    or on probe failure. Thus, it is not needed to manually clear the
    device driver data to NULL.

    Signed-off-by: Jingoo Han
    Signed-off-by: Greg Kroah-Hartman

    Jingoo Han
     
  • Since commit 7106b4e3 ("8250: Oxford Semiconductor Devices") the debug
    print of the device id does no longer match the real device if it is
    located in the "enum" behind oxsemi_pcie_pport. The reason is that the
    code assumes that each id contains one entry in the PCI table.
    The fix is to lookup the currently used id from the id-> parameter.

    Cc: Lee Howard
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     

31 Oct, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Wei Yongjun
    Cc: Andrew Morton
    Cc: Matt Porter
    Cc: Kay Sievers
    Cc: Gianluca Anzolin
    Cc: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

23 May, 2012

1 commit

  • Pull driver core updates from Greg Kroah-Hartman:
    "Here's the driver core, and other driver subsystems, pull request for
    the 3.5-rc1 merge window.

    Outside of a few minor driver core changes, we ended up with the
    following different subsystem and core changes as well, due to
    interdependancies on the driver core:
    - hyperv driver updates
    - drivers/memory being created and some drivers moved into it
    - extcon driver subsystem created out of the old Android staging
    switch driver code
    - dynamic debug updates
    - printk rework, and /dev/kmsg changes

    All of this has been tested in the linux-next releases for a few weeks
    with no reported problems.

    Signed-off-by: Greg Kroah-Hartman "

    Fix up conflicts in drivers/extcon/extcon-max8997.c where git noticed
    that a patch to the deleted drivers/misc/max8997-muic.c driver needs to
    be applied to this one.

    * tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (90 commits)
    uio_pdrv_genirq: get irq through platform resource if not set otherwise
    memory: tegra{20,30}-mc: Remove empty *_remove()
    printk() - isolate KERN_CONT users from ordinary complete lines
    sysfs: get rid of some lockdep false positives
    Drivers: hv: util: Properly handle version negotiations.
    Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp()
    memory: tegra{20,30}-mc: Use dev_err_ratelimited()
    driver core: Add dev_*_ratelimited() family
    Driver Core: don't oops with unregistered driver in driver_find_device()
    printk() - restore prefix/timestamp printing for multi-newline strings
    printk: add stub for prepend_timestamp()
    ARM: tegra30: Make MC optional in Kconfig
    ARM: tegra20: Make MC optional in Kconfig
    ARM: tegra30: MC: Remove unnecessary BUG*()
    ARM: tegra20: MC: Remove unnecessary BUG*()
    printk: correctly align __log_buf
    ARM: tegra30: Add Tegra Memory Controller(MC) driver
    ARM: tegra20: Add Tegra Memory Controller(MC) driver
    printk() - restore timestamp printing at console output
    printk() - do not merge continuation lines of different threads
    ...

    Linus Torvalds
     

08 May, 2012

1 commit

  • On Tue, May 8, 2012 at 10:48 AM, Sasha Levin wrote:
    > Before:
    > [ 10.110626] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
    >
    > After:
    > parport0: PC-style at 0x378
    > , irq 7
    > [
    > PCSPP
    > ,TRISTATE
    > ]

    Reported-By: Sasha Levin
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

21 Apr, 2012

1 commit


13 Jan, 2012

1 commit

  • drivers/parport/parport_pc.c: In function '__check_irq':
    drivers/parport/parport_pc.c:3415: warning: return from incompatible pointer type
    drivers/parport/parport_pc.c: In function '__check_dma':
    drivers/parport/parport_pc.c:3417: warning: return from incompatible pointer type

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

19 Oct, 2011

1 commit

  • sio_ite_8872_probe() bails out if it detects no-parallel (1S, 2S) or
    unknown card.

    It doesn't call release_region() on the previously allocated resource
    though. This causes

    (a) leak of the resource
    (b) kernel oops when parport module is removed and /proc/ioports is read. This
    is because the string that has been associated to the IO port region
    is a static char array inside the already removed module.

    Let's call release_region() properly before baling out.

    Signed-off-by: Jiri Kosina
    Acked-by: Niels de Vos
    Cc: Bjorn Helgaas
    Cc: Alan Cox
    Cc: Joe Krahn
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina
     

08 Jun, 2011

1 commit

  • Timedia/SUNIX PCI cards with both serial and parallel ports are
    currently supported by 8250_pci and parport_pc individually. Moving
    that support into parport_serial allows using both types of ports at the
    same time.

    This was successfully tested with a SUNIX 4079T.

    Signed-off-by: Frédéric Brière
    Acked-by: Alan Cox
    Cc: linux-serial@vger.kernel.org
    Cc: linux-parport@lists.infradead.org
    Signed-off-by: Greg Kroah-Hartman

    Frédéric Brière
     

24 May, 2011

1 commit

  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
    serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
    tty/serial: Fix break handling for PORT_TEGRA
    tty/serial: Add explicit PORT_TEGRA type
    n_tracerouter and n_tracesink ldisc additions.
    Intel PTI implementaiton of MIPI 1149.7.
    Kernel documentation for the PTI feature.
    export kernel call get_task_comm().
    tty: Remove to support serial for S5P6442
    pch_phub: Support new device ML7223
    8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
    ASoC: Update cx20442 for TTY API change
    pch_uart: Support new device ML7223 IOH
    parport: Use request_muxed_region for IT87 probe and lock
    tty/serial: add support for Xilinx PS UART
    n_gsm: Use print_hex_dump_bytes
    drivers/tty/moxa.c: Put correct tty value
    TTY: tty_io, annotate locking functions
    TTY: serial_core, remove superfluous set_task_state
    TTY: serial_core, remove invalid test
    Char: moxa, fix locking in moxa_write
    ...

    Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
    drivers/tty/serial/Makefile.

    I did the hci_ldisc thing as an evil merge, cleaning things up.

    Linus Torvalds
     

07 May, 2011

1 commit

  • This is needed as part of making the various IT87 drivers actually co-exist
    politely with each other, and with other superio devices that may be muxed
    on 0x2E/0x2F.

    It can be applied before or after the other patches by Nat Gurumoorthy without
    problem.

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

20 Apr, 2011

1 commit

  • Replace release_resource() by release_region() and also fix the
    inconsistency in the size of the requested/released region.

    The size of the resource should be 32, not 0x8 like it was corrected in
    commit e7c310c36e5fdf1b83a459e5db167bfbd86137db already.

    CC: linux-serial@vger.kernel.org
    Reported-by: Julia Lawall
    Signed-off-by: Niels de Vos
    Signed-off-by: Greg Kroah-Hartman

    Niels de Vos
     

31 Mar, 2011

1 commit


24 Aug, 2010

1 commit


03 Mar, 2010

1 commit

  • This patch is heavily based on an earlier patch found on the linux-serial
    mailing list [1], written by Darius Augulis.

    The previous incarnation of this patch only supported a 2x serial port
    card. I have added support for my SYBA 6x serial port card, and tested on
    x86.

    [1]: http://marc.info/?l=linux-serial&m=124975806304760

    Signed-off-by: Ira W. Snyder
    Cc: Darius Augulis
    Cc: Greg KH
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Ira W. Snyder
     

16 Dec, 2009

1 commit


01 Jul, 2009

1 commit

  • Add support for the PCI-Express NetMos 9901 Multi-IO card.

    0001:06:00.0 Serial controller [0700]: NetMos Technology Device [9710:9901] (prog-if 02 [16550])
    Subsystem: Device [a000:1000]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-
    Kernel driver in use: serial
    Kernel modules: 8250_pci

    0001:06:00.1 Serial controller [0700]: NetMos Technology Device [9710:9901] (prog-if 02 [16550])
    Subsystem: Device [a000:1000]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-
    Kernel driver in use: serial
    Kernel modules: 8250_pci

    0001:06:00.2 Parallel controller [0701]: NetMos Technology Device [9710:9901] (prog-if 03 [IEEE1284])
    Subsystem: Device [a000:2000]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-
    Region 2: Memory at 80101000 (32-bit, non-prefetchable) [size=4K]
    Region 4: Memory at 80100000 (32-bit, non-prefetchable) [size=4K]
    Capabilities:
    Kernel driver in use: parport_pc
    Kernel modules: parport_pc

    [ 16.760181] PCI parallel port detected: 416c:0100, I/O at 0x812010(0x0), IRQ 65
    [ 16.760225] parport0: PC-style at 0x812010, irq 65 [PCSPP,TRISTATE,EPP]
    [ 16.851842] serial 0001:06:00.0: enabling device (0004 -> 0007)
    [ 16.883776] 0001:06:00.0: ttyS0 at I/O 0x812030 (irq = 65) is a ST16650V2
    [ 16.893832] serial 0001:06:00.1: enabling device (0004 -> 0007)
    [ 16.926537] 0001:06:00.1: ttyS1 at I/O 0x812020 (irq = 65) is a ST16650V2

    Signed-off-by: Michael Buesch
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Buesch
     

23 Jun, 2009

2 commits

  • parport_pc_probe_port() creates the own 'parport_pc' device if the
    device argument is NULL. Then parport_pc_probe_port() doesn't
    initialize the dma_mask and coherent_dma_mask of the device and calls
    dma_alloc_coherent with it. dma_alloc_coherent fails because
    dma_alloc_coherent() doesn't accept the uninitialized dma_mask:

    http://lkml.org/lkml/2009/6/16/150

    Long ago, X86_32 and X86_64 had the own dma_alloc_coherent
    implementations; X86_32 accepted a device having dma_mask that is not
    initialized however X86_64 didn't. When we merged them, we chose to
    prohibit a device having dma_mask that is not initialized. I think
    that it's good to require drivers to set up dma_mask (and
    coherent_dma_mask) properly if the drivers want DMA.

    Signed-off-by: FUJITA Tomonori
    Reported-by: Malcom Blaney
    Tested-by: Malcom Blaney
    Cc: stable@kernel.org
    Signed-off-by: Alan Cox
    Acked-by: Jeff Garzik
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • CONFIG_PARPORT_PC_SUPERIO probes for various superio chips by writing
    byte sequences to a set of different potential I/O ranges. But the
    probed ranges are not exclusive to parallel ports. Some of our boards
    just happen to have a watchdog in one of them. Took us almost a week
    to figure out why some distros reboot without warning after running
    flawlessly for 3 hours. For exactly 170 = 0xAA minutes, that is ...

    Fixed by restoring original values after probing. Also fixed too small
    request_region() in detect_and_report_it87().

    Signed-off-by: Jens Rottmann
    Signed-off-by: Alan Cox
    Cc:
    Acked-by: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Jens Rottmann
     

11 Jun, 2009

3 commits

  • And tidy up a few bits coding style detectors missed

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Michael's patch fixed some of the coding style so the style is now
    inconsistent. Sort the rest out

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • This patch fixes array subscription bugs in the parport_pc driver.

    drivers/parport/parport_pc.c: In function ‘parport_irq_probe’:
    drivers/parport/parport_pc.c:1589: warning: array subscript is above array bounds
    drivers/parport/parport_pc.c: In function ‘parport_pc_probe_port’:
    drivers/parport/parport_pc.c:1579: warning: array subscript is above array bounds

    The patch also fixes a few other array bugs, which the compiler was
    unable to find. Coding style violations are also fixed.

    Signed-off-by: Michael Buesch
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Michael Buesch
     

07 Apr, 2009

1 commit

  • PCI parallel port devices can IRQ share so we should stop them hogging
    the line and making a mess on modern PC systems. We know the sharing
    side works as the PCMCIA driver has shared the parallel port IRQ for
    some time.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

24 Oct, 2008

1 commit