Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
Merge tag 'LE.UM.4.3.3.r1-01400-SDX55' into neutrino-msm-hotdogb-4.14
Browse files Browse the repository at this point in the history
"LE.UM.4.3.3.r1-01400-SDX55"

* tag 'LE.UM.4.3.3.r1-01400-SDX55':
  msm: sps: Assign proper BAM destination values
  ARM: dts: msm: Add lemur external modem support for sm8150
  ARM: dts: msm: Disable internal modem for sm8150 with lemur
  atlantic forwarding driver v1.1.8
  atlantic forwarding driver v1.1.9
  atlantic forwarding driver v1.1.10
  net: aquantia: Using non-interrupt mode for ICMP packets
  net: stmmac: Fixing KW errors
  cnss2: Add cnss_smmu_unmap API
  sched: Fix out of bounds issue in for_each_cluster macro
  msm: ipa: Return EINVAL when client not defined
  msm: ipa: pass client info properly
  ARM: align the start and end of v7_setup_stack to cache line
  msm: pci-msm: Add delay during system resume
  msm: ipa: enable SYSPIPE_ERR_DETECTION bit for deaggr_err
  dfc: TCP pure acks
  gpu: drm: msm: add event to event_list after register is successful

Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>

Conflicts:
	arch/arm64/boot/dts/qcom/Makefile
	drivers/net/ethernet/aquantia/atlantic-fwd/atl_ring.c
	kernel/sched/core_ctl.c
  • Loading branch information
0ctobot committed Oct 5, 2020
2 parents 6d48308 + 4d06126 commit f99b2fc
Show file tree
Hide file tree
Showing 46 changed files with 3,384 additions and 481 deletions.
5 changes: 3 additions & 2 deletions arch/arm/mm/proc-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <asm/pgtable-hwdef.h>
#include <asm/pgtable.h>
#include <asm/memory.h>
#include <asm/cache.h>

#include "proc-macros.S"

Expand Down Expand Up @@ -547,10 +548,10 @@ __v7_setup_stack_ptr:
ENDPROC(__v7_setup)

.bss
.align 2
.align L1_CACHE_SHIFT
__v7_setup_stack:
.space 4 * 7 @ 7 registers

.align L1_CACHE_SHIFT
__INITDATA

.weak cpu_v7_bugs_init
Expand Down
28 changes: 28 additions & 0 deletions arch/arm64/boot/dts/qcom/sm8150-lemur-cdp-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/clock/qcom,camcc-sm8150.h>

#include "sm8150-cdp.dtsi"

#include "sdx5xm-external-soc.dtsi"
#include "sm8150-lemur.dtsi"

/ {
model = "SM8150 LEMUR CDP";
compatible = "qcom,sm8150-cdp", "qcom,sm8150", "qcom,cdp";
qcom,board-id = <0x06010001 0x6>;
};

28 changes: 28 additions & 0 deletions arch/arm64/boot/dts/qcom/sm8150-lemur-mtp-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

/dts-v1/;
/plugin/;

#include <dt-bindings/clock/qcom,camcc-sm8150.h>

#include "sm8150-mtp.dtsi"

#include "sdx5xm-external-soc.dtsi"
#include "sm8150-lemur.dtsi"

/ {
model = "SM8150 LEMUR MTP";
compatible = "qcom,sm8150-mtp", "qcom,sm8150", "qcom,mtp";
qcom,board-id = <0x06010008 0x6>;
};

24 changes: 24 additions & 0 deletions arch/arm64/boot/dts/qcom/sm8150-lemur.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

&mdm3 {
compatible = "qcom,ext-lemur";
qcom,mdm-link-info = "0308_01.01.00";
};

&pil_modem {
status = "disabled";
};

