Skip to content
  1. Aug 18, 2016
  2. Aug 17, 2016
  3. Aug 16, 2016
    • David S. Miller's avatar
      Merge branch 'mediatek-fixes' · a1560dd7
      David S. Miller authored
      
      
      Sean Wang says:
      
      ====================
      mediatek: Fix warning and issue
      
      This patch set fixes the following warning and issues
      
      v1 -> v2: Fix message typos and add coverletter
      
      v2 -> v3: Split from the previous series for submitting bug fixes
      as a series targeting 'net'
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1560dd7
    • sean.wang@mediatek.com's avatar
      net: ethernet: mediatek: fix runtime warning raised by inconsistent struct... · 55a4e778
      sean.wang@mediatek.com authored
      
      net: ethernet: mediatek: fix runtime warning raised by inconsistent struct device pointers passed to DMA API
      
      Runtime warning occurs if DMA-API debug feature is enabled that would be
      raised by pointers passed to DMA API as arguments to inconsistent struct
      device objects, so that the patch makes them usage aligned between DMA
      operations such as dma_map_*() and dma_unmap_*() to eliminate the warning.
      
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55a4e778
    • sean.wang@mediatek.com's avatar
      net: ethernet: mediatek: fix flow control settings on GMAC0 is not being enabled properly · b2025c7c
      sean.wang@mediatek.com authored
      Commit 08ef55c6
      ("net-next: mediatek: fix gigabit and flow control advertisement")
      had supported proper flow control settings for GMAC1. But for GMAC0,
      
      1.GMAC0 shares the common logic with GMAC1 inside mtk_phy_link_adjust()
      to adapt various settings for the target phy.
      
      2.GMAC0 uses fixed-phy to connect to a builtin gigabit switch with
      fixed link speed as commit 0c72c50f
      
      
      ("net-next: mediatek: add fixed-phy support") describes.
      
      3.However, fixed-phy doesn't enable SUPPORTED_Pause & SUPPORTED_Asym_Pause
      supported flag on default that would cause mtk_phy_link_adjust() not to
      enable flow control setting on GMAC0 properly and cause packet dropped
      when high traffic.
      
      Due to these reasons, the patch adds SUPPORTED_Pause & SUPPORTED_Asym_Pause
      supported flags on fixed-phy used by the driver to have proper handling on
      the both GMAC with the shared common logic.
      
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b2025c7c
    • sean.wang@mediatek.com's avatar
      net: ethernet: mediatek: fix RMII mode and add REVMII supported by GMAC · 8ca7f4fe
      sean.wang@mediatek.com authored
      
      
      The patch fixes up the incorrect setup of reduced MII (RMII) on GMAC
      and adds the supplement for the setup of reverse MII (REVMII) on GMAC
      , and rearranges the error handling for invalid PHY argument.
      
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ca7f4fe
    • Wei Yongjun's avatar
      power_supply: tps65217-charger: fix missing platform_set_drvdata() · 33e7664a
      Wei Yongjun authored
      Add missing platform_set_drvdata() in tps65217_charger_probe(), otherwise
      calling platform_get_drvdata() in remove returns NULL.
      
      This is detected by Coccinelle semantic patch.
      
      Fixes: 3636859b
      
       ("power_supply: Add support for tps65217-charger")
      Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      33e7664a
    • Vegard Nossum's avatar
      tipc: fix NULL pointer dereference in shutdown() · d2fbdf76
      Vegard Nossum authored
      
      
      tipc_msg_create() can return a NULL skb and if so, we shouldn't try to
      call tipc_node_xmit_skb() on it.
      
          general protection fault: 0000 [#1] PREEMPT SMP KASAN
          CPU: 3 PID: 30298 Comm: trinity-c0 Not tainted 4.7.0-rc7+ #19
          Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
          task: ffff8800baf09980 ti: ffff8800595b8000 task.ti: ffff8800595b8000
          RIP: 0010:[<ffffffff830bb46b>]  [<ffffffff830bb46b>] tipc_node_xmit_skb+0x6b/0x140
          RSP: 0018:ffff8800595bfce8  EFLAGS: 00010246
          RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000003023b0e0
          RDX: 0000000000000000 RSI: dffffc0000000000 RDI: ffffffff83d12580
          RBP: ffff8800595bfd78 R08: ffffed000b2b7f32 R09: 0000000000000000
          R10: fffffbfff0759725 R11: 0000000000000000 R12: 1ffff1000b2b7f9f
          R13: ffff8800595bfd58 R14: ffffffff83d12580 R15: dffffc0000000000
          FS:  00007fcdde242700(0000) GS:ffff88011af80000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
          CR2: 00007fcddde1db10 CR3: 000000006874b000 CR4: 00000000000006e0
          DR0: 00007fcdde248000 DR1: 00007fcddd73d000 DR2: 00007fcdde248000
          DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000090602
          Stack:
           0000000000000018 0000000000000018 0000000041b58ab3 ffffffff83954208
           ffffffff830bb400 ffff8800595bfd30 ffffffff8309d767 0000000000000018
           0000000000000018 ffff8800595bfd78 ffffffff8309da1a 00000000810ee611
          Call Trace:
           [<ffffffff830c84a3>] tipc_shutdown+0x553/0x880
           [<ffffffff825b4a3b>] SyS_shutdown+0x14b/0x170
           [<ffffffff8100334c>] do_syscall_64+0x19c/0x410
           [<ffffffff83295ca5>] entry_SYSCALL64_slow_path+0x25/0x25
          Code: 90 00 b4 0b 83 c7 00 f1 f1 f1 f1 4c 8d 6d e0 c7 40 04 00 00 00 f4 c7 40 08 f3 f3 f3 f3 48 89 d8 48 c1 e8 03 c7 45 b4 00 00 00 00 <80> 3c 30 00 75 78 48 8d 7b 08 49 8d 75 c0 48 b8 00 00 00 00 00
          RIP  [<ffffffff830bb46b>] tipc_node_xmit_skb+0x6b/0x140
           RSP <ffff8800595bfce8>
          ---[ end trace 57b0484e351e71f1 ]---
      
      I feel like we should maybe return -ENOMEM or -ENOBUFS, but I'm not sure
      userspace is equipped to handle that. Anyway, this is better than a GPF
      and looks somewhat consistent with other tipc_msg_create() callers.
      
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
      Acked-by: default avatarYing Xue <ying.xue@windriver.com>
      Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d2fbdf76