1. 20 Oct, 2015 16 commits
    • Marcel Holtmann's avatar
      Bluetooth: btbcm: Read USB product information for Apple devices · 34cea41e
      Marcel Holtmann authored
      For the Apple Bluetooth devices, read the USB product information and
      print them. This allows for easy mapping of chip and USB details.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      34cea41e
    • Marcel Holtmann's avatar
      Bluetooth: btbcm: Fix firmware version number calculation · 8045ce21
      Marcel Holtmann authored
      The calculation for the firmware version number is off by one bit.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      8045ce21
    • Marcel Holtmann's avatar
      Bluetooth: btusb: Mark BCM2045 devices to have broken link key commands · 6c9d435d
      Marcel Holtmann authored
      The BCM2045 seems to have a problem with the stored link key commands
      and thus just mark them as broken.
      
        HCI Event: Command Complete (0x0e) plen 12
           Read Local Supported Features (0x04|0x0003) ncmd 1
           status 0x00
           Features: 0xff 0xff 0x8d 0xfe 0x8f 0xf9 0x00 0x80
        HCI Event: Command Complete (0x0e) plen 12
           Read Local Version Information (0x04|0x0001) ncmd 1
           status 0x00
           HCI Version: 2.0 (0x3) HCI Revision: 0x2000
           LMP Version: 2.0 (0x3) LMP Subversion: 0x410d
           Manufacturer: Broadcom Corporation (15)
        HCI Event: Command Complete (0x0e) plen 11
           Read Buffer Size (0x04|0x0005) ncmd 1
           status 0x00
           ACL MTU 1017:8 SCO MTU 64:0
        HCI Event: Command Complete (0x0e) plen 68
           Read Local Supported Commands (0x04|0x0002) ncmd 1
           status 0x00
           Commands: ffffff03feffcfffffffffff0300f8ff07
        HCI Event: Command Complete (0x0e) plen 4
           Delete Stored Link Key (0x03|0x0012) ncmd 1
           status 0x11 deleted 2048
           Error: Unsupported Feature or Parameter Value
      
      From the looks of it, this device seems genuine and not one of the
      devices that are neither Broadcom nor CSR devices in reality.
      
      T: Bus=04 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
      D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
      P: Vendor=0a5c ProdID=2045 Rev= 1.12
      S: Manufacturer=Broadcom Corp
      S: Product=BCM2045A
      S: SerialNumber=000000000000
      C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=100mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
      E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
      E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
      I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
      I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
      I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
      I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
      I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms
      E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=00 Driver=(none)
      Reported-and-tested-by: default avatarJulio González Mejías <juliolokooo@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      6c9d435d
    • Marcel Holtmann's avatar
      Bluetooth: btintel: Add diagnostic support for older controllers · 3e24767b
      Marcel Holtmann authored
      For the older controllers like Wilkens Peak and Stone Peak, enabling the
      traces requires to switch into manufacturer mode first. This patch does
      exactly that, but only for these older controllers.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      3e24767b
    • Marcel Holtmann's avatar
      Bluetooth: btintel: Set quirk for non-persistent diagnostic settings · d8270fbb
      Marcel Holtmann authored
      For Intel controllers the diagnostics settings are not persistent over
      HCI Reset. So set the quirk to programm them again on every power up.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      d8270fbb
    • Marcel Holtmann's avatar
      Bluetooth: Add new quirk for non-persistent diagnostic settings · 7e995b9e
      Marcel Holtmann authored
      If the diagnostic settings are not persistent over HCI Reset, then this
      quirk can be used to tell the Bluetoth core about it. This will ensure
      that the settings are programmed correctly when the controller is
      powered up.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      7e995b9e
    • Arnd Bergmann's avatar
      Bluetooth: bpa10x: fix BT_HCIUART dependency · 7841d06e
      Arnd Bergmann authored
      The change to bpa10x to use the h4_recv_buf helper added a dependency
      on BT_HCIUART. This was incorrectly added to Kconfig by adding a
      'select' statement, which now in turn causes build failures
      when CONFIG_TTY is not set:
      
      warning: (BT_HCIBPA10X) selects BT_HCIUART which has unmet direct dependencies (NET && BT && TTY)
      vers/built-in.o: In function `hci_uart_tty_receive':
      fpga-mgr.c:(.text+0x282824): undefined reference to `tty_unthrottle'
      drivers/built-in.o: In function `hci_uart_tty_ioctl':
      fpga-mgr.c:(.text+0x282aa0): undefined reference to `n_tty_ioctl_helper'
      drivers/built-in.o: In function `hci_uart_flush':
      
      This replaces the 'select BT_HCIUART' dependency with 'depends on', which
      does not have this kind of problem. Alternatively, one could add 'depends
      on TTY', but avoiding 'select' on user-visible options is generally the
      preferred choice as that does not introduce the potential for dependency
      loops or incomplete dependency chains.
      
      Fixes: 91489919 ("Bluetooth: bpa10x: Fix missing BT_HCIUART dependency")
      Fixes: 943cc592 ("Bluetooth: bpa10x: Use h4_recv_buf helper for frame reassembly")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      7841d06e
    • Marcel Holtmann's avatar
      Bluetooth: btusb: Print information of Intel SfP lock states · 2220994e
      Marcel Holtmann authored
      The lock states from Intel SfP controllers can only be read once before
      loading the firmware. So for debugging purposes, print them out.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      2220994e
    • Johan Hedberg's avatar
      Bluetooth: Don't use remote address type to decide IRK persistency · cad20c27
      Johan Hedberg authored
      There are LE devices on the market that start off by announcing their
      public address and then once paired switch to using private address.
      To be interoperable with such devices we should simply trust the fact
      that we're receiving an IRK from them to indicate that they may use
      private addresses in the future. Instead, simply tie the persistency
      to the bonding/no-bonding information the same way as for LTKs and
      CSRKs.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      cad20c27
    • Marcel Holtmann's avatar
      Bluetooth: Queue diagnostic messages together with HCI packets · 581d6fd6
      Marcel Holtmann authored
      Sending diagnostic messages directly to the monitor socket might cause
      issues for devices processing their messages in interrupt context. So
      instead of trying to directly forward them, queue them up with the other
      HCI packets and lets them be processed by the sockets at the same time.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      581d6fd6
    • Marcel Holtmann's avatar
      Bluetooth: Restrict valid packet types via HCI_CHANNEL_RAW · bb77543e
      Marcel Holtmann authored
      When using the HCI_CHANNEL_RAW, restrict the packet types to valid ones
      from the Bluetooth specification.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      bb77543e
    • Marcel Holtmann's avatar
      Bluetooth: Remove quirk for HCI_VENDOR_PKT filter handling · 8cd4f581
      Marcel Holtmann authored
      The HCI_VENDOR_PKT quirk was needed for BPA-100/105 devices that send
      these messages. Now that there is support for proper diagnostic channel
      this quirk is no longer needed.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      8cd4f581
    • Marcel Holtmann's avatar
      Bluetooth: btintel: Add support for enabling tracing functionality · 6d2e50d2
      Marcel Holtmann authored
      For Intel controllers with firmware that allows tracing of baseband
      functionality this allows enabling it via set_diag driver callback.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      6d2e50d2
    • Marcel Holtmann's avatar
      Bluetooth: btusb: Add support for Broadcom LM_DIAG interface · 9d08f504
      Marcel Holtmann authored
      The Broadcom Bluetooth USB devices have a third interface that is
      dedicated for LM_DIAG messages. The If#= 2 describes this interface
      and it consists of one bulk in and one bulk endpoint.
      
      T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 38 Spd=12   MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=19ff ProdID=0239 Rev= 1.12
      S:  Manufacturer=Broadcom Corp
      S:  Product=BCM20702A0
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=btusb
      E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      
      For all Broadcom based devices with this interface, the driver now
      claims it and schedules URBs for it. This allows to capture the
      LM_DIAG messages and allows forwarding them via hci_recv_diag into
      the diagnostic channel of the Bluetooth subsystem.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      9d08f504
    • Marcel Holtmann's avatar
      Bluetooth: bpa10x: Fix missing BT_HCIUART dependency · 91489919
      Marcel Holtmann authored
      Selecting just BT_HCIUART_H4 is not enough and it also needs to select
      BT_HCIUART to avoid this warning:
      
      warning: (BT_HCIBPA10X) selects BT_HCIUART_H4 which has unmet direct
      dependencies (NET && BT && BT_HCIUART)
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      91489919
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 26440c83
      David S. Miller authored
      Conflicts:
      	drivers/net/usb/asix_common.c
      	net/ipv4/inet_connection_sock.c
      	net/switchdev/switchdev.c
      
      In the inet_connection_sock.c case the request socket hashing scheme
      is completely different in net-next.
      
      The other two conflicts were overlapping changes.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26440c83
  2. 19 Oct, 2015 24 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 1099f860
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Account for extra headroom in ath9k driver, from Felix Fietkau.
      
       2) Fix OOPS in pppoe driver due to incorrect socket state transition,
          from Guillaume Nault.
      
       3) Kill memory leak in amd-xgbe debugfx, from Geliang Tang.
      
       4) Power management fixes for iwlwifi, from Johannes Berg.
      
       5) Fix races in reqsk_queue_unlink(), from Eric Dumazet.
      
       6) Fix dst_entry usage in ARP replies, from Jiri Benc.
      
       7) Cure OOPSes with SO_GET_FILTER, from Daniel Borkmann.
      
       8) Missing allocation failure check in amd-xgbe, from Tom Lendacky.
      
       9) Various resource allocation/freeing cures in DSA< from Neil
          Armstrong.
      
      10) A series of bug fixes in the openvswitch conntrack support, from
          Joe Stringer.
      
      11) Fix two cases (BPF and act_mirred) where we have to clean the sender
          cpu stored in the SKB before transmitting.  From WANG Cong and
          Alexei Starovoitov.
      
      12) Disable VLAN filtering in promiscuous mode in mlx5 driver, from
          Achiad Shochat.
      
      13) Older bnx2x chips cannot do 4-tuple UDP hashing, so prevent this
          configuration via ethtool.  From Yuval Mintz.
      
      14) Don't call rt6_uncached_list_flush_dev() from rt6_ifdown() when
          'dev' is NULL, from Eric Biederman.
      
      15) Prevent stalled link synchronization in tipc, from Jon Paul Maloy.
      
      16) kcalloc() gstrings ethtool buffer before having driver fill it in,
          in order to prevent kernel memory leaking.  From Joe Perches.
      
      17) Fix mixxing rt6_info initialization for blackhole routes, from
          Martin KaFai Lau.
      
      18) Kill VLAN regression in via-rhine, from Andrej Ota.
      
      19) Missing pfmemalloc check in sk_add_backlog(), from Eric Dumazet.
      
      20) Fix spurious MSG_TRUNC signalling in netlink dumps, from Ronen Arad.
      
      21) Scrube SKBs when pushing them between namespaces in openvswitch,
          from Joe Stringer.
      
      22) bcmgenet enables link interrupts too early, fix from Florian
          Fainelli.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (92 commits)
        net: bcmgenet: Fix early link interrupt enabling
        tunnels: Don't require remote endpoint or ID during creation.
        openvswitch: Scrub skb between namespaces
        xen-netback: correctly check failed allocation
        net: asix: add support for the Billionton GUSB2AM-1G-B USB adapter
        netlink: Trim skb to alloc size to avoid MSG_TRUNC
        net: add pfmemalloc check in sk_add_backlog()
        via-rhine: fix VLAN receive handling regression.
        ipv6: Initialize rt6_info properly in ip6_blackhole_route()
        ipv6: Move common init code for rt6_info to a new function rt6_info_init()
        Bluetooth: Fix initializing conn_params in scan phase
        Bluetooth: Fix conn_params list update in hci_connect_le_scan_cleanup
        Bluetooth: Fix remove_device behavior for explicit connects
        Bluetooth: Fix LE reconnection logic
        Bluetooth: Fix reference counting for LE-scan based connections
        Bluetooth: Fix double scan updates
        mlxsw: core: Fix race condition in __mlxsw_emad_transmit
        tipc: move fragment importance field to new header position
        ethtool: Use kcalloc instead of kmalloc for ethtool_get_strings
        tipc: eliminate risk of stalled link synchronization
        ...
      1099f860
    • Florian Fainelli's avatar
      net: bcmgenet: Fix early link interrupt enabling · 37850e37
      Florian Fainelli authored
      Link interrupts are enabled in init_umac(), which is too early for us to
      process them since we do not yet have a valid PHY device pointer. On
      BCM7425 chips for instance, we will crash calling phy_mac_interrupt()
      because phydev is NULL.
      
      Fix this by moving the link interrupts enabling in
      bcmgenet_netif_start(), under a specific function:
      bcmgenet_link_intr_enable() and while at it, update the comments
      surrounding the code.
      
      Fixes: 6cc8e6d4 ("net: bcmgenet: Delay PHY initialization to bcmgenet_open()")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37850e37
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-for-davem-2015-10-17' of... · afc050dd
      David S. Miller authored
      Merge tag 'wireless-drivers-for-davem-2015-10-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      iwlwifi:
      
      * mvm: flush fw_dump_wk when mvm fails to start
      * mvm: init card correctly on ctkill exit check
      * pci: add a few more PCI subvendor IDs for the 7265 series
      * fix firmware filename for 3160
      * mvm: clear csa countdown when AP is stopped
      * mvm: fix D3 firmware PN programming
      * dvm: fix D3 firmware PN programming
      * mvm: fix D3 CCMP TX PN assignment
      
      rtlwifi:
      
      * rtl8821ae: Fix system lockups on boot
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      afc050dd
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 371f1c7e
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS updates for net-next
      
      The following patchset contains Netfilter/IPVS updates for your net-next
      tree. Most relevantly, updates for the nfnetlink_log to integrate with
      conntrack, fixes for cttimeout and improvements for nf_queue core, they are:
      
      1) Remove useless ifdef around static inline function in IPVS, from
         Eric W. Biederman.
      
      2) Simplify the conntrack support for nfnetlink_queue: Merge
         nfnetlink_queue_ct.c file into nfnetlink_queue_core.c, then rename it back
         to nfnetlink_queue.c
      
      3) Use y2038 safe timestamp from nfnetlink_queue.
      
      4) Get rid of dead function definition in nf_conntrack, from Flavio
         Leitner.
      
      5) Attach conntrack support for nfnetlink_log.c, from Ken-ichirou MATSUZAWA.
         This adds a new NETFILTER_NETLINK_GLUE_CT Kconfig switch that
         controls enabling both nfqueue and nflog integration with conntrack.
         The userspace application can request this via NFULNL_CFG_F_CONNTRACK
         configuration flag.
      
      6) Remove unused netns variables in IPVS, from Eric W. Biederman and
         Simon Horman.
      
      7) Don't put back the refcount on the cttimeout object from xt_CT on success.
      
      8) Fix crash on cttimeout policy object removal. We have to flush out
         the cttimeout extension area of the conntrack not to refer to an unexisting
         object that was just removed.
      
      9) Make sure rcu_callback completion before removing nfnetlink_cttimeout
         module removal.
      
      10) Fix compilation warning in br_netfilter when no nf_defrag_ipv4 and
          nf_defrag_ipv6 are enabled. Patch from Arnd Bergmann.
      
      11) Autoload ctnetlink dependencies when NFULNL_CFG_F_CONNTRACK is
          requested. Again from Ken-ichirou MATSUZAWA.
      
      12) Don't use pointer to previous hook when reinjecting traffic via
          nf_queue with NF_REPEAT verdict since it may be already gone. This
          also avoids a deadloop if the userspace application keeps returning
          NF_REPEAT.
      
      13) A bunch of cleanups for netfilter IPv4 and IPv6 code from Ian Morris.
      
      14) Consolidate logger instance existence check in nfulnl_recv_config().
      
      15) Fix broken atomicity when applying configuration updates to logger
          instances in nfnetlink_log.
      
      16) Get rid of the .owner attribute in our hook object. We don't need
          this anymore since we're dropping pending packets that have escaped
          from the kernel when unremoving the hook. Patch from Florian Westphal.
      
      17) Remove unnecessary rcu_read_lock() from nf_reinject code, we always
          assume RCU read side lock from .call_rcu in nfnetlink. Also from Florian.
      
      18) Use static inline function instead of macros to define NF_HOOK() and
          NF_HOOK_COND() when no netfilter support in on, from Arnd Bergmann.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      371f1c7e
    • santosh.shilimkar@oracle.com's avatar
      RDS: fix rds-ping deadlock over TCP transport · 7b4b0009
      santosh.shilimkar@oracle.com authored
      Sowmini found hang with rds-ping while testing RDS over TCP. Its
      a corner case and doesn't happen always. The issue is not reproducible
      with IB transport. Its clear from below dump why we see it with RDS TCP.
      
       [<ffffffff8153b7e5>] do_tcp_setsockopt+0xb5/0x740
       [<ffffffff8153bec4>] tcp_setsockopt+0x24/0x30
       [<ffffffff814d57d4>] sock_common_setsockopt+0x14/0x20
       [<ffffffffa096071d>] rds_tcp_xmit_prepare+0x5d/0x70 [rds_tcp]
       [<ffffffffa093b5f7>] rds_send_xmit+0xd7/0x740 [rds]
       [<ffffffffa093bda2>] rds_send_pong+0x142/0x180 [rds]
       [<ffffffffa0939d34>] rds_recv_incoming+0x274/0x330 [rds]
       [<ffffffff810815ae>] ? ttwu_queue+0x11e/0x130
       [<ffffffff814dcacd>] ? skb_copy_bits+0x6d/0x2c0
       [<ffffffffa0960350>] rds_tcp_data_recv+0x2f0/0x3d0 [rds_tcp]
       [<ffffffff8153d836>] tcp_read_sock+0x96/0x1c0
       [<ffffffffa0960060>] ? rds_tcp_recv_init+0x40/0x40 [rds_tcp]
       [<ffffffff814d6a90>] ? sock_def_write_space+0xa0/0xa0
       [<ffffffffa09604d1>] rds_tcp_data_ready+0xa1/0xf0 [rds_tcp]
       [<ffffffff81545249>] tcp_data_queue+0x379/0x5b0
       [<ffffffffa0960cdb>] ? rds_tcp_write_space+0xbb/0x110 [rds_tcp]
       [<ffffffff81547fd2>] tcp_rcv_established+0x2e2/0x6e0
       [<ffffffff81552602>] tcp_v4_do_rcv+0x122/0x220
       [<ffffffff81553627>] tcp_v4_rcv+0x867/0x880
       [<ffffffff8152e0b3>] ip_local_deliver_finish+0xa3/0x220
      
      This happens because rds_send_xmit() chain wants to take
      sock_lock which is already taken by tcp_v4_rcv() on its
      way to rds_tcp_data_ready(). Commit db6526dc ("RDS: use
      rds_send_xmit() state instead of RDS_LL_SEND_FULL") which
      was trying to opportunistically finish the send request
      in same thread context.
      
      But because of above recursive lock hang with RDS TCP,
      the send work from rds_send_pong() needs to deferred to
      worker to avoid lock up. Given RDS ping is more of connectivity
      test than performance critical path, its should be ok even
      for transport like IB.
      Reported-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Acked-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Signed-off-by: default avatarSantosh Shilimkar <ssantosh@kernel.org>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Acked-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b4b0009
    • Jesse Gross's avatar
      tunnels: Don't require remote endpoint or ID during creation. · e277de5f
      Jesse Gross authored
      Before lightweight tunnels existed, it really didn't make sense to
      create a tunnel that was not fully specified, such as without a
      destination IP address - the resulting packets would go nowhere.
      However, with lightweight tunnels, the opposite is true - it doesn't
      make sense to require this information when it will be provided later
      on by the route. This loosens the requirements for this information.
      
      An alternative would be to allow the relaxed version only when
      COLLECT_METADATA is enabled. However, since there are several
      variations on this theme (such as NBMA tunnels in GRE), just dropping
      the restrictions seems the most consistent across tunnels and with
      the existing configuration.
      
      CC: John Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
      Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e277de5f
    • stephen hemminger's avatar
      uapi: add mpls_iptunnel.h · b3958b9e
      stephen hemminger authored
      Add missing rule to export mpls iptunnel header needed by iproute2
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3958b9e
    • Eric Dumazet's avatar
      tcp: do not set queue_mapping on SYNACK · dc6ef6be
      Eric Dumazet authored
      At the time of commit fff32699 ("tcp: reflect SYN queue_mapping into
      SYNACK packets") we had little ways to cope with SYN floods.
      
      We no longer need to reflect incoming skb queue mappings, and instead
      can pick a TX queue based on cpu cooking the SYNACK, with normal XPS
      affinities.
      
      Note that all SYNACK retransmits were picking TX queue 0, this no longer
      is a win given that SYNACK rtx are now distributed on all cpus.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc6ef6be
    • Joe Stringer's avatar
      openvswitch: Scrub skb between namespaces · 740dbc28
      Joe Stringer authored
      If OVS receives a packet from another namespace, then the packet should
      be scrubbed. However, people have already begun to rely on the behaviour
      that skb->mark is preserved across namespaces, so retain this one field.
      
      This is mainly to address information leakage between namespaces when
      using OVS internal ports, but by placing it in ovs_vport_receive() it is
      more generally applicable, meaning it should not be overlooked if other
      port types are allowed to be moved into namespaces in future.
      Signed-off-by: default avatarJoe Stringer <joestringer@nicira.com>
      Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      740dbc28
    • David S. Miller's avatar
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth · a5d6f7dd
      David S. Miller authored
      Johan Hedberg says:
      
      ====================
      pull request: bluetooth 2015-10-16
      
      First of all, sorry for the late set of patches for the 4.3 cycle. We
      just finished an intensive week of testing at the Bluetooth UnPlugFest
      and discovered (and fixed) issues there. Unfortunately a few issues
      affect 4.3-rc5 in a way that they break existing Bluetooth LE mouse and
      keyboard support.
      
      The regressions result from supporting LE privacy in conjunction with
      scanning for Resolvable Private Addresses before connecting. A feature
      that has been tested heavily (including automated unit tests), but sadly
      some regressions slipped in. The UnPlugFest with its multitude of test
      platforms is a good battle testing ground for uncovering every corner
      case.
      
      The patches in this pull request focus only on fixing the regressions in
      4.3-rc5. The patches look a bit larger since we also added comments in
      the critical sections of the fixes to improve clarity.
      
      I would appreciate if we can get these regression fixes to Linus
      quickly. Please let me know if there are any issues pulling. Thanks.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5d6f7dd
    • Arnd Bergmann's avatar
      net: hix5hd2_gmac: avoid integer overload warning · 951b5d95
      Arnd Bergmann authored
      BITS_RX_EN is an 'unsigned long' constant, so the ones complement of that
      has bits set that do not fit into a 32-bit variable on 64-bit architectures,
      which causes a harmless gcc warning:
      
      drivers/net/ethernet/hisilicon/hix5hd2_gmac.c: In function 'hix5hd2_port_disable':
      drivers/net/ethernet/hisilicon/hix5hd2_gmac.c:374:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
        writel_relaxed(~(BITS_RX_EN | BITS_TX_EN), priv->base + PORT_EN);
      
      This adds a cast to (u32) to tell gcc that the code is indeed fine.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      951b5d95
    • Arnd Bergmann's avatar
      net: hisilicon: add OF dependency · 876133d3
      Arnd Bergmann authored
      The HNS MDIO driver fails to build on older ARM machines that are not
      yet converted to CONFIG_OF:
      
      drivers/net/ethernet/hisilicon/hns_mdio.c: In function 'hns_mdio_bus_name':
      drivers/net/ethernet/hisilicon/hns_mdio.c:405:14: error: 'OF_BAD_ADDR' undeclared (first use in this function)
        u64 taddr = OF_BAD_ADDR;
                    ^
      drivers/net/ethernet/hisilicon/hns_mdio.c:405:14: note: each undeclared identifier is reported only once for each function it appears in
      drivers/net/ethernet/hisilicon/hns_mdio.c:409:11: error: implicit declaration of function 'of_translate_address' [-Werror=implicit-function-declaration]
         taddr = of_translate_address(np, addr);
                 ^
      
      This clarifies the dependency to ensure we don't attempt to build these
      drivers without CONFIG_OF, but also adds a COMPILE_TEST alternative to
      give us better build coverage testing.
      
      Build-tested on x86 as well to ensure this actually works.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      876133d3
    • Arnd Bergmann's avatar
      net: hisilicon: include linux/vmalloc.h in dsaf · 119c7ad8
      Arnd Bergmann authored
      Some configurations fail to build the hns dsaf code because of
      a missing header file:
      
      ethernet/hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_init':
      ethernet/hisilicon/hns/hns_dsaf_main.c:1096:2: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration]
        priv->soft_mac_tbl = vzalloc(sizeof(*priv->soft_mac_tbl)
      
      This adds the correct #include.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      119c7ad8
    • David S. Miller's avatar
      Merge branch 'hns-fixes' · a679dbbb
      David S. Miller authored
      yankejian says:
      
      ====================
      net: hns: fixes two bugs in hns driver
      
        This patchset fixes two bugs in hns driver.
        - fixes timeout when received pause frame from the connective ports
        - should be set by using ethtool -s when the devices are link down
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a679dbbb
    • lisheng's avatar
      net: hns: fixes a bug about timeout by pause frame · 90a505b9
      lisheng authored
      this patch fixes the bug triggered timeout sequence. when the connective
      ports cannot accept the packets with higher speed, they will send out the
      pause frame to the Soc's mac. At that time, the driver resets the relevant
      of the Soc, then it causes the packets cannot be sent out immediately.
      this patch fixes the issue.
      Signed-off-by: default avataryankejian <yankejian@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: default avatarlisheng <lisheng011@huawei.com>
      Signed-off-by: default avatarlipeng <lipeng321@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90a505b9
    • Chenny Xu's avatar
      net: hns: fixes the issue by using ethtool -s · 20ddb1d3
      Chenny Xu authored
        before this patch, hns driver only permits user to set the net device
      by using ethtool -s when the device is link up. it is obviously not so
      good. it needs to be set no matter it is link up or down. so this patch
      fixes this issue.
      Signed-off-by: default avataryankejian <yankejian@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: default avatarlisheng <lisheng011@huawei.com>
      Signed-off-by: default avatarlipeng <lipeng321@huawei.com>
      Signed-off-by: default avatarChenny Xu <chenny.xu@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20ddb1d3
    • David S. Miller's avatar
      Merge branch 'hsi-fixes' · 4639a3b5
      David S. Miller authored
      huangdaode says:
      
      ====================
      net: hisilicon fix some bugs in HNS drivers
      
      This patchset fixes the two bugs in HNS driver, one is remove the hnae sysfs interface
      according to the review comments from Arnd Bergmann <arnd@arndb.de>, another
      is fixing the wrong mac_id judgement bug which is found during internal tests.
      
      change log:
      v3:
       remove the hnae sysfs interface.
      
      v2:
        1) remove first bug fix, which is fixed in another patch submitted by
           Arnd Bergmann <arnd@arndb.de>
        2) change the code sytyle according to Joe.
      
      v1:
       initial version.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4639a3b5
    • huangdaode's avatar
      net: hisilicon fix a bug on Hisilicon Network Subsystem · abc2b10e
      huangdaode authored
      This patch fixes the wrong judgement of mac_id when get port num.
      Signed-off-by: default avatarhuangdaode <huangdaode@hisilicon.com>
      Signed-off-by: default avataryankejian <yankejian@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      abc2b10e
    • huangdaode's avatar
      net: hisilicon rm hnae sysfs interface · 31bbd771
      huangdaode authored
      This patch removes the hns driver hnae sysfs interface according to
      Arnd's review comments.
      Signed-off-by: default avatarhuangdaode <huangdaode@hisilicon.com>
      Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31bbd771
    • Insu Yun's avatar
      xen-netback: correctly check failed allocation · 833b8f18
      Insu Yun authored
      Since vzalloc can be failed in memory pressure,
      writes -ENOMEM to xenstore to indicate error.
      Signed-off-by: default avatarInsu Yun <wuninsu@gmail.com>
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      833b8f18
    • Chia-Sheng Chang's avatar
      net: asix: add support for the Billionton GUSB2AM-1G-B USB adapter · 80083a3c
      Chia-Sheng Chang authored
      Just another AX88178-based 10/100/1000 USB-to-Ethernet dongle. This one
      shows up in lsusb as: "ID 08dd:0114 Billionton Systems, Inc".
      Signed-off-by: default avatarChia-Sheng Chang <changchias@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Luca Ceresoli <luca@lucaceresoli.net>
      Cc: Christoph Jaeger <cj@linux.com>
      Cc: "Woojung.Huh@microchip.com" <Woojung.Huh@microchip.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Markus Elfring <elfring@users.sourceforge.net>
      Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-usb@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80083a3c
    • Arun Parameswaran's avatar
      net: phy: bcm-phy-lib: Fix module license issue · b89eb1fc
      Arun Parameswaran authored
      The 'bcm-phy-lib.c', added as a part of the commit
      "net: phy: Add Broadcom phy library for common interfaces"
      was missing the module license. This was causing an issue
      when the library is built as a module; "module license
      'unspecified' taints kernel".
      
      This patch fixes the issue by adding the module license,
      author and description to the bcm-phy-lib.c file.
      
      Fixes: a1cba561 ("net: phy: Add Broadcom phy library for
      common interfaces")
      Signed-off-by: default avatarArun Parameswaran <arunp@broadcom.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b89eb1fc
    • Arad, Ronen's avatar
      netlink: Trim skb to alloc size to avoid MSG_TRUNC · db65a3aa
      Arad, Ronen authored
      netlink_dump() allocates skb based on the calculated min_dump_alloc or
      a per socket max_recvmsg_len.
      min_alloc_size is maximum space required for any single netdev
      attributes as calculated by rtnl_calcit().
      max_recvmsg_len tracks the user provided buffer to netlink_recvmsg.
      It is capped at 16KiB.
      The intention is to avoid small allocations and to minimize the number
      of calls required to obtain dump information for all net devices.
      
      netlink_dump packs as many small messages as could fit within an skb
      that was sized for the largest single netdev information. The actual
      space available within an skb is larger than what is requested. It could
      be much larger and up to near 2x with align to next power of 2 approach.
      
      Allowing netlink_dump to use all the space available within the
      allocated skb increases the buffer size a user has to provide to avoid
      truncaion (i.e. MSG_TRUNG flag set).
      
      It was observed that with many VLANs configured on at least one netdev,
      a larger buffer of near 64KiB was necessary to avoid "Message truncated"
      error in "ip link" or "bridge [-c[ompressvlans]] vlan show" when
      min_alloc_size was only little over 32KiB.
      
      This patch trims skb to allocated size in order to allow the user to
      avoid truncation with more reasonable buffer size.
      Signed-off-by: default avatarRonen Arad <ronen.arad@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      db65a3aa
    • Li RongQing's avatar
      ipconfig: send Client-identifier in DHCP requests · 26fb342c
      Li RongQing authored
      A dhcp server may provide parameters to a client from a pool of IP
      addresses and using a shared rootfs, or provide a specific set of
      parameters for a specific client, usually using the MAC address to
      identify each client individually. The dhcp protocol also specifies
      a client-id field which can be used to determine the correct
      parameters to supply when no MAC address is available. There is
      currently no way to tell the kernel to supply a specific client-id,
      only the userspace dhcp clients support this feature, but this can
      not be used when the network is needed before userspace is available
      such as when the root filesystem is on NFS.
      
      This patch is to be able to do something like "ip=dhcp,client_id_type,
      client_id_value", as a kernel parameter to enable the kernel to
      identify itself to the server.
      Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26fb342c