05 Jan, 2016

9 commits

  • Commit 71557a37adb5 ("[netdrvr] sh_eth: Add SH7619 support") added support
    for the big-endian EDMAC descriptors. However, it was never used and never
    worked right until the recent driver fixes. I think we now can just remove
    this support, it was only burdening the driver from the start. It should be
    easy to do without disturbing the SH platform code, at least for now...

    Signed-off-by: Sergei Shtylyov
    Acked-by: Simon Horman
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • Use to_delayed_work() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Signed-off-by: David S. Miller

    Geliang Tang
     
  • The driver can support either all combined or all rx/tx rings. The
    default is combined, but the user can now select rx/tx rings.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Modify ring memory allocation and MSIX setup to support shared or
    non shared rings and do the proper mapping. Default is still to
    use shared rings.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Add logic to calculate how many shared or non shared rings can be
    supported. Default is to use shared rings.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • In order to support dedicated or shared completion rings, the ring
    indexing and mapping are re-structured as below:

    1. bp->grp_info[] array index is 1:1 with bp->bnapi[] array index and
    completion ring index.

    2. rx rings 0 to n will be mapped to completion rings 0 to n.

    3. If tx and rx rings share completion rings, then tx rings 0 to m will
    be mapped to completion rings 0 to m.

    4. If tx and rx rings use dedicated completion rings, then tx rings 0 to
    m will be mapped to completion rings n + 1 to n + m.

    5. Each tx or rx ring will use the corresponding completion ring index
    for doorbell mapping and MSIX mapping.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Each bnxt_napi structure may no longer be having both an rx ring and
    a tx ring. Check for a valid ring before using it.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Currently, an rx and a tx ring are always paired with a completion ring.
    We want to restructure it so that it is possible to have a dedicated
    completion ring for tx or rx only.

    The bnxt hardware uses a completion ring for rx and tx events. The driver
    has to process the completion ring entries sequentially for the rx and tx
    events. Using a dedicated completion ring for rx only or tx only has these
    benefits:

    1. A burst of rx packets can cause delay in processing tx events if the
    completion ring is shared. If tx queue is stopped by BQL, this can cause
    delay in re-starting the tx queue.

    2. A completion ring is sized according to the rx and tx ring size rounded
    up to the nearest power of 2. When the completion ring is shared, it is
    sized by adding the rx and tx ring sizes and then rounded to the next power
    of 2, often with a lot of wasted space.

    3. Using dedicated completion ring, we can adjust the tx and rx coalescing
    parameters independently for rx and tx.

    The first step is to separate the rx and tx ring structures from the
    bnxt_napi struct.

    In this patch, an rx ring and a tx ring will point to the same bnxt_napi
    struct to share the same completion ring. No change in ring assignment
    and mapping yet.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • By adding 3 separate functions to dump the different ring states.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     

01 Jan, 2016

