Merge tag 'LA.UM.9.14.r1-23300-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
"LA.UM.9.14.r1-23300-LAHAINA.QSSI14.0" * tag 'LA.UM.9.14.r1-23300-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4: coresight: Fix duplicate and abnormal stop issues of PCIE sw path nl80211: fix beacon tx rate mask validation msm_ipa: Add flag to enable ipv6 option header soc:qcom: trivial fix soc: qcom: socinfo: Add sku sysfs support soc: qcom: socinfo: Add revision 16 support in socinfo structure mtd: msm_qpic_nand: Add mutex lock in system suspend/resume functions Conflicts: drivers/firmware/qcom_scm.c drivers/md/dm-verity-target.c drivers/usb/dwc3/core.c drivers/usb/dwc3/debugfs.c drivers/usb/gadget/function/f_fs.c Change-Id: If237dbcd440d72c0a56ed7ca57f1d55a777973a5
This commit is contained in:
commit
0013ddf520
@ -1 +1 @@
|
||||
LTS_5.4.242_e699d543bbc9
|
||||
LTS_5.4.254_91f702572a80
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1229,6 +1229,7 @@ static void qcom_scm_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
qcom_scm_disable_sdi();
|
||||
qcom_scm_halt_spmi_pmic_arbiter();
|
||||
qcom_scm_set_download_mode(QCOM_DOWNLOAD_NODUMP, 0);
|
||||
}
|
||||
|
||||
static const struct of_device_id qcom_scm_dt_match[] = {
|
||||
|
@ -785,7 +785,7 @@ static void etr_pcie_write_work_fn(struct work_struct *work)
|
||||
req->snd_cmpl = 1;
|
||||
|
||||
bytes_to_write = mhi_dev_write_channel(req);
|
||||
if (bytes_to_write != PCIE_BLK_SIZE) {
|
||||
if (bytes_to_write != actual) {
|
||||
dev_err(&tmcdrvdata->csdev->dev, "Write error %d\n",
|
||||
bytes_to_write);
|
||||
|
||||
@ -795,7 +795,7 @@ static void etr_pcie_write_work_fn(struct work_struct *work)
|
||||
}
|
||||
|
||||
mutex_lock(&byte_cntr_data->byte_cntr_lock);
|
||||
if (byte_cntr_data->offset + actual >= tmcdrvdata->size)
|
||||
if (byte_cntr_data->offset + actual >= tmcdrvdata->sysfs_buf->size)
|
||||
byte_cntr_data->offset = 0;
|
||||
else
|
||||
byte_cntr_data->offset += actual;
|
||||
|
@ -1172,7 +1172,8 @@ static void __tmc_etr_disable_hw(struct tmc_drvdata *drvdata)
|
||||
{
|
||||
CS_UNLOCK(drvdata->base);
|
||||
|
||||
tmc_flush_and_stop(drvdata);
|
||||
if (drvdata->out_mode != TMC_ETR_OUT_MODE_PCIE)
|
||||
tmc_flush_and_stop(drvdata);
|
||||
/*
|
||||
* When operating in sysFS mode the content of the buffer needs to be
|
||||
* read before the TMC is disabled.
|
||||
|
@ -231,20 +231,27 @@ static void msm_nand_print_rpm_info(struct device *dev)
|
||||
static int msm_nand_suspend(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
struct msm_nand_info *info = dev_get_drvdata(dev);
|
||||
|
||||
mutex_lock(&info->lock);
|
||||
|
||||
if (!pm_runtime_suspended(dev))
|
||||
ret = msm_nand_runtime_suspend(dev);
|
||||
|
||||
mutex_unlock(&info->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int msm_nand_resume(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
struct msm_nand_info *info = dev_get_drvdata(dev);
|
||||
|
||||
mutex_lock(&info->lock);
|
||||
if (!pm_runtime_suspended(dev))
|
||||
ret = msm_nand_runtime_resume(dev);
|
||||
|
||||
mutex_unlock(&info->lock);
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
|
@ -34,6 +34,7 @@
|
||||
#define SMEM_IMAGE_VERSION_TABLE 469
|
||||
|
||||
static uint32_t socinfo_format;
|
||||
static const char *sku;
|
||||
|
||||
enum {
|
||||
HW_PLATFORM_UNKNOWN = 0,
|
||||
@ -121,6 +122,51 @@ static const char * const hw_platform_subtype[] = {
|
||||
[PLATFORM_SUBTYPE_INVALID] = "Invalid",
|
||||
};
|
||||
|
||||
enum {
|
||||
/* External SKU */
|
||||
SKU_UNKNOWN = 0x0,
|
||||
SKU_AA = 0x1,
|
||||
SKU_AB = 0x2,
|
||||
SKU_AC = 0x3,
|
||||
SKU_AD = 0x4,
|
||||
SKU_AE = 0x5,
|
||||
SKU_AF = 0x6,
|
||||
SKU_EXT_RESERVE,
|
||||
|
||||
/* Internal SKU */
|
||||
SKU_Y0 = 0xf1,
|
||||
SKU_Y1 = 0xf2,
|
||||
SKU_Y2 = 0xf3,
|
||||
SKU_Y3 = 0xf4,
|
||||
SKU_Y4 = 0xf5,
|
||||
SKU_Y5 = 0xf6,
|
||||
SKU_Y6 = 0xf7,
|
||||
SKU_Y7 = 0xf8,
|
||||
SKU_INT_RESERVE,
|
||||
};
|
||||
|
||||
static const char * const hw_platform_esku[] = {
|
||||
[SKU_UNKNOWN] = "Unknown",
|
||||
[SKU_AA] = "AA",
|
||||
[SKU_AB] = "AB",
|
||||
[SKU_AC] = "AC",
|
||||
[SKU_AD] = "AD",
|
||||
[SKU_AE] = "AE",
|
||||
[SKU_AF] = "AF",
|
||||
};
|
||||
|
||||
#define SKU_INT_MASK 0x0f
|
||||
static const char * const hw_platform_isku[] = {
|
||||
[SKU_Y0 & SKU_INT_MASK] = "Y0",
|
||||
[SKU_Y1 & SKU_INT_MASK] = "Y1",
|
||||
[SKU_Y2 & SKU_INT_MASK] = "Y2",
|
||||
[SKU_Y3 & SKU_INT_MASK] = "Y3",
|
||||
[SKU_Y4 & SKU_INT_MASK] = "Y4",
|
||||
[SKU_Y5 & SKU_INT_MASK] = "Y5",
|
||||
[SKU_Y6 & SKU_INT_MASK] = "Y6",
|
||||
[SKU_Y7 & SKU_INT_MASK] = "Y7",
|
||||
};
|
||||
|
||||
/* Socinfo SMEM item structure */
|
||||
static struct socinfo {
|
||||
__le32 fmt;
|
||||
@ -167,6 +213,11 @@ static struct socinfo {
|
||||
__le32 ndefective_parts_array_offset;
|
||||
/* Version 15 */
|
||||
__le32 nmodem_supported;
|
||||
/* Version 16 */
|
||||
__le32 esku;
|
||||
__le32 nproduct_code;
|
||||
__le32 npartnamemap_offset;
|
||||
__le32 nnum_partname_mapping;
|
||||
} *socinfo;
|
||||
|
||||
/* sysfs attributes */
|
||||
@ -362,6 +413,35 @@ static uint32_t socinfo_get_nmodem_supported(void)
|
||||
: 0;
|
||||
}
|
||||
|
||||
/* Version 16 */
|
||||
static uint32_t socinfo_get_eskuid(void)
|
||||
{
|
||||
return socinfo ?
|
||||
(socinfo_format >= SOCINFO_VERSION(0, 16) ?
|
||||
le32_to_cpu(socinfo->esku) : 0)
|
||||
: 0;
|
||||
}
|
||||
|
||||
static const char *socinfo_get_esku_mapping(void)
|
||||
{
|
||||
uint32_t id = socinfo_get_eskuid();
|
||||
|
||||
if (id > SKU_UNKNOWN && id < SKU_EXT_RESERVE)
|
||||
return hw_platform_esku[id];
|
||||
else if (id >= SKU_Y0 && id < SKU_INT_RESERVE)
|
||||
return hw_platform_isku[id & SKU_INT_MASK];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static uint32_t socinfo_get_nproduct_code(void)
|
||||
{
|
||||
return socinfo ?
|
||||
(socinfo_format >= SOCINFO_VERSION(0, 16) ?
|
||||
le32_to_cpu(socinfo->nproduct_code) : 0)
|
||||
: 0;
|
||||
}
|
||||
|
||||
/* Version 2 */
|
||||
static ssize_t
|
||||
msm_get_raw_id(struct device *dev,
|
||||
@ -612,6 +692,27 @@ msm_get_nmodem_supported(struct device *dev,
|
||||
}
|
||||
ATTR_DEFINE(nmodem_supported);
|
||||
|
||||
/* Version 16 */
|
||||
static ssize_t
|
||||
msm_get_sku(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sysfs_emit(buf, "%s\n", sku ? sku : "Unknown");
|
||||
}
|
||||
ATTR_DEFINE(sku);
|
||||
|
||||
static ssize_t
|
||||
msm_get_esku(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
const char *esku = socinfo_get_esku_mapping();
|
||||
|
||||
return sysfs_emit(buf, "%s\n", esku ? esku : "Unknown");
|
||||
}
|
||||
ATTR_DEFINE(esku);
|
||||
|
||||
struct qcom_socinfo {
|
||||
struct soc_device *soc_dev;
|
||||
struct soc_device_attribute attr;
|
||||
@ -959,6 +1060,9 @@ static void socinfo_populate_sysfs(struct qcom_socinfo *qcom_socinfo)
|
||||
int i = 0;
|
||||
|
||||
switch (socinfo_format) {
|
||||
case SOCINFO_VERSION(0, 16):
|
||||
msm_custom_socinfo_attrs[i++] = &dev_attr_sku.attr;
|
||||
msm_custom_socinfo_attrs[i++] = &dev_attr_esku.attr;
|
||||
case SOCINFO_VERSION(0, 15):
|
||||
msm_custom_socinfo_attrs[i++] = &dev_attr_nmodem_supported.attr;
|
||||
case SOCINFO_VERSION(0, 14):
|
||||
@ -1200,6 +1304,31 @@ static void socinfo_print(void)
|
||||
socinfo->nmodem_supported);
|
||||
break;
|
||||
|
||||
case SOCINFO_VERSION(0, 16):
|
||||
pr_info("v%u.%u, id=%u, ver=%u.%u, raw_id=%u, raw_ver=%u, hw_plat=%u, hw_plat_ver=%u\n accessory_chip=%u, hw_plat_subtype=%u, pmic_model=%u, pmic_die_revision=%u foundry_id=%u serial_number=%u num_pmics=%u chip_family=0x%x raw_device_family=0x%x raw_device_number=0x%x nproduct_id=0x%x num_clusters=0x%x ncluster_array_offset=0x%x num_defective_parts=0x%x ndefective_parts_array_offset=0x%x nmodem_supported=0x%x sku=%s\n",
|
||||
f_maj, f_min, socinfo->id, v_maj, v_min,
|
||||
socinfo->raw_id, socinfo->raw_ver,
|
||||
socinfo->hw_plat,
|
||||
socinfo->plat_ver,
|
||||
socinfo->accessory_chip,
|
||||
socinfo->hw_plat_subtype,
|
||||
socinfo->pmic_model,
|
||||
socinfo->pmic_die_rev,
|
||||
socinfo->foundry_id,
|
||||
socinfo->serial_num,
|
||||
socinfo->num_pmics,
|
||||
socinfo->chip_family,
|
||||
socinfo->raw_device_family,
|
||||
socinfo->raw_device_num,
|
||||
socinfo->nproduct_id,
|
||||
socinfo->num_clusters,
|
||||
socinfo->ncluster_array_offset,
|
||||
socinfo->num_defective_parts,
|
||||
socinfo->ndefective_parts_array_offset,
|
||||
socinfo->nmodem_supported,
|
||||
sku ? sku : "Unknown");
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_err("Unknown format found: v%u.%u\n", f_maj, f_min);
|
||||
break;
|
||||
@ -1237,6 +1366,7 @@ static int qcom_socinfo_probe(struct platform_device *pdev)
|
||||
struct qcom_socinfo *qs;
|
||||
struct socinfo *info;
|
||||
size_t item_size;
|
||||
const char *machine, *esku;
|
||||
|
||||
info = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_HW_SW_BUILD_ID,
|
||||
&item_size);
|
||||
@ -1261,6 +1391,14 @@ static int qcom_socinfo_probe(struct platform_device *pdev)
|
||||
SOCINFO_MINOR(le32_to_cpu(info->ver)));
|
||||
qs->attr.soc_id = kasprintf(GFP_KERNEL, "%d", socinfo_get_id());
|
||||
|
||||
if (socinfo_format >= SOCINFO_VERSION(0, 16)) {
|
||||
machine = socinfo_machine(le32_to_cpu(info->id));
|
||||
esku = socinfo_get_esku_mapping();
|
||||
if (machine && esku)
|
||||
sku = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s-%u-%s",
|
||||
machine, socinfo_get_nproduct_code(), esku);
|
||||
}
|
||||
|
||||
qsocinfo = qs;
|
||||
init_rwsem(&qs->current_image_rwsem);
|
||||
socinfo_populate_sysfs(qs);
|
||||
|
@ -202,9 +202,9 @@ gen_headers_out_arm = [
|
||||
"linux/dm-ioctl.h",
|
||||
"linux/dm-log-userspace.h",
|
||||
"linux/dma-buf.h",
|
||||
"linux/dn.h",
|
||||
"linux/dns_resolver.h",
|
||||
"linux/dqblk_xfs.h",
|
||||
"linux/eavb_shared.h",
|
||||
"linux/edd.h",
|
||||
"linux/efs_fs_sb.h",
|
||||
"linux/elf-em.h",
|
||||
@ -214,6 +214,7 @@ gen_headers_out_arm = [
|
||||
"linux/errno.h",
|
||||
"linux/errqueue.h",
|
||||
"linux/erspan.h",
|
||||
"linux/esoc_ctrl.h",
|
||||
"linux/ethtool.h",
|
||||
"linux/eventpoll.h",
|
||||
"linux/fadvise.h",
|
||||
@ -368,6 +369,7 @@ gen_headers_out_arm = [
|
||||
"linux/memfd.h",
|
||||
"linux/mempolicy.h",
|
||||
"linux/meye.h",
|
||||
"linux/mhi.h",
|
||||
"linux/mic_common.h",
|
||||
"linux/mic_ioctl.h",
|
||||
"linux/mii.h",
|
||||
@ -407,7 +409,6 @@ gen_headers_out_arm = [
|
||||
"linux/netfilter.h",
|
||||
"linux/netfilter_arp.h",
|
||||
"linux/netfilter_bridge.h",
|
||||
"linux/netfilter_decnet.h",
|
||||
"linux/netfilter_ipv4.h",
|
||||
"linux/netfilter_ipv6.h",
|
||||
"linux/netlink.h",
|
||||
@ -860,7 +861,9 @@ gen_headers_out_arm = [
|
||||
"linux/netfilter_ipv4/ipt_CLUSTERIP.h",
|
||||
"linux/netfilter_ipv4/ipt_ECN.h",
|
||||
"linux/netfilter_ipv4/ipt_LOG.h",
|
||||
"linux/netfilter_ipv4/ipt_NATTYPE.h",
|
||||
"linux/netfilter_ipv4/ipt_REJECT.h",
|
||||
"linux/netfilter_ipv4/ipt_TRIGGER.h",
|
||||
"linux/netfilter_ipv4/ipt_TTL.h",
|
||||
"linux/netfilter_ipv4/ipt_ah.h",
|
||||
"linux/netfilter_ipv4/ipt_ecn.h",
|
||||
@ -976,6 +979,7 @@ gen_headers_out_arm = [
|
||||
"audio/linux/msm_audio_amrnb.h",
|
||||
"audio/linux/msm_audio_amrwb.h",
|
||||
"audio/linux/msm_audio_amrwbplus.h",
|
||||
"audio/linux/msm_audio_ar.h",
|
||||
"audio/linux/msm_audio_ape.h",
|
||||
"audio/linux/msm_audio_calibration.h",
|
||||
"audio/linux/msm_audio_g711.h",
|
||||
@ -1004,6 +1008,7 @@ gen_headers_out_arm = [
|
||||
"camera/media/cam_icp.h",
|
||||
"camera/media/cam_isp.h",
|
||||
"camera/media/cam_isp_ife.h",
|
||||
"camera/media/cam_isp_sfe.h",
|
||||
"camera/media/cam_isp_tfe.h",
|
||||
"camera/media/cam_isp_vfe.h",
|
||||
"camera/media/cam_jpeg.h",
|
||||
|
@ -198,9 +198,9 @@ gen_headers_out_arm64 = [
|
||||
"linux/dm-ioctl.h",
|
||||
"linux/dm-log-userspace.h",
|
||||
"linux/dma-buf.h",
|
||||
"linux/dn.h",
|
||||
"linux/dns_resolver.h",
|
||||
"linux/dqblk_xfs.h",
|
||||
"linux/eavb_shared.h",
|
||||
"linux/edd.h",
|
||||
"linux/efs_fs_sb.h",
|
||||
"linux/elf-em.h",
|
||||
@ -210,6 +210,7 @@ gen_headers_out_arm64 = [
|
||||
"linux/errno.h",
|
||||
"linux/errqueue.h",
|
||||
"linux/erspan.h",
|
||||
"linux/esoc_ctrl.h",
|
||||
"linux/ethtool.h",
|
||||
"linux/eventpoll.h",
|
||||
"linux/fadvise.h",
|
||||
@ -363,6 +364,7 @@ gen_headers_out_arm64 = [
|
||||
"linux/memfd.h",
|
||||
"linux/mempolicy.h",
|
||||
"linux/meye.h",
|
||||
"linux/mhi.h",
|
||||
"linux/mic_common.h",
|
||||
"linux/mic_ioctl.h",
|
||||
"linux/mii.h",
|
||||
@ -402,7 +404,6 @@ gen_headers_out_arm64 = [
|
||||
"linux/netfilter.h",
|
||||
"linux/netfilter_arp.h",
|
||||
"linux/netfilter_bridge.h",
|
||||
"linux/netfilter_decnet.h",
|
||||
"linux/netfilter_ipv4.h",
|
||||
"linux/netfilter_ipv6.h",
|
||||
"linux/netlink.h",
|
||||
@ -856,6 +857,7 @@ gen_headers_out_arm64 = [
|
||||
"linux/netfilter_ipv4/ipt_CLUSTERIP.h",
|
||||
"linux/netfilter_ipv4/ipt_ECN.h",
|
||||
"linux/netfilter_ipv4/ipt_LOG.h",
|
||||
"linux/netfilter_ipv4/ipt_NATTYPE.h",
|
||||
"linux/netfilter_ipv4/ipt_REJECT.h",
|
||||
"linux/netfilter_ipv4/ipt_TTL.h",
|
||||
"linux/netfilter_ipv4/ipt_ah.h",
|
||||
@ -973,6 +975,7 @@ gen_headers_out_arm64 = [
|
||||
"audio/linux/msm_audio_amrwb.h",
|
||||
"audio/linux/msm_audio_amrwbplus.h",
|
||||
"audio/linux/msm_audio_ape.h",
|
||||
"audio/linux/msm_audio_ar.h",
|
||||
"audio/linux/msm_audio_calibration.h",
|
||||
"audio/linux/msm_audio_g711.h",
|
||||
"audio/linux/msm_audio_g711_dec.h",
|
||||
@ -1000,6 +1003,7 @@ gen_headers_out_arm64 = [
|
||||
"camera/media/cam_icp.h",
|
||||
"camera/media/cam_isp.h",
|
||||
"camera/media/cam_isp_ife.h",
|
||||
"camera/media/cam_isp_sfe.h",
|
||||
"camera/media/cam_isp_tfe.h",
|
||||
"camera/media/cam_isp_vfe.h",
|
||||
"camera/media/cam_jpeg.h",
|
||||
|
@ -1808,7 +1808,10 @@ struct ipa_ipgre_info {
|
||||
* GRE header value.
|
||||
*/
|
||||
uint16_t gre_protocol;
|
||||
uint8_t unused; /* for alignment */
|
||||
/* If v6 tunnel: option header enabled then set "true"
|
||||
* If v4 tunnel: option header enabled then set "false"
|
||||
*/
|
||||
uint8_t ipv6_option_hdr_enabled;
|
||||
/*
|
||||
* The number of valid elements in, and the accompanying
|
||||
* exception_list, below
|
||||
|
@ -4408,7 +4408,8 @@ static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = {
|
||||
};
|
||||
|
||||
static int nl80211_parse_tx_bitrate_mask(struct genl_info *info,
|
||||
struct cfg80211_bitrate_mask *mask)
|
||||
struct cfg80211_bitrate_mask *mask,
|
||||
bool default_all_enabled)
|
||||
{
|
||||
struct nlattr *tb[NL80211_TXRATE_MAX + 1];
|
||||
struct cfg80211_registered_device *rdev = info->user_ptr[0];
|
||||
@ -4420,6 +4421,9 @@ static int nl80211_parse_tx_bitrate_mask(struct genl_info *info,
|
||||
memset(mask, 0, sizeof(*mask));
|
||||
/* Default to all rates enabled */
|
||||
for (i = 0; i < NUM_NL80211_BANDS; i++) {
|
||||
if (!default_all_enabled)
|
||||
break;
|
||||
|
||||
sband = rdev->wiphy.bands[i];
|
||||
|
||||
if (!sband)
|
||||
@ -4943,7 +4947,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
|
||||
return -EINVAL;
|
||||
|
||||
if (info->attrs[NL80211_ATTR_TX_RATES]) {
|
||||
err = nl80211_parse_tx_bitrate_mask(info, ¶ms.beacon_rate);
|
||||
err = nl80211_parse_tx_bitrate_mask(info, ¶ms.beacon_rate, false);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@ -10725,7 +10729,7 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
|
||||
if (!rdev->ops->set_bitrate_mask)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
err = nl80211_parse_tx_bitrate_mask(info, &mask);
|
||||
err = nl80211_parse_tx_bitrate_mask(info, &mask, true);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@ -11321,7 +11325,7 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
|
||||
}
|
||||
|
||||
if (info->attrs[NL80211_ATTR_TX_RATES]) {
|
||||
err = nl80211_parse_tx_bitrate_mask(info, &setup.beacon_rate);
|
||||
err = nl80211_parse_tx_bitrate_mask(info, &setup.beacon_rate, false);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user