&glink_modem {
status = "disabled";
};
21 changes: 12 additions & 9 deletions drivers/gpu/drm/msm/msm_drv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
* Copyright (C) 2013 Red Hat
* Author: Rob Clark <robdclark@gmail.com>
*
Expand Down Expand Up @@ -1531,24 +1531,27 @@ static int msm_ioctl_register_event(struct drm_device *dev, void *data,
* calls add to client list and return.
*/
count = msm_event_client_count(dev, req_event, false);
/* Add current client to list */
spin_lock_irqsave(&dev->event_lock, flag);
list_add_tail(&client->base.link, &priv->client_event_list);
spin_unlock_irqrestore(&dev->event_lock, flag);

if (count)
if (count) {
/* Add current client to list */
spin_lock_irqsave(&dev->event_lock, flag);
list_add_tail(&client->base.link, &priv->client_event_list);
spin_unlock_irqrestore(&dev->event_lock, flag);
return 0;
}

ret = msm_register_event(dev, req_event, file, true);
if (ret) {
DRM_ERROR("failed to enable event %x object %x object id %d\n",
req_event->event, req_event->object_type,
req_event->object_id);
kfree(client);
} else {
/* Add current client to list */
spin_lock_irqsave(&dev->event_lock, flag);
list_del(&client->base.link);
list_add_tail(&client->base.link, &priv->client_event_list);
spin_unlock_irqrestore(&dev->event_lock, flag);
kfree(client);
}

return ret;
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/net/ethernet/aquantia/atlantic-fwd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ atlantic-fwd-objs := atl_fw.o \
atl_ethtool.o \
atl_trace.o \
atl_compat.o \
atl_hwmon.o
atl_hwmon.o \
atl_ptp.o \
atl_hw_ptp.o

atlantic-fwd-$(CONFIG_ATLFWD_FWD) += atl_fwd.o
atlantic-fwd-$(CONFIG_ATLFWD_FWD_NETLINK) += atl_fwdnl.o \
Expand Down
87 changes: 84 additions & 3 deletions drivers/net/ethernet/aquantia/atlantic-fwd/atl2_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,56 @@ static inline int atl2_shared_buffer_finish_ack(struct atl_hw *hw)
return err;
}

static int atl2_fw_get_filter_caps(struct atl_hw *hw)
{
struct atl_nic *nic = container_of(hw, struct atl_nic, hw);
struct filter_caps_s filter_caps;
u32 tag_top;
int err;

err = atl2_shared_buffer_read_safe(hw, filter_caps, &filter_caps);
if (err)
return err;

hw->art_base_index = filter_caps.rslv_tbl_base_index * 8;
hw->art_available = filter_caps.rslv_tbl_count * 8;
if (hw->art_available == 0)
hw->art_available = 128;
nic->rxf_flex.available = 1;
nic->rxf_flex.base_index = filter_caps.flexible_filter_mask >> 1;
nic->rxf_mac.base_index = filter_caps.l2_filters_base_index;
nic->rxf_mac.available = filter_caps.l2_filter_count;
nic->rxf_etype.base_index = filter_caps.ethertype_filter_base_index;
nic->rxf_etype.available = filter_caps.ethertype_filter_count;
nic->rxf_etype.tag_top =
(nic->rxf_etype.available >= ATL2_RPF_ETYPE_TAGS) ?
(ATL2_RPF_ETYPE_TAGS) : (ATL2_RPF_ETYPE_TAGS >> 1);
nic->rxf_vlan.base_index = filter_caps.vlan_filter_base_index;
/* 0 - no tag, 1 - reserved for vlan-filter-offload filters */
tag_top = (filter_caps.vlan_filter_count == ATL_VLAN_FLT_NUM) ?
(ATL_VLAN_FLT_NUM - 2) :
(ATL_VLAN_FLT_NUM / 2 - 2);
nic->rxf_vlan.available = min_t(u32, filter_caps.vlan_filter_count - 2,
tag_top);
nic->rxf_ntuple.l3_v4_base_index = filter_caps.l3_ip4_filter_base_index;
nic->rxf_ntuple.l3_v4_available = min_t(u32,
filter_caps.l3_ip4_filter_count,
ATL_NTUPLE_FLT_NUM - 1);
nic->rxf_ntuple.l3_v6_base_index = filter_caps.l3_ip6_filter_base_index;
nic->rxf_ntuple.l3_v6_available = filter_caps.l3_ip6_filter_count;
nic->rxf_ntuple.l4_base_index = filter_caps.l4_filter_base_index;
nic->rxf_ntuple.l4_available = min_t(u32, filter_caps.l4_filter_count,
ATL_NTUPLE_FLT_NUM - 1);

return 0;
}

