1. 24 12月, 2016 3 次提交
  2. 22 12月, 2016 4 次提交
    • C
      net: fddi: skfp: use %p format specifier for addresses rather than %x · 551cde19
      Colin Ian King 提交于
      Trivial fix: Addresses should be printed using the %p format specifier
      rather than using %x.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      551cde19
    • T
      net: mvpp2: fix dma unmapping of TX buffers for fragments · 8354491c
      Thomas Petazzoni 提交于
      Since commit 71ce391d ("net: mvpp2: enable proper per-CPU TX
      buffers unmapping"), we are not correctly DMA unmapping TX buffers for
      fragments.
      
      Indeed, the mvpp2_txq_inc_put() function only stores in the
      txq_cpu->tx_buffs[] array the physical address of the buffer to be
      DMA-unmapped when skb != NULL. In addition, when DMA-unmapping, we use
      skb_headlen(skb) to get the size to be unmapped. Both of this works fine
      for TX descriptors that are associated directly to a SKB, but not the
      ones that are used for fragments, with a NULL pointer as skb:
      
       - We have a NULL physical address when calling DMA unmap
       - skb_headlen(skb) crashes because skb is NULL
      
      This causes random crashes when fragments are used.
      
      To solve this problem, we need to:
      
       - Store the physical address of the buffer to be unmapped
         unconditionally, regardless of whether it is tied to a SKB or not.
      
       - Store the length of the buffer to be unmapped, which requires a new
         field.
      
      Instead of adding a third array to store the length of the buffer to be
      unmapped, and as suggested by David Miller, this commit refactors the
      tx_buffs[] and tx_skb[] arrays of 'struct mvpp2_txq_pcpu' into a
      separate structure 'mvpp2_txq_pcpu_buf', to which a 'size' field is
      added. Therefore, instead of having three arrays to allocate/free, we
      have a single one, which also improve data locality, reducing the
      impact on the CPU cache.
      
      Fixes: 71ce391d ("net: mvpp2: enable proper per-CPU TX buffers unmapping")
      Reported-by: NRaphael G <raphael.glon@corp.ovh.com>
      Cc: Raphael G <raphael.glon@corp.ovh.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8354491c
    • H
      net: ethernet: stmmac: dwmac-rk: make clk enablement first in powerup · f217bfde
      Heiko Stübner 提交于
      Right now the dwmac-rk tries to set up the GRF-specific speed and link
      options before enabling clocks, phys etc and on previous socs this works
      because the GRF is supplied on the whole by one clock.
      
      On the rk3399 however the GRF (General Register Files) clock-supply
      has been split into multiple clocks and while there is no specific
      grf-gmac clock like for other sub-blocks, it seems the mac-specific
      portions are actually supplied by the general mac clock.
      
      This results in hangs on rk3399 boards if the driver is build as module.
      When built in te problem of course doesn't surface, as the clocks
      are of course still on at the stage before clock_disable_unused.
      
      To solve this, simply move the clock enablement to the first position
      in the powerup callback. This is also a good idea in general to
      enable clocks before everything else.
      
      Tested on rk3288, rk3368 and rk3399 the dwmac still works on all of them.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f217bfde
    • K
      be2net: Increase skb headroom size to 256 bytes · 76b15923
      Kalesh A P 提交于
      The driver currently allocates 128 bytes of skb headroom.
      This was found to be insufficient with some configurations
      like Geneve tunnels, which resulted in skb head reallocations.
      
      Increase the headroom to 256 bytes to fix this.
      Signed-off-by: NKalesh A P <kalesh-anakkur.purayil@broadcom.com>
      Signed-off-by: NSuresh Reddy <suresh.reddy@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      76b15923
  3. 21 12月, 2016 13 次提交
  4. 20 12月, 2016 5 次提交
    • B
      ath10k: free host-mem with DMA_BIRECTIONAL flag · d4166b8b
      Ben Greear 提交于
      Hopefully this fixes the problem reported by Kalle:
      
      Noticed this in my log, but I don't have time to investigate this in
      detail right now:
      
      [  413.795346] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
      [  414.158755] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
      [  477.439659] ath10k_pci 0000:02:00.0: could not get mac80211 beacon
      [  481.666630] ------------[ cut here ]------------
      [  481.666669] WARNING: CPU: 0 PID: 1978 at lib/dma-debug.c:1155 check_unmap+0x320/0x8e0
      [  481.666688] ath10k_pci 0000:02:00.0: DMA-API: device driver frees DMA memory with different direction [device address=0x000000002d130000] [size=63800 bytes] [mapped with DMA_BIDIRECTIONAL] [unmapped with DMA_TO_DEVICE]
      [  481.666703] Modules linked in: ctr ccm ath10k_pci(E-) ath10k_core(E) ath(E) mac80211(E) cfg80211(E) snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event snd_seq btusb btintel snd_seq_device joydev coret
      [  481.671468] CPU: 0 PID: 1978 Comm: rmmod Tainted: G            E   4.9.0-rc7-wt+ #54
      [  481.671478] Hardware name: Hewlett-Packard HP ProBook 6540b/1722, BIOS 68CDD Ver. F.04 01/27/2010
      [  481.671489]  ef49dcec c842ee92 c8b5830e ef49dd34 ef49dd20 c80850f5 c8b5a13c ef49dd50
      [  481.671560]  000007ba c8b5830e 00000483 c8461830 c8461830 00000483 ef49ddcc f34e64b8
      [  481.671641]  c8b58360 ef49dd3c c80851bb 00000009 00000000 ef49dd34 c8b5a13c ef49dd50
      [  481.671716] Call Trace:
      [  481.671731]  [<c842ee92>] dump_stack+0x76/0xb4
      [  481.671745]  [<c80850f5>] __warn+0xe5/0x100
      [  481.671757]  [<c8461830>] ? check_unmap+0x320/0x8e0
      [  481.671769]  [<c8461830>] ? check_unmap+0x320/0x8e0
      [  481.671780]  [<c80851bb>] warn_slowpath_fmt+0x3b/0x40
      [  481.671791]  [<c8461830>] check_unmap+0x320/0x8e0
      [  481.671804]  [<c8462054>] debug_dma_unmap_page+0x84/0xa0
      [  481.671835]  [<f937cd7a>] ath10k_wmi_free_host_mem+0x9a/0xe0 [ath10k_core]
      [  481.671861]  [<f9363400>] ath10k_core_destroy+0x50/0x60 [ath10k_core]
      [  481.671875]  [<f8e13969>] ath10k_pci_remove+0x79/0xa0 [ath10k_pci]
      [  481.671889]  [<c848d8d8>] pci_device_remove+0x38/0xb0
      [  481.671901]  [<c859fe4b>] __device_release_driver+0x7b/0x110
      [  481.671913]  [<c85a00e7>] driver_detach+0x97/0xa0
      [  481.671923]  [<c859ef8b>] bus_remove_driver+0x4b/0xb0
      [  481.671934]  [<c85a0cda>] driver_unregister+0x2a/0x60
      [  481.671949]  [<c848c888>] pci_unregister_driver+0x18/0x70
      [  481.671965]  [<f8e14dae>] ath10k_pci_exit+0xd/0x25f [ath10k_pci]
      [  481.671979]  [<c812bb84>] SyS_delete_module+0xf4/0x180
      [  481.671995]  [<c81f801b>] ? __might_fault+0x8b/0xa0
      [  481.672009]  [<c80037d0>] do_fast_syscall_32+0xa0/0x1e0
      [  481.672025]  [<c88d4c88>] sysenter_past_esp+0x45/0x74
      [  481.672037] ---[ end trace 3fd23759e17e1622 ]---
      [  481.672049] Mapped at:
      [  481.672060]  [  481.672072] [<c846062c>] debug_dma_map_page.part.25+0x1c/0xf0
      [  481.672083]  [  481.672095] [<c8460799>] debug_dma_map_page+0x99/0xc0
      [  481.672106]  [  481.672132] [<f93745ec>] ath10k_wmi_alloc_chunk+0x12c/0x1f0 [ath10k_core]
      [  481.672142]  [  481.672168] [<f937d0c4>] ath10k_wmi_event_service_ready_work+0x304/0x540 [ath10k_core]
      [  481.672178]  [  481.672190] [<c80a3643>] process_one_work+0x1c3/0x670
      [  482.137134] ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
      [  482.313144] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:02:00.0.bin failed with error -2
      [  482.313274] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/cal-pci-0000:02:00.0.bin failed with error -2
      [  482.313768] ath10k_pci 0000:02:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
      [  482.313777] ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 0 testmode 1
      [  482.313974] ath10k_pci 0000:02:00.0: firmware ver 10.2.4.70.59-2 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 4159f498
      [  482.369858] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
      [  482.370011] ath10k_pci 0000:02:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
      [  483.596770] ath10k_pci 0000:02:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
      [  483.701686] ath: EEPROM regdomain: 0x0
      [  483.701706] ath: EEPROM indicates default country code should be used
      [  483.701713] ath: doing EEPROM country->regdmn map search
      [  483.701721] ath: country maps to regdmn code: 0x3a
      [  483.701730] ath: Country alpha2 being used: US
      [  483.701737] ath: Regpair used: 0x3a
      Reported-by: NKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      d4166b8b
    • A
      brcmfmac: fix uninitialized field in scheduled scan ssid configuration · 2b66325d
      Arend Van Spriel 提交于
      The scheduled scan ssid configuration in firmware has a flags field that
      was not initialized resulting in unexpected behaviour.
      
      Fixes: e3bdb7cc0300 ("brcmfmac: fix handling ssids in .sched_scan_start() callback")
      Reviewed-by: NHante Meuleman <hante.meuleman@broadcom.com>
      Reviewed-by: NPieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
      Reviewed-by: NFranky Lin <franky.lin@broadcom.com>
      Signed-off-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      2b66325d
    • A
      brcmfmac: fix memory leak in brcmf_cfg80211_attach() · cb853da3
      Arend Van Spriel 提交于
      In brcmf_cfg80211_attach() there was one error path not properly
      handled as it leaked memory allocated in brcmf_btcoex_attach().
      Reviewed-by: NHante Meuleman <hante.meuleman@broadcom.com>
      Reviewed-by: NPieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
      Reviewed-by: NFranky Lin <franky.lin@broadcom.com>
      Signed-off-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      cb853da3
    • P
      stmmac: fix memory barriers · ad688cdb
      Pavel Machek 提交于
      Fix up memory barriers in stmmac driver. They are meant to protect
      against DMA engine, so smp_ variants are certainly wrong, and dma_
      variants are preferable.
      Signed-off-by: NPavel Machek <pavel@denx.de>
      Tested-by: NNiklas Cassel <niklas.cassel@axis.com>
      Acked-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad688cdb
    • A
      net: ethernet: cavium: octeon: octeon_mgmt: Handle return NULL error from devm_ioremap · 162809df
      Arvind Yadav 提交于
      Here, If devm_ioremap will fail. It will return NULL.
      Kernel can run into a NULL-pointer dereference.
      This error check will avoid NULL pointer dereference.
      Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      162809df
  5. 19 12月, 2016 15 次提交