1. 10 1月, 2018 1 次提交
    • G
      gpio: Add missing open drain/source handling to gpiod_set_value_cansleep() · 1e77fc82
      Geert Uytterhoeven 提交于
      Since commit f11a0446 ("i2c: gpio: Enable working over slow
      can_sleep GPIOs"), probing the i2c RTC connected to an i2c-gpio bus on
      r8a7740/armadillo fails with:
      
          rtc-s35390a 0-0030: error resetting chip
          rtc-s35390a: probe of 0-0030 failed with error -5
      
      More debug code reveals:
      
          i2c i2c-0: master_xfer[0] R, addr=0x30, len=1
          i2c i2c-0: NAK from device addr 0x30 msg #0
          s35390a_get_reg: ret = -6
      
      Commit 02e47980 ("gpio: Alter semantics of *raw* operations to
      actually be raw") moved open drain/source handling from
      gpiod_set_raw_value_commit() to gpiod_set_value(), but forgot to take
      into account that gpiod_set_value_cansleep() also needs this handling.
      The i2c protocol mandates that i2c signals are open drain, hence i2c
      communication fails.
      
      Fix this by adding the missing handling to gpiod_set_value_cansleep(),
      using a new common helper gpiod_set_value_nocheck().
      
      Fixes: 02e47980 ("gpio: Alter semantics of *raw* operations to actually be raw")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      [removed underscore syntax, added kerneldoc]
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      1e77fc82
  2. 07 1月, 2018 2 次提交
    • J
      leds: core: Fix regression caused by commit 2b83ff96 · 7b6af2c5
      Jacek Anaszewski 提交于
      Commit 2b83ff96 ("led: core: Fix brightness setting when setting delay_off=0")
      replaced del_timer_sync(&led_cdev->blink_timer) with led_stop_software_blink()
      in led_blink_set(), which additionally clears LED_BLINK_SW flag as well as
      zeroes blink_delay_on and blink_delay_off properties of the struct led_classdev.
      
      Cleansing of the latter ones wasn't required to fix the original issue but
      wasn't considered harmful. It nonetheless turned out to be so in case when
      pointer to one or both props is passed to led_blink_set() like in the
      ledtrig-timer.c. In such cases zeroes are passed later in delay_on and/or
      delay_off arguments to led_blink_setup(), which results either in stopping
      the software blinking or setting blinking frequency always to 1Hz.
      
      Avoid using led_stop_software_blink() and add a single call required
      to clear LED_BLINK_SW flag, which was the only needed modification to
      fix the original issue.
      
      Fixes 2b83ff96 ("led: core: Fix brightness setting when setting delay_off=0")
      Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
      7b6af2c5
    • B
      mtd: nand: pxa3xx: Fix READOOB implementation · fee4380f
      Boris Brezillon 提交于
      In the current driver, OOB bytes are accessed in raw mode, and when a
      page access is done with NDCR_SPARE_EN set and NDCR_ECC_EN cleared, the
      driver must read the whole spare area (64 bytes in case of a 2k page,
      16 bytes for a 512 page). The driver was only reading the free OOB
      bytes, which was leaving some unread data in the FIFO and was somehow
      leading to a timeout.
      
      We could patch the driver to read ->spare_size + ->ecc_size instead of
      just ->spare_size when READOOB is requested, but we'd better make
      in-band and OOB accesses consistent.
      Since the driver is always accessing in-band data in non-raw mode (with
      the ECC engine enabled), we should also access OOB data in this mode.
      That's particularly useful when using the BCH engine because in this
      mode the free OOB bytes are also ECC protected.
      
      Fixes: 43bcfd2b ("mtd: nand: pxa3xx: Add driver-specific ECC BCH support")
      Cc: stable@vger.kernel.org
      Reported-by: NSean Nyekjær <sean.nyekjaer@prevas.dk>
      Tested-by: NWilly Tarreau <w@1wt.eu>
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Acked-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Tested-by: NSean Nyekjaer <sean.nyekjaer@prevas.dk>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      fee4380f
  3. 05 1月, 2018 1 次提交
    • S
      mfd: rtsx: Release IRQ during shutdown · 107b7d9f
      Sinan Kaya 提交于
      'Commit cc27b735 ("PCI/portdrv: Turn off PCIe services during
      shutdown")' revealed a resource leak in rtsx_pci driver during shutdown.
      
      Issue shows up as a warning during shutdown as follows:
      
      remove_proc_entry: removing non-empty directory 'irq/17', leaking at least
      'rtsx_pci'
      WARNING: CPU: 0 PID: 1578 at fs/proc/generic.c:572
      remove_proc_entry+0x11d/0x130
      Modules linked in <long list but none that are out-of-tree>
      ...
      Call Trace:
      unregister_irq_proc
      free_desc
      irq_free_descs
      mp_unmap_irq
      acpi_unregister_gsi_apic
      acpi_pci_irq_disable
      do_pci_disable_device
      pci_disable_device
      device_shutdown
      kernel_restart
      Sys_reboot
      
      Even though rtsx_pci driver implements a shutdown callback, it is not
      releasing the interrupt that it registered during probe. This is causing
      the ACPI layer to complain that the shared IRQ is in use while freeing
      IRQ.
      
      This code releases the IRQ to prevent resource leak and eliminate the
      warning.
      
      Fixes: cc27b735 ("PCI/portdrv: Turn off PCIe services during shutdown")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=198141Reported-by: NChris Clayton <chris2553@googlemail.com>
      Signed-off-by: NSinan Kaya <okaya@codeaurora.org>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      107b7d9f
  4. 04 1月, 2018 1 次提交
  5. 03 1月, 2018 8 次提交
  6. 02 1月, 2018 6 次提交
  7. 30 12月, 2017 1 次提交
    • T
      genirq/irqdomain: Rename early argument of irq_domain_activate_irq() · 702cb0a0
      Thomas Gleixner 提交于
      The 'early' argument of irq_domain_activate_irq() is actually used to
      denote reservation mode. To avoid confusion, rename it before abuse
      happens.
      
      No functional change.
      
      Fixes: 72491643 ("genirq/irqdomain: Update irq_domain_ops.activate() signature")
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Alexandru Chirvasitu <achirvasub@gmail.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Dou Liyang <douly.fnst@cn.fujitsu.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Mikael Pettersson <mikpelinux@gmail.com>
      Cc: Josh Poulson <jopoulso@microsoft.com>
      Cc: Mihai Costache <v-micos@microsoft.com>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: linux-pci@vger.kernel.org
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: Dexuan Cui <decui@microsoft.com>
      Cc: Simon Xiao <sixiao@microsoft.com>
      Cc: Saeed Mahameed <saeedm@mellanox.com>
      Cc: Jork Loeser <Jork.Loeser@microsoft.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: devel@linuxdriverproject.org
      Cc: KY Srinivasan <kys@microsoft.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Sakari Ailus <sakari.ailus@intel.com>,
      Cc: linux-media@vger.kernel.org
      702cb0a0
  8. 29 12月, 2017 2 次提交
    • T
      gpio: brcmstb: Make really use of the new lockdep class · 8880c137
      Thomas Gleixner 提交于
      The recent extension of irq_set_lockdep_class() with a second argument
      added the new lockdep class to the mrcmstb driver, but used the already
      existing lockdep class as second argument, which leaves the new lockdep
      class defined but unused.
      
      Use the new lockdep class as that's what the change intended to do.
      
      Fixes: 39c3fd58 ("kernel/irq: Extend lockdep class for request mutex")
      Reported-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: linus.walleij@linaro.org
      8880c137
    • T
      x86/apic: Switch all APICs to Fixed delivery mode · a31e58e1
      Thomas Gleixner 提交于
      Some of the APIC incarnations are operating in lowest priority delivery
      mode. This worked as long as the vector management code allocated the same
      vector on all possible CPUs for each interrupt.
      
      Lowest priority delivery mode does not necessarily respect the affinity
      setting and may redirect to some other online CPU. This was documented
      somewhere in the old code and the conversion to single target delivery
      missed to update the delivery mode of the affected APIC drivers which
      results in spurious interrupts on some of the affected CPU/Chipset
      combinations.
      
      Switch the APIC drivers over to Fixed delivery mode and remove all
      leftovers of lowest priority delivery mode.
      
      Switching to Fixed delivery mode is not a problem on these CPUs because the
      kernel already uses Fixed delivery mode for IPIs. The reason for this is
      that th SDM explicitely forbids lowest prio mode for IPIs. The reason is
      obvious: If the irq routing does not honor destination targets in lowest
      prio mode then an IPI targeted at CPU1 might end up on CPU0, which would be
      a fatal problem in many cases.
      
      As a consequence of this change, the apic::irq_delivery_mode field is now
      pointless, but this needs to be cleaned up in a separate patch.
      
      Fixes: fdba46ff ("x86/apic: Get rid of multi CPU affinity")
      Reported-by: vcaputo@pengaru.com
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: vcaputo@pengaru.com
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712281140440.1688@nanos
      a31e58e1
  9. 28 12月, 2017 10 次提交
  10. 27 12月, 2017 8 次提交