Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'char-misc-5.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
"Here are a number of late-arrival driver fixes for issues reported for
some char/misc drivers for 5.4-rc7

These all come from the different subsystem/driver maintainers as
things that they had reports for and wanted to see fixed.

All of these have been in linux-next with no reported issues"

* tag 'char-misc-5.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
intel_th: pci: Add Jasper Lake PCH support
intel_th: pci: Add Comet Lake PCH support
intel_th: msu: Fix possible memory leak in mode_store()
intel_th: msu: Fix overflow in shift of an unsigned int
intel_th: msu: Fix missing allocation failure check on a kstrndup
intel_th: msu: Fix an uninitialized mutex
intel_th: gth: Fix the window switching sequence
soundwire: slave: fix scanf format
soundwire: intel: fix intel_register_dai PDI offsets and numbers
interconnect: Add locking in icc_set_tag()
interconnect: qcom: Fix icc_onecell_data allocation
soundwire: depend on ACPI || OF
soundwire: depend on ACPI
thunderbolt: Drop unnecessary read when writing LC command in Ice Lake
thunderbolt: Fix lockdep circular locking depedency warning
thunderbolt: Read DP IN adapter first two dwords in one go

+45 -26
+3
drivers/hwtracing/intel_th/gth.c
··· 626 626 if (!count) 627 627 dev_dbg(&thdev->dev, "timeout waiting for CTS Trigger\n"); 628 628 629 + /* De-assert the trigger */ 630 + iowrite32(0, gth->base + REG_CTS_CTL); 631 + 629 632 intel_th_gth_stop(gth, output, false); 630 633 intel_th_gth_start(gth, output); 631 634 }
+8 -3
drivers/hwtracing/intel_th/msu.c
··· 164 164 }; 165 165 166 166 static LIST_HEAD(msu_buffer_list); 167 - static struct mutex msu_buffer_mutex; 167 + static DEFINE_MUTEX(msu_buffer_mutex); 168 168 169 169 /** 170 170 * struct msu_buffer_entry - internal MSU buffer bookkeeping ··· 327 327 struct msc_block_desc *bdesc = sg_virt(sg); 328 328 329 329 if (msc_block_wrapped(bdesc)) 330 - return win->nr_blocks << PAGE_SHIFT; 330 + return (size_t)win->nr_blocks << PAGE_SHIFT; 331 331 332 332 size += msc_total_sz(bdesc); 333 333 if (msc_block_last_written(bdesc)) ··· 1848 1848 len = cp - buf; 1849 1849 1850 1850 mode = kstrndup(buf, len, GFP_KERNEL); 1851 + if (!mode) 1852 + return -ENOMEM; 1853 + 1851 1854 i = match_string(msc_mode, ARRAY_SIZE(msc_mode), mode); 1852 - if (i >= 0) 1855 + if (i >= 0) { 1856 + kfree(mode); 1853 1857 goto found; 1858 + } 1854 1859 1855 1860 /* Buffer sinks only work with a usable IRQ */ 1856 1861 if (!msc->do_irq) {
+10
drivers/hwtracing/intel_th/pci.c
··· 200 200 .driver_data = (kernel_ulong_t)&intel_th_2x, 201 201 }, 202 202 { 203 + /* Comet Lake PCH */ 204 + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x06a6), 205 + .driver_data = (kernel_ulong_t)&intel_th_2x, 206 + }, 207 + { 203 208 /* Ice Lake NNPI */ 204 209 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x45c5), 205 210 .driver_data = (kernel_ulong_t)&intel_th_2x, ··· 212 207 { 213 208 /* Tiger Lake PCH */ 214 209 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa0a6), 210 + .driver_data = (kernel_ulong_t)&intel_th_2x, 211 + }, 212 + { 213 + /* Jasper Lake PCH */ 214 + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6), 215 215 .driver_data = (kernel_ulong_t)&intel_th_2x, 216 216 }, 217 217 { 0 },
+4
drivers/interconnect/core.c
··· 405 405 if (!path) 406 406 return; 407 407 408 + mutex_lock(&icc_lock); 409 + 408 410 for (i = 0; i < path->num_nodes; i++) 409 411 path->reqs[i].tag = tag; 412 + 413 + mutex_unlock(&icc_lock); 410 414 } 411 415 EXPORT_SYMBOL_GPL(icc_set_tag); 412 416
+2 -1
drivers/interconnect/qcom/qcs404.c
··· 433 433 if (!qp) 434 434 return -ENOMEM; 435 435 436 - data = devm_kcalloc(dev, num_nodes, sizeof(*node), GFP_KERNEL); 436 + data = devm_kzalloc(dev, struct_size(data, nodes, num_nodes), 437 + GFP_KERNEL); 437 438 if (!data) 438 439 return -ENOMEM; 439 440
+2 -1
drivers/interconnect/qcom/sdm845.c
··· 790 790 if (!qp) 791 791 return -ENOMEM; 792 792 793 - data = devm_kcalloc(&pdev->dev, num_nodes, sizeof(*node), GFP_KERNEL); 793 + data = devm_kzalloc(&pdev->dev, struct_size(data, nodes, num_nodes), 794 + GFP_KERNEL); 794 795 if (!data) 795 796 return -ENOMEM; 796 797
+1
drivers/soundwire/Kconfig
··· 5 5 6 6 menuconfig SOUNDWIRE 7 7 tristate "SoundWire support" 8 + depends on ACPI || OF 8 9 help 9 10 SoundWire is a 2-Pin interface with data and clock line ratified 10 11 by the MIPI Alliance. SoundWire is used for transporting data
+2 -2
drivers/soundwire/intel.c
··· 900 900 /* Create PCM DAIs */ 901 901 stream = &cdns->pcm; 902 902 903 - ret = intel_create_dai(cdns, dais, INTEL_PDI_IN, stream->num_in, 903 + ret = intel_create_dai(cdns, dais, INTEL_PDI_IN, cdns->pcm.num_in, 904 904 off, stream->num_ch_in, true); 905 905 if (ret) 906 906 return ret; ··· 931 931 if (ret) 932 932 return ret; 933 933 934 - off += cdns->pdm.num_bd; 934 + off += cdns->pdm.num_out; 935 935 ret = intel_create_dai(cdns, dais, INTEL_PDI_BD, cdns->pdm.num_bd, 936 936 off, stream->num_ch_bd, false); 937 937 if (ret)
+2 -1
drivers/soundwire/slave.c
··· 128 128 struct device_node *node; 129 129 130 130 for_each_child_of_node(bus->dev->of_node, node) { 131 - int link_id, sdw_version, ret, len; 131 + int link_id, ret, len; 132 + unsigned int sdw_version; 132 133 const char *compat = NULL; 133 134 struct sdw_slave_id id; 134 135 const __be32 *addr;
-1
drivers/thunderbolt/nhi_ops.c
··· 80 80 { 81 81 u32 data; 82 82 83 - pci_read_config_dword(nhi->pdev, VS_CAP_19, &data); 84 83 data = (cmd << VS_CAP_19_CMD_SHIFT) & VS_CAP_19_CMD_MASK; 85 84 pci_write_config_dword(nhi->pdev, VS_CAP_19, data | VS_CAP_19_VALID); 86 85 }
+11 -17
drivers/thunderbolt/switch.c
··· 896 896 */ 897 897 bool tb_dp_port_is_enabled(struct tb_port *port) 898 898 { 899 - u32 data; 899 + u32 data[2]; 900 900 901 - if (tb_port_read(port, &data, TB_CFG_PORT, port->cap_adap, 1)) 901 + if (tb_port_read(port, data, TB_CFG_PORT, port->cap_adap, 902 + ARRAY_SIZE(data))) 902 903 return false; 903 904 904 - return !!(data & (TB_DP_VIDEO_EN | TB_DP_AUX_EN)); 905 + return !!(data[0] & (TB_DP_VIDEO_EN | TB_DP_AUX_EN)); 905 906 } 906 907 907 908 /** ··· 915 914 */ 916 915 int tb_dp_port_enable(struct tb_port *port, bool enable) 917 916 { 918 - u32 data; 917 + u32 data[2]; 919 918 int ret; 920 919 921 - ret = tb_port_read(port, &data, TB_CFG_PORT, port->cap_adap, 1); 920 + ret = tb_port_read(port, data, TB_CFG_PORT, port->cap_adap, 921 + ARRAY_SIZE(data)); 922 922 if (ret) 923 923 return ret; 924 924 925 925 if (enable) 926 - data |= TB_DP_VIDEO_EN | TB_DP_AUX_EN; 926 + data[0] |= TB_DP_VIDEO_EN | TB_DP_AUX_EN; 927 927 else 928 - data &= ~(TB_DP_VIDEO_EN | TB_DP_AUX_EN); 928 + data[0] &= ~(TB_DP_VIDEO_EN | TB_DP_AUX_EN); 929 929 930 - return tb_port_write(port, &data, TB_CFG_PORT, port->cap_adap, 1); 930 + return tb_port_write(port, data, TB_CFG_PORT, port->cap_adap, 931 + ARRAY_SIZE(data)); 931 932 } 932 933 933 934 /* switch utility functions */ ··· 1034 1031 if (sw->authorized) 1035 1032 goto unlock; 1036 1033 1037 - /* 1038 - * Make sure there is no PCIe rescan ongoing when a new PCIe 1039 - * tunnel is created. Otherwise the PCIe rescan code might find 1040 - * the new tunnel too early. 1041 - */ 1042 - pci_lock_rescan_remove(); 1043 - 1044 1034 switch (val) { 1045 1035 /* Approve switch */ 1046 1036 case 1: ··· 1052 1056 default: 1053 1057 break; 1054 1058 } 1055 - 1056 - pci_unlock_rescan_remove(); 1057 1059 1058 1060 if (!ret) { 1059 1061 sw->authorized = val;