static int __atl2_fw_wait_init(struct atl_hw *hw)
{
struct request_policy_s request_policy;
struct link_control_s link_control;
uint32_t mtu;
int err;

BUILD_BUG_ON_MSG(sizeof(struct link_options_s) != 0x4,
"linkOptions invalid size");
Expand All @@ -168,7 +214,7 @@ static int __atl2_fw_wait_init(struct atl_hw *hw)
"pauseQuanta invalid size");
BUILD_BUG_ON_MSG(sizeof(struct cable_diag_control_s) != 0x4,
"cableDiagControl invalid size");
BUILD_BUG_ON_MSG(sizeof(struct statistics_s) != 0x6C,
BUILD_BUG_ON_MSG(sizeof(struct statistics_s) != 0x70,
"statistics_s invalid size");


Expand Down Expand Up @@ -225,9 +271,16 @@ static int __atl2_fw_wait_init(struct atl_hw *hw)
"stats invalid offset");
BUILD_BUG_ON_MSG(offsetof(struct fw_interface_out, filter_caps) != 0x774,
"filter_caps invalid offset");
BUILD_BUG_ON_MSG(offsetof(struct fw_interface_out,
management_status) != 0x78c,
"management_status invalid offset");
BUILD_BUG_ON_MSG(offsetof(struct fw_interface_out, trace) != 0x800,
"trace invalid offset");

err = atl2_fw_get_filter_caps(hw);
if (err)
return err;

atl2_shared_buffer_get(hw, link_control, link_control);
link_control.mode = ATL2_HOST_MODE_ACTIVE;
atl2_shared_buffer_write(hw, link_control, link_control);
Expand All @@ -236,6 +289,30 @@ static int __atl2_fw_wait_init(struct atl_hw *hw)
mtu = ATL_MAX_MTU + ETH_FCS_LEN + ETH_HLEN;
atl2_shared_buffer_write(hw, mtu, mtu);

atl2_shared_buffer_get(hw, request_policy, request_policy);
request_policy.bcast.accept = 1;
request_policy.bcast.queue_or_tc = 1;
request_policy.bcast.rx_queue_tc_index = 0;
request_policy.mcast.accept = 1;
request_policy.mcast.queue_or_tc = 1;
request_policy.mcast.rx_queue_tc_index = 0;
request_policy.promisc.queue_or_tc = 1;
request_policy.promisc.rx_queue_tc_index = 0;
atl2_shared_buffer_write(hw, request_policy, request_policy);

return atl2_shared_buffer_finish_ack(hw);
}

int atl2_fw_set_filter_policy(struct atl_hw *hw, bool promisc, bool allmulti)
{
struct request_policy_s request_policy;

atl2_shared_buffer_get(hw, request_policy, request_policy);

request_policy.promisc.all = promisc;
request_policy.mcast.promisc = allmulti;

atl2_shared_buffer_write(hw, request_policy, request_policy);
return atl2_shared_buffer_finish_ack(hw);
}

Expand Down Expand Up @@ -498,9 +575,11 @@ static struct atl_link_type *atl2_fw_check_link(struct atl_hw *hw)
{
struct atl_link_type *link;
struct atl_link_state *lstate = &hw->link_state;
struct phy_health_monitor_s phy_health_monitor = {0};
struct phy_health_monitor_s phy_health_monitor;
int ret = 0;

memset(&phy_health_monitor, 0, sizeof(phy_health_monitor));

atl_lock_fw(hw);

__atl2_fw_update_link_status(hw);
Expand Down Expand Up @@ -700,10 +779,12 @@ static int atl2_fw_enable_wol(struct atl_hw *hw, unsigned int wol_mode)
static int atl2_fw_update_thermal(struct atl_hw *hw)
{
bool enable = !!(hw->thermal.flags & atl_thermal_monitor);
struct phy_health_monitor_s phy_health_monitor = {0};
struct phy_health_monitor_s phy_health_monitor;
struct thermal_shutdown_s thermal_shutdown;
int ret = 0;

memset(&phy_health_monitor, 0, sizeof(phy_health_monitor));

atl_lock_fw(hw);

atl2_shared_buffer_get(hw, thermal_shutdown, thermal_shutdown);
Expand Down
Loading

0 comments on commit f99b2fc

Please sign in to comment.