1. 30 3月, 2021 11 次提交
  2. 29 3月, 2021 16 次提交
  3. 27 3月, 2021 13 次提交
    • L
      farsync: use DEFINE_SPINLOCK() for spinlock · a1281601
      Liu Jian 提交于
      spinlock can be initialized automatically with DEFINE_SPINLOCK()
      rather than explicitly calling spin_lock_init().
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NLiu Jian <liujian56@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1281601
    • M
      net: stmmac: Fix kernel panic due to NULL pointer dereference of fpe_cfg · 63c173ff
      Mohammad Athari Bin Ismail 提交于
      In this patch, "net: stmmac: support FPE link partner hand-shaking
      procedure", priv->plat->fpe_cfg wouldn`t be "devm_kzalloc"ed if
      dma_cap->frpsel is 0 (Flexible Rx Parser is not supported in SoC) in
      tc_init(). So, fpe_cfg will be remain as NULL and accessing it will cause
      kernel panic.
      
      To fix this, move the "devm_kzalloc"ing of priv->plat->fpe_cfg before
      dma_cap->frpsel checking in tc_init(). Additionally, checking of
      priv->dma_cap.fpesel is added before calling stmmac_fpe_link_state_handle()
      as only FPE supported SoC is allowed to call the function.
      
      Below is the kernel panic dump reported by Marek Szyprowski
      <m.szyprowski@samsung.com>:
      
      meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=35)
      meson8b-dwmac ff3f0000.ethernet eth0: No Safety Features support found
      meson8b-dwmac ff3f0000.ethernet eth0: PTP not supported by HW
      meson8b-dwmac ff3f0000.ethernet eth0: configuring for phy/rgmii link mode
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000001
      Mem abort info:
      ...
      user pgtable: 4k pages, 48-bit VAs, pgdp=00000000044eb000
      [0000000000000001] pgd=0000000000000000, p4d=0000000000000000
      Internal error: Oops: 96000004 [#1] PREEMPT SMP
      Modules linked in: dw_hdmi_i2s_audio dw_hdmi_cec meson_gxl realtek meson_gxbb_wdt snd_soc_meson_axg_sound_card dwmac_generic axg_audio meson_dw_hdmi crct10dif_ce snd_soc_meson_card_utils snd_soc_meson_axg_tdmout panfrost rc_odroid gpu_sched reset_meson_audio_arb meson_ir snd_soc_meson_g12a_tohdmitx snd_soc_meson_axg_frddr sclk_div clk_phase snd_soc_meson_codec_glue dwmac_meson8b snd_soc_meson_axg_fifo stmmac_platform meson_rng meson_drm stmmac rtc_meson_vrtc rng_core meson_canvas pwm_meson dw_hdmi mdio_mux_meson_g12a pcs_xpcs snd_soc_meson_axg_tdm_interface snd_soc_meson_axg_tdm_formatter nvmem_meson_efuse display_connector
      CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.12.0-rc4-next-20210325+
      Hardware name: Hardkernel ODROID-C4 (DT)
      Workqueue: events_power_efficient phylink_resolve
      pstate: 20400009 (nzCv daif +PAN -UAO -TCO BTYPE=--)
      pc : stmmac_mac_link_up+0x14c/0x348 [stmmac]
      lr : stmmac_mac_link_up+0x284/0x348 [stmmac] ...
      Call trace:
       stmmac_mac_link_up+0x14c/0x348 [stmmac]
       phylink_resolve+0x104/0x420
       process_one_work+0x2a8/0x718
       worker_thread+0x48/0x460
       kthread+0x134/0x160
       ret_from_fork+0x10/0x18
      Code: b971ba60 350007c0 f958c260 f9402000 (39400401)
      ---[ end trace 0c9deb6c510228aa ]---
      
      Fixes: 5a558611 ("net: stmmac: support FPE link partner hand-shaking
      procedure")
      Reported-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
      Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63c173ff
    • X
      net: ethernet: remove duplicated include · aeab5cfb
      Xu Jia 提交于
      Remove duplicated include from mtk_ppe_offload.c.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NXu Jia <xujia39@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aeab5cfb
    • R
      net: axienet: Enable more clocks · b11bfb9a
      Robert Hancock 提交于
      This driver was only enabling the first clock on the device, regardless
      of its name. However, this controller logic can have multiple clocks
      which should all be enabled. Add support for enabling additional clocks.
      The clock names used are matching those used in the Xilinx version of this
      driver as well as the Xilinx device tree generator, except for mgt_clk
      which is not present there.
      
      For backward compatibility, if no named clocks are present, the first
      clock present is used for determining the MDIO bus clock divider.
      Reviewed-by: NRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
      Signed-off-by: NRobert Hancock <robert.hancock@calian.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b11bfb9a
    • A
      net: ipa: support more than 6 resource groups · 3219953b
      Alex Elder 提交于
      IPA versions 3.0 and 3.1 support up to 8 resource groups.  There is
      some interest in supporting these older versions of the hardware, so
      update the resource configuration code to program resource limits
      for these groups if specified.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3219953b
    • A
      net: ipa: record number of groups in data · 4fd704b3
      Alex Elder 提交于
      The arrays of source and destination resource limits defined in
      configuration data are of a fixed size--which is the maximum number
      of resource groups supported for any platform.  Most platforms will
      use fewer than that many groups.
      
      Add new members to the ipa_rsrc_group_id enumerated type to define
      the number of source and destination resource groups are defined for
      the platform.  (This type is defined for each platform in its data
      file.)
      
      Add a new field to the resource configuration data that indicates
      how many of the source and destination resource groups are actually
      used for the platform, and initialize it with the count value.  This
      allows us to determine the number of groups defined for the platform
      without exposing the ipa_rsrc_group_id enumerated type.
      
      As a result, we no longer need ipa_resource_group_src_count()
      and ipa_resource_group_dst_count(), because each platform now
      defines its supported number of resource groups.  So get rid of
      those two functions.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4fd704b3
    • A
      net: ipa: pass data for source and dest resource config · 93c03729
      Alex Elder 提交于
      Pass the resource data pointer to ipa_resource_config_src() and
      ipa_resource_config_dst() to be used for configuring resource
      limits.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93c03729
    • A
      net: ipa: combine source and destation resource types · 7336ce1a
      Alex Elder 提交于
      The ipa_resource_src and ipa_resource_dst structures are identical
      in form, so just replace them with a single structure.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7336ce1a
    • A
      net: ipa: combine source and destination group limits · d9d1cddf
      Alex Elder 提交于
      Replace IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX
      with a single symbol, IPA_RESOURCE_GROUP_MAX.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9d1cddf
    • A
      net: ipa: move ipa_resource_type definition · cf9a10bd
      Alex Elder 提交于
      Most platforms have the same set of source and destination resource
      types.  But some older platforms have some additional ones, and it's
      possible different resources will be used in the future.
      
      Move the definition of the ipa_resource_type enumerated type so it
      is defined for each platform in its configuration data file.  This
      permits each to have a distinct set of resources.
      
      Shorten the data files slightly, by putting the min and max limit
      values on the same line.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf9a10bd
    • A
      net: ipa: index resource limits with type · 4bcfb35e
      Alex Elder 提交于
      Remove the type field from the ipa_resource_src and ipa_resource_dst
      structures, and instead use that value as the index into the arrays
      of source and destination resources.
      
      Change ipa_resource_config_src() and ipa_resource_config_dst() so
      the resource type is passed in as an argument.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bcfb35e
    • A
      net: ipa: combine resource type definitions · fd2b7bc3
      Alex Elder 提交于
      Combine the ipa_resource_type_src and ipa_resource_type_dst
      enumerated types into a single enumerated type, ipa_resource_type.
      
      Assign value 0 to the first element for the source and destination
      types, so their numeric values are preserved.  Add some additional
      commentary where these are defined, stating explicitly that code
      assumes the first source and first destination member must have
      numeric value 0.
      
      Fix the kerneldoc comments for the ipa_gsi_endpoint_data structure.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd2b7bc3
    • A
      net: ipa: add some missing resource limits · 9ab7e728
      Alex Elder 提交于
      Currently, the SDM845 configuration data defines resource limits for
      the first two resource groups (for both source and destination
      resource types).  The hardware supports additional resource groups,
      and we should program the resource limits for those groups as well.
      
      Even the "unused" destination resource group (number 2) should have
      non-zero limits programmed in some cases, to ensure correct operation.
      
      Add these missing resource group limit definitions to the SDM845
      configuration data.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ab7e728