1. 08 11月, 2017 6 次提交
  2. 14 10月, 2017 2 次提交
    • R
      PM / QoS: Drop PM_QOS_FLAG_REMOTE_WAKEUP · 20f97caf
      Rafael J. Wysocki 提交于
      The PM QoS flag PM_QOS_FLAG_REMOTE_WAKEUP is not used consistently
      and the vast majority of code simply assumes that remote wakeup
      should be enabled for devices in runtime suspend if they can
      generate wakeup signals, so drop it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      20f97caf
    • V
      PM / Domains: Add support to select performance-state of domains · 42f6284a
      Viresh Kumar 提交于
      Some platforms have the capability to configure the performance state of
      PM domains. This patch enhances the genpd core to support such
      platforms.
      
      The performance levels (within the genpd core) are identified by
      positive integer values, a lower value represents lower performance
      state.
      
      This patch adds a new genpd API, which is called by user drivers (like
      OPP framework):
      
      - int dev_pm_genpd_set_performance_state(struct device *dev,
      					 unsigned int state);
      
        This updates the performance state constraint of the device on its PM
        domain. On success, the genpd will have its performance state set to a
        value which is >= "state" passed to this routine. The genpd core calls
        the genpd->set_performance_state() callback, if implemented,
        else -ENODEV is returned to the caller.
      
      The PM domain drivers need to implement the following callback if they
      want to support performance states.
      
      - int (*set_performance_state)(struct generic_pm_domain *genpd,
      			       unsigned int state);
      
        This is called internally by the genpd core on several occasions. The
        genpd core passes the genpd pointer and the aggregate of the
        performance states of the devices supported by that genpd to this
        callback. This callback must update the performance state of the genpd
        (in a platform dependent way).
      
      The power domains can avoid supplying above callback, if they don't
      support setting performance-states.
      
      Currently we aren't propagating performance state changes of a subdomain
      to its masters as we don't have hardware that needs it right now. Over
      that, the performance states of subdomain and its masters may not have
      one-to-one mapping and would require additional information. We can get
      back to this once we have hardware that needs it.
      Tested-by: NRajendra Nayak <rnayak@codeaurora.org>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      42f6284a
  3. 11 10月, 2017 1 次提交
  4. 06 10月, 2017 1 次提交
    • J
      dm raid: fix incorrect status output at the end of a "recover" process · 41dcf197
      Jonathan Brassow 提交于
      There are three important fields that indicate the overall health and
      status of an array: dev_health, sync_ratio, and sync_action.  They tell
      us the condition of the devices in the array, and the degree to which
      the array is synchronized.
      
      This commit fixes a condition that is reported incorrectly.  When a member
      of the array is being rebuilt or a new device is added, the "recover"
      process is used to synchronize it with the rest of the array.  When the
      process is complete, but the sync thread hasn't yet been reaped, it is
      possible for the state of MD to be:
       mddev->recovery = [ MD_RECOVERY_RUNNING MD_RECOVERY_RECOVER MD_RECOVERY_DONE ]
       curr_resync_completed = <max dev size> (but not MaxSector)
       and all rdevs to be In_sync.
      This causes the 'array_in_sync' output parameter that is passed to
      rs_get_progress() to be computed incorrectly and reported as 'false' --
      or not in-sync.  This in turn causes the dev_health status characters to
      be reported as all 'a', rather than the proper 'A'.
      
      This can cause erroneous output for several seconds at a time when tools
      will want to be checking the condition due to events that are raised at
      the end of a sync process.  Fix this by properly calculating the
      'array_in_sync' return parameter in rs_get_progress().
      
      Also, remove an unnecessary intermediate 'recovery_cp' variable in
      rs_get_progress().
      Signed-off-by: NJonathan Brassow <jbrassow@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      41dcf197
  5. 05 10月, 2017 14 次提交
  6. 04 10月, 2017 16 次提交
    • M
      dm crypt: reject sector_size feature if device length is not aligned to it · 783874b0
      Milan Broz 提交于
      If a crypt mapping uses optional sector_size feature, additional
      restrictions to mapped device segment size must be applied in
      constructor, otherwise the device activation will fail later.
      
      Fixes: 8f0009a2 ("dm crypt: optionally support larger encryption sector size")
      Cc: stable@vger.kernel.org # 4.12+
      Signed-off-by: NMilan Broz <gmazyland@gmail.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      783874b0
    • C
      nvme-pci: Use PCI bus address for data/queues in CMB · 8969f1f8
      Christoph Hellwig 提交于
      Currently, NVMe PCI host driver is programming CMB dma address as
      I/O SQs addresses. This results in failures on systems where 1:1
      outbound mapping is not used (example Broadcom iProc SOCs) because
      CMB BAR will be progammed with PCI bus address but NVMe PCI EP will
      try to access CMB using dma address.
      
      To have CMB working on systems without 1:1 outbound mapping, we
      program PCI bus address for I/O SQs instead of dma address. This
      approach will work on systems with/without 1:1 outbound mapping.
      
      Based on a report and previous patch from Abhishek Shah.
      
      Fixes: 8ffaadf7 ("NVMe: Use CMB for the IO SQes if available")
      Cc: stable@vger.kernel.org
      Reported-by: NAbhishek Shah <abhishek.shah@broadcom.com>
      Tested-by: NAbhishek Shah <abhishek.shah@broadcom.com>
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      8969f1f8
    • G
      mmc: sdhci-xenon: Fix clock resource by adding an optional bus clock · bb16ea17
      Gregory CLEMENT 提交于
      On Armada 7K/8K we need to explicitly enable the bus clock. The bus clock
      is optional because not all the SoCs need them but at least for Armada
      7K/8K it is actually mandatory.
      
      The binding documentation is updating accordingly.
      
      Without this patch the kernel hand during boot if the mvpp2.2 network
      driver was not present in the kernel. Indeed the clock needed by the
      xenon controller was set by the network driver.
      
      Fixes: 3a3748db ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core
      functionality)"
      CC: Stable <stable@vger.kernel.org>
      Tested-by: NZhoujie Wu <zjwu@marvell.com>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      bb16ea17
    • J
      mmc: meson-gx: include tx phase in the tuning process · 0a446976
      Jerome Brunet 提交于
      It has been reported that some platforms (odroid-c2) may require
      a different tx phase setting to operate at high speed (hs200 and hs400)
      
      To improve the situation, this patch includes tx phase in the tuning
      process.
      
      Fixes: d341ca88 ("mmc: meson-gx: rework tuning function")
      Reported-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      Reviewed-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      0a446976
    • J
      mmc: meson-gx: fix rx phase reset · 3e2b0af4
      Jerome Brunet 提交于
      Resetting the phase when POWER_ON is set the set_ios() call means that the
      phase is reset almost every time the set_ios() is called, while the
      expected behavior was to reset the phase on a power cycle.
      
      This had gone unnoticed until now because in all mode (except hs400) the
      tuning is done after the last to set_ios(). In such case, the tuning
      result is used anyway.  In HS400, there are a few calls to set_ios() after
      the tuning is done, overwriting the tuning result.
      
      Resetting the phase on POWER_UP instead of POWER_ON solve the problem.
      
      Fixes: d341ca88 ("mmc: meson-gx: rework tuning function")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      Reviewed-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      3e2b0af4
    • J
      mmc: meson-gx: make sure the clock is rounded down · ca3dcd3f
      Jerome Brunet 提交于
      Using CLK_DIVIDER_ROUND_CLOSEST is unsafe as the mmc clock could be
      rounded to a rate higher the specified rate. Removing this flag ensure
      that, if the rate needs to be rounded, it will be rounded down.
      
      Fixes: 51c5d844 ("MMC: meson: initial support for GX platforms")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      Reviewed-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      ca3dcd3f
    • L
      mmc: Delete bounce buffer handling · de3ee99b
      Linus Walleij 提交于
      In may, Steven sent a patch deleting the bounce buffer handling
      and the CONFIG_MMC_BLOCK_BOUNCE option.
      
      I chose the less invasive path of making it a runtime config
      option, and we merged that successfully for kernel v4.12.
      
      The code is however just standing in the way and taking up
      space for seemingly no gain on any systems in wide use today.
      
      Pierre says the code was there to improve speed on TI SDHCI
      controllers on certain HP laptops and possibly some Ricoh
      controllers as well. Early SDHCI controllers lacked the
      scatter-gather feature, which made software bounce buffers
      a significant speed boost.
      
      We are clearly talking about the list of SDHCI PCI-based
      MMC/SD card readers found in the pci_ids[] list in
      drivers/mmc/host/sdhci-pci-core.c.
      
      The TI SDHCI derivative is not supported by the upstream
      kernel. This leaves the Ricoh.
      
      What we can however notice is that the x86 defconfigs in the
      kernel did not enable CONFIG_MMC_BLOCK_BOUNCE option, which
      means that any such laptop would have to have a custom
      configured kernel to actually take advantage of this
      bounce buffer speed-up. It simply seems like there was
      a speed optimization for the Ricoh controllers that noone
      was using. (I have not checked the distro defconfigs but
      I am pretty sure the situation is the same there.)
      
      Bounce buffers increased performance on the OMAP HSMMC
      at one point, and was part of the original submission in
      commit a45c6cb8 ("[ARM] 5369/1: omap mmc: Add new
         omap hsmmc controller for 2430 and 34xx, v3")
      
      This optimization was removed in
      commit 0ccd76d4 ("omap_hsmmc: Implement scatter-gather
         emulation")
      which found that scatter-gather emulation provided even
      better performance.
      
      The same was introduced for SDHCI in
      commit 2134a922 ("sdhci: scatter-gather (ADMA) support")
      
      I am pretty positively convinced that software
      scatter-gather emulation will do for any host controller what
      the bounce buffers were doing. Essentially, the bounce buffer
      was a reimplementation of software scatter-gather-emulation in
      the MMC subsystem, and it should be done away with.
      
      Cc: Pierre Ossman <pierre@ossman.eu>
      Cc: Juha Yrjola <juha.yrjola@solidboot.com>
      Cc: Steven J. Hill <Steven.Hill@cavium.com>
      Cc: Shawn Lin <shawn.lin@rock-chips.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Suggested-by: NSteven J. Hill <Steven.Hill@cavium.com>
      Suggested-by: NShawn Lin <shawn.lin@rock-chips.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      de3ee99b
    • M
      zram: fix null dereference of handle · ae94264e
      Minchan Kim 提交于
      In testing I found handle passed to zs_map_object in __zram_bvec_read is
      NULL so eh kernel goes oops in pin_object().
      
      The reason is there is no routine to check the slot's freeing after
      getting the slot's lock.  This patch fixes it.
      
      [minchan@kernel.org: v2]
        Link: http://lkml.kernel.org/r/1505887347-10881-1-git-send-email-minchan@kernel.org
      Link: http://lkml.kernel.org/r/1505788488-26723-1-git-send-email-minchan@kernel.org
      Fixes: 1f7319c7 ("zram: partial IO refactoring")
      Signed-off-by: NMinchan Kim <minchan@kernel.org>
      Reviewed-by: NSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ae94264e
    • I
      rapidio: remove global irq spinlocks from the subsystem · 31d1e130
      Ioan Nicu 提交于
      Locking of config and doorbell operations should be done only if the
      underlying hardware requires it.
      
      This patch removes the global spinlocks from the rapidio subsystem and
      moves them to the mport drivers (fsl_rio and tsi721), only to the
      necessary places.  For example, local config space read and write
      operations (lcread/lcwrite) are atomic in all existing drivers, so there
      should be no need for locking, while the cread/cwrite operations which
      generate maintenance transactions need to be synchronized with a lock.
      
      Later, each driver could chose to use a per-port lock instead of a
      global one, or even more granular locking.
      
      Link: http://lkml.kernel.org/r/20170824113023.GD50104@nokia.comSigned-off-by: NIoan Nicu <ioan.nicu.ext@nokia.com>
      Signed-off-by: NFrank Kunz <frank.kunz@nokia.com>
      Acked-by: NAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      31d1e130
    • S
      android: binder: drop lru lock in isolate callback · a1b2289c
      Sherry Yang 提交于
      Drop the global lru lock in isolate callback before calling
      zap_page_range which calls cond_resched, and re-acquire the global lru
      lock before returning.  Also change return code to LRU_REMOVED_RETRY.
      
      Use mmput_async when fail to acquire mmap sem in an atomic context.
      
      Fix "BUG: sleeping function called from invalid context"
      errors when CONFIG_DEBUG_ATOMIC_SLEEP is enabled.
      
      Also restore mmput_async, which was initially introduced in commit
      ec8d7c14 ("mm, oom_reaper: do not mmput synchronously from the oom
      reaper context"), and was removed in commit 21292580 ("mm: oom: let
      oom_reap_task and exit_mmap run concurrently").
      
      Link: http://lkml.kernel.org/r/20170914182231.90908-1-sherryy@android.com
      Fixes: f2517eb7 ("android: binder: Add global lru shrinker to binder")
      Signed-off-by: NSherry Yang <sherryy@android.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reported-by: NKyle Yan <kyan@codeaurora.org>
      Acked-by: NArve Hjønnevåg <arve@android.com>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Cc: Martijn Coenen <maco@google.com>
      Cc: Todd Kjos <tkjos@google.com>
      Cc: Riley Andrews <riandrews@android.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Hillf Danton <hdanton@sina.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Hoeun Ryu <hoeun.ryu@gmail.com>
      Cc: Christopher Lameter <cl@linux.com>
      Cc: Vegard Nossum <vegard.nossum@oracle.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a1b2289c
    • D
      net: stmmac: dwmac-rk: Add RK3128 GMAC support · 05946876
      David Wu 提交于
      Add constants and callback functions for the dwmac on rk3128 soc.
      As can be seen, the base structure is the same, only registers
      and the bits in them moved slightly.
      Signed-off-by: NDavid Wu <david.wu@rock-chips.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05946876
    • J
      null_blk: change configfs dependency to select · 6cd1a6fe
      Jens Axboe 提交于
      A recent commit made null_blk depend on configfs, which is kind of
      annoying since you now have to find this dependency and enable that
      as well. Discovered this since I no longer had null_blk available
      on a box I needed to debug, since it got killed when the config
      updated after the configfs change was merged.
      
      Fixes: 3bf2bd20 ("nullb: add configfs interface")
      Reviewed-by: NShaohua Li <shli@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      6cd1a6fe
    • A
      rndis_host: support Novatel Verizon USB730L · 63ba395c
      Aleksander Morgado 提交于
      Treat the ef/04/01 interface class/subclass/protocol combination used
      by the Novatel Verizon USB730L (1410:9030) as a possible RNDIS
      interface.
      
       T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 17 Spd=480 MxCh= 0
       D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  3
       P:  Vendor=1410 ProdID=9030 Rev=03.10
       S:  Manufacturer=Novatel Wireless
       S:  Product=MiFi USB730L
       S:  SerialNumber=0123456789ABCDEF
       C:  #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA
       I:  If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host
       I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
       I:  If#= 2 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
      
      Once the network interface is brought up, the user just needs to run a
      DHCP client to get IP address and routing setup.
      
      As a side note, other Novatel Verizon USB730L models with the same
      vid:pid end up exposing a standard ECM interface which doesn't require
      any other kernel update to make it work.
      Signed-off-by: NAleksander Morgado <aleksander@aleksander.es>
      Reviewed-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63ba395c
    • I
      drm/i915: Fix DDI PHY init if it was already on · 71300132
      Imre Deak 提交于
      The common lane power down flag of a DPIO PHY has a funky semantic:
      after the initial enabling of the PHY (so from a disabled state) this
      flag will be clear. It will be set only after the PHY will be used for
      the first time (for instance due to enabling the corresponding pipe) and
      then become unused (due to disabling the pipe). During the initial PHY
      enablement we don't know which of the above phases we are in, so move
      the check for the flag where this is known, the HW readout code. This is
      where the rest of lane power down status checks are done anyway.
      
      This fixes at least a problem on GLK where after module reloading, the
      common lane power down flag of PHY1 is set, but the PHY is actually
      powered-on and properly set up. The GRC readout code for other PHYs will
      hence think that PHY1 is not powered initially and disable it after the
      GRC readout. This will cause the AUX power well related to PHY1 to get
      disabled in a stuck state, timing out when we try to enable it later.
      
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Fixes: e93da0a0 ("drm/i915/bxt: Sanitiy check the PHY lane power down status")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102777Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171002135307.26117-1-imre.deak@intel.com
      (cherry picked from commit e19c1eb8)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      71300132
    • L
      ide: fix IRQ assignment for PCI bus order probing · b1f9e5e3
      Lorenzo Pieralisi 提交于
      We used to assign IRQs for all devices at boot-time, before any drivers
      claimed devices.  The following commits:
      
        30fdfb92 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()")
        0e4c2eeb ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
      
      changed this so we now call pci_assign_irq() from pci_device_probe() when
      we call a driver's probe method.
      
      The ide_scan_pcibus() path (enabled by CONFIG_IDEPCI_PCIBUS_ORDER) bypasses
      pci_device_probe() so it can guarantee devices are claimed in order of PCI
      bus address.  It calls the driver's probe method directly, so it misses the
      pci_assign_irq() call (and other PCI initialization functions), which
      causes failures like this:
      
        ide0: disabled, no IRQ
        ide0: failed to initialize IDE interface
        ide0: disabling port
        cmd64x 0000:00:02.0: IDE controller (0x1095:0x0646 rev 0x07)
        CMD64x_IDE 0000:00:02.0: BAR 0: can't reserve [io  0x8050-0x8057]
        cmd64x 0000:00:02.0: can't reserve resources
        CMD64x_IDE: probe of 0000:00:02.0 failed with error -16
        ide_generic: please use "probe_mask=0x3f" module parameter for probing
        all legacy ISA IDE ports
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x94/0xd0
        sysfs: cannot create duplicate filename '/class/ide_port/ide0'
        ...
      
        Trace:
        [<fffffc000048c9f4>] sysfs_warn_dup+0x94/0xd0
        [<fffffc0000330928>] warn_slowpath_fmt+0x58/0x70
        [<fffffc000048c9f4>] sysfs_warn_dup+0x94/0xd0
        [<fffffc0000486d40>] kernfs_path_from_node+0x30/0x60
        [<fffffc00004874ac>] kernfs_put+0x16c/0x2c0
        [<fffffc00004874ac>] kernfs_put+0x16c/0x2c0
        [<fffffc000048d010>] sysfs_do_create_link_sd.isra.2+0x100/0x120
        [<fffffc00005b9d64>] device_add+0x2a4/0x7c0
        [<fffffc00005ba5cc>] device_create_groups_vargs+0x14c/0x170
        [<fffffc00005ba518>] device_create_groups_vargs+0x98/0x170
        [<fffffc00005ba690>] device_create+0x50/0x70
        [<fffffc00005df36c>] ide_host_register+0x48c/0xa00
        [<fffffc00005df330>] ide_host_register+0x450/0xa00
        [<fffffc00005ba2a0>] device_register+0x20/0x50
        [<fffffc00005df330>] ide_host_register+0x450/0xa00
        [<fffffc00005df944>] ide_host_add+0x64/0xe0
        [<fffffc000079b41c>] kobject_uevent_env+0x16c/0x710
        [<fffffc0000310288>] do_one_initcall+0x68/0x260
        [<fffffc00007b13bc>] kernel_init+0x1c/0x1a0
        ...
        ---[ end trace 24a70433c3e4d374 ]---
        ide0: disabling port
      
      Fix the IRQ allocation issue by calling pci_assign_irq() from
      ide_scan_pcidev() before probing the IDE PCI drivers, so that IRQs for a
      given PCI device are allocated for the IDE PCI drivers to use them for
      device configuration.
      
      Fixes: 30fdfb92 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()")
      Fixes: 0e4c2eeb ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
      Link: http://lkml.kernel.org/r/32ec730f-c1b0-5584-cd35-f8a809122b96@roeck-us.netReported-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      [bhelgaas: changelog]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      b1f9e5e3
    • B
      ide: pci: free PCI BARs on initialization failure · a06876a7
      Bartlomiej Zolnierkiewicz 提交于
      Recent pci_assign_irq() changes uncovered a problem with missing freeing of
      PCI BARs on PCI IDE host initialization failure:
      
        ide0: disabled, no IRQ
        ide0: failed to initialize IDE interface
        ide0: disabling port
        cmd64x 0000:00:02.0: IDE controller (0x1095:0x0646 rev 0x07)
        CMD64x_IDE 0000:00:02.0: BAR 0: can't reserve [io  0x8050-0x8057]
        cmd64x 0000:00:02.0: can't reserve resources
        CMD64x_IDE: probe of 0000:00:02.0 failed with error -16
      
      Fix the problem by adding missing freeing of PCI BARs to
      ide_setup_pci_controller() and ide_pci_init_two().
      
      Fixes: 30fdfb92 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()")
      Fixes: 0e4c2eeb ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
      Link: http://lkml.kernel.org/r/32ec730f-c1b0-5584-cd35-f8a809122b96@roeck-us.netReported-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      [bhelgaas: add Fixes:]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      a06876a7