1. 24 1月, 2018 2 次提交
  2. 23 1月, 2018 2 次提交
  3. 22 1月, 2018 8 次提交
  4. 17 1月, 2018 1 次提交
  5. 16 1月, 2018 5 次提交
  6. 12 1月, 2018 1 次提交
  7. 11 1月, 2018 13 次提交
    • J
      USB: serial: f81534: fix tx error on some baud rate · d1c48227
      Ji-Ze Hong (Peter Hong) 提交于
      The F81532/534 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates
      can be up to 1.5Mbits with 24MHz. But on some baud rate (384~500kps), the
      TX side will send the data frame too close to treat frame error on RX
      side. This patch will force all TX data frame with delay 1bit gap.
      Signed-off-by: NJi-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      d1c48227
    • J
      USB: serial: f81534: add H/W disable port support · bb543ca2
      Ji-Ze Hong (Peter Hong) 提交于
      The F81532/534 can be disable port by manufacturer with
      following H/W design.
          1: Connect DCD/DSR/CTS/RI pin to ground.
          2: Connect RX pin to ground.
      
      In driver, we'll implements some detect method likes following:
          1: Read MSR.
          2: Turn MCR LOOP bit on, off and read LSR after delay with 60ms.
             It'll contain BREAK status in LSR.
      Signed-off-by: NJi-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      bb543ca2
    • J
      USB: serial: f81534: only read configuration once · f047d357
      Ji-Ze Hong (Peter Hong) 提交于
      In the original code, We'll read configuration in calc_num_ports()
      and read again in attach(). In fact, we can move all content from
      attach() to calc_num_ports() to simplify the code.
      Signed-off-by: NJi-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
      [ johan: replace commit summary ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      f047d357
    • J
      USB: serial: f81534: add output pin control · 138651e1
      Ji-Ze Hong (Peter Hong) 提交于
      The F81532/534 had 3 output pin (M0/SD, M1, M2) with open-drain mode to
      control transceiver. We'll read it from internal Flash with address
      0x2f05~0x2f08 for 4 ports. The value is range from 0 to 7. The M0/SD is
      MSB of this value. For a examples, If read value is 6, we'll write M0/SD,
      M1, M2 as 1, 1, 0.
      Signed-off-by: NJi-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      138651e1
    • J
      USB: serial: f81534: add auto RTS direction support · ee0309b4
      Ji-Ze Hong (Peter Hong) 提交于
      The F81532/534 had auto RTS direction support for RS485 mode.
      We'll read it from internal Flash with address 0x2f01~0x2f04 for 4 ports.
      There are 4 conditions below:
      	0: F81534_PORT_CONF_RS232.
      	1: F81534_PORT_CONF_RS485.
      	2: value error, default to F81534_PORT_CONF_RS232.
      	3: F81534_PORT_CONF_RS485_INVERT.
      
      F81532/534 Clock register (offset +08h)
      
      Bit0:	UART Enable (always on)
      Bit2-1:	Clock source selector
      			00: 1.846MHz.
      			01: 18.46MHz.
      			10: 24MHz.
      			11: 14.77MHz.
      Bit4:	Auto direction(RTS) control (RTS pin Low when TX)
      Bit5:	Invert direction(RTS) when Bit4 enabled (RTS pin high when TX)
      Signed-off-by: NJi-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
      [ johan: rename mode-mask define, and only use GENMASK() for masks ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      ee0309b4
    • J
      USB: serial: f81534: add high baud rate support · 3aacac02
      Ji-Ze Hong (Peter Hong) 提交于
      The F81532/534 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates
      can be up to 1.5Mbits with 24MHz.
      
      This device may generate data overrun when baud rate setting to 921600bps
      or higher with old UART trigger level setting (8x14=112) with full
      loading. We'll change trigger level from 8x14=112 to 8x8=64 to avoid data
      overrun.
      
      Also the read/write of EP0 will be affected by this patch. The worst case
      of responding time is 20s when all serial port are full loading and trying
      to access EP0, so we change EP0 timeout from 10 to 20s.
      
      F81532/534 Clock register (offset +08h)
      
      Bit0:	UART Enable (always on)
      Bit2-1:	Clock source selector
      			00: 1.846MHz.
      			01: 18.46MHz.
      			10: 24MHz.
      			11: 14.77MHz.
      Signed-off-by: NJi-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
      [ johan: only use GENMASK() for masks ]
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      3aacac02
    • C
      drm/i915: Don't adjust priority on an already signaled fence · 5005c851
      Chris Wilson 提交于
      When we retire a signaled fence, we free the dependency tree. However,
      we skip clearing the list so that if we then try to adjust the priority
      of the signaled fence, we may walk the list of freed dependencies.
      
      [ 3083.156757] ==================================================================
      [ 3083.156806] BUG: KASAN: use-after-free in execlists_schedule+0x199/0x660 [i915]
      [ 3083.156810] Read of size 8 at addr ffff8806bf20f400 by task Xorg/831
      
      [ 3083.156815] CPU: 0 PID: 831 Comm: Xorg Not tainted 4.15.0-rc6-no-psn+ #1
      [ 3083.156817] Hardware name: Notebook                         N24_25BU/N24_25BU, BIOS 5.12 02/17/2017
      [ 3083.156818] Call Trace:
      [ 3083.156823]  dump_stack+0x5c/0x7a
      [ 3083.156827]  print_address_description+0x6b/0x290
      [ 3083.156830]  kasan_report+0x28f/0x380
      [ 3083.156872]  ? execlists_schedule+0x199/0x660 [i915]
      [ 3083.156914]  execlists_schedule+0x199/0x660 [i915]
      [ 3083.156956]  ? intel_crtc_atomic_check+0x146/0x4e0 [i915]
      [ 3083.156997]  ? execlists_submit_request+0xe0/0xe0 [i915]
      [ 3083.157038]  ? i915_vma_misplaced.part.4+0x25/0xb0 [i915]
      [ 3083.157079]  ? __i915_vma_do_pin+0x7c8/0xc80 [i915]
      [ 3083.157121]  ? intel_atomic_state_alloc+0x44/0x60 [i915]
      [ 3083.157130]  ? drm_atomic_helper_page_flip+0x3e/0xb0 [drm_kms_helper]
      [ 3083.157145]  ? drm_mode_page_flip_ioctl+0x7d2/0x850 [drm]
      [ 3083.157159]  ? drm_ioctl_kernel+0xa7/0xf0 [drm]
      [ 3083.157172]  ? drm_ioctl+0x45b/0x560 [drm]
      [ 3083.157211]  i915_gem_object_wait_priority+0x14c/0x2c0 [i915]
      [ 3083.157251]  ? i915_gem_get_aperture_ioctl+0x150/0x150 [i915]
      [ 3083.157290]  ? i915_vma_pin_fence+0x1d8/0x320 [i915]
      [ 3083.157331]  ? intel_pin_and_fence_fb_obj+0x175/0x250 [i915]
      [ 3083.157372]  ? intel_rotation_info_size+0x60/0x60 [i915]
      [ 3083.157413]  ? intel_link_compute_m_n+0x80/0x80 [i915]
      [ 3083.157428]  ? drm_dev_printk+0x1b0/0x1b0 [drm]
      [ 3083.157443]  ? drm_dev_printk+0x1b0/0x1b0 [drm]
      [ 3083.157485]  intel_prepare_plane_fb+0x2f8/0x5a0 [i915]
      [ 3083.157527]  ? intel_crtc_get_vblank_counter+0x80/0x80 [i915]
      [ 3083.157536]  drm_atomic_helper_prepare_planes+0xa0/0x1c0 [drm_kms_helper]
      [ 3083.157587]  intel_atomic_commit+0x12e/0x4e0 [i915]
      [ 3083.157605]  drm_atomic_helper_page_flip+0xa2/0xb0 [drm_kms_helper]
      [ 3083.157621]  drm_mode_page_flip_ioctl+0x7d2/0x850 [drm]
      [ 3083.157638]  ? drm_mode_cursor2_ioctl+0x10/0x10 [drm]
      [ 3083.157652]  ? drm_lease_owner+0x1a/0x30 [drm]
      [ 3083.157668]  ? drm_mode_cursor2_ioctl+0x10/0x10 [drm]
      [ 3083.157681]  drm_ioctl_kernel+0xa7/0xf0 [drm]
      [ 3083.157696]  drm_ioctl+0x45b/0x560 [drm]
      [ 3083.157711]  ? drm_mode_cursor2_ioctl+0x10/0x10 [drm]
      [ 3083.157725]  ? drm_getstats+0x20/0x20 [drm]
      [ 3083.157729]  ? timerqueue_del+0x49/0x80
      [ 3083.157732]  ? __remove_hrtimer+0x62/0xb0
      [ 3083.157735]  ? hrtimer_try_to_cancel+0x173/0x210
      [ 3083.157738]  do_vfs_ioctl+0x13b/0x880
      [ 3083.157741]  ? ioctl_preallocate+0x140/0x140
      [ 3083.157744]  ? _raw_spin_unlock_irq+0xe/0x30
      [ 3083.157746]  ? do_setitimer+0x234/0x370
      [ 3083.157750]  ? SyS_setitimer+0x19e/0x1b0
      [ 3083.157752]  ? SyS_alarm+0x140/0x140
      [ 3083.157755]  ? __rcu_read_unlock+0x66/0x80
      [ 3083.157757]  ? __fget+0xc4/0x100
      [ 3083.157760]  SyS_ioctl+0x74/0x80
      [ 3083.157763]  entry_SYSCALL_64_fastpath+0x1a/0x7d
      [ 3083.157765] RIP: 0033:0x7f6135d0c6a7
      [ 3083.157767] RSP: 002b:00007fff01451888 EFLAGS: 00003246 ORIG_RAX: 0000000000000010
      [ 3083.157769] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f6135d0c6a7
      [ 3083.157771] RDX: 00007fff01451950 RSI: 00000000c01864b0 RDI: 000000000000000c
      [ 3083.157772] RBP: 00007f613076f600 R08: 0000000000000001 R09: 0000000000000000
      [ 3083.157773] R10: 0000000000000060 R11: 0000000000003246 R12: 0000000000000000
      [ 3083.157774] R13: 0000000000000060 R14: 000000000000001b R15: 0000000000000060
      
      [ 3083.157779] Allocated by task 831:
      [ 3083.157783]  kmem_cache_alloc+0xc0/0x200
      [ 3083.157822]  i915_gem_request_await_dma_fence+0x2c4/0x5d0 [i915]
      [ 3083.157861]  i915_gem_request_await_object+0x321/0x370 [i915]
      [ 3083.157900]  i915_gem_do_execbuffer+0x1165/0x19c0 [i915]
      [ 3083.157937]  i915_gem_execbuffer2+0x1ad/0x550 [i915]
      [ 3083.157950]  drm_ioctl_kernel+0xa7/0xf0 [drm]
      [ 3083.157962]  drm_ioctl+0x45b/0x560 [drm]
      [ 3083.157964]  do_vfs_ioctl+0x13b/0x880
      [ 3083.157966]  SyS_ioctl+0x74/0x80
      [ 3083.157968]  entry_SYSCALL_64_fastpath+0x1a/0x7d
      
      [ 3083.157971] Freed by task 831:
      [ 3083.157973]  kmem_cache_free+0x77/0x220
      [ 3083.158012]  i915_gem_request_retire+0x72c/0xa70 [i915]
      [ 3083.158051]  i915_gem_request_alloc+0x1e9/0x8b0 [i915]
      [ 3083.158089]  i915_gem_do_execbuffer+0xa96/0x19c0 [i915]
      [ 3083.158127]  i915_gem_execbuffer2+0x1ad/0x550 [i915]
      [ 3083.158140]  drm_ioctl_kernel+0xa7/0xf0 [drm]
      [ 3083.158153]  drm_ioctl+0x45b/0x560 [drm]
      [ 3083.158155]  do_vfs_ioctl+0x13b/0x880
      [ 3083.158156]  SyS_ioctl+0x74/0x80
      [ 3083.158158]  entry_SYSCALL_64_fastpath+0x1a/0x7d
      
      [ 3083.158162] The buggy address belongs to the object at ffff8806bf20f400
                      which belongs to the cache i915_dependency of size 64
      [ 3083.158166] The buggy address is located 0 bytes inside of
                      64-byte region [ffff8806bf20f400, ffff8806bf20f440)
      [ 3083.158168] The buggy address belongs to the page:
      [ 3083.158171] page:00000000d43decc4 count:1 mapcount:0 mapping:          (null) index:0x0
      [ 3083.158174] flags: 0x17ffe0000000100(slab)
      [ 3083.158179] raw: 017ffe0000000100 0000000000000000 0000000000000000 0000000180200020
      [ 3083.158182] raw: ffffea001afc16c0 0000000500000005 ffff880731b881c0 0000000000000000
      [ 3083.158184] page dumped because: kasan: bad access detected
      
      [ 3083.158187] Memory state around the buggy address:
      [ 3083.158190]  ffff8806bf20f300: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
      [ 3083.158192]  ffff8806bf20f380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
      [ 3083.158195] >ffff8806bf20f400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
      [ 3083.158196]                    ^
      [ 3083.158199]  ffff8806bf20f480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
      [ 3083.158201]  ffff8806bf20f500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
      [ 3083.158203] ==================================================================
      Reported-by: NAlexandru Chirvasitu <achirvasub@gmail.com>
      Reported-by: NMike Keehan <mike@keehan.net>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104436
      Fixes: 1f181225 ("drm/i915/execlists: Keep request->priority for its lifetime")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Alexandru Chirvasitu <achirvasub@gmail.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Tested-by: NAlexandru Chirvasitu <achirvasub@gmail.com>
      Reviewed-by: NMichał Winiarski <michal.winiarski@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180106105618.13532-1-chris@chris-wilson.co.uk
      (cherry picked from commit c218ee03)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      5005c851
    • K
      drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake. · 4636bda8
      Kenneth Graunke 提交于
      Geminilake requires the 3D driver to select whether barriers are
      intended for compute shaders, or tessellation control shaders, by
      whacking a "Barrier Mode" bit in SLICE_COMMON_ECO_CHICKEN1 when
      switching pipelines.  Failure to do this properly can result in GPU
      hangs.
      
      Unfortunately, this means it needs to switch mid-batch, so only
      userspace can properly set it.  To facilitate this, the kernel needs
      to whitelist the register.
      
      The workarounds page currently tags this as applying to Broxton only,
      but that doesn't make sense.  The documentation for the register it
      references says the bit userspace is supposed to toggle only exists on
      Geminilake.  Empirically, the Mesa patch to toggle this bit appears to
      fix intermittent GPU hangs in tessellation control shader barrier tests
      on Geminilake; we haven't seen those hangs on Broxton.
      
      v2: Mention WA #0862 in the comment (it doesn't have a name).
      Signed-off-by: NKenneth Graunke <kenneth@whitecape.org>
      Acked-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180105085905.9298-1-kenneth@whitecape.org
      (cherry picked from commit ab062639)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      4636bda8
    • J
      mlxsw: spectrum_qdisc: Don't use variable array in mlxsw_sp_tclass_congestion_enable · db84924c
      Jiri Pirko 提交于
      Resolve the sparse warning:
      "sparse: Variable length array is used."
      Use 2 arrays for 2 PRM register accesses.
      
      Fixes: 96f17e07 ("mlxsw: spectrum: Support RED qdisc offload")
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Reviewed-by: NYuval Mintz <yuvalm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db84924c
    • Y
      mlxsw: pci: Wait after reset before accessing HW · 8e033a93
      Yuval Mintz 提交于
      After performing reset driver polls on HW indication until learning
      that the reset is done, but immediately after reset the device becomes
      unresponsive which might lead to completion timeout on the first read.
      
      Wait for 100ms before starting the polling.
      
      Fixes: 233fa44b ("mlxsw: pci: Implement reset done check")
      Signed-off-by: NYuval Mintz <yuvalm@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e033a93
    • J
      nfp: always unmask aux interrupts at init · fc233650
      Jakub Kicinski 提交于
      The link state and exception interrupts may be masked when we probe.
      The firmware should in theory prevent sending (and automasking) those
      interrupts if the device is disabled, but if my reading of the FW code
      is correct there are firmwares out there with race conditions in this
      area.  The interrupt may also be masked if previous driver which used
      the device was malfunctioning and we didn't load the FW (there is no
      other good way to comprehensively reset the PF).
      
      Note that FW unmasks the data interrupts by itself when vNIC is
      enabled, such helpful operation is not performed for LSC/EXN interrupts.
      
      Always unmask the auxiliary interrupts after request_irq().  On the
      remove path add missing PCI write flush before free_irq().
      
      Fixes: 4c352362 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs")
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc233650
    • M
      of_mdio: avoid MDIO bus removal when a PHY is missing · 95f566de
      Madalin Bucur 提交于
      If one of the child devices is missing the of_mdiobus_register_phy()
      call will return -ENODEV. When a missing device is encountered the
      registration of the remaining PHYs is stopped and the MDIO bus will
      fail to register. Propagate all errors except ENODEV to avoid it.
      Signed-off-by: NMadalin Bucur <madalin.bucur@nxp.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95f566de
    • Y
      net: gianfar_ptp: move set_fipers() to spinlock protecting area · 11d827a9
      Yangbo Lu 提交于
      set_fipers() calling should be protected by spinlock in
      case that any interrupt breaks related registers setting
      and the function we expect. This patch is to move set_fipers()
      to spinlock protecting area in ptp_gianfar_adjtime().
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11d827a9
  8. 10 1月, 2018 8 次提交