1. 08 Feb, 2013 22 commits
    • Rafał Miłecki's avatar
      bgmac: validate (and random if needed) MAC addr · d166f218
      Rafał Miłecki authored
      This adds check for a valid Ethernet MAC address and in case it is not,
      it will generate a valid random one, such that the adapter is still
      usable.
      Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d166f218
    • Alexander Duyck's avatar
      skbuff: Move definition of NETDEV_FRAG_PAGE_MAX_SIZE · e5e67305
      Alexander Duyck authored
      In order to address the fact that some devices cannot support the full 32K
      frag size we need to have the value accessible somewhere so that we can use it
      to do comparisons against what the device can support.  As such I am moving
      the values out of skbuff.c and into skbuff.h.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5e67305
    • David S. Miller's avatar
      Merge branch 'wireless' · bfb235d7
      David S. Miller authored
      John W. Linville says:
      
      ====================
      Please accept this pull request intended for the 3.9 stream!
      
      Included are a mac80211 pull, an iwlwifi pull (actually two -- one
      was a fast-forward), a wl12xx pull, and a couple of Bluetooth pulls.
      
      On mac80211, Johannes says:
      
      "I've included
       * AKM definitions from Bing,
       * mesh fixes from Thomas, including a fix from him for me breaking his
         patch while applying,
       * channel check fix from Simon,
       * an old patch from Yoni Divinsky who doesn't even work for TI any
         more, to configure the WEP TX key for ARP offload etc.
       * MAC ACL API from Vasanth
       * a fix for the infamous chanctx_conf warning from Arnd
       * from myself, a fix for my previous aggregation changes, some cleanup
         and some improvements and fixes for WoWLAN"
      
      On iwlwifi, Johannes says:
      
      "Two small changes for iwlwifi-next, one to update all our Copyright
      notices and one to provide the RX page order."
      
      And also:
      
      "So what I have here is some cleanups, preparations and the new MVM
      (multi-virtual MAC) driver itself and (this is new) some work on the
      transport API as well as a message flooding fix."
      
      On wl12xx, Luca says:
      
      "Lots of bugfixes and improvements in our TI wireless drivers,
      including support for multi-channel.  Intended for 3.9."
      
      On Bluetooth, Gustavo says:
      
      "This is my first pull request to 3.9. The biggest changes here are from Johan
      Hedberg who made a lot of fixes in the Management interface. The issues arose
      due to a new test tool we wrote and the usage of the Management interface as
      default in BlueZ 5. The rest of the patches are more clean ups and small
      fixes."
      
      And also:
      
      "Here goes another batch intended for 3.9, the majority of the patch here are
      from Johan who is fixing many issues in the management interface that have
      appeared lately. The rest of the patches are just small improvements, fixes
      and clean ups."
      
      Along with those are the usual variety of updates/enhancements to
      the mwl8k, mwifiex, ath9k, rtlwifi, and rt2x00 drivers as well as
      a few updates for the ssb and bcma busses.  I don't think there are
      any big headliners there.
      
      Please let me know if there are problems!
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bfb235d7
    • John W. Linville's avatar
      Merge branch 'master' of... · f5237f27
      John W. Linville authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
      f5237f27
    • David S. Miller's avatar
      Merge branch 'tg3' · b285109d
      David S. Miller authored
      Attention linux-next maintainer, you will hit a merge conflict between
      this merge and the mips tree, the resolution is to preserve the removal
      of uses of nvram_geenv() and nvram_parse_macaddr() from the net-next
      side.
      
      Hauke Mehrtens says:
      
      ====================
      These patches are adding support for the Ethernet core found in the
      BCM4705/BCM4785 SoC.
      
      This is based on current master of davem/net-next.git.
      
      v4:
       * move setting of DMA_RWCTRL_ONE_DMA
      
      v3:
       * combined first two patches into one patch
      
      v2:
       * use of struct sprom in ssb_gige_get_macaddr() instead of accessing
         the nvram directly
       * add return value to ssb_gige_get_macaddr()
       * try to read the mac address from ssb core before accessing the own
         registers.
       * fix two checkpatch warnings
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b285109d
    • Hauke Mehrtens's avatar
      tg3: add support for Ethernet core in bcm4785 · 7e6c63f0
      Hauke Mehrtens authored
      The BCM4785 or sometimes named BMC4705 is a Broadcom SoC which a
      Gigabit 5750 Ethernet core. The core is connected via PCI with the rest
      of the SoC, but it uses some extension.
      
      This core does not use a firmware or an eeprom.
      
      Some devices only have a switch which supports 100MBit/s, this
      currently does not work with this driver.
      
      This patch was original written by Michael Buesch <m@bues.ch> and is in
      OpenWrt for some years now.
      
      This was tested on a Linksys WRT610N V1 and older versions of this patch
      were tested by other people on different devices.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e6c63f0
    • Hauke Mehrtens's avatar
      tg3: make it possible to provide phy_id in ioctl · 5c358045
      Hauke Mehrtens authored
      In OpenWrt we currently use a switch driver which uses the ioctls to
      configure the switch in the phy. We have to provide the phy_id to do
      so, but without this patch this is not possible.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c358045
    • Hauke Mehrtens's avatar
      ssb: get mac address from sprom struct for gige driver · 180996c3
      Hauke Mehrtens authored
      The mac address is already stored in the sprom structure by the
      platform code of the SoC this Ethernet core is found on, it just has to
      be fetched from this structure instead of accessing the nvram here.
      This patch also adds a return value to indicate if a mac address could
      be fetched from the sprom structure.
      When CONFIG_SSB_DRIVER_GIGE is not set the header file now also declares
      ssb_gige_get_macaddr().
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Acked-by: default avatarMichael Buesch <m@bues.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      180996c3
    • Daniel Borkmann's avatar
      net: sctp: sctp_auth_make_key_vector: remove duplicate ntohs calls · 241448c2
      Daniel Borkmann authored
      Instead of calling 3 times ntohs(random->param_hdr.length), 2 times
      ntohs(hmacs->param_hdr.length), and 3 times ntohs(chunks->param_hdr.length)
      within the same function, we only call each once and store it in a
      variable.
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      241448c2
    • Frank Li's avatar
      net: fec: fix spin_lock dead lock · 85bd1798
      Frank Li authored
      =========================================================
      [ INFO: possible irq lock inversion dependency detected ]
      3.8.0-rc5+ #82 Not tainted
      ---------------------------------------------------------
      swapper/0/0 just changed the state of lock:
       (&(&fep->hw_lock)->rlock){..-...}, at: [<8034e2f8>] fec_enet_start_xmit+0x48/0x                      2cc
      but this lock took another, SOFTIRQ-unsafe lock in the past:
      (prepare_lock){+.+.+.}
      
      and interrupts could create inverse lock ordering between them.
      other info that might help us debug this:
      Possible interrupt unsafe locking scenario:
      
      CPU0				CPU1
      ----				----
      lock(prepare_lock);
      				local_irq_disable()
      				lock(&(&fep->hw_lock)->rlock);
      				lock(prepare_lock);
      <Interrupt>
      lock(&(&fep->hw_lock)->rlock);
      
      *** DEADLOCK ***
      Signed-off-by: default avatarFrank Li <Frank.Li@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      85bd1798
    • Frank Li's avatar
      net: fec: correct fix method about miss init spinlock · 365cc174
      Frank Li authored
      Old method will cause init spinlock twice.
      New method will avoid init spinlock twice and fix miss init spinlock
      at fec_restart.
      
      BUG: spinlock bad magic on CPU#1, swapper/0/1
      lock: 0xbfae0f8c, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
      Backtrace:
       [<80011d54>] (dump_backtrace+0x0/0x10c) from [<804e7800>] (dump_stack+0x18/0x1c)
       r6:bfae0000 r5:bfae0f8c r4:00000000 r3:806c1310
       [<804e77e8>] (dump_stack+0x0/0x1c) from [<804e9f20>] (spin_dump+0x80/0x94)
       [<804e9ea0>] (spin_dump+0x0/0x94) from [<804e9f60>] (spin_bug+0x2c/0x30)
       r5:805f6f8c r4:bfae0f8c
       [<804e9f34>] (spin_bug+0x0/0x30) from [<80257984>] (do_raw_spin_lock+0x170/0x1b0                                         )
       r5:806b4950 r4:bfae0f8c
       [<80257814>] (do_raw_spin_lock+0x0/0x1b0) from [<804ed15c>] (_raw_spin_lock_irqs                                         ave+0x18/0x20)
       [<804ed144>] (_raw_spin_lock_irqsave+0x0/0x20) from [<8033c694>] (fec_ptp_start_                                         cyclecounter+0x3c/0x120)
       r4:bfae0f8c r3:00000002
       [<8033c658>] (fec_ptp_start_cyclecounter+0x0/0x120) from [<80339e08>] (fec_resta                                         rt+0x56c/0x5f8)
       r8:00000000 r7:806e6f48 r6:00000112 r5:806b4950 r4:bfae0000
       [<8033989c>] (fec_restart+0x0/0x5f8) from [<8033b9e4>] (fec_probe+0x508/0xa48)
      Signed-off-by: default avatarFrank Li <Frank.Li@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      365cc174
    • Tom Herbert's avatar
      mlx4_en: Fix BQL reset TX queue call point · 41b74920
      Tom Herbert authored
      Fix issue in Mellanox driver related to BQL.  netdev_tx_reset_queue
      was not being called in certain situations where the device was
      being start and stopped.  Moved netdev_tx_reset_queue from the reset
      device path to mlx4_en_free_tx_buf which is where the rings are
      cleaned in a reset (specifically from device being stopped).
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Acked-By: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41b74920
    • David S. Miller's avatar
      Merge branch 'mlx4' · 2de27f30
      David S. Miller authored
      Amir Vadai says:
      
      ====================
      This series from Yan Burman adds support for unicast MAC address filtering and
      ndo FDB operations.  It also includes some optimizations to loopback related
      decisions and checks in the TX/RX fast path and one cleanup, all in separate
      patches.
      
      Today, when adding macvlan devices, the NIC goes into promiscuous mode, since
      unicast MAC filtering is not supported. With these changes, macvlan devices can
      be added without the penalty of promiscuous mode.
      
      If for some reason adding a unicast address filter fails e.g as of missing space in
      the HW mac table, the device forces itself into promiscuous mode (and out of this
      forced state when enough space is available).
      
      Also, now it is possible to have bridge under multi-function configuration that include
      PF and VFs.  In order to use bridge over PF/VFs, VM MAC fdb entries must be added e.g.
      using 'bridge fdb add' command.
      
      Changes from v1 - based on more comments from Eric Dumazet:
      * added failure handling when adding unicast address filter
      
      Changes from v0 - based on comments from Eric Dumazet:
      * Removed unneeded synchronize_rcu()
      * Use kfree_rcu() instead of synchronize_rcu() + kfree()
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2de27f30
    • Yan Burman's avatar
      net/mlx4_en: Implement ndo fdb functionality · 0ccddcd1
      Yan Burman authored
      Add support for setting embedded switch fdb in case of SRIOV, by
      implementing ndo_fdb_{add, del, dump}. This will allow to use
      bridged configuration with multi-function. In order to add VM MAC
      to the eSwitch fdb, the following command may be used over the relevant function interface:
      bridge fdb add <MAC> permanent self dev <IFACE>
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ccddcd1
    • Yan Burman's avatar
      net/mlx4_en: Add unicast MAC filtering · cc5387f7
      Yan Burman authored
      Implement and advertise unicast MAC filtering, such that setting macvlan
      instance over mlx4_en interfaces will not require the networking core
      to put mlx4_en devices in promiscuous mode.
      
      If for some reason adding a unicast address filter fails e.g as of missing space in
      the HW mac table, the device forces itself into promiscuous mode (and out of this
      forced state when enough space is available).
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc5387f7
    • Yan Burman's avatar
      net/mlx4_en: Manage hash of MAC addresses per port · c07cb4b0
      Yan Burman authored
      As a preparation step for supporting multiple unicast addresses, store MAC addresses in hash table.
      Remove the radix tree for MAC addresses per QP, as it's not in use.
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c07cb4b0
    • Yan Burman's avatar
      net/mlx4_en: Save previous MAC address of the port so we can replace it later · 90bbb74a
      Yan Burman authored
      In preparation to having more than one unicast MAC per port, we need to keep track
      of the previous MAC address in the flow of ndo_set_mac_address,
      so that mlx4_en_replace_mac will know what to replace.
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90bbb74a
    • Yan Burman's avatar
      net/mlx4_en: Re-arrange ndo_set_rx_mode related code · 0eb74fdd
      Yan Burman authored
      Currently, mlx4_en_do_set_multicast serves as the ndo_set_rx_mode entry for mlx4_en,
      doing all related work. Split it to few calls, one per required functionality
      (e.g multicast, promiscuous, etc) and rename some structures and calls
      to use rx_mode notation instead of multicast.
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0eb74fdd
    • Yan Burman's avatar
      net/mlx4: Move Ethernet related functionality from mlx4_core to mlx4_en · 16a10ffd
      Yan Burman authored
      Move low level code that deals with management of Ethernet MACs and QPs from mlx4_core to mlx4_en.
      Also convert the new functions to deal with MACs in form of char array instead of u64.
      
      Actual functions moved:
      mlx4_replace_mac
      mlx4_get_eth_qp
      mlx4_put_eth_qp
      
      To conduct this change, some functionality had to be exported from the core,
      the following functions were added:
      mlx4_get_base_qp
      __mlx4_replace_mac (low level function for CX1/A0 compatibility)
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16a10ffd
    • Yan Burman's avatar
      net/mlx4_en: Cleanup multiline strings · 48e551ff
      Yan Burman authored
      Make the code consistent in regard to error messages
      not spanning multiple lines.
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48e551ff
    • Yan Burman's avatar
      net/mlx4_en: Optimize Rx fast path filter checks · 6bbb6d99
      Yan Burman authored
      Currently, RX path code that does RX filtering is not optimized
      and does an expensive conversion. In order to use ether_addr_equal_64bits
      which is optimized for such cases, we need the MAC address kept by the device
      to be in the form of unsigned char array instead of u64. Store the MAC address
      as unsigned char array and convert to/from u64 out of the fast path when needed.
      Side effect of this is that we no longer need priv->mac, since it's the same
      as dev->dev_addr.
      
      This optimization was suggested by Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6bbb6d99
    • Yan Burman's avatar
      net/mlx4_en: Optimize loopback related checks in data path · 79aeaccd
      Yan Burman authored
      Currently there are relatively complex conditional checks in the fast path,
      for TX loopback enabling and resulting RX filter logic.
      Move elaborate if's out of data path, replace them with a single flag
      for each state and update that state from appropriate places.
      Also, in native (non SRIOV) mode and not in loopback or in selftest,
      there is no need to try and filter out packets that HW loopback-ed,
      as in native mode we do not loopback packets anymore.
      Signed-off-by: default avatarYan Burman <yanb@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79aeaccd
  2. 06 Feb, 2013 18 commits