1. 30 Aug, 2016 11 commits
  2. 29 Aug, 2016 29 commits
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · b8927721
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Fix bugs that could cause kernel deadlocks or file system corruption
        while moving xattrs to expand the extended inode.
      
        Also add some sanity checks to the block group descriptors to make
        sure we don't end up overwriting the superblock"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: avoid deadlock when expanding inode size
        ext4: properly align shifted xattrs when expanding inodes
        ext4: fix xattr shifting when expanding inodes part 2
        ext4: fix xattr shifting when expanding inodes
        ext4: validate that metadata blocks do not overlap superblock
        ext4: reserve xattr index for the Hurd
      b8927721
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 1f6a563e
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Segregate namespaces properly in conntrack dumps, from Liping Zhang.
      
       2) tcp listener refcount fix in netfilter tproxy, from Eric Dumazet.
      
       3) Fix timeouts in qed driver due to xmit_more, from Yuval Mintz.
      
       4) Fix use-after-free in tcp_xmit_retransmit_queue().
      
       5) Userspace header fixups (use of __u32, missing includes, etc.) from
          Mikko Rapeli.
      
       6) Further refinements to fragmentation wrt gso and tunnels, from
          Shmulik Ladkani.
      
       7) Trigger poll correctly for zero length UDP packets, from Eric
          Dumazet.
      
       8) TCP window scaling fix, also from Eric Dumazet.
      
       9) SLAB_DESTROY_BY_RCU is not relevant any more for UDP sockets.
      
      10) Module refcount leak in qdisc_create_dflt(), from Eric Dumazet.
      
      11) Fix deadlock in cp_rx_poll() of 8139cp driver, from Gao Feng.
      
      12) Memory leak in rhashtable's alloc_bucket_locks(), from Eric Dumazet.
      
      13) Add new device ID to alx driver, from Owen Lin.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (83 commits)
        Add Killer E2500 device ID in alx driver.
        net: smc91x: fix SMC accesses
        Documentation: networking: dsa: Remove platform device TODO
        net/mlx5: Increase number of ethtool steering priorities
        net/mlx5: Add error prints when validate ETS failed
        net/mlx5e: Fix memory leak if refreshing TIRs fails
        net/mlx5e: Add ethtool counter for TX xmit_more
        net/mlx5e: Fix ethtool -g/G rx ring parameter report with striding RQ
        net/mlx5e: Don't wait for SQ completions on close
        net/mlx5e: Don't post fragmented MPWQE when RQ is disabled
        net/mlx5e: Don't wait for RQ completions on close
        net/mlx5e: Limit UMR length to the device's limitation
        rhashtable: fix a memory leak in alloc_bucket_locks()
        sfc: fix potential stack corruption from running past stat bitmask
        team: loadbalance: push lacpdus to exact delivery
        net: hns: dereference ppe_cb->ppe_common_cb if it is non-null
        8139cp: Fix one possible deadloop in cp_rx_poll
        i40e: Change some init flow for the client
        Revert "phy: IRQ cannot be shared"
        net: dsa: bcm_sf2: Fix race condition while unmasking interrupts
        ...
      1f6a563e
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.8-4' of... · cf4d3779
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v4.8-4' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull x86 platform driver fixes from Darren Hart:
       "Remove module related code from two drivers that are only configurable
        as built-in: intel_pmic_gpio and platform/olpc"
      
      * tag 'platform-drivers-x86-v4.8-4' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        intel_pmic_gpio: Make explicitly non-modular
        platform/olpc: Make ec explicitly non-modular
      cf4d3779
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 2a90309e
      Linus Torvalds authored
      Pull powerpc fixes from Ben Herrenschmidt:
       "This was meant to be sent early last week, but I has a change pending
        on one of the fixes and other things made me forget all about.  Ugh.
      
        We have some misc fixes for powerpc 4.8.  Some trivial bits and some
        regressions, and a trivial cleanup or two that I saw no point in
        letting rot in patchwork"
      
      * tag 'powerpc-4.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: signals: Discard transaction state from signal frames
        powerpc/powernv : Drop reference added by kset_find_obj()
        powerpc/tm: do not use r13 for tabort_syscall
        powerpc: move hmi.c to arch/powerpc/kvm/
        powerpc: sysdev: cpm: fix gpio save_regs functions
        powerpc/pseries: PACA save area fix for MCE vs MCE
        powerpc/pseries: PACA save area fix for general exception vs MCE
        powerpc/prom: Fix sub-processor option passed to ibm, client-architecture-support
        powerpc, hotplug: Avoid to touch non-existent cpumasks.
        powerpc: migrate exception table users off module.h and onto extable.h
        powerpc/powernv/pci: fix iterator signedness
        powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)
        cxl: use pcibios_free_controller_deferred() when removing vPHBs
        powerpc: mpc8349emitx: Delete unnecessary assignment for the field "owner"
        powerpc/512x: Delete unnecessary assignment for the field "owner"
        drivers/macintosh: Delete owner assignment
        powerpc: cputhreads: Add missing include file
      2a90309e
    • Jean Delvare's avatar
      hwmon: (it87) Add missing sysfs attribute group terminator · 3c329263
      Jean Delvare authored
      Attribute array it87_attributes_in lacks its NULL terminator,
      causing random behavior when operating on the attribute group.
      
      Fixes: 52929715 ("hwmon: (it87) Use is_visible for voltage sensors")
      Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      3c329263
    • Jacob Keller's avatar
      fm10k: don't re-map queues when a mailbox message suffices · 325782a1
      Jacob Keller authored
      When the PF assigns a new MAC address to a VF it uses the base address
      registers to store the MAC address. This allows a VF which loads after
      this setup the ability to get the initial address without having to wait
      for a mailbox message. Unfortunately to do this, the PF must take queue
      ownership away from the VF, which can cause fault errors when there is
      already an active VF driver.
      
      This queue ownership assignment causes race condition between the PF and
      the VF such that potentially a VF can cause FUM fault errors due to
      normal PF/VF driver behavior.
      
      It is not safe to simply allow the PF to write the base address
      registers without taking queue ownership back as the PF must also
      disable the queues, and this would impact active VF use. The current
      code is safe because the queue ownership will prevent the VF from
      actually writing but does trigger the FUM fault.
      
      We can do better by simply avoiding the register write process when
      a mailbox message suffices. If the message can be sent over the mailbox,
      then we will not perform the queue ownership assignment and we won't
      update the base address to be the same as the MAC address.
      
      We do still have to write the TXQCTL registers in order to update the
      VID of the queue. This is necessary because the TXQCTL register is
      read-only from the VF, and thus the VF cannot do this for itself. This
      register does not need to wait for the Tx queue to be disabled and is
      safe for the PF to write during normal VF operation, so we move this
      write to the top of the function above the mailbox message. Without
      this, the TXQCTL register would be misconfigured and cause the VF to Tx
      hang.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      325782a1
    • Jacob Keller's avatar
      fm10k: don't clear the RXQCTL register when enabling or disabling queues · c689eff1
      Jacob Keller authored
      Ensure that other bits in the RXQCTL register do not get cleared. This
      ensures that bits related to queue ownership are maintained.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c689eff1
    • Jacob Keller's avatar
    • Jacob Keller's avatar
      fm10k: add support for Rx offloads on one Geneve tunnel · 1ad78292
      Jacob Keller authored
      Similar to how we handle VXLAN offload, enable support for a single
      Geneve tunnel.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      1ad78292
    • Jacob Keller's avatar
      fm10k: rework vxlan_port offload before adding geneve support · f92e0e48
      Jacob Keller authored
      In preparation for adding Geneve Rx offload support, refactor the
      current VXLAN offload flow to be a bit more generic so that it will be
      easier to add the new Geneve code. The fm10k hardware supports one VXLAN
      and one Geneve tunnel, so we will eventually treat the VXLAN and Geneve
      tunnels identically. To this end, factor out the code that handles the
      current list so that we can use the generic flow for both tunnels in the
      next patch.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f92e0e48
    • Jacob Keller's avatar
      fm10k: don't try to stop queues if we've lost hw_addr · 5f45c830
      Jacob Keller authored
      In the event of a surprise remove, we expect the driver to go down,
      which includes calling .stop_hw(). However, this function will return an
      error because the queues won't appear to cleanly disable. Prevent this
      and avoid the unnecessary checks by just returning when
      FM10K_REMOVED(hw->hw_addr) is true.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5f45c830
    • Jacob Keller's avatar
      fm10k: don't continue probe if PCI device not in normal IO state · 18095937
      Jacob Keller authored
      In the event of an uncorrectable AER error occurring when the driver has
      not loaded, the recovery routines are not done. This is done because
      future loads of the driver may not be aware of the IO state and may not
      be able to recover at all. In this case, when we next load the driver it
      fails due to what appears to be a surprise remove event. Instead, add
      a check to ensure that the device is in the normal IO state before
      continuing to probe. This allows us to give a more descriptive message
      of what is wrong.
      
      Without this change, the driver will attempt to probe up to our first
      call of .reset_hw() which will be unable to read registers and act as if
      a surprise remove event occurred.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      18095937
    • Jacob Keller's avatar
    • Jacob Keller's avatar
      fm10k: NAPI polling routine must return actual work done · e5fbfb78
      Jacob Keller authored
      When fm10k_poll fully cleans rings it returns 0. This is incorrect as it
      messes up the budget accounting in the core NAPI code. Fix this by
      returning actual work done, capped at budget - 1 since the core doesn't
      expect a return of the full budget when the driver modifies the NAPI
      status.
      
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Venkatesh Srinivas <venkateshs@google.com>
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e5fbfb78
    • Jacob Keller's avatar
      fm10k: prefer READ_ONCE instead of ACCESS_ONCE · ce4dad2c
      Jacob Keller authored
      While technically not needed, as all our uses of ACCESS_ONCE are scalar
      types, we already use READ_ONCE in a few places, and for code
      readability we can swap all the uses of the older ACCESS_ONCE into
      READ_ONCE.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ce4dad2c
    • Jacob Keller's avatar
      fm10k: remove fm10k_get_reta_size from namespace · 88cdcfec
      Jacob Keller authored
      The function is only used in fm10k_ethtool.c, so make it static.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      88cdcfec
    • Jacob Keller's avatar
    • Jacob Keller's avatar
      fm10k: use software values when checking for Tx hangs in hot path · 5b9e4432
      Jacob Keller authored
      A previous patch added support to check for hardware Tx pending in the
      fm10k_down routine. This support was intended to ensure that we
      accurately check what the hardware state is. However, checking for Tx
      hangs in this manor during the hotpath results in a large performance
      hit. Avoid this by making the hotpath check use the SW counters instead.
      
      Fixes: a0f53cf49cb0 ("fm10k: use actual hardware registers when checking for pending Tx", 2016-06-08)
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5b9e4432
    • Jacob Keller's avatar
      fm10k: fix PCI device enable_cnt leak in .io_slot_reset · e59a393d
      Jacob Keller authored
      A previous patch removed the pci_disable_device() call in
      .io_error_detected. This call corresponded to a pci_enable_device_mem()
      call within .io_slot_reset handler. Change the call here to
      a pci_reenable_device() so that it does not increment and leak the
      enable_cnt reference count for the device. Without this change, VF
      devices may fail during an unbind/bind, and we'll never zero the
      reference counter for the pci_dev structure.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e59a393d
    • Paul Gortmaker's avatar
      intel_pmic_gpio: Make explicitly non-modular · da43bf0c
      Paul Gortmaker authored
      The Kconfig entry controlling compilation of this code is:
      
      drivers/platform/x86/Kconfig:config GPIO_INTEL_PMIC
      drivers/platform/x86/Kconfig:   bool "Intel PMIC GPIO support"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the couple traces of modular infrastructure use, so that
      when reading the driver there is no doubt it is builtin-only.
      
      We delete the MODULE_LICENSE tag etc. since all that information
      was (or is now) contained at the top of the file in the comments.
      
      We don't replace module.h with init.h since the file already has that.
      
      Cc: Alek Du <alek.du@intel.com>
      Cc: platform-driver-x86@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      da43bf0c
    • Paul Gortmaker's avatar
      platform/olpc: Make ec explicitly non-modular · f48d1496
      Paul Gortmaker authored
      The Kconfig entry controlling compilation of this code is:
      
      arch/x86/Kconfig:config OLPC
      arch/x86/Kconfig:       bool "One Laptop Per Child support"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the couple traces of modular infrastructure use, so that
      when reading the driver there is no doubt it is builtin-only.
      
      We delete the MODULE_LICENSE tag etc. since all that information
      was (or is now) contained at the top of the file in the comments.
      
      Cc: platform-driver-x86@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Acked-by: default avatarAndres Salomon <dilinger@queued.net>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      f48d1496
    • Arnd Bergmann's avatar
      net_sched: fix use of uninitialized ethertype variable in cls_flower · 0b498a52
      Arnd Bergmann authored
      The addition of VLAN support caused a possible use of uninitialized
      data if we encounter a zero TCA_FLOWER_KEY_ETH_TYPE key, as pointed
      out by "gcc -Wmaybe-uninitialized":
      
      net/sched/cls_flower.c: In function 'fl_change':
      net/sched/cls_flower.c:366:22: error: 'ethertype' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This changes the code to only set the ethertype field if it
      was nonzero, as before the patch.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 9399ae9a ("net_sched: flower: Add vlan support")
      Cc: Hadar Hen Zion <hadarh@mellanox.com>
      Cc: Jiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0b498a52
    • Arnd Bergmann's avatar
      net/xgene: fix error handling during reset · f9dc7074
      Arnd Bergmann authored
      The newly added reset logic uses helper functions for the MMIO that
      may fail. However, when the read operation fails, we end up writing
      back uninitialized data to the register, as gcc warns:
      
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c: In function 'xgene_enet_link_state':
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:213:2: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:209:6: note: 'data' was declared here
        u32 data;
      
      We already print a warning to the console log if that happens,
      the best alternative that I can see is skip the rest of the reset
      sequence if the register value cannot be read: Most likely the
      write would fail as well, and if it succeeded, worse things could
      happen.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 3eb7cb9d ("drivers: net: xgene: XFI PCS reset when link is down")
      Cc: Fushen Chen <fchen@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9dc7074
    • Vidya Sagar Ravipati's avatar
      net: ethtool: add support for 1000BaseX and missing 10G link modes · 5711a982
      Vidya Sagar Ravipati authored
      This patch enhances ethtool link mode bitmap to include
      missing interface modes for 1G/10G speeds
      
      Changes:
      1000baseX is the mode introduced to cover all 1G Fiber cases.
      All modes under 1000BaseX i.e. 1000BASE-SX, 1000BASE-LX, 1000BASE-LX10
      and 1000BASE-BX10 are not explicitly defined at this moment.
      10G CR,SR,LR and ER link modes are included for 10G speed..
      
      Issue:
      ethtool on  1G/10G SFP port reports Base-T
      as this port supports 1000baseX,10G CR, SR and LR modes.
      
      root@tor-02$ ethtool swp1
      Settings for swp1:
              Supported ports: [ FIBRE ]
              Supported link modes:   1000baseT/Full
                                      10000baseT/Full
              Supported pause frame use: Symmetric Receive-only
              Supports auto-negotiation: Yes
              Advertised link modes:  1000baseT/Full
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Speed: 10000Mb/s
              Duplex: Full
              Port: FIBRE
              PHYAD: 0
              Transceiver: external
              Auto-negotiation: off
              Current message level: 0x00000000 (0)
      
              Link detected: yes
      
      After fix:
      root@tor-02$ ethtool swp1
      Settings for swp1:
              Supported ports: [ FIBRE ]
              Supported link modes:   1000baseX/Full
                                      10000baseCR/Full
                                      10000baseSR/Full
                                      10000baseLR/Full
                                      10000baseER/Full
              Supported pause frame use: Symmetric Receive-only
              Supports auto-negotiation: Yes
              Advertised link modes:  1000baseT/Full
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Speed: 10000Mb/s
              Duplex: Full
              Port: FIBRE
              PHYAD: 0
              Transceiver: external
              Auto-negotiation: off
              Current message level: 0x00000000 (0)
              Link detected: yes
      Signed-off-by: default avatarVidya Sagar Ravipati <vidya@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5711a982
    • James Morse's avatar
      amd-xgbe: Reset running devices after resume from hibernate · a039b638
      James Morse authored
      After resume from hibernate on arm64, any amd-xgbe devices that were
      running when we hibernated are reported as down, even when it is not.
      
      Re-plugging the cables does not cause the interface to come back, the
      link must be marked as down then up via 'ip set link' using the serial
      console.
      
      This happens because the device has been power-cycled and possibly
      re-initialised by firmware, whereas the driver's memory structures have
      been restored from the hibernate image and the two do not agree.
      
      Schedule a restart of the device after powerup in case the world changed
      while we were asleep.
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a039b638
    • Owen Lin's avatar
      Add Killer E2500 device ID in alx driver. · b99b43bb
      Owen Lin authored
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b99b43bb
    • Eric Dumazet's avatar
      tcp: add tcp_add_backlog() · c9c33212
      Eric Dumazet authored
      When TCP operates in lossy environments (between 1 and 10 % packet
      losses), many SACK blocks can be exchanged, and I noticed we could
      drop them on busy senders, if these SACK blocks have to be queued
      into the socket backlog.
      
      While the main cause is the poor performance of RACK/SACK processing,
      we can try to avoid these drops of valuable information that can lead to
      spurious timeouts and retransmits.
      
      Cause of the drops is the skb->truesize overestimation caused by :
      
      - drivers allocating ~2048 (or more) bytes as a fragment to hold an
        Ethernet frame.
      
      - various pskb_may_pull() calls bringing the headers into skb->head
        might have pulled all the frame content, but skb->truesize could
        not be lowered, as the stack has no idea of each fragment truesize.
      
      The backlog drops are also more visible on bidirectional flows, since
      their sk_rmem_alloc can be quite big.
      
      Let's add some room for the backlog, as only the socket owner
      can selectively take action to lower memory needs, like collapsing
      receive queues or partial ofo pruning.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c9c33212
    • Russell King's avatar
      net: smc91x: fix SMC accesses · 2fb04fdf
      Russell King authored
      Commit b70661c7 ("net: smc91x: use run-time configuration on all ARM
      machines") broke some ARM platforms through several mistakes.  Firstly,
      the access size must correspond to the following rule:
      
      (a) at least one of 16-bit or 8-bit access size must be supported
      (b) 32-bit accesses are optional, and may be enabled in addition to
          the above.
      
      Secondly, it provides no emulation of 16-bit accesses, instead blindly
      making 16-bit accesses even when the platform specifies that only 8-bit
      is supported.
      
      Reorganise smc91x.h so we can make use of the existing 16-bit access
      emulation already provided - if 16-bit accesses are supported, use
      16-bit accesses directly, otherwise if 8-bit accesses are supported,
      use the provided 16-bit access emulation.  If neither, BUG().  This
      exactly reflects the driver behaviour prior to the commit being fixed.
      
      Since the conversion incorrectly cut down the available access sizes on
      several platforms, we also need to go through every platform and fix up
      the overly-restrictive access size: Arnd assumed that if a platform can
      perform 32-bit, 16-bit and 8-bit accesses, then only a 32-bit access
      size needed to be specified - not so, all available access sizes must
      be specified.
      
      This likely fixes some performance regressions in doing this: if a
      platform does not support 8-bit accesses, 8-bit accesses have been
      emulated by performing a 16-bit read-modify-write access.
      
      Tested on the Intel Assabet/Neponset platform, which supports only 8-bit
      accesses, which was broken by the original commit.
      
      Fixes: b70661c7 ("net: smc91x: use run-time configuration on all ARM machines")
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Tested-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2fb04fdf
    • Florian Fainelli's avatar
      Documentation: networking: dsa: Remove platform device TODO · 7d13eca0
      Florian Fainelli authored
      Since commit 83c0afae ("net: dsa: Add new binding implementation"),
      the shortcomings of the dsa platform device have been addressed, remove
      that TODO item.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d13eca0