01 May, 2016

1 commit

  • The drivers which depends on parport may sometimes try to iniitialize
    and register with parport bus even before parport has actually
    registered with the device layer.
    The simplest solution is to mark the init function as subsys_initcall()
    and load the parport before the other drivers loads.

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

    Sudip Mukherjee
     

04 Jan, 2016

11 commits


26 Jul, 2015

1 commit


23 Jul, 2015

3 commits

  • After the reference count becomes 0 when put_device() is called, it will
    execute the release callback where we are freeing all the allocated
    memory associated with the device. So if we just continue on the error
    path then we are again freeing devname and trying to dereference par_dev
    which has already been free-ed in the release callback.

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

    Sudip Mukherjee
     
  • After the reference count becomes 0 when put_device() is called, it will
    execute the release callback where we are freeing all the allocated
    memory associated with the device. We missed freeing par_dev->state.

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

    Sudip Mukherjee
     
  • After registering the device if exclusive access fails for any reason
    then we need to unregister the device to remove all references.

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

    Sudip Mukherjee
     

13 Jun, 2015

1 commit

  • As of now we were starting the registration process and after the device
    is registered we were checking if the device can be used by the
    parport. Now lets check it first so that we do not need to go through
    the registration process only to fail at the end.
    The original exclusive access check at the end is still there so that we
    do not get any surprises if two different process registers its device
    with same parport and with exclusive access at the same time.

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

    Sudip Mukherjee
     

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 Jan, 2015

1 commit

  • IRQ_TYPE_SLOW is no longer used by the Atari platform interrupt code
    since commit 734085651c9b80aa ("[PATCH] m68k: convert atari irq code")
    in v2.6.18-rc1, so drop it.

    Note that its value has been reused for a different purpose
    (IRQ_TYPE_NONE) since commit 6a6de9ef5850d063 ("[PATCH] genirq: core")
    in v2.6.18-rc1.

    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

15 Dec, 2014

2 commits

  • 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
     
  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    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
     

07 Nov, 2014

1 commit


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
     

09 Aug, 2014

1 commit


26 Jul, 2014

1 commit

  • Do not split the PARPORT-related symbols with the new kconfig
    symbol ARCH_MIGHT_HAVE_PC_PARPORT. The split was causing incorrect
    display of these symbols -- they were not being displayed together
    as they should be.

    Fixes: d90c3eb31535 "Kconfig cleanup (PARPORT_PC dependencies)"

    Signed-off-by: Randy Dunlap
    Cc: Mark Salter
    Cc: Ingo Molnar
    Cc: stable@vger.kernel.org # for 3.13, 3.14, 3.15
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

07 Jun, 2014

1 commit


29 May, 2014

1 commit

  • This Multi-IO card has one serial 16550-like and one parallel port connector.
    Here's the lspci output, after this commit is applied:

    03:07.0 Serial controller: Device 4348:5053 (rev 10) (prog-if 02 [16550])
    Subsystem: Device 4348:5053
    Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR-
    Cc: Alan Cox
    Cc: Greg Kroah-Hartman
    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Greg Kroah-Hartman

    Ezequiel Garcia
     

01 Mar, 2014

1 commit

  • The interruptible_sleep_on function is can still lead to the
    deadlock mentioned in the comment above the caller, and we want
    to remove it soon, so replace it now with the race-free
    wait_event_interruptible.

    Signed-off-by: Arnd Bergmann
    Cc: Andrew Morton
    Cc: Greg Kroah-Hartman
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

21 Jan, 2014

2 commits

  • Pull tty/serial driver updates from Greg KH:
    "Here's the big tty/serial driver pull request for 3.14-rc1

    There are a number of n_tty fixes and cleanups, and some serial driver
    bugfixes, and we got rid of one obsolete driver, making this series
    remove more lines than added, always a nice surprise.

    All of these have been in linux-next with no reports of issues"

    * tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (60 commits)
    tty/serial: at91: disable uart timer at start of shutdown
    serial: 8250: enable UART_BUG_NOMSR for Tegra
    tty/serial: at91: reset rx_ring when port is shutdown
    tty/serial: at91: fix race condition in atmel_serial_remove
    tty/serial: at91: Handle shutdown more safely
    serial: sirf: correct condition for fetching dma buffer into tty
    serial: sirf: provide pm entries of uart_ops
    serial: sirf: use PM macro initialize PM functions
    serial: clps711x: Enable driver compilation with COMPILE_TEST
    serial: clps711x: Add support for N_IRDA line discipline
    tty: synclink: avoid sleep_on race
    tty/amiserial: avoid interruptible_sleep_on
    tty: delete non-required instances of include
    tty: an overflow of multiplication in drivers/tty/cyclades.c
    serial: Remove old SC26XX driver
    serial: add support for 200 v3 series Titan card
    serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip
    tty: Removing the deprecated function tty_vhangup_locked()
    TTY/n_gsm: Removing the wrong tty_unlock/lock() in gsm_dlci_release()
    tty/serial: at91: document clock properties
    ...

    Linus Torvalds
     
  • Pull char/misc driver patches from Greg KH:
    "Here's the big char/misc driver patches for 3.14-rc1.

    Lots of little things, and a new "big" driver, genwqe. Full details
    are in the shortlog"

    * tag 'char-misc-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (90 commits)
    mei: limit the number of consecutive resets
    mei: revamp mei reset state machine
    drivers/char: don't use module_init in non-modular ttyprintk.c
    VMCI: fix error handling path when registering guest driver
    extcon: gpio: Add power resume support
    Documentation: HOWTO: Updates on subsystem trees, patchwork, -next (vs. -mm) in ko_KR
    Documentation: HOWTO: update for 2.6.x -> 3.x versioning in ko_KR
    Documentation: HOWTO: update stable address in ko_KR
    Documentation: HOWTO: update LXR web link in ko_KR
    char: nwbutton: open-code interruptible_sleep_on
    mei: fix syntax in comments and debug output
    mei: nfc: mei_nfc_free has to be called under lock
    mei: use hbm idle state to prevent spurious resets
    mei: do not run reset flow from the interrupt thread
    misc: genwqe: fix return value check in genwqe_device_create()
    GenWQE: Fix warnings for sparc
    GenWQE: Fix compile problems for Alpha
    Documentation/misc-devices/mei/mei-amt-version.c: remove unneeded call of mei_deinit()
    GenWQE: Rework return code for flash-update ioctl
    sgi-xp: open-code interruptible_sleep_on_timeout
    ...

    Linus Torvalds
     

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
     

09 Dec, 2013

1 commit


26 Nov, 2013

1 commit

  • ZTWO_VADDR() converts from physical to virtual I/O addresses, so it should
    return "void __iomem *" instead of "unsigned long".

    This allows to drop several casts, but requires adding a few casts to
    accomodate legacy driver frameworks that store "unsigned long" I/O
    addresses.

    Signed-off-by: Geert Uytterhoeven

    Geert Uytterhoeven
     

16 Nov, 2013

1 commit

  • Pull Kconfig cleanups from Mark Salter:
    "Remove some unused config options from C6X and clean up PC_PARPORT
    dependencies. The latter was discussed here:

    https://lkml.org/lkml/2013/10/8/12"

    * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
    c6x: remove unused COMMON_CLKDEV Kconfig parameter
    Kconfig cleanup (PARPORT_PC dependencies)
    x86: select ARCH_MIGHT_HAVE_PC_PARPORT
    unicore32: select ARCH_MIGHT_HAVE_PC_PARPORT
    sparc: select ARCH_MIGHT_HAVE_PC_PARPORT
    sh: select ARCH_MIGHT_HAVE_PC_PARPORT
    powerpc: select ARCH_MIGHT_HAVE_PC_PARPORT
    parisc: select ARCH_MIGHT_HAVE_PC_PARPORT
    mips: select ARCH_MIGHT_HAVE_PC_PARPORT
    microblaze: select ARCH_MIGHT_HAVE_PC_PARPORT
    m68k: select ARCH_MIGHT_HAVE_PC_PARPORT
    ia64: select ARCH_MIGHT_HAVE_PC_PARPORT
    arm: select ARCH_MIGHT_HAVE_PC_PARPORT
    alpha: select ARCH_MIGHT_HAVE_PC_PARPORT
    c6x: remove unused parameter in Kconfig

    Linus Torvalds
     

15 Nov, 2013

1 commit