12 Jul, 2012

15 commits

  • Pull fbdev fixes from Florian Tobias Schandinat:
    "Two fixes for OMAPDSS by Tomi Valkeinen:
    - one to avoid warnings when runtime PM is not enabled
    - one workaround to dependancy issues during suspend/resume"

    * tag 'fbdev-fixes-for-3.5-2' of git://github.com/schandinat/linux-2.6:
    OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
    OMAPDSS: Use PM notifiers for system suspend

    Linus Torvalds
     
  • Merge random patches from Andrew Morton.

    * Merge emailed patches from Andrew Morton : (32 commits)
    memblock: free allocated memblock_reserved_regions later
    mm: sparse: fix usemap allocation above node descriptor section
    mm: sparse: fix section usemap placement calculation
    xtensa: fix incorrect memset
    shmem: cleanup shmem_add_to_page_cache
    shmem: fix negative rss in memcg memory.stat
    tmpfs: revert SEEK_DATA and SEEK_HOLE
    drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT
    fat: fix non-atomic NFS i_pos read
    MAINTAINERS: add OMAP CPUfreq driver to OMAP Power Management section
    sgi-xp: nested calls to spin_lock_irqsave()
    fs: ramfs: file-nommu: add SetPageUptodate()
    drivers/rtc/rtc-mxc.c: fix irq enabled interrupts warning
    mm/memory_hotplug.c: release memory resources if hotadd_new_pgdat() fails
    h8300/uaccess: add mising __clear_user()
    h8300/uaccess: remove assignment to __gu_val in unhandled case of get_user()
    h8300/time: add missing #include
    h8300/signal: fix typo "statis"
    h8300/pgtable: add missing #include
    drivers/rtc/rtc-ab8500.c: ensure correct probing of the AB8500 RTC when Device Tree is enabled
    ...

    Linus Torvalds
     
  • Requesting a threaded interrupt without a primary handler and without
    IRQF_ONESHOT is dangerous, and after commit 1c6c6952 ("genirq: Reject
    bogus threaded irq requests"), these requests are rejected. This causes
    ->probe() to fail, and the RTC driver not to be availble.

    To fix, add IRQF_ONESHOT to the IRQ flags.

    Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake to
    wake from system suspend multiple times.

    Signed-off-by: Kevin Hilman
    Cc: Alessandro Zummo
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kevin Hilman
     
  • The code here has a nested spin_lock_irqsave(). It's not needed since
    IRQs are already disabled and it causes a problem because it means that
    IRQs won't be enabled again at the end. The second call to
    spin_lock_irqsave() will overwrite the value of irq_flags and we can't
    restore the proper settings.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Robin Holt
    Cc: Jack Steiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • Fixes

    WARNING: at irq/handle.c:146 handle_irq_event_percpu+0x19c/0x1b8()
    irq 25 handler mxc_rtc_interrupt+0x0/0xac enabled interrupts
    Modules linked in:
    (unwind_backtrace+0x0/0xf0) from (warn_slowpath_common+0x4c/0x64)
    (warn_slowpath_common+0x4c/0x64) from (warn_slowpath_fmt+0x30/0x40)
    (warn_slowpath_fmt+0x30/0x40) from (handle_irq_event_percpu+0x19c/0x1b8)
    (handle_irq_event_percpu+0x19c/0x1b8) from (handle_irq_event+0x28/0x38)
    (handle_irq_event+0x28/0x38) from (handle_level_irq+0x80/0xc4)
    (handle_level_irq+0x80/0xc4) from (generic_handle_irq+0x24/0x38)
    (generic_handle_irq+0x24/0x38) from (handle_IRQ+0x30/0x84)
    (handle_IRQ+0x30/0x84) from (avic_handle_irq+0x2c/0x4c)
    (avic_handle_irq+0x2c/0x4c) from (__irq_svc+0x40/0x60)
    Exception stack(0xc050bf60 to 0xc050bfa8)
    bf60: 00000001 00000000 003c4208 c0018e20 c050a000 c050a000 c054a4c8 c050a000
    bf80: c05157a8 4117b363 80503bb4 00000000 01000000 c050bfa8 c0018e2c c000e808
    bfa0: 60000013 ffffffff
    (__irq_svc+0x40/0x60) from (default_idle+0x1c/0x30)
    (default_idle+0x1c/0x30) from (cpu_idle+0x68/0xa8)
    (cpu_idle+0x68/0xa8) from (start_kernel+0x22c/0x26c)

    Signed-off-by: Benoît Thébaudeau
    Cc: Alessandro Zummo
    Cc: Sascha Hauer
    Acked-by: Uwe Kleine-König
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benoît Thébaudeau
     
  • Without this patch, if Device Tree is enabled the AB8500 RTC wouldn't get
    probed at all, as there is no reference to it from platform code. This
    patch ensures the driver is probed during normal DT start-up.

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Lee Jones
    Cc: Alessandro Zummo
    Acked-by: Linus Walleij
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lee Jones
     
  • This driver's IRQ registration is failing because the kernel now forces
    IRQs to be ONESHOT if no IRQ handler is passed.

    Signed-off-by: Lee Jones
    Cc: Alessandro Zummo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lee Jones
     
  • `config' is freed and is then used in the rtc_device_unregister() call,
    causing a kernel panic.

    Signed-off-by: Devendra Naga
    Reviewed-by: Viresh Kumar
    Cc: Alessandro Zummo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Devendra Naga
     
  • Pull SCSI fixes from James Bottomley:
    "This is a set of three fixes for data corruption (libsas task file),
    oops causing (NULL in scsi_cmd_to_driver) and driver failure (bnx2i).
    The oops caused by the NULL in scsi_cmd_to_driver() manifests in
    scsi_eh_send_cmd() and has been seen by several people now.

    Signed-off-by: James Bottomley "

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    [SCSI] bnx2i: Removed the reference to the netdev->base_addr
    [SCSI] libsas: fix taskfile corruption in sas_ata_qc_fill_rtf
    [SCSI] Fix NULL dereferences in scsi_cmd_to_driver

    Linus Torvalds
     
  • Do not use MX2_CAMERA_SWAP16 and MX2_CAMERA_PACK_DIR_MSB flags. The driver
    must negotiate with the attached sensor whether the mbus format is UYUV or
    YUYV and set CSICR1 configuration accordingly.

    This is needed for the video function on mach-imx27_visstrim_m10.c to
    perform properly, since an earlier version of this patch has been proven
    wrong and has been reverted and a commit, depending on it: "[media]
    i.MX27: visstrim_m10: Remove use of MX2_CAMERA_SWAP16" is in the mainline.

    Signed-off-by: Javier Martin
    Reviewed-by: Mauro Carvalho Chehab
    Acked-by: Laurent Pinchart
    [ g.liakhovetski@gmx.de: move a macro definition to a more logical place ]
    Signed-off-by: Guennadi Liakhovetski
    [ Applying directly because Mauro is on vacation - Linus ]
    Signed-off-by: Linus Torvalds

    Javier Martin
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    - multiple omap2+ bug fixes
    - a regression on ux500 dt support
    - a build failure on shmobile

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: OMAP2+: omap2plus_defconfig: EHCI driver is not stable, disable it
    ARM: shmobile: fix platsmp.c build when ARCH_SH73A0=n
    ARM: ux500: Over-ride the DT device naming scheme for pinctrl
    ARM: ux500: Fix build errors/warnings when MACH_UX500_DT is not set
    of: address: Don't fail a lookup just because a node has no reg property
    ARM: OMAP2+: hwmod code/clockdomain data: fix 32K sync timer

    Linus Torvalds
     
  • Pull power management fix from Rafael Wysocki:
    "This removes ACPICA code that had already been removed once from the
    kernel already by commit 2780cc4660e1 ("[ACPI] Fix suspend/resume
    lockup issue by leaving Bus Master Arbitration enabled"), because it
    was known to cause systems to lock up during resume from suspend, but
    was re-introduced by mistake during the v3.4 merge window."

    * tag 'pm-for-3.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / PM: Leave Bus Master Arbitration enabled for suspend/resume

    Linus Torvalds
     
  • Pull USB fixes from Greg Kroah-Hartman:
    "Here are a few fixes and new device ids for the 3.5-rc6 tree.

    The PCI changes resolve a long-standing issue with resuming some EHCI
    controllers. It has been acked by the PCI maintainer, and he asked
    for it to go through my USB tree instead of his.

    The xhci patches also resolve a number of reported issues.

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'usb-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    PCI: EHCI: fix crash during suspend on ASUS computers
    USB: cdc-wdm: fix lockup on error in wdm_read
    USB: metro-usb: fix tty_flip_buffer_push use
    USB: option: Add MEDIATEK product ids
    USB: option: add ZTE MF60
    xhci: Fix hang on back-to-back Set TR Deq Ptr commands.
    usb: Add support for root hub port status CAS

    Linus Torvalds
     
  • Pull misc fix from Greg Kroah-Hartman:
    "Here's a single MEI driver fix that resolves a regression from 3.4
    that a number of people have reported (and sent to me in different
    patches.)

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'char-misc-3.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    mei: pci_resume: set IRQF_ONESHOT for msi request_threaded_irq

    Linus Torvalds
     
  • Pull a late GPIO fix from Linus Walleij:
    "Grr! So typically -next washed out a bug in the bug fixes. This v2 of
    the pull request fixes another OF/DT related issue caused by fixing
    another OF/DT related issue, courtesy of Gerard Sintselaar.

    So please pull the v2. Or pull it on top of the other one, whatever.
    Sorry for the panic mode, I'm in the middle of the Swedish woods,
    supposedly on vacation."

    * tag 'fixes-for-v3.5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio/gpio-tps65910: gpio_chip.of_node referenced without CONFIG_OF_GPIO defined

    Linus Torvalds
     

11 Jul, 2012

7 commits

  • commit 626f9914 added code to initialize gpio_chip.of_node, but if
    CONFIG_OF_GPIO is not defined gps-tps65910 fails to build with an
    error complaining gpio_chip has no member of_node. I ran into this
    while doing a allyesconfig build on linux-next.

    Signed-off-by: Gerard Snitselaar
    Signed-off-by: Linus Walleij

    Jerry Snitselaar
     
  • Pull GPIO fixes from Linus Walleij:
    "Yes, this is a *LATE* GPIO pull request with fixes for v3.5.

    Grant moved across the planet and accidentally fell off the grid, so
    he asked me to take over the GPIO merges for a while 10 days ago.

    Since then I went over the archives and collected this pile of fixes,
    and pulled two of them from the TI maintainer Kevin Hilman. Then
    waited for them to at least hit linux-next once or twice."

    GPIO fixes for v3.5:
    - Invalid context restore on bank 0 for OMAP driver in runtime
    suspend/resume cycle
    - Check for NULL platform data in sta-2x11 driver
    - Constrain selection of the V1 MSM GPIO driver to applicable platforms
    (Kconfig issue)
    - Make sure the correct output value is set in the wm8994 driver
    - Export devm_gpio_request_one() so it can be used in modules.
    Apparently some in-kernel modules can be configured to use this
    leading to breakage.
    - Check that the GPIO is valid in the lantiq driver
    - Fix the flag bits introduced for v3.5, so they don't overlap
    - Fix a device tree intialization bug for imx21-compatible devices
    - Carry over the OF node to the TPS65910 GPIO chip struct

    * tag 'fixes-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio: tps65910: initialize of_node of gpio_chip
    gpio/mxc: make irqs work for fsl,imx21-gpio devices
    gpio: fix bits conflict for gpio flags
    mips: pci-lantiq: Fix check for valid gpio
    gpio: export devm_gpio_request_one
    gpiolib: wm8994: Pay attention to the value set when enabling as output
    gpio/msm_v1: CONFIG_GPIO_MSM_V1 is only available on three SoCs
    gpio-sta2x11: don't use pdata if null
    gpio/omap: fix invalid context restore of gpio bank-0
    gpio/omap: fix irq loss while in idle with debounce on

    Linus Torvalds
     
  • Pull powerpc fixes from Benjamin Herrenschmidt:
    "It looks like my rewrite of our lazy irq scheme is still exposing
    "interesting" issues left and right. The previous fixes are now
    causing an occasional BUG_ON to trigger (which this patch turns into a
    WARN_ON while at it), due to another issue of disconnect of the lazy
    irq state vs the processor state in the idle loop on pseries and
    cell.

    This should fix it properly once for all moving the nasty code to a
    common helper function.

    There's also couple more fixes for some debug stuff that didn't build
    (and helped resolving those problems so it's worth having), along with
    a compile fix for newer gcc's."

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    tty/hvc_opal: Fix debug function name
    powerpc/numa: Avoid stupid uninitialized warning from gcc
    powerpc: Fix build of some debug irq code
    powerpc: More fixes for lazy IRQ vs. idle

    Linus Torvalds
     
  • This is an old suspend/resume lockup fix:

    commit 2780cc4660e1
    Author: Len Brown
    Date: Thu Dec 23 13:43:30 2004 -0500

    [ACPI] Fix suspend/resume lockup issue
    by leaving Bus Master Arbitration enabled.
    The ACPI spec mandates it be disabled only for C3.

    http://bugzilla.kernel.org/show_bug.cgi?id=3599

    Signed-off-by: David Shaohua Li
    Signed-off-by: Len Brown

    The bug snuck back in in commit 2feec47d4c5f (ACPICA: ACPI 5: Support
    for new FADT SleepStatus, SleepControl registers, 2012-02-14),
    presumably by copy/pasting a copy of the code without that fix for the
    legacy case.

    On affected machines, after that commit, the machine locks up hard on
    resume from suspend. The same fix as seven years ago still works.

    Addresses .

    Reported-bisected-and-tested-by: Octavio Alvarez
    Reported-by: Adrian Knoth
    Signed-off-by: Jonathan Nieder
    Cc: stable@vger.kernel.org
    Signed-off-by: Rafael J. Wysocki

    Jonathan Nieder
     
  • This reverts commit 107a84e61cdd3406c842a0e4be7efffd3a05dba6.

    Meelis Roos reports a regression since 3.5-rc5 that stops Sun Fire V100
    and Sun Netra X1 sparc64 machines from booting, hanging after enabling
    serial console. He bisected it to commit 107a84e61cdd.

    Rob Herring explains:
    "The problem is match combinations of compatible plus name and/or type
    fail to match correctly. I have a fix for this, but given how late it
    is for 3.5 I think it is best to revert this for now. There could be
    other cases that rely on the current although wrong behavior. I will
    post an updated version for 3.6."

    Bisected-and-reported-by: Meelis Roos
    Requested-by: Rob Herring
    Cc: Thierry Reding
    Cc: Grant Likely
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • when the default irq quick handler is used then IRQF_ONESHOT must be set
    otherwise the request fails and following error is displayed:

    mei 0000:00:16.0: irq 48 for MSI/MSI-X
    genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 48
    mei 0000:00:16.0: request_threaded_irq failed: irq = 48.
    dpm_run_callback(): pci_pm_resume+0x0/0x140 returns -22
    PM: Device 0000:00:16.0 failed to resume async: error -22

    Reported-by: Peter Wu
    Signed-off-by: Tomas Winkler
    Tested-by: Peter Wu
    Signed-off-by: Roland Dreier
    Cc: stable # 3.5
    Signed-off-by: Greg Kroah-Hartman

    Tomas Winkler
     
  • Quite a few ASUS computers experience a nasty problem, related to the
    EHCI controllers, when going into system suspend. It was observed
    that the problem didn't occur if the controllers were not put into the
    D3 power state before starting the suspend, and commit
    151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during
    suspend on ASUS computers) was created to do this.

    It turned out this approach messed up other computers that didn't have
    the problem -- it prevented USB wakeup from working. Consequently
    commit c2fb8a3fa25513de8fedb38509b1f15a5bbee47b (USB: add
    NO_D3_DURING_SLEEP flag and revert 151b61284776be2) was merged; it
    reverted the earlier commit and added a whitelist of known good board
    names.

    Now we know the actual cause of the problem. Thanks to AceLan Kao for
    tracking it down.

    According to him, an engineer at ASUS explained that some of their
    BIOSes contain a bug that was added in an attempt to work around a
    problem in early versions of Windows. When the computer goes into S3
    suspend, the BIOS tries to verify that the EHCI controllers were first
    quiesced by the OS. Nothing's wrong with this, but the BIOS does it
    by checking that the PCI COMMAND registers contain 0 without checking
    the controllers' power state. If the register isn't 0, the BIOS
    assumes the controller needs to be quiesced and tries to do so. This
    involves making various MMIO accesses to the controller, which don't
    work very well if the controller is already in D3. The end result is
    a system hang or memory corruption.

    Since the value in the PCI COMMAND register doesn't matter once the
    controller has been suspended, and since the value will be restored
    anyway when the controller is resumed, we can work around the BIOS bug
    simply by setting the register to 0 during system suspend. This patch
    (as1590) does so and also reverts the second commit mentioned above,
    which is now unnecessary.

    In theory we could do this for every PCI device. However to avoid
    introducing new problems, the patch restricts itself to EHCI host
    controllers.

    Finally the affected systems can suspend with USB wakeup working
    properly.

    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=37632
    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=42728
    Based-on-patch-by: AceLan Kao
    Signed-off-by: Alan Stern
    Tested-by: Dâniel Fraga
    Tested-by: Javier Marcet
    Tested-by: Andrey Rahmatullin
    Tested-by: Oleksij Rempel
    Tested-by: Pavel Pisa
    Cc: stable
    Acked-by: Bjorn Helgaas
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

10 Jul, 2012

9 commits


09 Jul, 2012

1 commit

  • Since ee7cd8981e15bcb365fc762afe3fc47b8242f630 'virtio: expose added
    descriptors immediately.', in virtio balloon virtqueue_get_buf might
    now run concurrently with virtqueue_kick. I audited both and this
    seems safe in practice but this is not guaranteed by the API.
    Additionally, a spurious interrupt might in theory make
    virtqueue_get_buf run in parallel with virtqueue_add_buf, which is
    racy.

    While we might try to protect against spurious callbacks it's
    easier to fix the driver: balloon seems to be the only one
    (mis)using the API like this, so let's just fix balloon.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Rusty Russell (removed unused var)

    Michael S. Tsirkin
     

08 Jul, 2012

5 commits

  • If runtime PM is not enabled in the kernel config, pm_runtime_get_sync()
    will always return 1 and pm_runtime_put_sync() will always return
    -ENOSYS. pm_runtime_get_sync() returning 1 presents no problem to the
    driver, but -ENOSYS from pm_runtime_put_sync() causes the driver to
    print a warning.

    One option would be to ignore errors returned by pm_runtime_put_sync()
    totally, as they only say that the call was unable to put the hardware
    into suspend mode.

    However, I chose to ignore the returned -ENOSYS explicitly, and print a
    warning for other errors, as I think we should get notified if the HW
    failed to go to suspend properly.

    Signed-off-by: Tomi Valkeinen
    Cc: Jassi Brar
    Cc: Grazvydas Ignotas
    Signed-off-by: Archit Taneja
    Signed-off-by: Florian Tobias Schandinat

    Tomi Valkeinen
     
  • The current way how omapdss handles system suspend and resume is that
    omapdss device (a platform device, which is not part of the device
    hierarchy of the DSS HW devices, like DISPC and DSI, or panels.) uses
    the suspend and resume callbacks from platform_driver to handle system
    suspend. It does this by disabling all enabled panels on suspend, and
    resuming the previously disabled panels on resume.

    This presents a few problems.

    One is that as omapdss device is not related to the panel devices or the
    DSS HW devices, there's no ordering in the suspend process. This means
    that suspend could be first ran for DSS HW devices and panels, and only
    then for omapdss device. Currently this is not a problem, as DSS HW
    devices and panels do not handle suspend.

    Another, more pressing problem, is that when suspending or resuming, the
    runtime PM functions return -EACCES as runtime PM is disabled during
    system suspend. This causes the driver to print warnings, and operations
    to fail as they think that they failed to bring up the HW.

    This patch changes the omapdss suspend handling to use PM notifiers,
    which are called before suspend and after resume. This way we have a
    normally functioning system when we are suspending and resuming the
    panels.

    This patch, I believe, creates a problem that somebody could enable or
    disable a panel between PM_SUSPEND_PREPARE and the system suspend, and
    similarly the other way around in resume. I choose to ignore the problem
    for now, as it sounds rather unlikely, and if it happens, it's not
    fatal.

    In the long run the system suspend handling of omapdss and panels should
    be thought out properly. The current approach feels rather hacky.
    Perhaps the panel drivers should handle system suspend, or the users of
    omapdss (omapfb, omapdrm) should handle system suspend.

    Note that after this patch we could probably revert
    0eaf9f52e94f756147dbfe1faf1f77a02378dbf9 (OMAPDSS: use sync versions of
    pm_runtime_put). But as I said, this patch may be temporary, so let's
    leave the sync version still in place.

    Signed-off-by: Tomi Valkeinen
    Reported-by: Jassi Brar
    Tested-by: Jassi Brar
    Tested-by: Joe Woodward
    Signed-off-by: Archit Taneja
    [fts: fixed 2 brace coding style issues]
    Signed-off-by: Florian Tobias Schandinat

    Tomi Valkeinen
     
  • The netdev->base_addr parameter has been deprecated in the L2 bnx2
    driver. This is used by bnx2i for the BARn iomapping.

    This patch will directly reference the pci_resource_start instead
    of using the deprecated netdev->base_addr.

    This patch is actually a critical bug fix as the 1G bnx2 driver no
    longer supports the netdev->base_addr in the current kernel of the scsi
    tree. This means that Broadcom's 1G Linux iSCSI offload solution would
    not work at all without this patch.

    Signed-off-by: Eddie Wai
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Eddie Wai
     
  • fill_result_tf() grabs the taskfile flags from the originating qc which
    sas_ata_qc_fill_rtf() promptly overwrites. The presence of an
    ata_taskfile in the sata_device makes it tempting to just copy the full
    contents in sas_ata_qc_fill_rtf(). However, libata really only wants
    the fis contents and expects the other portions of the taskfile to not
    be touched by ->qc_fill_rtf. To that end store a fis buffer in the
    sata_device and use ata_tf_from_fis() like every other ->qc_fill_rtf()
    implementation.

    Cc:
    Reported-by: Praveen Murali
    Tested-by: Praveen Murali
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Commit 300bab9770 (hwspinlock/core: register a bank of hwspinlocks in a
    single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
    to register numerous (a bank of) hwspinlock instances in a single API,
    'hwspin_lock_register()'.

    At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
    to 'hwspin_lock_register_single()', despite that ..._single() requires
    'global IDs' to register hwspinlocks.

    We have to convert into global IDs by supplying the missing 'base_id'.

    Cc: stable
    Signed-off-by: Shinya Kuribayashi
    [ohad: fix error path of hwspin_lock_register, too]
    Signed-off-by: Ohad Ben-Cohen

    Shinya Kuribayashi
     

07 Jul, 2012

3 commits

  • Pull target fixes from Nicholas Bellinger:
    "Two minor target fixes. There is really nothing exciting and/or
    controversial this time around.

    There's one fix from MDR for a RCU debug warning message within tcm_fc
    code (CC'ed to stable), and a small AC fix for qla_target.c based upon
    a recent Coverity static report.

    Also, there is one other outstanding virtio-scsi LUN scanning bugfix
    that has been uncovered with the in-flight tcm_vhost driver over the
    last days, and that needs to make it into 3.5 final too. This patch
    has been posted to linux-scsi again here:

    http://marc.info/?l=linux-scsi&m=134160609212542&w=2

    and I've asked James to include it in his next PULL request."

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    qla2xxx: print the right array elements in qlt_async_event
    tcm_fc: Resolve suspicious RCU usage warnings

    Linus Torvalds
     
  • Based upon Alan's patch from Coverity scan id 793583, these debug
    messages in qlt_async_event() should be starting from byte 0, which is
    always the Asynchronous Event Status Code from the parent switch statement.

    Also, rename reason_code -> login_code following the language used in
    2500 FW spec for Port Database Changed (0x8014) -> Port Database Changed
    Event Mailbox Register for mailbox[2].

    Signed-off-by: Alan Cox
    Cc: Chad Dupuis
    Cc: Giridhar Malavali
    Signed-off-by: Nicholas Bellinger

    Alan Cox
     
  • Use rcu_dereference_protected to tell rcu that the ft_lport_lock
    is held during ft_lport_create. This resolved "suspicious RCU usage"
    warnings when debugging options are turned on.

    Signed-off-by: Mark Rustad
    Tested-by: Ross Brattain
    Cc:
    Signed-off-by: Nicholas Bellinger

    Mark Rustad