4 commits

  • David S. Miller
     
  • Pull PCI bugfix from Bjorn Helgaas:
    "Here's another fix for v4.4.

    This fixes 32-bit config reads for the HiSilicon driver. Obviously
    the driver is completely broken without this fix (apparently it
    actually was tested internally, but got broken somehow in the process
    of upstreaming it).

    Summary:

    HiSilicon host bridge driver
    Fix 32-bit config reads (Dongdong Liu)"

    * tag 'pci-v4.4-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI: hisi: Fix hisi_pcie_cfg_read() 32-bit reads

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Prevent XFRM per-cpu counter updates for one namespace from being
    applied to another namespace. Fix from DanS treetman.

    2) Fix RCU de-reference in iwl_mvm_get_key_sta_id(), from Johannes
    Berg.

    3) Remove ethernet header assumption in nft_do_chain_netdev(), from
    Pablo Neira Ayuso.

    4) Fix cpsw PHY ident with multiple slaves and fixed-phy, from Pascal
    Speck.

    5) Fix use after free in sixpack_close and mkiss_close.

    6) Fix VXLAN fw assertion on bnx2x, from Yuval Mintz.

    7) natsemi doesn't check for DMA mapping errors, from Alexey
    Khoroshilov.

    8) Fix inverted test in ip6addrlbl_get(), from ANdrey Ryabinin.

    9) Missing initialization of needed_headroom in geneve tunnel driver,
    from Paolo Abeni.

    10) Fix conntrack template leak in openvswitch, from Joe Stringer.

    11) Mission initialization of wq->flags in sock_alloc_inode(), from
    Nicolai Stange.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (35 commits)
    sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close
    net, socket, socket_wq: fix missing initialization of flags
    drivers: net: cpsw: fix error return code
    openvswitch: Fix template leak in error cases.
    sctp: label accepted/peeled off sockets
    sctp: use GFP_USER for user-controlled kmalloc
    qlcnic: fix a loop exit condition better
    net: cdc_ncm: avoid changing RX/TX buffers on MTU changes
    geneve: initialize needed_headroom
    ipv6: honor ifindex in case we receive ll addresses in router advertisements
    addrconf: always initialize sysctl table data
    ipv6/addrlabel: fix ip6addrlbl_get()
    switchdev: bridge: Pass ageing time as clock_t instead of jiffies
    sh_eth: fix 16-bit descriptor field access endianness too
    veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.
    net: usb: cdc_ncm: Adding Dell DW5813 LTE AT&T Mobile Broadband Card
    net: usb: cdc_ncm: Adding Dell DW5812 LTE Verizon Mobile Broadband Card
    natsemi: add checks for dma mapping errors
    rhashtable: Kill harmless RCU warning in rhashtable_walk_init
    openvswitch: correct encoding of set tunnel action attributes
    ...

    Linus Torvalds
     
  • …etooth/bluetooth-next

    Johan Hedberg says:

    ====================
    pull request: bluetooth-next 2015-12-31

    Here's (probably) the last bluetooth-next pull request for the 4.5
    kernel:

    - Add support for BCM2E65 ACPI ID
    - Minor fixes/cleanups in the bcm203x & bfusb drivers
    - Minor debugfs related fix in 6lowpan code

    Please let me know if there are any issues pulling. Thanks.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

31 Dec, 2015

