16 Jun, 2015

24 commits

  • Without this change, modprobe -r sfc hits the BUG_ON() in
    efx_pci_remove_main().

    Fixes: e7fef9b45ae1 ("sfc: add sysfs entry to control MCDI tracing")
    Reported-by: Jarod Wilson
    Reviewed-by: Jarod Wilson
    Signed-off-by: Edward Cree
    Signed-off-by: David S. Miller

    Edward Cree
     
  • Implement the ndo to gather VF statistics through the PF.

    All counters related to this VF are stored in a per slave
    list, run over the slave's list and collect all statistics.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • Allow the user to observe the PF own statistics using ethtool with pf_
    prefixed counter names.

    Those counters are the PF statistics out of the overall port statistics.
    Every PF QP is attached to a counter and the summary of those counters
    is the PF statistics.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • This is an infrastructure step for querying VF and PF counters.

    This code was in the IB driver, move it to the mlx4 core driver
    so it will be accessible for more use cases.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • As IB VFs are not capable to read the port counters through MADs,
    move there to read their own QP counters to gather statistics.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • This is an infrastructure step to attach all the QPs opened from the
    IB driver to a counter in order to collect VF stats from the PF using
    those counters.

    If the port's type is Ethernet, the counter policy demands two counters
    per port (one for RoCE and one for Ethernet). The port default counter
    (allocated in mlx4_core) is used for the Ethernet netdev QPs and we
    allocate another counter for RoCE.

    If the port's traffic is Infiniband, the counter policy demands
    one counter per port, so it can use the port's default counter.

    Also, Add 'allocated' flag for each counter in order to clean it at
    unload.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • Default counter per port will be allocated at the mlx4 core driver load.

    Every QP opened by the Ethernet driver will be attached to the port's default
    counter. This is an infrastructure step to collect VF statistics from the PF.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • Counter will get its port attribute within the resource tracker when
    the first QP attached to it is modified to RTR. If a QP is counter-less,
    an attempt to create a new counter with assigned port will be made.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • Each physical function has a guarantee of two counters per port, one
    for a default counter and one for the IB driver.

    Each virtual function has a guarantee of one counter per port.
    All other counters are free and can be obtained on demand.

    This is a preparation step for supporting a get_vf_stats ndo call,
    so we can promise a counter for every VF in order to collect their
    statistics from the PF context.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • Since virtual functions get their counters indices allocation from the PF,
    allocate counters indices bitmap only in case the function isn't virtual.

    Also, check that the device has counters to allocate before creating the
    indices bitmap table.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • Reserve the last valid counter index for "sink" counter, when a
    new counter cannot be allocated, the driver will use this counter.

    In order to avoid allocating this counter on any other flow, fix the
    indices bitmap allocation range, and reserve the sink counter index.

    Add macro for the sink counter index and replace all appearences of the
    index with the macro.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • Add resetting the counter data to the free counter flow, so the counter's
    data won't be accessible anymore if querying the counter. Also, on next
    counter allocation (to another VM for example), it will be fresh and clear.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • If counters are not supported by the device. The indices bitmap table is not
    allocated during initialization. Add the symmetrical check before cleaning
    the counters bitmap table or freeing a counter.

    Signed-off-by: Eran Ben Elisha
    Signed-off-by: Hadar Hen Zion
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Eran Ben Elisha
     
  • We need to delete from offload the device externally learnded fdbs when any
    one of these events happen:

    1) Bridge ages out fdb. (When bridge is doing ageing vs. device doing
    ageing. If device is doing ageing, it would send SWITCHDEV_FDB_DEL
    directly).

    2) STP state change flushes fdbs on port.

    3) User uses sysfs interface to flush fdbs from bridge or bridge port:

    echo 1 >/sys/class/net/BR_DEV/bridge/flush
    echo 1 >/sys/class/net/BR_PORT/brport/flush

    4) Offload driver send event SWITCHDEV_FDB_DEL to delete fdb entry.

    For rocker, we can now get called to delete fdb entry in wait and nowait
    contexts, so set NOWAIT flag when deleting fdb entry.

    Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • Samuel Ortiz says:

    ====================
    NFC 4.2 pull request

    This is the NFC pull request for 4.2.

    - NCI drivers can now define their own handlers for processing
    proprietary NCI responses and notifications.

    - NFC vendors can use a dedicated netlink API to send their own
    proprietary commands, like e.g. all commands needed to implement
    vendor specific manufacturing tools.

    - A new generic NCI over UART driver against which any NCI chipset
    running on top of a serial interface can register.

    - The st21nfcb driver is renamed to st-nci as it can and will support
    most of ST Microelectronics NCI chipsets.

    - The st21nfcb driver can put its CLF in hibernate mode and save
    significant amount of power.

    - A few st21nfcb minor fixes.

    - The NXP NCI driver now supports ACPI enumeration.

    - The Marvell NCI driver now supports both USB and serial
    physical interfaces.

    - The Marvell NCI drivers also supports NCI frames being muxed
    over HCI. This is a setting that can be defined by a DT property.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Export the partner_oper_port_state of each port via sysfs and netlink.
    In 802.3ad mode it is valuable for the user to be able to check the
    partner_oper state, it is already exported via bond's proc entry.

    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: Andy Gospodarek
    Signed-off-by: David S. Miller

    Nikolay Aleksandrov
     
  • Export the actor_oper_port_state of each port via sysfs and netlink.
    In 802.3ad mode it is valuable for the user to be able to check the
    actor_oper state, it is already exported via bond's proc entry.

    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: Andy Gospodarek
    Signed-off-by: David S. Miller

    Nikolay Aleksandrov
     
  • rocker_port_stop can be called from atomic and non-atomic contexts. Since
    we can't test what context we're getting called in, do the processing as
    'no wait', which will cover all cases.

    Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • We can get STP updates from the bridge driver in atomic and non-atomic
    contexts. Since we can't test what context we're getting called in,
    do the STP processing as 'no wait', which will cover all cases.

    Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • Neigh update event handler runs in a context where we can't sleep, so mark
    processing in driver with ROCKER_OP_FLAG_NOWAIT. NOWAIT will use
    GFP_ATOMIC for allocations and will queue cmds to the device's cmd ring but
    will not wait (sleep) for cmd response back from device.

    Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • One of the items removed from the rocker driver in the Spring Cleanup patch
    series was the ability to mark processing in the driver as "no wait" for
    those contexts where we cannot sleep. Turns out, we have "no wait"
    contexts where we want to program the device. So re-add the
    ROCKER_OP_FLAG_NOWAIT flag to mark such processes, and propagate flags to
    mem allocator and to the device cmd executor. With NOWAIT, mem allocs are
    GFP_ATOMIC and device cmds are queued to the device, but the driver will
    not wait (sleep) for the response back from the device.

    My bad for removing NOWAIT support in the first place; I thought we could
    swing non-sleep contexts to process context using a work queue, for
    example, but there is push-back to keep processing in original context.

    Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • rocker->neigh_tbl_next_index is used to generate unique indices for neigh
    entries programmed into the device. The way new indices were generated was
    racy with the new prepare-commit transaction model. A simple fix here
    removes the race. The race was with two processes getting the same index,
    one process using prepare-commit, the other not:

    Proc A Proc B

    PREPARE phase
    get neigh_tbl_next_index

    NONE phase
    get neigh_tbl_next_index
    neigh_tbl_next_index++

    COMMIT phase
    neigh_tbl_next_index++

    Both A and B got the same index. The fix is to store and increment
    neigh_tbl_next_index in the PREPARE (or NONE) phase and use value in COMMIT
    phase:

    Proc A Proc B

    PREPARE phase
    get neigh_tbl_next_index
    neigh_tbl_next_index++

    NONE phase
    get neigh_tbl_next_index
    neigh_tbl_next_index++

    COMMIT phase
    // use value stashed in PREPARE phase

    Reported-by: Simon Horman
    Signed-off-by: Scott Feldman
    Reviewed-by: Simon Horman
    Signed-off-by: David S. Miller

    Scott Feldman
     
  • The ports array is filled in as ports are probed, but if probing doesn't
    finish, we need to stop only those ports that where probed successfully.
    Check the ports array for NULL to skip un-probed ports when stopping.

    Signed-off-by: Scott Feldman
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Scott Feldman
     

