1. 01 Mar, 2016 7 commits
    • Xin Long's avatar
      sctp: lack the check for ports in sctp_v6_cmp_addr · 40b4f0fd
      Xin Long authored
      As the member .cmp_addr of sctp_af_inet6, sctp_v6_cmp_addr should also check
      the port of addresses, just like sctp_v4_cmp_addr, cause it's invoked by
      sctp_cmp_addr_exact().
      
      Now sctp_v6_cmp_addr just check the port when two addresses have different
      family, and lack the port check for two ipv6 addresses. that will make
      sctp_hash_cmp() cannot work well.
      
      so fix it by adding ports comparison in sctp_v6_cmp_addr().
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40b4f0fd
    • David S. Miller's avatar
      Merge branch 'phy-micrel-fixes' · f0da74bc
      David S. Miller authored
      Alexandre Belloni says:
      
      ====================
      phy: micrel: fix issues with interrupt on atmel boards
      
      Since the phy is not polled anymore, there were issues getting a link on the
      sama5d* xplained boards.
      
      I'm not too sure about were those fixes should go and I'm wondering whether the
      first one shoud be made generic.
      
      For the second one, I found the PHY_HAS_MAGICANEG flag that is not used and I
      wondering whether this is related to that kind of issue. I had a quick look at
      the history and could'nt find its use.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f0da74bc
    • Alexandre Belloni's avatar
      phy: micrel: Disable auto negotiation on startup · 99f81afc
      Alexandre Belloni authored
      Disable auto negotiation on init to properly detect an already plugged
      cable at boot.
      
      At boot, when the phy is started, it is in the PHY_UP state.
      However, if a cable is plugged at boot, because auto negociation is already
      enabled at the time we get the first interrupt, the phy is already running.
      But the state machine then switches from PHY_UP to PHY_AN and calls
      phy_start_aneg(). phy_start_aneg() will not do anything because aneg is
      already enabled on the phy. It will then wait for a interrupt before going
      further. This interrupt will never happen unless the cable is unplugged and
      then replugged.
      
      It was working properly before 321beec5 (net: phy: Use interrupts when
      available in NOLINK state) because switching to NOLINK meant starting
      polling the phy, even if IRQ were enabled.
      
      Fixes: 321beec5 (net: phy: Use interrupts when available in NOLINK state)
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99f81afc
    • Alexandre Belloni's avatar
      phy: micrel: Ensure interrupts are reenabled on resume · f5aba91d
      Alexandre Belloni authored
      At least on ksz8081, when getting back from power down, interrupts are
      disabled. ensure they are reenabled if they were previously enabled.
      
      This fixes resuming which is failing on the xplained boards from atmel
      since 321beec5 (net: phy: Use interrupts when available in NOLINK
      state)
      
      Fixes: 321beec5 (net: phy: Use interrupts when available in NOLINK state)
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5aba91d
    • Guillaume Nault's avatar
      ppp: lock ppp->flags in ppp_read() and ppp_poll() · edffc217
      Guillaume Nault authored
      ppp_read() and ppp_poll() can be called concurrently with ppp_ioctl().
      In this case, ppp_ioctl() might call ppp_ccp_closed(), which may update
      ppp->flags while ppp_read() or ppp_poll() is reading it.
      The update done by ppp_ccp_closed() isn't atomic due to the bit mask
      operation ('ppp->flags &= ~(SC_CCP_OPEN | SC_CCP_UP)'), so concurrent
      readers might get transient values.
      Reading incorrect ppp->flags may disturb the 'ppp->flags & SC_LOOP_TRAFFIC'
      test in ppp_read() and ppp_poll(), which in turn can lead to improper
      decision on whether the PPP unit file is ready for reading or not.
      
      Since ppp_ccp_closed() is protected by the Rx and Tx locks (with
      ppp_lock()), taking the Rx lock is enough for ppp_read() and ppp_poll()
      to guarantee that ppp_ccp_closed() won't update ppp->flags
      concurrently.
      
      The same reasoning applies to ppp->n_channels. The 'n_channels' field
      can also be written to concurrently by ppp_ioctl() (through
      ppp_connect_channel() or ppp_disconnect_channel()). These writes aren't
      atomic (simple increment/decrement), but are protected by both the Rx
      and Tx locks (like in the ppp->flags case). So holding the Rx lock
      before reading ppp->n_channels also prevents concurrent writes.
      Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      edffc217
    • Ivan Vecera's avatar
      bna: fix list corruption · a7f4b988
      Ivan Vecera authored
      Use list_move_tail() to move MAC address entry from list of pending
      to list of active entries. Simple list_add_tail() leaves the entry
      also in the first list, this leads to list corruption.
      
      Cc: Rasesh Mody <rasesh.mody@qlogic.com>
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Acked-by: default avatarRasesh Mody <rasesh.mody@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7f4b988
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-4.5-20160226' of... · c44a72a5
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-4.5-20160226' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2016-02-26
      
      this is a pull request of one patch for net.
      
      The patch by Maximilain Schneider fixes a kfree() problem during disconnect in
      the gs_usb driver.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c44a72a5
  2. 29 Feb, 2016 1 commit
    • Neil Horman's avatar
      3c59x: mask LAST_FRAG bit from length field in ring · a6522c08
      Neil Horman authored
      Recently, I fixed a bug in 3c59x:
      
      commit 6e144419
      Author: Neil Horman <nhorman@tuxdriver.com>
      Date:   Wed Jan 13 12:43:54 2016 -0500
      
          3c59x: fix another page map/single unmap imbalance
      
      Which correctly rebalanced dma mapping and unmapping types.  Unfortunately it
      introduced a new bug which causes oopses on older systems.
      
      When mapping dma regions, the last entry for a packet in the 3c59x tx ring
      encodes a LAST_FRAG bit, which is encoded as the high order bit of the buffers
      length field.  When it is unmapped the LAST_FRAG bit is cleared prior to being
      passed to the unmap function.  Unfortunately the commit above fails to do that
      masking.  It was missed in testing because the system on which I tested it had
      an intel iommu, the driver for which ignores the size field, using only the DMA
      address as the token to identify the mapping to be released.  However, on older
      systems that rely on swiotlb (or other dma drivers that key off that length
      field), not masking off that LAST_FRAG high order bit results in parsing a huge
      size to be release, leading to all sorts of odd corruptions and the like.
      
      Fix is easy, just mask the length with 0xFFF.  It should really be
      &(LAST_FRAG-1), but 0xFFF is the style of the file, and I'd like to make this
      fix minimal and correct before making it prettier.
      
      Appies to the net tree cleanly.  All testing on both iommu and swiommu based
      systems produce good results
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      CC: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6522c08
  3. 26 Feb, 2016 2 commits
  4. 25 Feb, 2016 7 commits
  5. 24 Feb, 2016 6 commits
  6. 23 Feb, 2016 5 commits
  7. 22 Feb, 2016 12 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · dea08e60
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Looks like a lot, but mostly driver fixes scattered all over as usual.
      
        Of note:
      
         1) Add conditional sched in nf conntrack in cleanup to avoid NMI
            watchdogs.  From Florian Westphal.
      
         2) Fix deadlock in nfnetlink cttimeout, also from Floarian.
      
         3) Fix handling of slaves in bonding ARP monitor validation, from Jay
            Vosburgh.
      
         4) Callers of ip_cmsg_send() are responsible for freeing IP options,
            some were not doing so.  Fix from Eric Dumazet.
      
         5) Fix per-cpu bugs in mvneta driver, from Gregory CLEMENT.
      
         6) Fix vlan handling in mv88e6xxx DSA driver, from Vivien Didelot.
      
         7) bcm7xxx PHY driver bug fixes from Florian Fainelli.
      
         8) Avoid unaligned accesses to protocol headers wrt.  GRE, from
            Alexander Duyck.
      
         9) SKB leaks and other problems in arc_emac driver, from Alexander
            Kochetkov.
      
        10) tcp_v4_inbound_md5_hash() releases listener socket instead of
            request socket on error path, oops.  Fix from Eric Dumazet.
      
        11) Missing socket release in pppoe_rcv_core() that seems to have
            existed basically forever.  From Guillaume Nault.
      
        12) Missing slave_dev unregister in dsa_slave_create() error path,
            from Florian Fainelli.
      
        13) crypto_alloc_hash() never returns NULL, fix return value check in
            __tcp_alloc_md5sig_pool.  From Insu Yun.
      
        14) Properly expire exception route entries in ipv4, from Xin Long.
      
        15) Fix races in tcp/dccp listener socket dismantle, from Eric
            Dumazet.
      
        16) Don't set IFF_TX_SKB_SHARING in vxlan, geneve, or GRE, it's not
            legal.  These drivers modify the SKB on transmit.  From Jiri Benc.
      
        17) Fix regression in the initialziation of netdev->tx_queue_len.
            From Phil Sutter.
      
        18) Missing unlock in tipc_nl_add_bc_link() error path, from Insu Yun.
      
        19) SCTP port hash sizing does not properly ensure that table is a
            power of two in size.  From Neil Horman.
      
        20) Fix initializing of software copy of MAC address in fmvj18x_cs
            driver, from Ken Kawasaki"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (129 commits)
        bnx2x: Fix 84833 phy command handler
        bnx2x: Fix led setting for 84858 phy.
        bnx2x: Correct 84858 PHY fw version
        bnx2x: Fix 84833 RX CRC
        bnx2x: Fix link-forcing for KR2
        net: ethernet: davicom: fix devicetree irq resource
        fmvj18x_cs: fix incorrect indexing of dev->dev_addr[] when copying the MAC address
        Driver: Vmxnet3: Update Rx ring 2 max size
        net: netcp: rework the code for get/set sw_data in dma desc
        soc: ti: knav_dma: rename pad in struct knav_dma_desc to sw_data
        net: ti: netcp: restore get/set_pad_info() functionality
        MAINTAINERS: Drop myself as xen netback maintainer
        sctp: Fix port hash table size computation
        can: ems_usb: Fix possible tx overflow
        Bluetooth: hci_core: Avoid mixing up req_complete and req_complete_skb
        net: bcmgenet: Fix internal PHY link state
        af_unix: Don't use continue to re-execute unix_stream_read_generic loop
        unix_diag: fix incorrect sign extension in unix_lookup_by_ino
        bnxt_en: Failure to update PHY is not fatal condition.
        bnxt_en: Remove unnecessary call to update PHY settings.
        ...
      dea08e60
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.5-rc6' of... · 5c102d0e
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "Two fixes headed for stable:
      
         - Remove an unnecessary speed_index lookup for thermal hook in the
           gpio-fan driver.  The unnecessary speed lookup can hog the system.
      
         - Handle negative conversion values correctly in the ads1015 driver"
      
      * tag 'hwmon-for-linus-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (gpio-fan) Remove un-necessary speed_index lookup for thermal hook
        hwmon: (ads1015) Handle negative conversion values correctly
      5c102d0e
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · a16152c8
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "One ocrdma fix:
      
         - The new CQ API support was added to ocrdma, but they got the arming
           logic wrong, so without this, transfers eventually fail when they
           fail to arm the interrupt properly under load
      
        Two related fixes for mlx4:
      
         - When we added the 64bit extended counters support to the core IB
           code, they forgot to update the RoCE side of the mlx4 driver (the
           IB side they properly updated).
      
           I debated whether or not to include these patches as they could be
           considered feature enablement patches, but the existing code will
           blindy copy the 32bit counters, whether any counters were requested
           at all (a bug).
      
           These two patches make it (a) check to see that counters were
           requested and (b) copy the right counters (the 64bit support is
           new, the 32bit is not).  For that reason I went ahead and took
           them"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/mlx4: Add support for the port info class for RoCE ports
        IB/mlx4: Add support for extended counters over RoCE ports
        RDMA/ocrdma: Fix arm logic to align with new cq API
      a16152c8
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 7ee302f6
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Some bugfixes from I2C for you:
      
        A fix for a RuntimePM regression with OMAP, a fix to enable TCO for
        Lewisburg platforms, and a typo fix while we are here"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: i801: Adding Intel Lewisburg support for iTCO
        i2c: uniphier: fix typos in error messages
        i2c: omap: Fix PM regression with deferred probe for pm_runtime_reinit
      7ee302f6
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-4.5-20160221' of... · d856626d
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-4.5-20160221' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2016-02-21
      
      this is a pull reqeust of one patch for net/master.
      
      The patch is by Gerhard Uttenthaler and fixes a potential tx overflow in the
      ems_usb driver.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d856626d
    • David S. Miller's avatar
      Merge branch 'bnx2x-848xx-phy-fixes' · dd78dac8
      David S. Miller authored
      Yuval Mintz says:
      
      ====================
      bnx2x: Fix 848xx phys
      
      This series contains link-related fixes, mostly for the 848xx phys
      [2 patches are for 84833, and 2 patches are for 84858].
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dd78dac8
    • Yuval Mintz's avatar
      bnx2x: Fix 84833 phy command handler · 4ec0b6d5
      Yuval Mintz authored
      Current initialization sequence is lacking, causing some configurations
      to fail.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ec0b6d5
    • Yuval Mintz's avatar
      bb1187af
    • Yuval Mintz's avatar
      bnx2x: Correct 84858 PHY fw version · 27ba2d2d
      Yuval Mintz authored
      The phy's firmware version isn't being parsed properly as it's
      currently parsed like the rest of the 848xx phys.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27ba2d2d
    • Yuval Mintz's avatar
      bnx2x: Fix 84833 RX CRC · 512ab9a0
      Yuval Mintz authored
      There's a problem in current 84833 phy configuration -
      in case 1Gb link is configured and jumbo-sized packets are being
      used, device will experience RX crc errors.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      512ab9a0
    • Yuval Mintz's avatar
      bnx2x: Fix link-forcing for KR2 · 1e411f01
      Yuval Mintz authored
      Currently, when link is using KR2 it cannot be forced to any speed other
      than 20g.
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.om>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e411f01
    • David S. Miller's avatar
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth · 9ca69b70
      David S. Miller authored
      Johan Hedberg says:
      
      ====================
      pull request: bluetooth 2016-02-20
      
      Here's an important patch for 4.5 which fixes potential invalid pointer
      access when processing completed Bluetooth HCI commands.
      
      Please let me know if there are any issues pulling. Thanks.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ca69b70