15 commits

  • The PHY counters receiver errors and errors while idle.

    Signed-off-by: Andrew Lunn
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • The PHY counters receiver errors and errors while idle.

    Signed-off-by: Andrew Lunn
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • …m/linux/kernel/git/kvalo/wireless-drivers

    Kalle Valo says:

    ====================
    iwlwifi

    * don't load firmware that won't exist for 7260
    * fix RCU splat
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • Jeff Kirsher says:

    ====================
    10GbE Intel Wired LAN Driver Updates 2015-12-29

    This series contains updates to ixgbe and ixgbevf.

    William Dauchy provides a fix for ixgbevf that was implemented for ixgbe,
    commit 5d6002b7b822c7 ("ixgbe: Fix handling of NAPI budget when multiple
    queues are enabled per vector"). The issue was that the polling routine
    would increase the budget for receive to at least 1 per queue if multiple
    queues were present, which resulted in receive packets being processed
    when the budget was 0.

    Emil provides minor cleanups for ixgbevf, one being that we need to
    check rx_itr_setting with == and not &, since it is not a mask. Added
    QSFP PHY support in ixgbe to allow for more accurate reporting of port
    settings. Fixed the max RSS limit for X550 which is 63, not 64.

    Veola fixes ixgbe ethtool reporting of backplane type interfaces as
    1000/10000baseT link modes, instead, report the media as KR, KX or KX4
    based on the backplane interface present.

    Mark cleans up redundancy in the setting of hw_enc_features that makes
    it appear that X550 has more encapsulation features than other devices.
    Also do not set NETIF_F_SG any longer since that is set by the
    register_netdev() call. Also fixed the X550EM_x revision check, which
    needs to check a value, not just a bit.

    Alex Duyck fixes additional bugs in ixgbe_clear_vf_vlans(), one being
    that the mask was using a divide instead of a modulus, which resulted
    in the mask bit being incorrectly set to 0 or 1 based on the value of
    the VF being tested. Alex also found that he was not consistent in
    using the "word" argument as an offset or as a register offset, so
    made the code consistently use word as the offset in the array.

    v2: dropped patch 8 of the original series, as it was undoing a part of
    the fix Alex Duyck was doing in patch 9 of the original series.
    Dropped based on feedback from Emil (the author).
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: Suresh Reddy
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Suresh Reddy
     
  • This patch adds support for ethtool's --get-dump option in be2net,
    to retrieve FW dump. In the past when this option was not yet available,
    this feature was supported via the --register-dump option as a workaround.
    This patch removes support for FW-dump via --register-dump option as it is
    now available via --get-dump option. Even though the
    "ethtool --register-dump" cmd which used to work earlier, will now fail
    with ENOTSUPP error, we feel it is not an issue as this is used only
    for diagnostics purpose.

    Signed-off-by: Venkat Duvvuru
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Venkat Duvvuru
     
  • Commit 72ef3a88fa8e ("be2net: set pci_func_num while issuing
    GET_PROFILE_CONFIG cmd") passed a specific pf_num while issuing a
    GET_PROFILE_CONFIG cmd as FW returns descriptors for all functions when
    pf_num is zero. But, when pf_num is set to a non-zero value, FW does not
    return the Port resource descriptor.
    This patch fixes this by setting pf_num to 0 while issuing the query cmd
    and adds code to pick the correct NIC resource descriptor from the list of
    descriptors returned by FW.

    Fixes: 72ef3a88fa8e ("be2net: set pci_func_num while issuing
    GET_PROFILE_CONFIG cmd")
    Signed-off-by: Suresh Reddy

    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Suresh Reddy
     
  • eeh_error, fw_timeout, hw_error variables in the be_adapter structure are
    not used anymore. An earlier patch that introduced adapter->err_flags to
    store this information missed removing these variables.

    Signed-off-by: Venkat Duvvuru
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Venkat Duvvuru
     
  • This patch removes a line of code that changes adapter->recommended_prio
    value followed by yet another assignment.
    Also, the variable is used to store the vlan priority value that is already
    shifted to the PCP bits position in the vlan tag format. Hence, the name of
    this variable is changed to recommended_prio_bits.

    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Sathya Perla
     
  • (based on a jumper setting on the adapter.) In this mode, the FW image when
    flashed is authenticated with a digital signature. This patch logs
    appropriate error messages and return a status to ethtool when errors
    relating to FW image authentication occur.

    Signed-off-by: Suresh Reddy
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Suresh Reddy
     
  • All code relating to FW cmds is in be_cmds.[ch] excepting FW flash cmd
    related code. This patch moves these routines from be_main.c to be_cmds.c

    Signed-off-by: Suresh Reddy
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Suresh Reddy
     
  • Many constant definitions relating to the FW-image layout
    (such as section offset values) were defined in decimal format rather than
    hexa-decimal. This makes this part of the code un-readable. Also some
    defines related to BE2 are labeld "g2" and defines related to BE3 are
    labeled "g3". This patch cleans up all of this to make this code more
    readable.

    Signed-off-by: Suresh Reddy
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Suresh Reddy
     
  • BE3 chip doesn't support VEPA mode.

    Signed-off-by: Suresh Reddy
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Suresh Reddy
     
  • The VF link state setting transition from "disable" to "auto" does not work
    due to a bug in SET_LOGICAL_LINK_CONFIG_V1 cmd in FW. This issue could not
    be fixed in FW due to some backward compatibility issues it causes with
    some released drivers. The issue has been fixed by introducing a new
    version (v2) of the cmd from 10.6 FW onwards. In v2, to set the VF link
    state to auto, both PLINK_ENABLE and PLINK_TRACK bits have to be set to 1.

    The VF link state setting feature now works on Lancer chips too from
    FW ver 10.6.315.0 onwards.

    Signed-off-by: Suresh Reddy
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Suresh Reddy
     
  • Pull block fixes from Jens Axboe:
    "Make the block layer great again.

    Basically three amazing fixes in this pull request, split into 4
    patches. Believe me, they should go into 4.4. Two of them fix a
    regression, the third and last fixes an easy-to-trigger bug.

    - Fix a bad irq enable through null_blk, for queue_mode=1 and using
    timer completions. Add a block helper to restart a queue
    asynchronously, and use that from null_blk. From me.

    - Fix a performance issue in NVMe. Some devices (Intel Pxxxx) expose
    a stripe boundary, and performance suffers if we cross it. We took
    that into account for merging, but not for the newer splitting
    code. Fix from Keith.

    - Fix a kernel oops in lightnvm with multiple channels. From Matias"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    lightnvm: wrong offset in bad blk lun calculation
    null_blk: use async queue restart helper
    block: add blk_start_queue_async()
    block: Split bios on chunk boundaries

    Linus Torvalds
     

30 Dec, 2015

11 commits

  • When I had rewritten the code for ixgbe_clear_vf_vlans() it looks like I
    had transitioned back and forth between using word as an offset and using
    word as a register offset. As a result I honestly don't see how the code
    was working before other than the fact that resetting the VLANs on the VF
    like didn't do much to clear them.

    Another issue found is that the mask was using a divide instead of a
    modulus. As a result the mask bit was incorrectly being set to either bit
    0 or 1 based on the value of the VF being tested. As a result the wrong
    VFs were having their VLANs cleared if they were enabled.

    I have updated the code so that word represents the offset in the array.
    This way we can use the modulus and xor operations and they will make sense
    instead of being performed on a 4 byte aligned value.

    I replaced the statement "(word % 2) ^ 1" with "~word % 2" in order to
    reduce the line length as the line exceeded 80 characters with the register
    name inserted. The two should be equivalent so the change should be safe.

    Reported-by: Emil Tantilov
    Signed-off-by: Alexander Duyck
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • The X550EM_x revision check needs to check a value, not just a bit.
    Use a mask and check the value. Also remove the redundant check
    inside the ixgbe_enter_lplu_t_x550em, because it can only be called
    when both the mac type and revision check pass.

    Signed-off-by: Mark Rustad
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Mark Rustad
     
  • X550 allows for up to 64 RSS queues, but the driver can have max
    of 63 (-1 MSIX vector for link).

    On systems with >= 64 CPUs the driver will set the redirection table
    for all 64 queues which will result in packets being dropped.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • Clean up minor redundancy in the setting of hw_enc_features that
    makes it appears that X550 uniquely has more encapsulation features
    than other devices. The driver only supports one more feature, so
    make it look that way. No longer set NETIF_F_SG since that is set
    by the register_netdev call. Thanks to Alex Duyck for noticing this
    slight confusion.

    Reported-by: Alexander Duyck
    Signed-off-by: Mark Rustad
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Mark Rustad
     
  • Ethtool reports backplane type interfaces as 1000/10000baseT link modes.
    This has been corrected to report the media as KR, KX or KX4 based on the
    backplane interface present.

    Signed-off-by: Veola Nazareth
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Veola Nazareth
     
  • Add missing QSFP PHY types to allow for more accurate reporting of
    port settings.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • adapter->rx_itr_setting is not a mask so check it with == instead of &
    do not default to 12K interrupts in ixgbevf_set_itr()

    There should be no functional effect from these changes.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • This is the same patch as for ixgbe but applied differently according to
    busy polling. See commit 5d6002b7b822c74 ("ixgbe: Fix handling of NAPI
    budget when multiple queues are enabled per vector")

    Signed-off-by: William Dauchy
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    William Dauchy
     
  • Use to_platform_device() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Signed-off-by: David S. Miller

    Geliang Tang
     
  • Use to_pci_dev() instead of open-coding it.

    Signed-off-by: Geliang Tang
    Signed-off-by: David S. Miller

    Geliang Tang
     
  • Propagate the return value of platform_get_irq on failure.

    A simplified version of the semantic match that finds the two cases where
    no error code is returned at all is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    identifier ret; expression e1,e2;
    @@
    (
    if (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

29 Dec, 2015

1 commit

  • dev->nr_luns reports the total number of luns available in a device
    while dev->luns_per_chnl is the number of luns per channel.

    When multiple channels are available, the offset is calculated from a
    channel and lun id into a linear array. As it multiplies with
    the total number of luns, we go out of bound when channel id > 0 and
    causes the kernel to panic when we read a protected kernel memory area.

    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling