summaryrefslogtreecommitdiff
path: root/drivers/parport/parport_pc.c
AgeCommit message (Collapse)Author
2019-05-21treewide: Add SPDX license identifier for more missed filesThomas Gleixner
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 <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11parport_pc: fix find_superio io compare code, should use equal test.QiaoChong
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 <alan@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: QiaoChong <qiaochong@loongson.cn> [rewrite the commit message] Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27parport: parport_pc: Mark expected switch fall-throughGustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114730 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-14parport_pc: Add support for WCH CH382L PCI-E single parallel port card.Alexander Gerasiov
WCH CH382L is a PCI-E adapter with 1 parallel port. It is similair to CH382 but serial ports are not soldered on board. Detected as Serial controller: Device 1c00:3050 (rev 10) (prog-if 05 [16850]) Signed-off-by: Alexander Gerasiov <gq@redlab-i.ru> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28parport_pc: use pr_contMikulas Patocka
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 <mpatocka@redhat.com> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-20Annotate hardware config module parameters in drivers/parport/David Howells
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 <gnomes@lxorguk.ukuu.org.uk> Signed-off-by: David Howells <dhowells@redhat.com> cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
2017-03-02sched/headers: Prepare to move signal wakeup & sigpending methods from ↵Ingo Molnar
<linux/sched.h> into <linux/sched/signal.h> Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-02-27scripts/spelling.txt: add "overwriten" pattern and fix typo instancesMasahiro Yamada
Fix typos and add the following to the scripts/spelling.txt: overwrien||overwritten Link: http://lkml.kernel.org/r/1481573103-11329-30-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-01parport: add device-model to parport subsystemSudip Mukherjee
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 <jdelvare@suse.de> Tested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-14Merge tag 'char-misc-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc 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 ...
2014-11-26parport: parport_pc, do not remove parent devices earlyJiri Slaby
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: ... [<ffffffff810aff76>] warn_slowpath_fmt+0x46/0x50 [<ffffffff8123d81b>] sysfs_remove_group+0x9b/0xa0 [<ffffffff814c27e7>] dpm_sysfs_remove+0x57/0x60 [<ffffffff814b6ac9>] device_del+0x49/0x240 [<ffffffff814b6ce2>] device_unregister+0x22/0x70 [<ffffffff814b6dac>] device_destroy+0x3c/0x50 [<ffffffffc012209a>] pp_detach+0x4a/0x60 [ppdev] [<ffffffff814b32dd>] parport_remove_port+0x11d/0x150 [<ffffffffc0137328>] parport_pc_unregister_port+0x28/0xf0 [parport_pc] [<ffffffffc0138c0e>] parport_pc_exit+0x76/0x468 [parport_pc] [<ffffffff81128dbc>] 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 <jslaby@suse.cz> Reviewed-by: Takashi Iwai <tiwai@suse.de> Tested-by: Martin Pluskal <mpluskal@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20parport: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-09-23parport: parport_pc: Implement architecture and device check to cut off ↵Matwey V. Kornilov
false-positives 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 <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23parport: parport_pc: Introduce intel_bug_present function.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 <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10parport: parport_pc: remove double PCI ID for NetMosSebastian Andrzej Siewior
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 <maks@stro.at> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10parport_pc: remove unnecessary pci_set_drvdata()Jingoo Han
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 <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10parport: parport_pc: fix id print of a deviceSebastian Andrzej Siewior
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 <lee.howard@mainpine.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-31DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()Russell King
The code sequence: dev->coherent_dma_mask = DMA_BIT_MASK(24); dev->dma_mask = &dev->coherent_dma_mask; bypasses the architectures check on the DMA mask. It can be replaced with dma_coerce_mask_and_coherent(), avoiding the direct initialization of this mask. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-01-03Drivers: parport: remove __dev* attributes.Greg Kroah-Hartman
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 <wfp5p@virginia.edu> Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Matt Porter <mporter@ti.com> Cc: Kay Sievers <kay@vrfy.org> Cc: Gianluca Anzolin <gianluca@sottospazio.it> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-22Merge tag 'driver-core-3.5-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 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 <gregkh@linuxfoundation.org>" 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 ...
2012-05-08parport: use KERN_CONT in printk() continuation linesKay Sievers
On Tue, May 8, 2012 at 10:48 AM, Sasha Levin <levinsasha928@gmail.com> 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 <levinsasha928@gmail.com> Signed-off-by: Kay Sievers <kay@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20parport: remove unused dead code from lowlevel driversMatt Porter
This unused code has been untouched for over 7 years and must go. Signed-off-by: Matt Porter <mporter@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-01-12drivers/parport/parport_pc.c: fix warningsAndrew Morton
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 <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-18parport_pc: release IO region properly if unsupported ITE887x card is foundJiri Kosina
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 <jkosina@suse.cz> Acked-by: Niels de Vos <ndevos@redhat.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Joe Krahn <krahn@niehs.nih.gov> Signed-off-by: Andrew Morton <akpm@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07parport/serial: add support for Timedia/SUNIX cards to parport_serialFrédéric Brière
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 <fbriere@fbriere.net> Acked-by: Alan Cox <alan@linux.intel.com> Cc: linux-serial@vger.kernel.org Cc: linux-parport@lists.infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-23Merge branch 'tty-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * '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.
2011-05-06parport: Use request_muxed_region for IT87 probe and lockAlan Cox
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 <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19parport_pc.c: correctly release the requested region for the IT887xNiels de Vos
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 <julia@diku.dk> Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-08-24parport_pc: show the detection of a 2 serial port ITE8874 chipNiels de Vos
The printk message for the 2 serial port version is obscured with a debug macro, unlike all other versions of the card. It should be changed to make the output equal for all detected models. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=578616#c1 CC: Joe Krahn <krahn@niehs.nih.gov> Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-03-02serial: 8250_pci: add support for MCS9865 / SYBA 6x Serial Port CardIra W. Snyder
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 <iws@ovro.caltech.edu> Cc: Darius Augulis <augulis.darius@gmail.com> Cc: Greg KH <greg@kroah.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-16parport_pc.c: use correct length in strncmpJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-30parport/serial: add support for NetMos 9901 Multi-IO cardMichael Buesch
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- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 65 Region 0: I/O ports at 0030 [size=8] Region 1: Memory at 80105000 (32-bit, non-prefetchable) [size=4K] Region 4: Memory at 80104000 (32-bit, non-prefetchable) [size=4K] Capabilities: <access denied> 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- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin B routed to IRQ 65 Region 0: I/O ports at 0020 [size=8] Region 1: Memory at 80103000 (32-bit, non-prefetchable) [size=4K] Region 4: Memory at 80102000 (32-bit, non-prefetchable) [size=4K] Capabilities: <access denied> 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- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin C routed to IRQ 65 Region 0: I/O ports at 0010 [size=8] Region 1: I/O ports at <unassigned> Region 2: Memory at 80101000 (32-bit, non-prefetchable) [size=4K] Region 4: Memory at 80100000 (32-bit, non-prefetchable) [size=4K] Capabilities: <access denied> 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 <mb@bu3sch.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-22parport_pc: set properly the dma_mask for parport_pc deviceFUJITA Tomonori
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 <fujita.tomonori@lab.ntt.co.jp> Reported-by: Malcom Blaney <malcolm.blaney@maptek.com.au> Tested-by: Malcom Blaney <malcolm.blaney@maptek.com.au> Cc: stable@kernel.org Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-22parport_pc: after superio probing restore original register valuesJens Rottmann
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 <JRottmann@LiPPERTEmbedded.de> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: <stable@kernel.org> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11parport_pc: clean up the modified while loops using forAlan Cox
And tidy up a few bits coding style detectors missed Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11parport_pc: Coding styleAlan 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 <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11parport_pc: Fix subscription bugsMichael Buesch
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 <mb@bu3sch.de> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07parport: Use the PCI IRQ if offeredAlan Cox
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 <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-238250: Oxford Semiconductor DevicesLee Howard
Add support for the OxSemi 'Tornado' devices. Reformatted and reworked a bit by Alan Cox Signed-off-by: Lee Howard <lee.howard@mainpine.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26parport_pc: add base_hi BAR for oxsemi_840Bernhard Walle
Use the 2nd BAR for the oxsemi_840 chip as BAR for base_hi. Tested with: Parallel controller [0701]: Oxford Semiconductor Ltd VScom 011H-EP1 1 port parallel adaptor [1415:8403] (prog-if 03 [IEEE1284]) This patch is needed to make 'TRISTATE' work with that adaptor. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30drivers: replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29parport_pc: wrap PNP probe code in #ifdef CONFIG_PNPBjorn Helgaas
Wrap PNP probe code in #ifdef CONFIG_PNP. We already do the same for CONFIG_PCI. Without this change, we'll have unresolved references to pnp_get_resource() function when CONFIG_PNP=n. (This is a new interface that's not in mainline yet.) Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-04parport_pc: make sure to release IO ports after probing for IT87XXLinus Torvalds
Commit f63fd7e299ee13da071ecfce2b90b58c5e1562b1 ("parport_pc: detection for SuperIO IT87XX POST") only released the IO port region on success, not when the probe for the IT87XX chip failed. That caused not only a reserved region to leak, but also caused an oops when the driver module was unloaded and somebody tried to cat /proc/ioports - because the string that was assigned to the IO port region was a static string in the module virtual address area. Reported-by: Lubos Lunak <l.lunak@suse.cz> Cc: Jan Kara <jack@suse.cz> Cc: Petr Cvek <petr.cvek@tul.cz> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-13parport: section fixupDavid Brownell
Fix section warning for parport_ECP_supported(); it's called from a routine exported to modules, so it can't be removed with __devinit section pruning. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06parport_pc: detection for SuperIO IT87XX POSTPetr Cvek
Add detection for IT87XX SuperIO chip and disabling its POST feature, which made noise on parallel port's pins. Signed-off-by: Petr Cvek <petr.cvek@tul.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06parport: add support for the Quatech SPPXP-100 Parallel port PCI ExpressCardLuís P Mendes
Added pci device id for the Quatech SPPXP-100 ExpressCard - 0x278 - to include/linux/pci_id.h Modified drivers/parport/parport_pc.c to support the Quatech SPPXP-100 Parallel port PCI ExpressCard [akpm@linux-foundation.org: build fix] Signed-off-by: Luís P Mendes <luis.p.mendes@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-23[PARPORT] Consolidate code copies into a single generic irq handlerJeff Garzik
Several arches used the exact same code for their parport irq handling. Make that code generic, in parport_irq_handler(). Also, s/__inline__/inline/ in include/linux/parport.h. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-07-31parport_pc locking fixAndrew Morton
http://bugzilla.kernel.org/show_bug.cgi?id=8821 reports a might_sleep() warning due to parport_pc_exit() running platform_device_unregister() while holding ports_lock. Just remove the locking: nobody else can access ports_list during module_exit. Cc: "Mike Sharkey" <mike@pikeaero.com> Cc: Tim Waugh <tim@cyberelk.net> Cc: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16parport_pc: it887x fixNiels de Vos
The IO port range requested by parport_pc.c:sio_ite_8872_probe is too small. The IO-ports of ttyS1 (0x2f8) will be missconfigured by the ITE-chip. The ITE starts looking for the chip a 0x2a0. An IO-portrange of 32 will not overwrite the ports of ttyS1. Therefore register 0x60 should be written with 0xe5000000, enabling the ITE and setting IO-portsize to 32 bytes. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>