14 Jun, 2015

1 commit


13 Jun, 2015

8 commits

  • Pull networking fixes from David Miller:

    1) Fix uninitialized struct station_info in cfg80211_wireless_stats(),
    from Johannes Berg.

    2) Revert commit attempt to fix ipv6 protocol resubmission, it adds
    regressions.

    3) Endless loops can be created in bridge port lists, fix from Nikolay
    Aleksandrov.

    4) Don't WARN_ON() if sk->sk_forward_alloc is non-zero in
    sk_clear_memalloc, it is a legal situation during swap deactivation.
    Fix from Mel Gorman.

    5) Fix order of disabling interrupts and unlocking NAPI in enic driver
    to avoid a race. From Govindarajulu Varadarajan.

    6) High and low register writes are swapped when programming the start
    of periodic output in igb driver. From Richard Cochran.

    7) Fix device rename handling in mpls stack, from Robert Shearman.

    8) Do not trigger compaction synchronously when optimistically trying
    to allocate an order 3 page in alloc_skb_with_frags() and
    skb_page_frag_refill(). From Shaohua Li.

    9) Authentication with COOKIE_ECHO is not handled properly in SCTP, fix
    from Marcelo Ricardo Leitner.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    Doc: networking: Fix URL for wiki.wireshark.org in udplite.txt
    sctp: allow authenticating DATA chunks that are bundled with COOKIE_ECHO
    net: don't wait for order-3 page allocation
    mpls: handle device renames for per-device sysctls
    net: igb: fix the start time for periodic output signals
    enic: fix memory leak in rq_clean
    enic: check return value for stat dump
    enic: unlock napi busy poll before unmasking intr
    net, swap: Remove a warning and clarify why sk_mem_reclaim is required when deactivating swap
    bridge: fix multicast router rlist endless loop
    tipc: disconnect socket directly after probe failure
    Revert "ipv6: Fix protocol resubmission"
    cfg80211: wext: clear sinfo struct before calling driver

    Linus Torvalds
     
  • 1) Fixed following sparse warnings:
    lio_main.c:213:6: warning: symbol 'octeon_droq_bh' was not
    declared. Should it be static?
    lio_main.c:233:5: warning: symbol 'lio_wait_for_oq_pkts' was
    not declared. Should it be static?
    lio_main.c:3083:5: warning: symbol 'lio_nic_info' was not
    declared. Should it be static?
    lio_main.c:2618:16: warning: cast from restricted __be16
    octeon_device.c:466:6: warning: symbol 'oct_set_config_info'
    was not declared. Should it be static?
    octeon_device.c:573:25: warning: cast to restricted __be32
    octeon_device.c:582:29: warning: cast to restricted __be32
    octeon_device.c:584:39: warning: cast to restricted __be32
    octeon_device.c:594:13: warning: cast to restricted __be32
    octeon_device.c:596:25: warning: cast to restricted __be32
    octeon_device.c:613:25: warning: cast to restricted __be32
    octeon_device.c:614:29: warning: cast to restricted __be64
    octeon_device.c:615:29: warning: cast to restricted __be32
    octeon_device.c:619:37: warning: cast to restricted __be32
    octeon_device.c:623:33: warning: cast to restricted __be32
    cn66xx_device.c:540:6: warning: symbol
    'lio_cn6xxx_get_pcie_qlmport' was not declared. Should it be s
    octeon_mem_ops.c:181:16: warning: cast to restricted __be64
    octeon_mem_ops.c:190:16: warning: cast to restricted __be32
    octeon_mem_ops.c:196:17: warning: incorrect type in initializer
    2) Fix build errors corresponding to vmalloc on linux-next 4.1.
    3) Liquidio now supports 64 bit only, modified Kconfig accordingly.
    4) Fix some code alignment issues based on kernel build warnings.

    Signed-off-by: Derek Chickles
    Signed-off-by: Satanand Burla
    Signed-off-by: Felix Manlunas
    Signed-off-by: Raghu Vatsavayi
    Signed-off-by: David S. Miller

    Raghu Vatsavayi
     
  • PB_BAIL_OUT parameter as to be set to one. This is needed because
    digital protocol 1.0 is used in combination with ISO15693 protocol.

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     
  • Reference Marvell NFC controller as ISO15693 capable.

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     
  • Marvell NFC USB driver has to be updated to follow new multi
    PHY driver interface.

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     
  • Pull block layer fixes from Jens Axboe:
    "Remember about a week ago when I sent the last pull request for 4.1?
    Well, I lied. Now, I don't want to shift the blame, but Dan, Ming,
    and Richard made a liar out of me.

    Here are three small patches that should go into 4.1. More
    specifically, this pull request contains:

    - A Kconfig dependency for the pmem block driver, so it can't be
    selected if HAS_IOMEM isn't availble. From Richard Weinberger.

    - A fix for genhd, making the ext_devt_lock softirq safe. This makes
    lockdep happier, since we also end up grabbing this lock on release
    off the softirq path. From Dan Williams.

    - A blk-mq software queue release fix from Ming Lei.

    Last two are headed to stable, first fixes an issue introduced in this
    cycle"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: pmem: Add dependency on HAS_IOMEM
    block: fix ext_dev_lock lockdep report
    blk-mq: free hctx->ctxs in queue's release handler

    Linus Torvalds
     
  • Pull three more md fixes from Neil Brown:
    "Hasn't been a good cycle for md has it :-(

    The main issue fixed here is a rare race which can result in two
    reshape threads running at once, which doesn't end well.

    Also a minor issue with a write to a sysfs file returning the wrong
    value. Backports to 4.0-stable are indicated"

    * tag 'md/4.1-rc7-fixes' of git://neil.brown.name/md:
    md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync
    md: Close race when setting 'action' to 'idle'.
    md: don't return 0 from array_state_store

    Linus Torvalds
     
  • Pull VT-d hardware workarounds from David Woodhouse:
    "This contains a workaround for hardware issues which I *thought* were
    never going to be seen on production hardware. I'm glad I checked
    that before the 4.1 release...

    Firstly, PASID support is so broken on existing chips that we're just
    going to declare the old capability bit 28 as 'reserved' and change
    the VT-d spec to move PASID support to another bit. So any existing
    hardware doesn't support SVM; it only sets that (now) meaningless bit
    28.

    That patch *wasn't* imperative for 4.1 because we don't have PASID
    support yet. But *even* the extended context tables are broken — if
    you just enable the wider tables and use none of the new bits in them,
    which is precisely what 4.1 does, you find that translations don't
    work. It's this problem which I thought was caught in time to be
    fixed before production, but wasn't.

    To avoid triggering this issue, we now *only* enable the extended
    context tables on hardware which also advertises "we have PASID
    support and we actually tested it this time" with the new PASID
    feature bit.

    In addition, I've added an 'intel_iommu=ecs_off' command line
    parameter to allow us to disable it manually if we need to"

    * git://git.infradead.org/intel-iommu:
    iommu/vt-d: Only enable extended context tables if PASID is supported
    iommu/vt-d: Change PASID support to bit 40 of Extended Capability Register

    Linus Torvalds
     

