1. 09 7月, 2014 17 次提交
  2. 08 7月, 2014 23 次提交
    • D
      Merge branch 'amd-xgbe-next' · 52d14c66
      David S. Miller 提交于
      Tom Lendacky says:
      
      ====================
      amd-xgbe: AMD 10Gb Ethernet driver updates
      
      The following series fixes some bugs and provides new/changed support
      in the driver.
      
      - Fix a debugfs backward compatibility issue introduced by a previous patch
      - Write to the interrupt enablement register, not the status register when
        setting MTL interrupts
      - Call netif_napi_del whenever the ndo_stop operation is called (to match
        the call to netif_napi_add on ndo_open)
      - Peformance enhancements:
        - Adjusted default coalescing settings
        - AXI DMA changes (burst length size and cache settings)
        - ioread/iowrite reduction during interrupt
        - Napi poll updates
      - AXI DMA settings based on device tree property to account for a change in
        the ARM64 default cache operations assignment
      
      This patch series is based on net-next.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52d14c66
    • L
      amd-xgbe: Base AXI DMA cache settings on device tree · cfa50c78
      Lendacky, Thomas 提交于
      The default cache operations for ARM64 were changed during 3.15.
      To use coherent operations a "dma-coherent" device tree property
      is required.  If that property is not present in the device tree
      node then the non-coherent operations are assigned for the device.
      
      Add support to the amd-xgbe driver to assign the AXI DMA cache settings
      based on whether the "dma-coherent" property is present in the device
      node.  If present, use settings that work with the caches.  If not
      present, use settings that do not look at the caches.
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cfa50c78
    • L
      amd-xgbe: Performance enhancements · 9867e8fb
      Lendacky, Thomas 提交于
      This patch provides some general performance enhancements for the
      driver:
        - Modify the default coalescing settings (reduce usec, increase frames)
        - Change the AXI burst length to 256 bytes (default was 16 bytes which
          was smaller than a cache line)
        - Change the AXI cache settings to write-back/write-allocate which
          allocate cache entries for received packets during the DMA since the
          packet will be processed soon afterwards
        - Combine ioread/iowrite when disabling both the Tx and Rx interrupts
        - Change to processing the Tx/Rx channels in pairs
        - Only recycle the Rx descriptors when a threshold of dirty descriptors
          is reached
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9867e8fb
    • L
      amd-xgbe: Call netif_napi_del on ndo_stop operation · ff42606e
      Lendacky, Thomas 提交于
      Currently the napi context is added using netif_napi_add each time
      the ndo_open operation is called.  However, there is not a
      corresponding netif_napi_del call during the ndo_stop operation. If
      the device ndo_open operation was called more than once an infinite
      loop occurs during module unload.  Add a call to netif_napi_del during
      the ndo_stop operation.
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff42606e
    • L
      amd-xgbe: Clear the proper MTL interrupt register · 91f87345
      Lendacky, Thomas 提交于
      When initializing the MTL interrupts the interrupt status
      register is written to instead of the interrupt enable register.
      Since no MTL interrupts are being enabled and the default state
      is for MTL interrupts to be disabled this did not cause a problem,
      but needs to be fixed to target the correct register.
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91f87345
    • L
      amd-xgbe: Fix debugfs compatibility change with kstrtouint · f3f128d4
      Lendacky, Thomas 提交于
      The initial change from sscanf to kstrtouint broke backward
      compatbility by using a base of "0" in the kstrtouint call.
      This allowed for entering decimal, hexadecimal or octal as
      input where previously the sscanf always interpreted the input
      as hexadecimal.  Additionally, -EIO was returned on error prior
      to this change and now it is whatever the error value that is
      returned by kstrtouint.
      
      Change the base value of the kstrtouint from 0 to 16 and return
      -EIO on error.
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Reported-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3f128d4
    • R
      net: arcnet: Remove "#define bool int" · db55b62c
      Rasmus Villemoes 提交于
      The header file include/linux/arcdevice.h #defines bool to int, if
      bool is not already #defined. However, the files which use that header
      file seem to rely on that #define (unconditionally) being in effect:
      the prototypes for the functions arcrimi_reset, com20020_reset,
      com90io_reset, com90xx_reset (whose addresses are assigned to the
      hw.reset member of struct arcnet_local) use int explicitly.
      
      Moreover, that #define is an accident waiting to happen (scenario:
      inclusion of arcdevice.h followed by inclusion of some header which
      declares function prototypes using bool). Also, #include
      <linux/types.h> must appear before #include <linux/arcdevice.h> (the
      compiler wouldn't like "typedef _Bool int").
      
      Since none of the files using arcdevice.h declare variables of type
      "bool", the patch is actually quite simple, unlike the commit message.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db55b62c
    • G
      enic: fix return values in enic_set_coalesce · a16a3361
      Govindarajulu Varadarajan 提交于
      enic_set_coalesce() has two problems.
      
      * It should return -EINVAL and not -EOPNOTSUPP for invalid coalesce values.
      
      * In case of MSIX, enic_set_coalesce return error after applying requested
        coalescing setting partially. We should either apply all the setting requeste
        and return success or apply non and return error.
      
      * This patch also simplifies the algo.
      
      This was introduced by
      '7c2ce6e6 enic: Add support for adaptive interrupt coalescing'
      
      These changes were suggested by Ben Hutchings here
      http://www.spinics.net/lists/netdev/msg283972.html
      
      Also change enic driver version.
      Signed-off-by: NGovindarajulu Varadarajan <_govind@gmx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a16a3361
    • J
      bonding: remove no longer relevant vlan warnings · e721f87d
      Jiri Pirko 提交于
      These warnings are no longer relevant. Even when last slave is
      removed, there is a valid address assigned to bond (random).
      The correct functionality of vlans is ensured by maintaining unicast
      list in vlan_sync_address().
      Suggested-by: NJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Acked-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e721f87d
    • D
      Merge branch 'at86rf230-next' · 7cb9e6bf
      David S. Miller 提交于
      Alexander Aring says:
      
      ====================
      at86rf230: rework driver implementation
      
      this patch series includes a rework of the at86rf230 driver.
      
      There are several changes:
      
       - Add regmap support.
       - Merge at86rf212 operations with generic at86rf2xx operations, all chips
         supports these operations.
       - Drop of irqworker. This is a workqueue which will scheduled by an irq to
         handle synchronous spi handling. Instead using asynchronous spi handling,
         then no scheduler is involved at irq handling.
       - Also detected some bugs by receiving frame like CRC can be correct and a
         802.15.4 frame length could be above 127 bytes. This would crash the whole
         kernel (but should be handled by the mac layer). Another bug is the handling
         with RX_SAFE_MODE which protect the frame buffer after a readout. This is
         currently not working because we read out the buffer twice and the first one
         to get the frame size. Solution is to readout always the whole frame buffer.
       - Added some timing relevants things from the datasheet for state changes And
         IEEE 802.15.4 standard like interframe spacing. Interframe spacing is needed
         to insert some receiving space time between frame transmitting. This should be
         also handled by MAC layer, but it's currently a workaround to add this inside
         the driver layer.
       - Add some callback setting for chip specific handling, instead of runtime decisions
         if (is_chip_type()). Callbacks are set only once at probe time.
       - We don't using a force state change anymore. A force state change will do a
         abort of receiving frames while we want to transmit a new frame. This should
         decrease the drop rate of packets.
       - And many others changes and bug fixes...
      
      changes since v3:
       - fix irq polarity in patch ("at86rf230: rework irq_pol setting").
      
      changes since v2:
       - add check if necessary functions are implemented when hw flags are set in patch
         ("mac802154: at86rf230: add hw flags and merge ops"). I choosed the second variant.
       - remove unnecessary includes for workqueue and mutex in patch
         ("at86rf230: rework transmit and receive").
       - remove unnecessary cast in patch ("at86rf230: rework transmit and receive").
       - acivate regmap cache with REGCACHE_RBTREE in patch
         ("at86rf230: add regmap support").
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cb9e6bf
    • A
      at86rf230: add new author · 01ebd60b
      Alexander Aring 提交于
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01ebd60b
    • A
      at86rf230: add sleep cycle timing · 7a4ef918
      Alexander Aring 提交于
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a4ef918
    • A
      984e0c68
    • A
      09e536cd
    • A
      at86rf230: rework state change and start/stop · 2e0571c0
      Alexander Aring 提交于
      This patch removes the current synchron state change function and add a
      new function for a state assert. Change the start and stop callbacks to
      use this new synchron state change behaviour. It's a wrapper around the
      async state change function.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e0571c0
    • A
      at86rf230: rework irq_pol setting · 1db0558e
      Alexander Aring 提交于
      This patch rework the irq_pol register setting for rising and falling
      interrupt settings only. The default behaviour should be rising flag.
      
      Also use IRQ_TYPE_* defines instead of IRQF_* defines. There is no
      functionality change but irq_get_trigger_type returns IRQ_TYPE_* defines.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1db0558e
    • A
      at86rf230: move RX_SAFE_MODE setting to hw_init · 6bd2b132
      Alexander Aring 提交于
      There is no need to set this bit in start callback which could be
      called more than once.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6bd2b132
    • A
      at86rf230: rework transmit and receive handling · 1d15d6b5
      Alexander Aring 提交于
      This patch is a complete reimplementation of transmit and receive
      handling for the at86rf230 driver.
      
      It solves also six bugs:
      
      First:
      
      The RX_SAFE_MODE is enabled and the transceiver doesn't leave the
      receive state while the framebuffer isn't read by a CMD_FB command.
      This is useful to read out the frame and don't get into another receive
      or transmit state, otherwise the frame would be overwritten.
      The current driver do twice CMD_FB calls, the first one leaves this
      protection.
      
      Second:
      
      Sometimes the CRC calculation is correct and the length field is greater
      127. The current mac802154 layer and filter of a at86rf2xx doesn't check
      on this and the kernel crashes. In this case the frame is corrupted, we
      send the whole receive buffer to the next layer which can be useful for
      sniffing.
      
      Thrid:
      There is a undocumented race condition. When we are go into the
      RX_AACK_ON state the transceiver could be changed into RX_AACK_BUSY
      state. This is a normal behaviour. In this case the transceiver received
      a SHR while assert wasn't finished.
      
      Fourth:
      It also handle some more "correct" state changes. In aret mode the
      transceiver need to go to TX_ON before the transceiver go into
      RX_AACK_ON.
      
      Fifth:
      The programming model [0] describes also a error handling in ARET mode
      if the trac status is different than zero. This is patch adds support
      for handling this.
      
      Sixth:
      In receive handling the transceiver should also get the trac status
      according [0]. The driver could use the trac status as error statistic
      handling, but the driver doesn't use this currently. There is maybe some
      timing behaviour or the read of this register change some transceiver
      states.
      
      In addition the irqworker is removed. Instead we do async spi calls and
      no scheduling is involved anymore. The transmit function is also
      asynchron but with a wait_for_completion handling. The mac802154 layer
      doesn't support asynchron transmit handling right now.
      
      The state change behaviour is now changes, before it was:
      
      1. assert while(!STATE_TRANSITION_IN_PROGRESS)
      2. state change
      3. assert while(!STATE_TRANSITION_IN_PROGRESS)
      4. assert once(wanted state != current state)
      
      Sometimes a unexcepted state change occurs when 4. assert was violated.
      The new state change behaviour is:
      
      1. assert while(!STATE_TRANSITION_IN_PROGRESS)
      2. state change
      3. wait state change timing according datasheet
      4. assert once(wanted state != current state)
      
      This behaviour is described in the at86rf231 software programming model [0].
      The state change documentation in this programming guide should also valid for
      at86rf212 and at86rf233 chips.
      
      The transceiver don't do a FORCE_TX_ON while we want to transmit a PDU.
      The new behaviour is a TX_ON and wait a receiving time (tFrame + tPAck).
      If we are still in RX_AACK_BUSY then we transmit a FORCE_TX_ON as timeout
      handling. The different is that FORCE_TX_ON aborts receiving and TX_ON
      waits if RX_AACK_BUSY is finished. This should decrease the drop rate of
      packets.
      
      [0] http://www.atmel.com/Images/AVR2022_swpm231-2.0.zipSigned-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d15d6b5
    • A
      at86rf230: add support for at86rf23x desense · a7d7eda9
      Alexander Aring 提交于
      To set the CCA_ED_THRES register the calculation for at86rf23x is
      different than for at86rf212. This patch adds a new callback for this
      calculation in chip data struct.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7d7eda9
    • A
      at86rf230: remove is212 and add driver data · a53d1f7c
      Alexander Aring 提交于
      This patch adds a new at86rf2xx_chip_data structure which holds device
      specific attributes. Instead of runtime decisions "if (is212())" we set
      callbacks/attributes while device detection.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a53d1f7c
    • A
      at86rf230: rework detect device handling · c8ee0f56
      Alexander Aring 提交于
      This patch drops the current lowlevel spi calls for the detect device
      function instead we handle this via regmap. Also put the detection of
      in a seperate function and set all device specific attributes while detection.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8ee0f56
    • A
      at86rf230: add regmap support · f76014f7
      Alexander Aring 提交于
      This patch adds regmap support for the at86rf230 driver and drop the
      lowlevel spi access functions and use the regmap access functions.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f76014f7
    • A
      mac802154: at86rf230: add hw flags and merge ops · 640985ec
      Alexander Aring 提交于
      This patch adds new mac802154 hw flags for transmit power, csma and
      listen before transmit (lbt). These flags indicates that the transceiver
      supports these features. If the flags are set and the driver doesn't
      implement the necessary functions, then ieee802154_register_device
      returns -ENOSYS "Function not implemented".
      
      This patch merges also all at86rf230 operations into one operations structure
      and set the right hw flags for the at86rf230 transceivers.
      Signed-off-by: NAlexander Aring <alex.aring@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      640985ec