1. 11 May, 2018 4 commits
  2. 10 May, 2018 25 commits
  3. 09 May, 2018 1 commit
    • Heiner Kallweit's avatar
      r8169: fix powering up RTL8168h · 3148dedf
      Heiner Kallweit authored
      Since commit a92a0849 "r8169: improve runtime pm in general and
      suspend unused ports" interfaces w/o link are runtime-suspended after
      10s. On systems where drivers take longer to load this can lead to the
      situation that the interface is runtime-suspended already when it's
      initially brought up.
      This shouldn't be a problem because rtl_open() resumes MAC/PHY.
      However with at least one chip version the interface doesn't properly
      come up, as reported here:
      https://bugzilla.kernel.org/show_bug.cgi?id=199549
      
      The vendor driver uses a delay to give certain chip versions some
      time to resume before starting the PHY configuration. So let's do
      the same. I don't know which chip versions may be affected,
      therefore apply this delay always.
      
      This patch was reported to fix the issue for RTL8168h.
      I was able to reproduce the issue on an Asus H310I-Plus which also
      uses a RTL8168h. Also in my case the patch fixed the issue.
      Reported-by: default avatarSlava Kardakov <ojab@ojab.ru>
      Tested-by: default avatarSlava Kardakov <ojab@ojab.ru>
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3148dedf
  4. 08 May, 2018 10 commits
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-4.17-20180508' of... · 42f02130
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-4.17-20180508' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2018-05-08
      
      this is a pull request for 7 patches for net/master.
      
      The first patch is by Jakob Unterwurzacher and increases the severity of
      bus-off messages in the generic CAN device infrastructure. The next two patches
      are by Uwe Kleine-König and fix the endianess detection in the flexcan driver.
      Jimmy Assarsson's patch for the kvaser driver corrects the stats counter for
      dropped tx-messages. Geert Uytterhoeven provides one patch and Sergei Shtylyov
      two patches for the rcan_canfd device tree binding description.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42f02130
    • David S. Miller's avatar
      Merge branch 'ieee802154-for-davem-2018-05-08' of... · 2dabf9f2
      David S. Miller authored
      Merge branch 'ieee802154-for-davem-2018-05-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan
      
      Stefan Schmidt says:
      
      ====================
      pull-request: ieee802154 2018-05-08
      
      An update from ieee802154 for your *net* tree.
      
      Two fixes for the mcr20a driver, which was being added in the 4.17 merge window,
      by Gustavo and myself.
      The atusb driver got a change to GFP_KERNEL where no GFP_ATOMIC is needed by
      Jia-Ju.
      
      The last and most important fix is from Alex to get IPv6 reassembly working
      again for the ieee802154 6lowpan adaptation. This got broken in 4.16 so please
      queue this one also up for the 4.16 stable tree.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2dabf9f2
    • Sergei Shtylyov's avatar
      DT: net: can: rcar_canfd: document R8A77980 bindings · 7a25ac2f
      Sergei Shtylyov authored
      Document the R-Car V3H (R8A77980) SoC support in the R-Car CAN-FD bindings.
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      7a25ac2f
    • Sergei Shtylyov's avatar
      DT: net: can: rcar_canfd: document R8A77970 bindings · 0a4fe40e
      Sergei Shtylyov authored
      Document the R-Car V3M (R8A77970) SoC support in the R-Car CAN-FD bindings.
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: default avatarRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
      Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      0a4fe40e
    • Geert Uytterhoeven's avatar
      1469c5f0
    • Jimmy Assarsson's avatar
      can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg() · 6ee00865
      Jimmy Assarsson authored
      Increase rx_dropped, if alloc_can_skb() fails, not tx_dropped.
      Signed-off-by: default avatarJimmy Assarsson <extja@kvaser.com>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      6ee00865
    • Uwe Kleine-König's avatar
      arm: dts: imx[35]*: declare flexcan devices to be compatible to imx25's flexcan · 9a62dcf4
      Uwe Kleine-König authored
      Commit d50f4630 ("arm: dts: Remove p1010-flexcan compatible from imx
      series dts") removed the fallback compatible "fsl,p1010-flexcan" from
      the imx device trees. As the flexcan cores on i.MX25, i.MX35 and i.MX53
      are identical, introduce the first as fallback for the two latter ones.
      
      Fixes: d50f4630 ("arm: dts: Remove p1010-flexcan compatible from imx series dts")
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: linux-stable <stable@vger.kernel.org> # >= v4.16
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      9a62dcf4
    • Uwe Kleine-König's avatar
      can: flexcan: fix endianess detection · 0e030a37
      Uwe Kleine-König authored
      In commit 88462d2a ("can: flexcan: Remodel FlexCAN register r/w APIs
      for big endian FlexCAN controllers.") the following logic was
      implemented:
      
      	if the dt property "big-endian" is given or
      	   the device is compatible to "fsl,p1010-flexcan":
      		use big-endian mode;
      	else
      		use little-endian mode;
      
      This relies on commit d50f4630 ("arm: dts: Remove p1010-flexcan
      compatible from imx series dts") which was applied a few commits later.
      Without this commit (or an old device tree used for booting a new
      kernel) the flexcan devices on i.MX25, i.MX28, i.MX35 and i.MX53 match
      the 'the device is compatible to "fsl,p1010-flexcan"' test and so are
      switched erroneously to big endian mode.
      
      Instead of the check above put a quirk in devtype data and rely on
      of_match_device yielding the most compatible match
      
      Fixes: 88462d2a ("can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers.")
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Tested-by: default avatarGavin Schenk <g.schenk@eckelmann.de>
      Cc: linux-stable <stable@vger.kernel.org> # >= v4.16
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      0e030a37
    • Jakob Unterwurzacher's avatar
      can: dev: increase bus-off message severity · 71c23a82
      Jakob Unterwurzacher authored
      bus-off is usually caused by hardware malfunction or configuration error
      (baud rate mismatch) and causes a complete loss of communication.
      
      Increase the "bus-off" message's severity from netdev_dbg() to
      netdev_info() to make it visible to the user.
      
      A can interface going into bus-off is similar in severity to ethernet's
      "Link is Down" message, which is also printed at info level.
      
      It is debatable whether the the "restarted" message should also be
      changed to netdev_info() to make the interface state changes
      comprehensible from the kernel log. I have chosen to keep the
      "restarted" message at dbg for now as the "bus-off" message should be
      enough for the user to notice and investigate the problem.
      Signed-off-by: default avatarJakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
      Cc: linux-can@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      71c23a82
    • Eric Dumazet's avatar
      llc: better deal with too small mtu · 2c5d5b13
      Eric Dumazet authored
      syzbot loves to set very small mtu on devices, since it brings joy.
      We must make llc_ui_sendmsg() fool proof.
      
      usercopy: Kernel memory overwrite attempt detected to wrapped address (offset 0, size 18446612139802320068)!
      
      kernel BUG at mm/usercopy.c:100!
      invalid opcode: 0000 [#1] SMP KASAN
      Dumping ftrace buffer:
         (ftrace buffer empty)
      Modules linked in:
      CPU: 0 PID: 17464 Comm: syz-executor1 Not tainted 4.17.0-rc3+ #36
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:usercopy_abort+0xbb/0xbd mm/usercopy.c:88
      RSP: 0018:ffff8801868bf800 EFLAGS: 00010282
      RAX: 000000000000006c RBX: ffffffff87d2fb00 RCX: 0000000000000000
      RDX: 000000000000006c RSI: ffffffff81610731 RDI: ffffed0030d17ef6
      RBP: ffff8801868bf858 R08: ffff88018daa4200 R09: ffffed003b5c4fb0
      R10: ffffed003b5c4fb0 R11: ffff8801dae27d87 R12: ffffffff87d2f8e0
      R13: ffffffff87d2f7a0 R14: ffffffff87d2f7a0 R15: ffffffff87d2f7a0
      FS:  00007f56a14ac700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000001b2bc21000 CR3: 00000001abeb1000 CR4: 00000000001426f0
      DR0: 0000000020000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000030602
      Call Trace:
       check_bogus_address mm/usercopy.c:153 [inline]
       __check_object_size+0x5d9/0x5d9 mm/usercopy.c:256
       check_object_size include/linux/thread_info.h:108 [inline]
       check_copy_size include/linux/thread_info.h:139 [inline]
       copy_from_iter_full include/linux/uio.h:121 [inline]
       memcpy_from_msg include/linux/skbuff.h:3305 [inline]
       llc_ui_sendmsg+0x4b1/0x1530 net/llc/af_llc.c:941
       sock_sendmsg_nosec net/socket.c:629 [inline]
       sock_sendmsg+0xd5/0x120 net/socket.c:639
       __sys_sendto+0x3d7/0x670 net/socket.c:1789
       __do_sys_sendto net/socket.c:1801 [inline]
       __se_sys_sendto net/socket.c:1797 [inline]
       __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797
       do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      RIP: 0033:0x455979
      RSP: 002b:00007f56a14abc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
      RAX: ffffffffffffffda RBX: 00007f56a14ac6d4 RCX: 0000000000455979
      RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000018
      RBP: 000000000072bea0 R08: 00000000200012c0 R09: 0000000000000010
      R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
      R13: 0000000000000548 R14: 00000000006fbf60 R15: 0000000000000000
      Code: 55 c0 e8 c0 55 bb ff ff 75 c8 48 8b 55 c0 4d 89 f9 ff 75 d0 4d 89 e8 48 89 d9 4c 89 e6 41 56 48 c7 c7 80 fa d2 87 e8 a0 0b a3 ff <0f> 0b e8 95 55 bb ff e8 c0 a8 f7 ff 8b 95 14 ff ff ff 4d 89 e8
      RIP: usercopy_abort+0xbb/0xbd mm/usercopy.c:88 RSP: ffff8801868bf800
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c5d5b13