1. 16 10月, 2015 3 次提交
    • J
      Bluetooth: Fix LE reconnection logic · 49c50922
      Johan Hedberg 提交于
      We can't use hci_explicit_connect_lookup() since that would only cover
      explicit connections, leaving normal reconnections completely
      untouched. Not using it in turn means leaving out entries in
      pend_le_reports.
      
      To fix this and simplify the logic move conn params from the reports
      list to the pend_le_conns list for the duration of an explicit
      connect. Once the connect is complete move the params back to the
      pend_le_reports list. This also means that the explicit connect lookup
      function only needs to look into the pend_le_conns list.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      49c50922
    • J
      Bluetooth: Fix reference counting for LE-scan based connections · b958f9a3
      Johan Hedberg 提交于
      The code should never directly call hci_conn_hash_del since many
      cleanup & reference counting updates would be lost. Normally
      hci_conn_del is the right thing to do, but in the case of a connection
      doing LE scanning this could cause a deadlock due to doing a
      cancel_delayed_work_sync() on the same work callback that we were
      called from.
      
      Connections in the LE scanning state actually need very little cleanup
      - just a small subset of hci_conn_del. To solve the issue, refactor
      out these essential pieces into a new hci_conn_cleanup() function and
      call that from the two necessary places.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b958f9a3
    • J
      Bluetooth: Fix double scan updates · 168b8a25
      Jakub Pawlowski 提交于
      When disable/enable scan command is issued twice, some controllers
      will return an error for the second request, i.e. requests with this
      command will fail on some controllers, and succeed on others.
      
      This patch makes sure that unnecessary scan disable/enable commands
      are not issued.
      
      When adding device to the auto connect whitelist when there is pending
      connect attempt, there is no need to update scan.
      
      hci_connect_le_scan_cleanup is conditionally executing
      hci_conn_params_del, that is calling hci_update_background_scan. Make
      the other case also update scan, and remove reduntand call from
      hci_connect_le_scan_remove.
      
      When stopping interleaved discovery the state should be set to stopped
      only when both LE scanning and discovery has stopped.
      Signed-off-by: NJakub Pawlowski <jpawlowski@google.com>
      Acked-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      168b8a25
  2. 15 10月, 2015 4 次提交
  3. 14 10月, 2015 1 次提交
    • J
      tipc: eliminate risk of stalled link synchronization · 0f8b8e28
      Jon Paul Maloy 提交于
      In commit 6e498158 ("tipc: move link synch and failover to link aggregation level")
      we introduced a new mechanism for performing link failover and
      synchronization. We have now detected a bug in this mechanism.
      
      During link synchronization we use the arrival of any packet on
      the tunnel link to trig a check for whether it has reached the
      synchronization point or not. This has turned out to be too
      permissive, since it may cause an arriving non-last SYNCH packet to
      end the synch state, just to see the next SYNCH packet initiate a
      new synch state with a new, higher synch point. This is not fatal,
      but should be avoided, because it may significantly extend the
      synchronization period, while at the same time we are not allowed
      to send NACKs if packets are lost. In the worst case, a low-traffic
      user may see its traffic stall until a LINK_PROTOCOL state message
      trigs the link to leave synchronization state.
      
      At the same time, LINK_PROTOCOL packets which happen to have a (non-
      valid) sequence number lower than the tunnel link's rcv_nxt value will
      be consistently dropped, and will never be able to resolve the situation
      described above.
      
      We fix this by exempting LINK_PROTOCOL packets from the sequence number
      check, as they should be. We also reduce (but don't completely
      eliminate) the risk of entering multiple synchronization states by only
      allowing the (logically) first SYNCH packet to initiate a synchronization
      state. This works independently of actual packet arrival order.
      
      Fixes: commit 6e498158 ("tipc: move link synch and failover to link aggregation level")
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Acked-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0f8b8e28
  4. 13 10月, 2015 12 次提交
    • E
      ipv6: Don't call with rt6_uncached_list_flush_dev · e332bc67
      Eric W. Biederman 提交于
      As originally written rt6_uncached_list_flush_dev makes no sense when
      called with dev == NULL as it attempts to flush all uncached routes
      regardless of network namespace when dev == NULL.  Which is simply
      incorrect behavior.
      
      Furthermore at the point rt6_ifdown is called with dev == NULL no more
      network devices exist in the network namespace so even if the code in
      rt6_uncached_list_flush_dev were to attempt something sensible it
      would be meaningless.
      
      Therefore remove support in rt6_uncached_list_flush_dev for handling
      network devices where dev == NULL, and only call rt6_uncached_list_flush_dev
       when rt6_ifdown is called with a network device.
      
      Fixes: 8d0b94af ("ipv6: Keep track of DST_NOCACHE routes in case of iface down/unregister")
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Reviewed-by: NMartin KaFai Lau <kafai@fb.com>
      Tested-by: NMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e332bc67
    • N
      switchdev: check if the vlan id is in the proper vlan range · 87aaf2ca
      Nikolay Aleksandrov 提交于
      VLANs 0 and 4095 are reserved and shouldn't be used, add checks to
      switchdev similar to the bridge. Also make sure ids above 4095 cannot
      be passed either.
      
      Fixes: 47f8328b ("switchdev: add new switchdev bridge setlink")
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87aaf2ca
    • D
      Merge branch 'be2net-fixes' · 1f225031
      David S. Miller 提交于
      Sathya Perla says:
      
      ====================
      be2net: patch set
      
      Patch 1 fixes a FW image compatibility check in the driver that
      prevents certain FW images from being flashed on BE3 (not BE3-R)
      adapters.
      
      Patch 2 fixes a spin_lock not being released in a failure case in
      be_cmd_notify_wait().
      
      Patch 3 includes a workaround to pad packets that are only 32b long or less
      to be applicabe to BE3 too. This workaround was currently applied only to
      Skyhawk and Lancer chips. Such packets are causing BE3's TX path to stall
      on a SR-IOV config.
      
      Patch 4 fixes the be_cmd_get_profile_config() routine to set the pf_num
      field in the cmd request. The FW requires this field to be set for it to
      return the specific function's descriptors. If not set, the FW returns
      the descriptors of all the functions on the device. If the first descriptor
      is not what is being queried for, the driver will read wrong data.
      This patch fixes this issue by using the GET_CNTL_ATTRIB cmd to query the
      real pci_func_num of a function and then uses it in the GET_PROFILE_CONFIG
      cmd.
      
      Patch 5 completes an earlier fix that removed the vlan promisc capability
      for VFs. The earlier fix did not update the removal of this capability from
      the profile descriptor of the VF. This causes the VF driver to request this
      capability when it tries to create it's interface at probe time. This could
      potentailly cause the VF probe to fail if the FW enforces strict checking of
      the flags based on what was provisoned by the PF.  This strict checking is
      not being done by FW currently but will be fixed in a future version. This
      patch fixes this issue by updating the VF's profile descriptor so that they
      match the interface capability flags provisioned by the PF.
      
      Pls consider adding these patches to the net tree. Thanks!
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f225031
    • K
      be2net: remove vlan promisc capability from VF's profile descriptors · 196e3735
      Kalesh AP 提交于
      The commit 435452aa ("Prevent VFs from enabling VLAN promiscuous mode")
      fixed the PF driver to not include the VLAN promisc capability while
      provisioning the interface for a VF. But the fix did not remove this
      capability from the profile descriptor of the VF. This causes the VF
      driver to request this capability when it tries to create it's interface
      at probe time.  This could potentailly cause the VF probe to fail if the
      FW enforces strict checking of the flags based on what was provisoned
      by the PF.  This strict checking is not being done by FW currently but
      will be fixed in a future version. This patch fixes this issue by updating
      the VF's profile descriptor so that they match the interface capability
      flags provisioned by the PF.
      
      Fixes: 435452aa ("Prevent VFs from enabling VLAN promiscuous mode")
      Signed-off-by: NKalesh AP <kalesh.purayil@avagotech.com>
      Signed-off-by: NSathya Perla <sathya.perla@avagotech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      196e3735
    • S
      be2net: set pci_func_num while issuing GET_PROFILE_CONFIG cmd · 72ef3a88
      Somnath Kotur 提交于
      The FW requires the pf_num field in the cmd hdr to be set for it to return
      the specific function's descriptors in the GET_PROFILE_CONFIG cmd. If not
      set, the FW returns the descriptors of all the functions on the device.
      If the first descriptor is not what is being queried for, the driver will
      read wrong data. This patch fixes this issue by using the GET_CNTL_ATTRIB
      cmd to query the real pci_func_num of a function and then uses it in the
      GET_PROFILE_CONFIG cmd.
      Signed-off-by: NSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: NSathya Perla <sathya.perla@avagotech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72ef3a88
    • S
      be2net: pad skb to meet minimum TX pkt size in BE3 · 8227e990
      Suresh Reddy 提交于
      On BE3 chips in SRIOV configs, the TX path stalls when a packet less
      than 32B is received from the host. A workaround to pad such packets
      already exists for the Skyhawk and Lancer chips. Use the same workaround
      for BE3 chips too.
      Signed-off-by: NSuresh Reddy <suresh.reddy@avagotech.com>
      Signed-off-by: NSathya Perla <sathya.perla@avagotech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8227e990
    • S
      be2net: release mcc-lock in a failure case in be_cmd_notify_wait() · 0c884567
      Suresh Reddy 提交于
      The mcc/mbox lock is not being released when be_cmd_copy() returns
      an error.
      Signed-off-by: NSuresh Reddy <suresh.reddy@avagotech.com>
      Signed-off-by: NSathya Perla <sathya.perla@avagotech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c884567
    • K
      be2net: fix BE3-R FW download compatibility check · ae4a9d6a
      Kalesh AP 提交于
      In the BE3 FW image, unlike Skyhawk's, the "asic_type_rev" field doesn't
      track the asic_rev of chip it is compatible with. When asic_type_rev
      is 0 the image is compatible only with pre-BE3-R chips (asic_rev < 0x10).
      Fix the current compatibility check to take care of this.
      We hit this issue when we try to flash old BE3 images (used prior to the
      release of BE3-R) on pre-BE3-R adapters.
      
      Fixes: a6e6ff6e ("be2net: simplify UFI compatibility checking")
      Signed-off-by: NKalesh AP <kalesh.purayil@avagotech.com>
      Signed-off-by: NSathya Perla <sathya.perla@avagotech.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae4a9d6a
    • G
      net/fsl_pq_mdio: fix computed address for the TBI register · 3bb35ac4
      Gerlando Falauto 提交于
      commit afae5ad7
        "net/fsl_pq_mdio: streamline probing of MDIO nodes"
      
      added support for different types of MDIO devices:
      1) Gianfar MDIO nodes that only map the MII registers
      2) Gianfar MDIO nodes that map the full MDIO register set
      3) eTSEC2 MDIO nodes (which map the full MDIO register set)
      4) QE MDIO nodes (which map only the MII registers)
      
      However, the implementation for types 1 and 4 would mistakenly assume
      a mapping of the full MDIO register set, thereby computing the address
      for the TBI register starting from the containing structure.
      The TBI register would therefore be accessed at a wrong (much bigger)
      address, not giving the expected result at all.
      This patch restores the correct behavior we had prior to the above one.
      
      The consequences of this bug are apparent when trying to access a PHY
      with the same address as the value contained in the initial value of
      the TBI register (normally 0); in that case you'll get answers from the
      internal TBI device (even though MDIO/MDC pins are actually *also*
      toggling on the physical bus!).
      Beware that you also need to add a fake tbi node to your device tree
      with an unused address.
      
      Notice how this fix is related to commit
      22066949
        "powerpc: Add TBI PHY node to first MDIO bus"
      
      which fixed the behavior in kernel 3.3, which was later broken by the
      above commit on kernel 3.7.
      Signed-off-by: NGerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Timur Tabi <timur@tabi.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3bb35ac4
    • G
      net/fsl_pq_mdio: check TBI address for consistency with mapped range · 3dd03e52
      Gerlando Falauto 提交于
      When configuring the MDIO subsystem it is also necessary to configure
      the TBI register. Make sure the TBI is contained within the mapped
      register range in order to:
      a) make sure the address is computed correctly
      b) make users aware that we're actually accessing that register
      
      In case of error, print a message but continue anyway.
      Signed-off-by: NGerlando Falauto <gerlando.falauto@keymile.com>
      Cc: Timur Tabi <timur@tabi.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dd03e52
    • M
      mac80211: Fix hwflags debugfs file format · 4633dfc3
      Mohammed Shafi Shajakhan 提交于
      Commit 30686bf7 ("mac80211: convert HW flags to unsigned long
      bitmap") accidentally removed the newline delimiter from the hwflags
      debugfs file. Fix this by adding back the newline between the HW flags.
      
      Cc: stable@vger.kernel.org [4.2]
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      [fix commit log]
      Signed-off-by: NJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      4633dfc3
    • A
      rtnetlink: fix gcc -Wconversion warning · e8444637
      Arad, Ronen 提交于
      RTA_ALIGNTO is currently define as 4. It has to be 4U to prevent warning
      for RTA_ALIGN and RTA_DATA expansions when -Wconversion gcc option is
      enabled.
      This follows NLMSG_ALIGNTO definition in <include/uapi/linux/netlink.h>.
      Signed-off-by: NRonen Arad <ronen.arad@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8444637
  5. 11 10月, 2015 7 次提交
  6. 09 10月, 2015 5 次提交
  7. 08 10月, 2015 6 次提交
  8. 07 10月, 2015 2 次提交
    • D
      Merge branch 'ovs-ct-fixes' · 41747509
      David S. Miller 提交于
      Joe Stringer says:
      
      ====================
      OVS conntrack fixes for net
      
      The userspace side of the Open vSwitch conntrack changes is currently
      undergoing review, which has highlighted some minor bugs in the existing
      conntrack implementation in the kernel, as well as pointing out some
      future-proofing that can be done on the interface to reduce the need for
      additional compatibility code in future.
      
      The biggest changes here are to the userspace API for the ct_state match
      field and the CT action. This series proposes to firstly extend the ct_state
      match field to 32 bits, ensuring to reject any currently unsupported bits.
      Secondly, rather than representing CT action flags within a 32-bit field,
      simply use a netlink attribute as presence of the single flag that is
      defined today. This also serves to reject unsupported ct action flag bits.
      
      v4: Use 12-character abbreviated hashes in commit messages.
      v3: Fully acked.
      v2: Address minor style feedback, add acks.
      v1: Initial post.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41747509
    • J
      openvswitch: Change CT_ATTR_FLAGS to CT_ATTR_COMMIT · ab38a7b5
      Joe Stringer 提交于
      Previously, the CT_ATTR_FLAGS attribute, when nested under the
      OVS_ACTION_ATTR_CT, encoded a 32-bit bitmask of flags that modify the
      semantics of the ct action. It's more extensible to just represent each
      flag as a nested attribute, and this requires no additional error
      checking to reject flags that aren't currently supported.
      Suggested-by: NBen Pfaff <blp@nicira.com>
      Signed-off-by: NJoe Stringer <joestringer@nicira.com>
      Acked-by: NPravin B Shelar <pshelar@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab38a7b5