07 Dec, 2014

40 commits

  • commit 5247a589c24022ab34e780039cc8000c48f2035e upstream.

    ikfree_skb() is Called in can_free_echo_skb(), which might be called from (TX
    Error) interrupt, which triggers the folloing warning:

    [ 1153.360705] ------------[ cut here ]------------
    [ 1153.360715] WARNING: CPU: 0 PID: 31 at net/core/skbuff.c:563 skb_release_head_state+0xb9/0xd0()
    [ 1153.360772] Call Trace:
    [ 1153.360778] [] dump_stack+0x41/0x52
    [ 1153.360782] [] warn_slowpath_common+0x7e/0xa0
    [ 1153.360784] [] ? skb_release_head_state+0xb9/0xd0
    [ 1153.360786] [] ? skb_release_head_state+0xb9/0xd0
    [ 1153.360788] [] warn_slowpath_null+0x22/0x30
    [ 1153.360791] [] skb_release_head_state+0xb9/0xd0
    [ 1153.360793] [] skb_release_all+0x10/0x30
    [ 1153.360795] [] kfree_skb+0x36/0x80
    [ 1153.360799] [] ? can_free_echo_skb+0x28/0x40 [can_dev]
    [ 1153.360802] [] can_free_echo_skb+0x28/0x40 [can_dev]
    [ 1153.360805] [] esd_pci402_interrupt+0x34c/0x57a [esd402]
    [ 1153.360809] [] handle_irq_event_percpu+0x35/0x180
    [ 1153.360811] [] ? handle_irq_event_percpu+0xa3/0x180
    [ 1153.360813] [] handle_irq_event+0x31/0x50
    [ 1153.360816] [] handle_fasteoi_irq+0x6f/0x120
    [ 1153.360818] [] ? handle_edge_irq+0x110/0x110
    [ 1153.360822] [] handle_irq+0x71/0x90
    [ 1153.360823] [] do_IRQ+0x3c/0xd0
    [ 1153.360829] [] common_interrupt+0x2c/0x34
    [ 1153.360834] [] ? finish_task_switch+0x47/0xf0
    [ 1153.360836] [] __schedule+0x35b/0x7e0
    [ 1153.360839] [] ? console_unlock+0x2c4/0x4d0
    [ 1153.360842] [] ? n_tty_receive_buf_common+0x890/0x890
    [ 1153.360845] [] ? process_one_work+0x196/0x370
    [ 1153.360847] [] schedule+0x23/0x60
    [ 1153.360849] [] worker_thread+0x161/0x460
    [ 1153.360852] [] ? __wake_up_locked+0x1f/0x30
    [ 1153.360854] [] ? rescuer_thread+0x2f0/0x2f0
    [ 1153.360856] [] kthread+0xa1/0xc0
    [ 1153.360859] [] ret_from_kernel_thread+0x21/0x30
    [ 1153.360861] [] ? kthread_create_on_node+0x110/0x110
    [ 1153.360863] ---[ end trace 5ff83639cbb74b35 ]---

    This patch replaces the kfree_skb() by dev_kfree_skb_any().

    Signed-off-by: Thomas Körper
    Signed-off-by: Marc Kleine-Budde
    Signed-off-by: Greg Kroah-Hartman

    Thomas Körper
     
  • commit 1899045510ff109980d9cc34e330fd8ca3631871 upstream.

    Intel Multi-Flex LUNs choke on REPORT SUPPORTED OPERATION CODES
    resulting in sd_mod hanging for several minutes on startup.
    The issue was introduced with WRITE SAME discovery heuristics.

    Fixes: 5db44863b6eb ("[SCSI] sd: Implement support for WRITE SAME")
    Signed-off-by: Christian Sünkenberg
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Greg Kroah-Hartman

    Christian Sünkenberg
     
  • commit ab8edab132829b26dd13db6caca3c242cce35dc1 upstream.

    This patch addresses a bug where individual vhost-scsi configfs endpoint
    groups can be removed from below while active exports to QEMU userspace
    still exist, resulting in an OOPs.

    It adds a configfs_depend_item() in vhost_scsi_set_endpoint() to obtain
    an explicit dependency on se_tpg->tpg_group in order to prevent individual
    vhost-scsi WWPN endpoints from being released via normal configfs methods
    while an QEMU ioctl reference still exists.

    Also, add matching configfs_undepend_item() in vhost_scsi_clear_endpoint()
    to release the dependency, once QEMU's reference to the individual group
    at /sys/kernel/config/target/vhost/$WWPN/$TPGT is released.

    (Fix up vhost_scsi_clear_endpoint() error path - DanC)

    Cc: Michael S. Tsirkin
    Cc: Paolo Bonzini
    Cc: Stefan Hajnoczi
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Bellinger
     
  • commit 9c4b19a07dddda3ba35a2eb9b4134d485908e2f5 upstream.

    commit 8c328a262f ("spi: sirf: Avoid duplicate code in various
    bits_per_word cases") is wrong in setting data width register of
    fifo is not right, it should use sspi->word_width >> 1 to set
    related bits. According to hardware spec, the mapping between
    register value and data width:
    0 - byte
    1 - WORD
    2 - DWORD

    Fixes: 8c328a262f ("spi: sirf: Avoid duplicate code in various bits_per_word cases") is wrong in setting data width register of
    Signed-off-by: Qipan Li
    Signed-off-by: Barry Song
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Qipan Li
     
  • commit c1aefbdd050e1fb15e92bcaf34d95b17ea952097 upstream.

    We can only use page_address on memory that has been mapped using kmap,
    when the buffer passed to the SPI has been allocated by vmalloc the page
    has not necessarily been mapped through kmap. This means sometimes
    page_address will return NULL causing the pointer we pass to sg_set_buf
    to be invalid.

    As we only call page_address so that we can pass a virtual address to
    sg_set_buf which will then immediately call virt_to_page on it, fix this
    by calling sg_set_page directly rather then relying on the sg_set_buf
    helper.

    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Charles Keepax
     
  • commit 0a8727e69778683495058852f783eeda141a754e upstream.

    An IOCTL call that calls spi_setup() and then dw_spi_setup() will
    overwrite the persisted last transfer speed. On each transfer, the
    SPI speed is compared to the last transfer speed to determine if the
    clock divider registers need to be updated (did the speed change?).
    This bug was observed with the spidev driver using spi-config to
    update the max transfer speed.

    This fix: Don't overwrite the persisted last transaction clock speed
    when updating the SPI parameters in dw_spi_setup(). On the next
    transaction, the new speed won't match the persisted last speed
    and the hardware registers will be updated.
    On initialization, the persisted last transaction clock
    speed will be 0 but will be updated after the first SPI
    transaction.

    Move zeroed clock divider check into clock change test because
    chip->clk_div is zero on startup and would cause a divide-by-zero
    error. The calculation was wrong as well (can't support odd #).

    Reported-by: Vlastimil Setka
    Signed-off-by: Vlastimil Setka
    Signed-off-by: Thor Thayer
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Thor Thayer
     
  • commit 3b726ae2de02a406cc91903f80132daee37b6f1b upstream.

    In this case the cm_id->context is the isert_np, and the cm_id->qp
    is NULL, so use that to distinct the cases.

    Since we don't expect any other events on this cm_id we can
    just return -1 for explicit termination of the cm_id by the
    cma layer.

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Sagi Grimberg
     
  • commit 885e7b0e181c14e4d0ddd26c688bad2b84c1ada9 upstream.

    If an initiator sends a zero-length command (e.g. TEST UNIT READY) but
    sets the transfer direction in the transport layer to indicate a
    data-out phase, we still shouldn't try to transfer data. At best it's
    a NOP, and depending on the transport, we might crash on an
    uninitialized sg list.

    Reported-by: Craig Watson
    Signed-off-by: Roland Dreier
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Roland Dreier
     
  • commit ab477c1ff5e0a744c072404bf7db51bfe1f05b6e upstream.

    It is not guaranteed to that srp_sq_size is supported
    by the HCA. So if we failed to create the QP with ENOMEM,
    try with a smaller srp_sq_size. Keep it up until we hit
    MIN_SRPT_SQ_SIZE, then fail the connection.

    Reported-by: Mark Lehrer
    Signed-off-by: Bart Van Assche
    Signed-off-by: Sagi Grimberg
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     
  • commit a1f9a4072655843fc03186acbad65990cc05dd2d upstream.

    The xpad wireless endpoint is not a bulk endpoint on my devices, but
    rather an interrupt one, so the USB core complains when it is submitted.
    I'm guessing that the author really did mean that this should be an
    interrupt urb, but as there are a zillion different xpad devices out
    there, let's cover out bases and handle both bulk and interrupt
    endpoints just as easily.

    Signed-off-by: "Pierre-Loup A. Griffais"
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • commit bce4f9e764c36bc35dd5c9cf9e057c09f422397d upstream.

    The LEN2006 Synaptics touchpad (as found in Thinkpad E540) returns wrong
    min max values.

    touchpad-edge-detector output:
    > Touchpad SynPS/2 Synaptics TouchPad on /dev/input/event6
    > Move one finger around the touchpad to detect the actual edges
    > Kernel says: x [1472..5674], y [1408..4684]
    > Touchpad sends: x [1264..5675], y [1171..4688]

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88211
    Signed-off-by: Binyamin Sagal
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Ben Sagal
     
  • commit c1a2086e2d8c4eb4e8630ba752e911ec180dec67 upstream.

    The removal path for selftest data has an off by one error that causes
    the code to dereference beyond the end of the nodes[] array on the first
    pass through. The old code only worked by chance on a lot of platforms,
    but the bug was recently exposed on aarch64.

    The fix is simple. Decrement the node count before dereferencing, not
    after.

    Reported-by: Kevin Hilman
    Cc: Rob Herring
    Cc: Gaurav Minocha

    Grant Likely
     
  • commit ab74d00a39f70e1bc34a01322bb59f3750ca7a8c upstream.

    __earlycon_of_table_sentinel.compatible is a char[128], not a pointer, so
    it will never be NULL. Checking it against NULL causes the match loop to
    run past the end of the array, and eventually match a bogus entry, under
    the following conditions:

    - Kernel command line specifies "earlycon" with no parameters
    - DT has a stdout-path pointing to a UART node
    - The UART driver doesn't use OF_EARLYCON_DECLARE (or maybe the console
    driver is compiled out)

    Fix this by checking to see if match->compatible is a non-empty string.

    Signed-off-by: Kevin Cernekee
    Signed-off-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Kevin Cernekee
     
  • commit a1d69c60c44134f64945bbf6a6dfda22eaf4a214 upstream.

    This is a specific implementation, is the
    multiplexer that has the arch-specific knowledge of which
    of the implementations needs to be used, so include that.

    This issue was revealed by kbuild testing
    when was added in
    resulting in redefinition of get_unaligned_be16 (and
    probably others).

    Reported-by: Fengguang Wu
    Signed-off-by: Johannes Berg
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • commit 4c69f05eaa428e37890daf88b86a567ce615570b upstream.

    Return value of irq_of_parse_and_map() is unsigned int, with 0
    indicating failure, so testing for negative result never works.

    Signed-off-by: Dmitry Torokhov
    Acked-by: Arend van Spriel
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • commit 0cd75b19899fd86b51a6480fb8c00dcd85a54591 upstream.

    The function chandef_to_chanspec() failed when converting a
    chandef with bandwidth set to NL80211_CHAN_WIDTH_20_NOHT. This
    was reported by user running the device in AP mode.

    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 304 at
    drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:381
    chandef_to_chanspec.isra.11+0x158/0x184()

    Modules linked in:

    CPU: 0 PID: 304 Comm: hostapd Not tainted 3.16.0-rc7-abb+g64aa90f #8

    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (warn_slowpath_common+0x6c/0x8c)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24)
    [] (warn_slowpath_null) from [] (chandef_to_chanspec.isra.11+0x158/0x184)
    [] (chandef_to_chanspec.isra.11) from [] (brcmf_cfg80211_start_ap+0x1e4/0x614)
    [] (brcmf_cfg80211_start_ap) from [] (nl80211_start_ap+0x288/0x414)
    [] (nl80211_start_ap) from [] (genl_rcv_msg+0x21c/0x38c)
    [] (genl_rcv_msg) from [] (netlink_rcv_skb+0xac/0xc0)
    [] (netlink_rcv_skb) from [] (genl_rcv+0x20/0x34)
    [] (genl_rcv) from [] (netlink_unicast+0x150/0x20c)
    [] (netlink_unicast) from [] (netlink_sendmsg+0x2b8/0x398)
    [] (netlink_sendmsg) from [] (sock_sendmsg+0x84/0xa8)
    [] (sock_sendmsg) from [] (___sys_sendmsg.part.29+0x268/0x278)
    [] (___sys_sendmsg.part.29) from [] (__sys_sendmsg+0x4c/0x7c)
    [] (__sys_sendmsg) from [] (ret_fast_syscall+0x0/0x44)
    ---[ end trace 965ee2158c9905a2 ]---

    Reported-by: Pontus Fuchs
    Reviewed-by: Hante Meuleman
    Reviewed-by: Daniel (Deognyoun) Kim
    Reviewed-by: Franky (Zhenhui) Lin
    Reviewed-by: Pieter-Paul Giesberts
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Arend van Spriel
     
  • commit 78579b7c7eb45f0e7ec5e9437087ed21749f9a9c upstream.

    As reported by Dmitry, on some Chromebooks there are devices with
    corresponding ACPI objects and with unusual system wakeup
    configuration. Namely, they technically are wakeup-capable, but the
    wakeup is handled via a platform-specific out-of-band mechanism and
    the ACPI PM layer has no information on the wakeup capability. As
    a result, device_may_wakeup(dev) called from acpi_dev_suspend_late()
    returns 'true' for those devices, but the wakeup.flags.valid flag is
    unset for the corresponding ACPI device objects, so acpi_device_wakeup()
    reproducibly fails for them causing acpi_dev_suspend_late() to return
    an error code. The entire system suspend is then aborted and the
    machines in question cannot suspend at all.

    Address the problem by ignoring the device_may_wakeup(dev) return
    value in acpi_dev_suspend_late() if the ACPI companion of the device
    being handled has wakeup.flags.valid unset (in which case it is clear
    that the wakeup is supposed to be handled by other means).

    This fixes a regression introduced by commit a76e9bd89ae7 (i2c:
    attach/detach I2C client device to the ACPI power domain) as the
    affected systems could suspend and resume successfully before that
    commit.

    Fixes: a76e9bd89ae7 (i2c: attach/detach I2C client device to the ACPI power domain)
    Reported-by: Dmitry Torokhov
    Reviewed-by: Dmitry Torokhov
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • commit 558e4736f2e1b0e6323adf7a5e4df77ed6cfc1a4 upstream.

    There is platform refusing to respond QR_EC when SCI_EVT isn't set
    which is Acer Aspire V5-573G.

    By disallowing QR_EC to be issued before the previous one has been
    completed we are able to reduce the possibilities to trigger issues on
    such platforms.

    Note that this fix can only reduce the occurrence rate of this issue, but
    this issue may still occur when such a platform doesn't clear SCI_EVT
    before or immediately after completing the previous QR_EC transaction.
    This patch cannot fix the CLEAR_ON_RESUME quirk which also relies on
    the assumption that the platforms are able to respond even when SCI_EVT
    isn't set.

    But this patch is still useful as it can help to reduce the number of
    scheduled QR_EC work items.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=82611
    Reported-and-tested-by: Alexander Mezin
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Lv Zheng
     
  • commit efbd50d2f62fc1f69a3dcd153e63ba28cc8eb27f upstream.

    It seems struct esd_usb2 dev is not deallocated on disconnect. The patch adds
    the missing deallocation.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Acked-by: Matthias Fuchs
    Signed-off-by: Marc Kleine-Budde
    Signed-off-by: Greg Kroah-Hartman

    Alexey Khoroshilov
     
  • commit a1377e5397ab321e21b793ec8cd2b6f12bd3c718 upstream.

    When system is being suspended, if host device is not allowed to do wakeup,
    xhci_suspend() needs to clear all root port wake on bits. Otherwise, some
    platforms may generate spurious wakeup, even if PCI PME# is disabled.

    The initial commit ff8cbf250b44 ("xhci: clear root port wake on bits"),
    which also got into stable, turned out to not work correctly and had to
    be reverted, and is now rewritten.

    Signed-off-by: Lu Baolu
    Suggested-by: Alan Stern
    Acked-by: Alan Stern
    [Mathias Nyman: reword commit message]
    Signed-off-by: Mathias Nyman
    Signed-off-by: Greg Kroah-Hartman

    Lu Baolu
     
  • commit 8e71a322fdb127814bcba423a512914ca5bc6cf5 upstream.

    If a device is halted and reuturns a STALL, then the halted endpoint
    needs to be cleared both on the host and device side. The host
    side halt is cleared by issueing a xhci reset endpoint command. The device side
    is cleared with a ClearFeature(ENDPOINT_HALT) request, which should
    be issued by the device driver if a URB reruen -EPIPE.

    Previously we cleared the host side halt after the device side was cleared.
    To make sure the host side halt is cleared in time we want to issue the
    reset endpoint command immedialtely when a STALL status is encountered.

    Otherwise we end up not following the specs and not returning -EPIPE
    several times in a row when trying to transfer data to a halted endpoint.

    Fixes: bcef3fd (USB: xhci: Handle errors that cause endpoint halts.)
    Tested-by: Felipe Balbi
    Signed-off-by: Mathias Nyman
    Signed-off-by: Greg Kroah-Hartman

    Mathias Nyman
     
  • commit c3492dbfa1050debf23a5b5cd2bc7514c5b37896 upstream.

    A halted endpoint ring must first be reset, then move the ring
    dequeue pointer past the problematic TRB. If we start the ring too
    early after reset, but before moving the dequeue pointer we
    will end up executing the same problematic TRB again.

    As we always issue a set transfer dequeue command after a reset
    endpoint command we can skip starting endpoint rings at reset endpoint
    command completion.

    Without this fix we end up trying to handle the same faulty TD for
    contol endpoints. causing timeout, and failing testusb ctrl_out write
    tests.

    Fixes: e9df17e (USB: xhci: Correct assumptions about number of rings per endpoint.)
    Tested-by: Felipe Balbi
    Signed-off-by: Mathias Nyman
    Signed-off-by: Greg Kroah-Hartman

    Mathias Nyman
     
  • commit 8daee1352d51a32676b84bddcc0e3252d1caa833 upstream.

    These disks have a broken uas implementation, the tag field of the status
    iu-s is not set properly, so we need to fall-back to usb-storage for these.

    Signed-off-by: Hans de Goede
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit 263e80b43559a6103e178a9176938ce171b23872 upstream.

    This wireless mouse receiver needs a reset-resume quirk to properly come
    out of reset.

    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1165206
    Signed-off-by: Hans de Goede
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit 204ec6e07ea7aff863df0f7c53301f9cbbfbb9d3 upstream.

    Add PIDs for new Matrix Orbital GTT series products.

    Signed-off-by: Troy Clark
    [johan: shorten commit message ]
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Troy Clark
     
  • commit ffcfe30ebd8dd703d0fc4324ffe56ea21f5479f4 upstream.

    Signed-off-by: Preston Fick
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Preston Fick
     
  • commit 5d1678a33c731b56e245e888fdae5e88efce0997 upstream.

    Fix handling of TTY error flags, which are not bitmasks and must
    specifically not be ORed together as this prevents the line discipline
    from recognising them.

    Also insert null characters when reporting overrun errors as these are
    not associated with the received character.

    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit 855515a6d3731242d85850a206f2ec084c917338 upstream.

    Fix reporting of overrun errors, which are not associated with a
    character. Instead insert a null character and report only once.

    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit 75bcbf29c284dd0154c3e895a0bd1ef0e796160e upstream.

    Fix reporting of overrun errors, which should only be reported once
    using the inserted null character.

    Fixes: 6b8f1ca5581b ("USB: ssu100: set tty_flags in ssu100_process_packet")
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • commit 6d4556fc0309608f760f1d329df56d77fdd0c31a upstream.

    The DLink GO-USB-N150 with revision B1 uses this driver.

    Signed-off-by: Larry Finger
    Signed-off-by: Greg Kroah-Hartman

    Larry Finger
     
  • commit fbbba1f89eb68e7d07707e104193d56de8e37fe5 upstream.

    The mcb_device_id table is supposed to be zero-terminated.

    Signed-off-by: Axel Lin
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Axel Lin
     
  • commit 746c9e9f92dde2789908e51a354ba90a1962a2eb upstream.

    We have a historical hack that treats missing ranges properties as the
    equivalent of an empty one. This is needed for ancient PowerMac "bad"
    device-trees, and shouldn't be enabled for any other PowerPC platform,
    otherwise we get some nasty layout of devices in sysfs or even
    duplication when a set of otherwise identically named devices is
    created multiple times under a different parent node with no ranges
    property.

    This fix is needed for the PowerNV i2c busses to be exposed properly
    and will fix a number of other embedded cases.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Grant Likely
    Signed-off-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     
  • commit 4e6ce4dc7ce71d0886908d55129d5d6482a27ff9 upstream.

    Based on the reference clock, which could be 25MHz or 40MHz,
    AR_RTC_DERIVED_CLK is programmed differently for AR9340 and AR9550.
    But, when a chip reset is done, processing the initvals
    sets the register back to the default value.

    Fix this by moving the code in ath9k_hw_init_pll() to
    ar9003_hw_override_ini(). Also, do this override for AR9531.

    Signed-off-by: Miaoqing Pan
    Signed-off-by: Sujith Manoharan
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Miaoqing Pan
     
  • commit f57915cfa5b2b14c1cffa2e83c034f55e3f0e70d upstream.

    This patch adds a max_send_sge=2 minimum in isert_conn_setup_qp()
    to ensure outgoing control PDU responses with tx_desc->num_sge=2
    are able to function correctly.

    This addresses a bug with RDMA hardware using dev_attr.max_sge=3,
    that in the original code with the ConnectX-2 work-around would
    result in isert_conn->max_sge=1 being negotiated.

    Originally reported by Chris with ocrdma driver.

    Reported-by: Chris Moore
    Tested-by: Chris Moore
    Signed-off-by: Or Gerlitz
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Or Gerlitz
     
  • commit b1a5ad006b34ded9dc7ec64988deba1b3ecad367 upstream.

    isert has an issue of trying to create a CQ with more CQEs than are
    supported by the hardware, that currently results in failures during
    isert_device creation during first session login.

    This is the isert version of the patch that Minh Tran submitted for
    iser, and is simple a workaround required to function with existing
    ocrdma hardware.

    Signed-off-by: Chris Moore
    Reviewied-by: Sagi Grimberg
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Chris Moore
     
  • commit 6bab4a8a1888729f17f4923cc5867e4674f66333 upstream.

    The interrupts were activated and the handler registered before the clockevent
    was registered in the probe function.

    The interrupt handler, however, was making the assumption that the clockevent
    device was registered.

    That could cause a null pointer dereference if the timer interrupt was firing
    during this narrow window.

    Fix that by moving the clockevent registration before the interrupt is enabled.

    Reported-by: Roman Byshko
    Signed-off-by: Maxime Ripard
    Signed-off-by: Daniel Lezcano
    Signed-off-by: Greg Kroah-Hartman

    Maxime Ripard
     
  • commit f144d1496b47e7450f41b767d0d91c724c2198bc upstream.

    This can be set by quirks/drivers to be used by the architecture code
    that assigns the MSI addresses.

    We additionally add verification in the core MSI code that the values
    assigned by the architecture do satisfy the limitation in order to fail
    gracefully if they don't (ie. the arch hasn't been updated to deal with
    that quirk yet).

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Bjorn Helgaas
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     
  • commit 7fc986d8a9727e5d40da3c2c1c343da6142e82a9 upstream.

    Aaron reported that a 32-bit x86 kernel with Physical Address Extension
    (PAE) support complains about bridge prefetchable memory windows above 4GB:

    pci_bus 0000:00: root bus resource [mem 0x380000000000-0x383fffffffff]
    ...
    pci 0000:03:00.0: reg 0x10: [mem 0x383fffc00000-0x383fffdfffff 64bit pref]
    pci 0000:03:00.0: reg 0x20: [mem 0x383fffe04000-0x383fffe07fff 64bit pref]
    pci 0000:03:00.1: reg 0x10: [mem 0x383fffa00000-0x383fffbfffff 64bit pref]
    pci 0000:03:00.1: reg 0x20: [mem 0x383fffe00000-0x383fffe03fff 64bit pref]
    pci 0000:00:02.2: PCI bridge to [bus 03-04]
    pci 0000:00:02.2: bridge window [io 0x1000-0x1fff]
    pci 0000:00:02.2: bridge window [mem 0x91900000-0x91cfffff]
    pci 0000:00:02.2: can't handle 64-bit address space for bridge

    In this kernel, unsigned long is 32 bits and dma_addr_t is 64 bits.
    Previously we used "unsigned long" to hold the bridge window address. But
    this is a bus address, so we should use dma_addr_t instead.

    Use dma_addr_t to hold the bridge window base and limit.

    The question of whether the CPU can actually *address* the window is
    separate and depends on what the physical address space of the CPU is and
    whether the host bridge does any address translation.

    [bhelgaas: fix "shift count > width of type", changelog, stable tag]
    Fixes: d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=88131
    Reported-by: Aaron Ma
    Tested-by: Aaron Ma
    Signed-off-by: Yinghai Lu
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Greg Kroah-Hartman

    Yinghai Lu
     
  • [ Upstream commit f4a1edd56120249198073aa4a373b77e3700ac8f ]

    Currenly we only support Large-Send and TX checksum offloads for
    encapsulated traffic of type VXLAN. We must make sure to advertize
    these offloads up to the stack only when VXLAN tunnel is set.

    Failing to do so, would mislead the the networking stack to assume
    that the driver can offload the internal TX checksum for GRE packets
    and other buggy schemes.

    Reported-by: Florian Westphal
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Or Gerlitz
     
  • [ Upstream commit 9737c6ab7afbc950e997ef80cba2c40dbbd16ea4 ]

    This is currently missing, which results in a crash when one attempts
    to set VXLAN tunnel over the mlx4_en when acting as PF.

    [ 2408.785472] BUG: unable to handle kernel NULL pointer dereference at (null)
    [...]
    [ 2408.994104] Call Trace:
    [ 2408.996584] [] ? vxlan_get_rx_port+0xd6/0x103 [vxlan]
    [ 2409.003316] [] ? vxlan_lowerdev_event+0xf2/0xf2 [vxlan]
    [ 2409.010225] [] mlx4_en_start_port+0x862/0x96a [mlx4_en]
    [ 2409.017132] [] mlx4_en_open+0x17f/0x1b8 [mlx4_en]

    While here, make sure to invoke vxlan_get_rx_port() only when VXLAN
    offloads are actually enabled and not when they are only supported.

    Reported-by: Ido Shamay
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Or Gerlitz