12 Jun, 2015

7 commits

  • Although the extended tables are theoretically a completely orthogonal
    feature to PASID and anything else that *uses* the newly-available bits,
    some of the early hardware has problems even when all we do is enable
    them and use only the same bits that were in the old context tables.

    For now, there's no motivation to support extended tables unless we're
    going to use PASID support to do SVM. So just don't use them unless
    PASID support is advertised too. Also add a command-line bailout just in
    case later chips also have issues.

    The equivalent problem for PASID support has already been fixed with the
    upcoming VT-d spec update and commit bd00c606a ("iommu/vt-d: Change
    PASID support to bit 40 of Extended Capability Register"), because the
    problematic platforms use the old definition of the PASID-capable bit,
    which is now marked as reserved and meaningless.

    So with this change, we'll magically start using ECS again only when we
    see the new hardware advertising "hey, we have PASID support and we
    actually tested it this time" on bit 40.

    The VT-d hardware architect has promised that we are not going to have
    any reason to support ECS *without* PASID any time soon, and he'll make
    sure he checks with us before changing that.

    In the future, if hypothetical new features also use new bits in the
    context tables and can be seen on implementations *without* PASID support,
    we might need to add their feature bits to the ecs_enabled() macro.

    Signed-off-by: David Woodhouse

    David Woodhouse
     
  • MD_RECOVERY_DONE is normally cleared by md_check_recovery after a
    resync etc finished. However it is possible for raid5_start_reshape
    to race and start a reshape before MD_RECOVERY_DONE is cleared. This
    can lean to multiple reshapes running at the same time, which isn't
    good.

    To make sure it is cleared before starting a reshape, and also clear
    it when reaping a thread, just to be safe.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • Checking ->sync_thread without holding the mddev_lock()
    isn't really safe, even after flushing the workqueue which
    ensures md_start_sync() has been run.

    While this code is waiting for the lock, md_check_recovery could reap
    the thread itself, and then start another thread (e.g. recovery might
    finish, then reshape starts). When this thread gets the lock
    md_start_sync() hasn't run so it doesn't get reaped, but
    MD_RECOVERY_RUNNING gets cleared. This allows two threads to start
    which leads to confusion.

    So don't both if MD_RECOVERY_RUNNING isn't set, but if it is do
    the flush and the test and the reap all under the mddev_lock to
    avoid any race with md_check_recovery.

    Signed-off-by: NeilBrown
    Fixes: 6791875e2e53 ("md: make reconfig_mutex optional for writes to md sysfs files.")
    Cc: stable@vger.kernel.org (v4.0+)

    NeilBrown
     
  • Returning zero from a 'store' function is bad.
    The return value should be either len length of the string
    or an error.

    So use 'len' if 'err' is zero.

    Fixes: 6791875e2e53 ("md: make reconfig_mutex optional for writes to md sysfs files.")
    Signed-off-by: NeilBrown
    Cc: stable@vger.kernel (v4.0+)

    NeilBrown
     
  • Fix for the regression Linus called out, and another for probing
    dongles.

    * tag 'drm-intel-fixes-2015-06-11' of git://anongit.freedesktop.org/drm-intel:
    drm/i915: Fix DDC probe for passive adapters
    drm/i915: Properly initialize SDVO analog connectors

    Dave Airlie
     
  • Two regression reverts, and two fixes, one for a dpm boot freeze.

    * 'drm-fixes-4.1' of git://people.freedesktop.org/~agd5f/linux:
    drm/radeon: Make sure radeon_vm_bo_set_addr always unreserves the BO
    Revert "drm/radeon: adjust pll when audio is not enabled"
    Revert "drm/radeon: don't share plls if monitors differ in audio support"
    drm/radeon: fix freeze for laptop with Turks/Thames GPU.

    Dave Airlie
     
  • When programming the start of a periodic output, the code wrongly places
    the seconds value into the "low" register and the nanoseconds into the
    "high" register. Even though this is backwards, it slipped through my
    testing, because the re-arming code in the interrupt service routine is
    correct, and the signal does appear starting with the second edge.

    This patch fixes the issue by programming the registers correctly.

    Signed-off-by: Richard Cochran
    Reviewed-by: Jacob Keller
    Acked-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Richard Cochran