1. 29 8月, 2019 2 次提交
  2. 28 8月, 2019 1 次提交
    • M
      Add genphy_c45_config_aneg() function to phy-c45.c · 94acaeb5
      Marco Hartmann 提交于
      Commit 34786005 ("net: phy: prevent PHYs w/o Clause 22 regs from calling
      genphy_config_aneg") introduced a check that aborts phy_config_aneg()
      if the phy is a C45 phy.
      This causes phy_state_machine() to call phy_error() so that the phy
      ends up in PHY_HALTED state.
      
      Instead of returning -EOPNOTSUPP, call genphy_c45_config_aneg()
      (analogous to the C22 case) so that the state machine can run
      correctly.
      
      genphy_c45_config_aneg() closely resembles mv3310_config_aneg()
      in drivers/net/phy/marvell10g.c, excluding vendor specific
      configurations for 1000BaseT.
      
      Fixes: 22b56e82 ("net: phy: replace genphy_10g_driver with genphy_c45_driver")
      Signed-off-by: NMarco Hartmann <marco.hartmann@nxp.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      94acaeb5
  3. 27 8月, 2019 2 次提交
  4. 26 8月, 2019 1 次提交
  5. 25 8月, 2019 1 次提交
  6. 24 8月, 2019 3 次提交
  7. 23 8月, 2019 12 次提交
  8. 22 8月, 2019 11 次提交
    • B
      RDMA/siw: Fix SGL mapping issues · fab4f97e
      Bernard Metzler 提交于
      All user level and most in-kernel applications submit WQEs
      where the SG list entries are all of a single type.
      iSER in particular, however, will send us WQEs with mixed SG
      types: sge[0] = kernel buffer, sge[1] = PBL region.
      Check and set is_kva on each SG entry individually instead of
      assuming the first SGE type carries through to the last.
      This fixes iSER over siw.
      
      Fixes: b9be6f18 ("rdma/siw: transmit path")
      Reported-by: NKrishnamraju Eraparaju <krishna2@chelsio.com>
      Tested-by: NKrishnamraju Eraparaju <krishna2@chelsio.com>
      Signed-off-by: NBernard Metzler <bmt@zurich.ibm.com>
      Link: https://lore.kernel.org/r/20190822150741.21871-1-bmt@zurich.ibm.comSigned-off-by: NDoug Ledford <dledford@redhat.com>
      fab4f97e
    • S
      RDMA/bnxt_re: Fix stack-out-of-bounds in bnxt_qplib_rcfw_send_message · d37b1e53
      Selvin Xavier 提交于
      Driver copies FW commands to the HW queue as  units of 16 bytes. Some
      of the command structures are not exact multiple of 16. So while copying
      the data from those structures, the stack out of bounds messages are
      reported by KASAN. The following error is reported.
      
      [ 1337.530155] ==================================================================
      [ 1337.530277] BUG: KASAN: stack-out-of-bounds in bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re]
      [ 1337.530413] Read of size 16 at addr ffff888725477a48 by task rmmod/2785
      
      [ 1337.530540] CPU: 5 PID: 2785 Comm: rmmod Tainted: G           OE     5.2.0-rc6+ #75
      [ 1337.530541] Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 1.0.4 08/28/2014
      [ 1337.530542] Call Trace:
      [ 1337.530548]  dump_stack+0x5b/0x90
      [ 1337.530556]  ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re]
      [ 1337.530560]  print_address_description+0x65/0x22e
      [ 1337.530568]  ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re]
      [ 1337.530575]  ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re]
      [ 1337.530577]  __kasan_report.cold.3+0x37/0x77
      [ 1337.530581]  ? _raw_write_trylock+0x10/0xe0
      [ 1337.530588]  ? bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re]
      [ 1337.530590]  kasan_report+0xe/0x20
      [ 1337.530592]  memcpy+0x1f/0x50
      [ 1337.530600]  bnxt_qplib_rcfw_send_message+0x40a/0x850 [bnxt_re]
      [ 1337.530608]  ? bnxt_qplib_creq_irq+0xa0/0xa0 [bnxt_re]
      [ 1337.530611]  ? xas_create+0x3aa/0x5f0
      [ 1337.530613]  ? xas_start+0x77/0x110
      [ 1337.530615]  ? xas_clear_mark+0x34/0xd0
      [ 1337.530623]  bnxt_qplib_free_mrw+0x104/0x1a0 [bnxt_re]
      [ 1337.530631]  ? bnxt_qplib_destroy_ah+0x110/0x110 [bnxt_re]
      [ 1337.530633]  ? bit_wait_io_timeout+0xc0/0xc0
      [ 1337.530641]  bnxt_re_dealloc_mw+0x2c/0x60 [bnxt_re]
      [ 1337.530648]  bnxt_re_destroy_fence_mr+0x77/0x1d0 [bnxt_re]
      [ 1337.530655]  bnxt_re_dealloc_pd+0x25/0x60 [bnxt_re]
      [ 1337.530677]  ib_dealloc_pd_user+0xbe/0xe0 [ib_core]
      [ 1337.530683]  srpt_remove_one+0x5de/0x690 [ib_srpt]
      [ 1337.530689]  ? __srpt_close_all_ch+0xc0/0xc0 [ib_srpt]
      [ 1337.530692]  ? xa_load+0x87/0xe0
      ...
      [ 1337.530840]  do_syscall_64+0x6d/0x1f0
      [ 1337.530843]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [ 1337.530845] RIP: 0033:0x7ff5b389035b
      [ 1337.530848] Code: 73 01 c3 48 8b 0d 2d 0b 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fd 0a 2c 00 f7 d8 64 89 01 48
      [ 1337.530849] RSP: 002b:00007fff83425c28 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
      [ 1337.530852] RAX: ffffffffffffffda RBX: 00005596443e6750 RCX: 00007ff5b389035b
      [ 1337.530853] RDX: 000000000000000a RSI: 0000000000000800 RDI: 00005596443e67b8
      [ 1337.530854] RBP: 0000000000000000 R08: 00007fff83424ba1 R09: 0000000000000000
      [ 1337.530856] R10: 00007ff5b3902960 R11: 0000000000000206 R12: 00007fff83425e50
      [ 1337.530857] R13: 00007fff8342673c R14: 00005596443e6260 R15: 00005596443e6750
      
      [ 1337.530885] The buggy address belongs to the page:
      [ 1337.530962] page:ffffea001c951dc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0
      [ 1337.530964] flags: 0x57ffffc0000000()
      [ 1337.530967] raw: 0057ffffc0000000 0000000000000000 ffffffff1c950101 0000000000000000
      [ 1337.530970] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
      [ 1337.530970] page dumped because: kasan: bad access detected
      
      [ 1337.530996] Memory state around the buggy address:
      [ 1337.531072]  ffff888725477900: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 f2 f2 f2
      [ 1337.531180]  ffff888725477980: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00
      [ 1337.531288] >ffff888725477a00: 00 f2 f2 f2 f2 f2 f2 00 00 00 f2 00 00 00 00 00
      [ 1337.531393]                                                  ^
      [ 1337.531478]  ffff888725477a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      [ 1337.531585]  ffff888725477b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      [ 1337.531691] ==================================================================
      
      Fix this by passing the exact size of each FW command to
      bnxt_qplib_rcfw_send_message as req->cmd_size. Before sending
      the command to HW, modify the req->cmd_size to number of 16 byte units.
      
      Fixes: 1ac5a404 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
      Signed-off-by: NSelvin Xavier <selvin.xavier@broadcom.com>
      Link: https://lore.kernel.org/r/1566468170-489-1-git-send-email-selvin.xavier@broadcom.comSigned-off-by: NDoug Ledford <dledford@redhat.com>
      d37b1e53
    • D
      gve: Copy and paste bug in gve_get_stats() · cc07db5a
      Dan Carpenter 提交于
      There is a copy and paste error so we have "rx" where "tx" was intended
      in the priv->tx[] array.
      
      Fixes: f5cedc84 ("gve: Add transmit and receive support")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NCatherine Sullivan <csully@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc07db5a
    • F
      net: dsa: bcm_sf2: Do not configure PHYLINK on CPU port · 738a2e4b
      Florian Fainelli 提交于
      The SF2 binding does not specify that the CPU port should have
      properties mandatory for successfully instantiating a PHYLINK object. As
      such, there will be missing properties (including fixed-link) and when
      attempting to validate and later configure link modes, we will have an
      incorrect set of parameters (interface, speed, duplex).
      
      Simply prevent the CPU port from being configured through PHYLINK since
      bcm_sf2_imp_setup() takes care of that already.
      
      Fixes: 0e279218 ("net: dsa: Use PHYLINK for the CPU/DSA ports")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      738a2e4b
    • N
      drm/amd/display: Calculate bpc based on max_requested_bpc · ec6e4913
      Nicholas Kazlauskas 提交于
      [Why]
      The only place where state->max_bpc is updated on the connector is
      at the start of atomic check during drm_atomic_connector_check. It
      isn't updated when adding the connectors to the atomic state after
      the fact. It also doesn't necessarily reflect the right value when
      called in amdgpu during mode validation outside of atomic check.
      
      This can cause the wrong bpc to be used even if the max_requested_bpc
      is the correct value.
      
      [How]
      Don't rely on state->max_bpc reflecting the real bpc value and just
      do the min(...) based on display info bpc and max_requested_bpc.
      
      Fixes: 01933ba4 ("drm/amd/display: Use current connector state if NULL when checking bpc")
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Reviewed-by: NLeo Li <sunpeng.li@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      ec6e4913
    • N
      drm/amdgpu: prevent memory leaks in AMDGPU_CS ioctl · 1a701ea9
      Nicolai Hähnle 提交于
      Error out if the AMDGPU_CS ioctl is called with multiple SYNCOBJ_OUT and/or
      TIMELINE_SIGNAL chunks, since otherwise the last chunk wins while the
      allocated array as well as the reference counts of sync objects are leaked.
      Signed-off-by: NNicolai Hähnle <nicolai.haehnle@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      1a701ea9
    • K
      drm/amd/amdgpu: disable MMHUB PG for navi10 · 221a2bdb
      Kenneth Feng 提交于
      Disable MMHUB PG for navi10 according to the production requirement.
      Signed-off-by: NKenneth Feng <kenneth.feng@amd.com>
      Reviewed-by: NHawking Zhang <Hawking.Zhang@amd.com>
      Reviewed-by: NKevin Wang <kevin1.wang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      221a2bdb
    • K
      drm/amd/powerplay: remove duplicate macro smu_get_uclk_dpm_states in amdgpu_smu.h · 155f85c0
      Kevin Wang 提交于
      remove duplicate macro smu_get_uclk_dpm_states in amdgpu_smu.h
      
      "
       #define smu_get_uclk_dpm_states(smu, clocks_in_khz, num_states) \
               ((smu)->ppt_funcs->get_uclk_dpm_states ? (smu)->ppt_funcs->get_uclk_dpm_states((smu), (clocks_in_khz), (num_states)) : 0)
       #define smu_get_max_sustainable_clocks_by_dc(smu, max_clocks) \
               ((smu)->funcs->get_max_sustainable_clocks_by_dc ? (smu)->funcs->get_max_sustainable_clocks_by_dc((smu), (max_clocks)) : 0)
       #define smu_get_uclk_dpm_states(smu, clocks_in_khz, num_states) \
               ((smu)->ppt_funcs->get_uclk_dpm_states ? (smu)->ppt_funcs->get_uclk_dpm_states((smu), (clocks_in_khz), (num_states)) : 0)
      "
      Signed-off-by: NKevin Wang <kevin1.wang@amd.com>
      Reviewed-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      155f85c0
    • K
      drm/amd/powerplay: fix variable type errors in smu_v11_0_setup_pptable · 00430144
      Kevin Wang 提交于
      fix size type errors, from uint32_t to uint16_t.
      it will cause only initializes the highest 16 bits in
      smu_get_atom_data_table function.
      
      bug report:
      This fixes the following static checker warning.
              drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:390 smu_v11_0_setup_pptable()
              warn: passing casted pointer '&size' to 'smu_get_atom_data_table()' 32 vs 16.
      Signed-off-by: NKevin Wang <kevin1.wang@amd.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      00430144
    • A
      drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible · 98f58ada
      Alex Deucher 提交于
      We need to set certain power gating flags after we determine
      if the firmware version is sufficient to support gfxoff.
      Previously we set the pg flags in early init, but we later
      we might have disabled gfxoff if the firmware versions didn't
      support it.  Move adding the additional pg flags after we
      determine whether or not to support gfxoff.
      
      Fixes: 00544006 ("drm/amdgpu: enable gfxoff again on raven series (v2)")
      Tested-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Tested-by: NTom St Denis <tom.stdenis@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: stable@vger.kernel.org
      98f58ada
    • A
      net: cpsw: fix NULL pointer exception in the probe error path · 2d683eaa
      Antoine Tenart 提交于
      In certain cases when the probe function fails the error path calls
      cpsw_remove_dt() before calling platform_set_drvdata(). This is an
      issue as cpsw_remove_dt() uses platform_get_drvdata() to retrieve the
      cpsw_common data and leds to a NULL pointer exception. This patches
      fixes it by calling platform_set_drvdata() earlier in the probe.
      
      Fixes: 83a8471b ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
      Reported-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d683eaa
  9. 21 8月, 2019 7 次提交