1. 19 5月, 2016 1 次提交
    • L
      iwlwifi: fix mis-merge that breaks the driver · 0e034f5c
      Linus Torvalds 提交于
      My laptop that uses the intel 7680 iwlwifi module would no longer
      connects to the network.  It would fail with a "Microcode SW error
      detected." and spew out register state over and over again without ever
      connecting to the network.
      
      The cause is mis-merge in commit 909b27f7, where David seems to have
      lost some of the changes to iwl_mvm_set_tx_cmd() from commit
      5c08b0f5 ("iwlwifi: mvm: don't override the rate with the AMSDU
      len").
      
      The reason seems to be a conflict with commit d8fe4844 ("iwlwifi:
      mvm: add support for new TX CMD API"), which touched a line adjacent to
      the changes in 909b27f7.
      
      David missed the fact that "info->driver_data[0]" had become
      "skb_info->driver_data[0]".  Then he removed the skb_info because it was
      unused.
      
      This just re-updates iwl_mvm_set_tx_cmd() with the lost two lines.
      Reported-and-tested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: NReinoud Koornstra <reinoudkoornstra@gmail.com>
      Cc: Luciano Coelho <luciano.coelho@intel.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0e034f5c
  2. 18 5月, 2016 11 次提交
    • D
      Revert "phy dp83867: Fix compilation with CONFIG_OF_MDIO=m" · 917fa535
      David S. Miller 提交于
      This reverts commit 7f32541c.
      
      This needs reverting too, as per requests.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      917fa535
    • D
      Revert "phy dp83867: Make rgmii parameters optional" · c606b499
      David S. Miller 提交于
      This reverts commit 81003bc9.
      
      Developers have asked me to revert this for now.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c606b499
    • A
      r8169: default to 64-bit DMA on recent PCIe chips · 27896c83
      Ard Biesheuvel 提交于
      The current logic around the 'use_dac' module parameter prevents the
      r81969 driver from being loadable on 64-bit systems without any RAM
      below 4 GB when the parameter is left at its default value.
      
      So introduce a new default value -1 which indicates that 64-bit DMA
      should be enabled on sufficiently recent PCIe chips, i.e., versions
      RTL_GIGA_MAC_VER_18 or later. Explicit param values of 0 or 1 retain
      the existing behavior of unconditionally enabling/disabling 64-bit DMA
      on 64-bit architectures (i.e., regardless of the type and version of the
      chip)
      
      Since PCIe chips do not need to CPlusCmd Dual Address Cycle to be set,
      make that conditional on the device type as well.
      
      Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27896c83
    • A
      phy dp83867: Make rgmii parameters optional · 81003bc9
      Alexander Graf 提交于
      If you compile without OF_MDIO support in an RGMII configuration, we fail
      to configure the dp83867 phy today by writing garbage into its configuration
      registers.
      
      On the other hand if you do compile with OF_MDIO and the phy gets loaded via
      device tree, you have to have the properties set in the device tree, otherwise
      we fail to load the driver and don't even attach the generic phy driver to
      the interface anymore.
      
      To make things slightly more consistent, make the rgmii configuration properties
      optional and allow a user to omit them in their device tree.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81003bc9
    • A
      phy dp83867: Fix compilation with CONFIG_OF_MDIO=m · 7f32541c
      Alexander Graf 提交于
      When CONFIG_OF_MDIO is configured as module, the #define for it really
      is CONFIG_OF_MDIO_MODULE, not CONFIG_OF_MDIO. So if we are compiling it
      as module, the dp83867 doesn't see that OF_MDIO was selected and doesn't
      read the dt rgmii parameters.
      
      The fix is simple: Use IS_ENABLED(). It checks for both - module as well
      as compiled in code.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f32541c
    • J
      asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions · cd9e2e5d
      John Stultz 提交于
      In testing with HiKey, we found that since
      commit 3f30b158 ("asix: On RX avoid creating bad Ethernet
      frames"),
      we're seeing lots of noise during network transfers:
      
      [  239.027993] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header synchronisation was lost, remaining 988
      [  239.037310] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x54ebb5ec, offset 4
      [  239.045519] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0xcdffe7a2, offset 4
      [  239.275044] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header synchronisation was lost, remaining 988
      [  239.284355] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x1d36f59d, offset 4
      [  239.292541] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0xaef3c1e9, offset 4
      [  239.518996] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header synchronisation was lost, remaining 988
      [  239.528300] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x2881912, offset 4
      [  239.536413] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x5638f7e2, offset 4
      
      And network throughput ends up being pretty bursty and slow with
      a overall throughput of at best ~30kB/s (where as previously we
      got 1.1MB/s with the slower USB1.1 "full speed" host).
      
      We found the issue also was reproducible on a x86_64 system,
      using a "high-speed" USB2.0 port but the throughput did not
      measurably drop (possibly due to the scp transfer being cpu
      bound on my slow test hardware).
      
      After lots of debugging, I found the check added in the
      problematic commit seems to be calculating the offset
      incorrectly.
      
      In the normal case, in the main loop of the function, we do:
      (where offset is zero, or set to "offset += (copy_length + 1) &
      0xfffe" in the previous loop)
          rx->header = get_unaligned_le32(skb->data +
                                          offset);
          offset += sizeof(u32);
      
      But the problematic patch calculates:
          offset = ((rx->remaining + 1) & 0xfffe) + sizeof(u32);
          rx->header = get_unaligned_le32(skb->data + offset);
      
      Adding some debug logic to check those offset calculation used
      to find rx->header, the one in problematic code is always too
      large by sizeof(u32).
      
      Thus, this patch removes the incorrect " + sizeof(u32)" addition
      in the problematic calculation, and resolves the issue.
      
      Cc: Dean Jenkins <Dean_Jenkins@mentor.com>
      Cc: "David B. Robins" <linux@davidrobins.net>
      Cc: Mark Craske <Mark_Craske@mentor.com>
      Cc: Emil Goode <emilgoode@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: YongQin Liu <yongqin.liu@linaro.org>
      Cc: Guodong Xu <guodong.xu@linaro.org>
      Cc: Ivan Vecera <ivecera@redhat.com>
      Cc: linux-usb@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Cc: stable <stable@vger.kernel.org> #4.4+
      Reported-by: NYongqin Liu <yongqin.liu@linaro.org>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd9e2e5d
    • J
      switchdev: pass pointer to fib_info instead of copy · da4ed551
      Jiri Pirko 提交于
      The problem is that fib_info->nh is [0] so the struct fib_info
      allocation size depends on number of nexthops. If we just copy fib_info,
      we do not copy the nexthops info and driver accesses memory which is not
      ours.
      
      Given the fact that fib4 does not defer operations and therefore it does
      not need copy, just pass the pointer down to drivers as it was done
      before.
      
      Fixes: 850d0cbc ("switchdev: remove pointers from switchdev objects")
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da4ed551
    • H
      drivers: net: Don't print unpopulated net_device name · 3274940b
      Harvey Hunt 提交于
      For ethernet devices, net_device.name will be eth%d before
      register_netdev() is called. Don't print the net_device name until
      the format string is replaced.
      Signed-off-by: NHarvey Hunt <harvey.hunt@imgtec.com>
      Cc: Marcel Ziswiler <marcel@ziswiler.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Barry Song <Baohua.Song@csr.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3274940b
    • S
      qed: add support for dcbx. · 39651abd
      Sudarsana Reddy Kalluru 提交于
      This patch adds the necessary driver support for Management Firmware to
      configure the device/firmware with the dcbx results. Management Firmware
      is responsible for communicating the DCBX and driving the negotiation,
      but the driver has responsibility of receiving async notification and
      configuring the results in hw/fw. This patch also adds the dcbx support for
      future protocols (e.g., FCoE) as preparation to their imminent submission.
      Signed-off-by: NSudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
      Signed-off-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39651abd
    • G
      ravb: Add missing free_irq() calls to ravb_close() · ccf92824
      Geert Uytterhoeven 提交于
      When reopening the network device on ra7795/salvator-x, e.g. after a
      DHCP timeout:
      
          IP-Config: Reopening network devices...
          genirq: Flags mismatch irq 139. 00000000 (eth0:ch0:rx_be) vs. 00000000 (ravb e6800000.ethernet eth0: cannot request IRQ eth0:ch0:rx_be
          IP-Config: Failed to open eth0
          IP-Config: No network devices available
      
      The "mismatch" is due to requesting an IRQ that is already in use,
      while IRQF_PROBE_SHARED wasn't set.
      
      However, the real cause is that ravb_close() doesn't release any of the
      R-Car Gen3-specific secondary IRQs.
      
      Add the missing free_irq() calls to fix this.
      
      Fixes: f51bdc23 ("ravb: Add dma queue interrupt support")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccf92824
    • D
      qed: Remove a stray tab · f82731b4
      Dan Carpenter 提交于
      This line was indented more than it should be.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NYuval Mintz <Yuval.Mintz@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f82731b4
  3. 17 5月, 2016 28 次提交