Linux 5.10.22
[email protected]
maintainerFrom: Greg Kroah-Hartman <[email protected]>
I'm announcing the release of the 5.10.22 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 3 - arch/arm64/mm/init.c | 22 ++++--- drivers/acpi/arm64/iort.c | 55 +++++++++++++++++++ drivers/base/power/runtime.c | 62 +++++++++++++--------- drivers/block/rsxx/core.c | 8 +- drivers/char/tpm/tpm_tis_core.c | 30 ++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 - drivers/gpu/drm/amd/amdgpu/nv.c | 6 +- drivers/infiniband/core/cm.c | 5 + drivers/infiniband/hw/mlx5/devx.c | 4 + drivers/infiniband/sw/rxe/Kconfig | 1 drivers/iommu/intel/pasid.h | 4 - drivers/md/dm-bufio.c | 4 + drivers/md/dm-verity-fec.c | 23 ++++---- drivers/net/ethernet/realtek/r8169_main.c | 2 drivers/of/address.c | 42 ++++++++++++++ drivers/of/unittest.c | 21 +++++++ fs/btrfs/block-group.c | 33 +++++++++++ fs/btrfs/block-group.h | 9 +++ fs/btrfs/ctree.h | 5 + fs/btrfs/delayed-inode.c | 2 fs/btrfs/file.c | 5 + fs/btrfs/free-space-cache.c | 14 ++-- fs/btrfs/inode.c | 40 +++++++++++++- fs/btrfs/ioctl.c | 19 ++++++ fs/btrfs/raid56.c | 21 +++---- fs/btrfs/reflink.c | 18 ++++++ fs/btrfs/scrub.c | 9 ++- fs/btrfs/xattr.c | 31 +++++++++-- fs/io_uring.c | 3 + include/crypto/hash.h | 8 +- include/linux/acpi_iort.h | 4 + include/linux/crypto.h | 9 ++- include/linux/mmzone.h | 20 ------- include/linux/of.h | 7 ++ include/sound/intel-nhlt.h | 5 + kernel/trace/ring_buffer.c | 11 +++ scripts/recordmcount.c | 2 security/tomoyo/network.c | 2 sound/hda/intel-nhlt.c | 54 +++++++++++++++---- sound/pci/ctxfi/cthw20k2.c | 2 sound/pci/hda/patch_realtek.c | 13 ++++ sound/usb/mixer.c | 11 +++ sound/usb/mixer_maps.c | 10 +++ 47 files changed, 531 insertions(+), 138 deletions(-)
Andrea Fagiani (1):
ALSA: usb-audio: use Corsair Virtuoso mapping for Corsair Virtuoso SE
Ard Biesheuvel (2):
crypto - shash: reduce minimum alignment of shash_desc structure
arm64: mm: Set ZONE_DMA size based on early IORT scan
Asher.Song (1):
drm/amdgpu:disable VCN for Navi12 SKU
Catalin Marinas (1):
of: unittest: Fix build on architectures without CONFIG_OF_ADDRESS
Chen Jun (1):
ftrace: Have recordmcount use w8 to read relp->r_info in arm64_is_fake_mcount
Chris Chiu (1):
ALSA: hda/realtek: Enable headset mic of Acer SWIFT with ALC256
Colin Ian King (1):
ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits
Dan Carpenter (2):
btrfs: validate qgroup inherit for SNAP_CREATE_V2 ioctl
rsxx: Return -EFAULT if copy_to_user() fails
Filipe Manana (4):
btrfs: fix race between writes to swap files and scrub
btrfs: fix race between swap file activation and snapshot creation
btrfs: fix stale data exposure after cloning a hole with NO_HOLES enabled
btrfs: fix warning when creating a directory with smack enabled
Greg Kroah-Hartman (1):
Linux 5.10.22
Heiner Kallweit (1):
r8169: fix resuming from suspend on RTL8105e if machine runs on battery
Ira Weiny (1):
btrfs: fix raid6 qstripe kmap
Jarkko Sakkinen (1):
tpm, tpm_tis: Decorate tpm_get_timeouts() with request_locality()
Jens Axboe (1):
io_uring: ignore double poll add on the same waitqueue head
Josef Bacik (1):
btrfs: avoid double put of block group when emptying cluster
Julian Braha (1):
RDMA/rxe: Fix missing kconfig dependency on CRYPTO
Kevin Wang (1):
drm/amdgpu: fix parameter error of RREG32_PCIE() in amdgpu_regs_pcie
Lukasz Majczak (1):
tpm, tpm_tis: Decorate tpm_tis_gen_interrupt() with request_locality()
Mikulas Patocka (1):
dm bufio: subtract the number of initial sectors in dm_bufio_get_device_size
Milan Broz (1):
dm verity: fix FEC for RS roots unaligned to block size
Neil Armstrong (1):
Revert "arm64: dts: amlogic: add missing ethernet reset ID"
Nicolas Saenz Julienne (6):
arm64: mm: Move reserve_crashkernel() into mem_init()
arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() of/address: Introduce of_dma_get_max_cpu_address()
of: unittest: Add test for of_dma_get_max_cpu_address()
arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges
mm: Remove examples from enum zone_type comment
Nikolay Borisov (3):
btrfs: fix race between extent freeing/allocation when using bitmaps
btrfs: free correct amount of space in btrfs_delayed_inode_reserve_metadata
btrfs: unlock extents in btrfs_zero_range in case of quota reservation errors
Pierre-Louis Bossart (1):
ALSA: hda: intel-nhlt: verify config type
Rafael J. Wysocki (1):
PM: runtime: Update device status before letting suppliers suspend
Saeed Mahameed (1):
RDMA/cm: Fix IRQ restore in ib_send_cm_sidr_rep
Steven Rostedt (VMware) (1):
ring-buffer: Force before_stamp and write_stamp to be different on discard
Takashi Iwai (1):
ALSA: usb-audio: Drop bogus dB range in too low level
Tetsuo Handa (1):
tomoyo: recognize kernel threads correctly
YueHaibing (1):
IB/mlx5: Add missing error code
Zenghui Yu (1):
iommu/vt-d: Fix status code for Allocate/Free PASID command
[email protected]
maintainerFrom: Greg Kroah-Hartman <[email protected]>
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 21 +SUBLEVEL = 22 EXTRAVERSION = NAME = Dare mighty things
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +0 -2
@@ -227,8 +227,6 @@ ethmac: ethernet@ff3f0000 { "timing-adjustment"; rx-fifo-depth = <4096>; tx-fifo-depth = <2048>; - resets = <&reset RESET_ETHERNET>; - reset-names = "stmmaceth"; status = "disabled"; };
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +0 -2
@@ -224,8 +224,6 @@ ethmac: ethernet@ff3f0000 { "timing-adjustment"; rx-fifo-depth = <4096>; tx-fifo-depth = <2048>; - resets = <&reset RESET_ETHERNET>; - reset-names = "stmmaceth"; status = "disabled"; mdio0: mdio {
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +0 -3
@@ -13,7 +13,6 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/power/meson-gxbb-power.h> -#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h> #include <dt-bindings/thermal/thermal.h> / {
@@ -576,8 +575,6 @@ ethmac: ethernet@c9410000 { interrupt-names = "macirq"; rx-fifo-depth = <4096>; tx-fifo-depth = <2048>; - resets = <&reset RESET_ETHERNET>; - reset-names = "stmmaceth"; power-domains = <&pwrc PWRC_GXBB_ETHERNET_MEM_ID>; status = "disabled"; };
arch/arm64/mm/init.c +13 -9
@@ -29,6 +29,7 @@#include <linux/kexec.h> #include <linux/crash_dump.h> #include <linux/hugetlb.h> +#include <linux/acpi_iort.h> #include <asm/boot.h> #include <asm/fixmap.h>
@@ -42,8 +43,6 @@#include <asm/tlb.h> #include <asm/alternative.h> -#define ARM64_ZONE_DMA_BITS 30 -/* * We need to be able to catch inadvertent references to memstart_addr * that occur (potentially in generic code) before arm64_memblock_init()
@@ -188,8 +187,14 @@ static phys_addr_t __init max_zone_phys(unsigned int zone_bits)static void __init zone_sizes_init (unsigned long min,unsigned long max) {unsigned long max_zone_pfns[MAX_NR_ZONES ] = {0 }; +unsigned int __maybe_unused acpi_zone_dma_bits; +unsigned int __maybe_unused dt_zone_dma_bits;#ifdef CONFIG_ZONE_DMA + acpi_zone_dma_bits =fls64 (acpi_iort_dma_get_max_cpu_address ()); + dt_zone_dma_bits =fls64 (of_dma_get_max_cpu_address (NULL )); + zone_dma_bits =min3 (32U , dt_zone_dma_bits, acpi_zone_dma_bits); + arm64_dma_phys_limit =max_zone_phys (zone_dma_bits); max_zone_pfns[ZONE_DMA ] =PFN_DOWN (arm64_dma_phys_limit);#endif #ifdef CONFIG_ZONE_DMA32
@@ -376,18 +381,11 @@ void __init arm64_memblock_init(void)early_init_fdt_scan_reserved_mem (); -if (IS_ENABLED (CONFIG_ZONE_DMA )) { - zone_dma_bits =ARM64_ZONE_DMA_BITS ; - arm64_dma_phys_limit =max_zone_phys (ARM64_ZONE_DMA_BITS ); - } -if (IS_ENABLED (CONFIG_ZONE_DMA32 )) arm64_dma32_phys_limit =max_zone_phys (32 );else arm64_dma32_phys_limit =PHYS_MASK +1 ; -reserve_crashkernel (); -reserve_elfcorehdr (); high_memory =__va (memblock_end_of_DRAM () -1 ) +1 ;
@@ -427,6 +425,12 @@ void __init bootmem_init(void)sparse_init ();zone_sizes_init (min, max); +/* +* request_standard_resources() depends on crashkernel's memory being +* reserved, so do it here. +*/ +reserve_crashkernel (); +memblock_dump_all (); }
drivers/acpi/arm64/iort.c +55 -0
58 lines not on this page · raw message
drivers/base/power/runtime.c +37 -25
83 lines not on this page · raw message
drivers/block/rsxx/core.c +5 -3
@@ -165,15 +165,17 @@ static ssize_t rsxx_cram_read(struct file *fp, char __user *ubuf, {struct rsxx_cardinfo *card =file_inode (fp)->i_private;char *buf; -ssize_t st; +int st; buf =kzalloc (cnt,GFP_KERNEL );if (!buf)return -ENOMEM ; st =rsxx_creg_read (card,CREG_ADD_CRAM + (u32)*ppos, cnt, buf,1 ); -if (!st) - st =copy_to_user (ubuf, buf, cnt); +if (!st) { +if (copy_to_user (ubuf, buf, cnt)) + st = -EFAULT ; + }kfree (buf);if (st)return st;
drivers/char/tpm/tpm_tis_core.c +25 -5
@@ -707,12 +707,22 @@ static int tpm_tis_gen_interrupt(struct tpm_chip *chip)const char *desc ="attempting to generate an interrupt" ;u32 cap2;cap_t cap; +int ret; +/* TPM 2.0 */ if (chip->flags &TPM_CHIP_FLAG_TPM2 )return tpm2_get_tpm_pt (chip,0x100 , &cap2, desc); -else -return tpm1_getcap (chip,TPM_CAP_PROP_TIS_TIMEOUT , &cap, desc, -0 ); + +/* TPM 1.2 */ + ret =request_locality (chip,0 ); +if (ret <0 ) +return ret; + + ret =tpm1_getcap (chip,TPM_CAP_PROP_TIS_TIMEOUT , &cap, desc,0 ); + +release_locality (chip,0 ); + +return ret; }/* Register the IRQ and issue a command that will cause an interrupt. If an
@@ -1019,11 +1029,21 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,init_waitqueue_head (&priv->read_queue);init_waitqueue_head (&priv->int_queue);if (irq !=-1 ) { -/* Before doing irq testing issue a command to the TPM in polling mode +/* +* Before doing irq testing issue a command to the TPM in polling mode * to make sure it works. May as well use that command to set the * proper timeouts for the driver. */ -if (tpm_get_timeouts (chip)) { + + rc =request_locality (chip,0 ); +if (rc <0 ) + goto out_err; + + rc =tpm_get_timeouts (chip); + +release_locality (chip,0 ); + +if (rc) {dev_err (dev,"Could not get TPM timeouts and durations\n" ); rc = -ENODEV ; goto out_err;
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +2 -2
@@ -355,7 +355,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,while (size) {uint32_t value; - value =RREG32_PCIE (*pos >>2 ); + value =RREG32_PCIE (*pos); r =put_user (value, (uint32_t *)buf);if (r) {pm_runtime_mark_last_busy (adev_to_drm (adev)->dev);
@@ -422,7 +422,7 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __userreturn r; } -WREG32_PCIE (*pos >>2 , value); +WREG32_PCIE (*pos, value); result +=4 ; buf +=4 ;
drivers/gpu/drm/amd/amdgpu/nv.c +4 -2
@@ -459,7 +459,8 @@ static bool nv_is_headless_sku(struct pci_dev *pdev) {if ((pdev->device ==0x731E && (pdev->revision ==0xC6 || pdev->revision ==0xC7 )) || - (pdev->device ==0x7340 && pdev->revision ==0xC9 )) + (pdev->device ==0x7340 && pdev->revision ==0xC9 ) || + (pdev->device ==0x7360 && pdev->revision ==0xC7 ))return true;return false; }
@@ -524,7 +525,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)if (adev->firmware.load_type ==AMDGPU_FW_LOAD_DIRECT && !amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &smu_v11_0_ip_block); -amdgpu_device_ip_block_add (adev, &vcn_v2_0_ip_block); +if (!nv_is_headless_sku (adev->pdev)) +amdgpu_device_ip_block_add (adev, &vcn_v2_0_ip_block);if (!amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &jpeg_v2_0_ip_block);break ;
drivers/infiniband/core/cm.c +3 -2
@@ -3650,6 +3650,7 @@ static int cm_send_sidr_rep_locked(struct cm_id_private *cm_id_priv, struct ib_cm_sidr_rep_param *param) {struct ib_mad_send_buf *msg; +unsigned long flags;int ret;lockdep_assert_held (&cm_id_priv->lock);
@@ -3675,12 +3676,12 @@ static int cm_send_sidr_rep_locked(struct cm_id_private *cm_id_priv,return ret; } cm_id_priv->id.state =IB_CM_IDLE ; -spin_lock_irq (&cm.lock); +spin_lock_irqsave (&cm.lock, flags);if (!RB_EMPTY_NODE (&cm_id_priv->sidr_id_node)) {rb_erase (&cm_id_priv->sidr_id_node, &cm.remote_sidr_table);RB_CLEAR_NODE (&cm_id_priv->sidr_id_node); } -spin_unlock_irq (&cm.lock); +spin_unlock_irqrestore (&cm.lock, flags);return 0 ; }
drivers/infiniband/hw/mlx5/devx.c +3 -1
@@ -1973,8 +1973,10 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT)( num_alloc_xa_entries++; event_sub =kzalloc (sizeof (*event_sub),GFP_KERNEL ); -if (!event_sub) +if (!event_sub) { + err = -ENOMEM ; goto err; + }list_add_tail (&event_sub->event_list, &sub_list);uverbs_uobject_get (&ev_file->uobj);
drivers/infiniband/sw/rxe/Kconfig +1 -0
@@ -4,6 +4,7 @@ config RDMA_RXE depends on INET && PCI && INFINIBAND depends on INFINIBAND_VIRT_DMA select NET_UDP_TUNNEL + select CRYPTO select CRYPTO_CRC32 help This driver implements the InfiniBand RDMA transport over
drivers/iommu/intel/pasid.h +2 -2
@@ -30,8 +30,8 @@#define VCMD_VRSP_IP 0x1#define VCMD_VRSP_SC (e) (((e) >> 1) & 0x3)#define VCMD_VRSP_SC_SUCCESS 0 -#define VCMD_VRSP_SC_NO_PASID_AVAIL 1 -#define VCMD_VRSP_SC_INVALID_PASID 1 +#define VCMD_VRSP_SC_NO_PASID_AVAIL 2 +#define VCMD_VRSP_SC_INVALID_PASID 2#define VCMD_VRSP_RESULT_PASID (e) (((e) >> 8) & 0xfffff)#define VCMD_CMD_OPERAND (e) ((e) << 8)/*
drivers/md/dm-bufio.c +4 -0
@@ -1526,6 +1526,10 @@ EXPORT_SYMBOL_GPL(dm_bufio_get_block_size);sector_t dm_bufio_get_device_size (struct dm_bufio_client *c) {sector_t s =i_size_read (c->bdev->bd_inode) >>SECTOR_SHIFT ; +if (s >= c->start) + s -= c->start; +else + s =0 ;if (likely (c->sectors_per_block_bits >=0 )) s >>= c->sectors_per_block_bits;else
drivers/md/dm-verity-fec.c +12 -11
@@ -61,19 +61,18 @@ static int fec_decode_rs8(struct dm_verity *v, struct dm_verity_fec_io *fio,static u8 *fec_read_parity (struct dm_verity *v,u64 rsb,int index,unsigned *offset,struct dm_buffer **buf) { -u64 position, block; +u64 position, block, rem;u8 *res; position = (index + rsb) * v->fec->roots; - block = position >> v->data_dev_block_bits; - *offset = (unsigned )(position - (block << v->data_dev_block_bits)); + block =div64_u64_rem (position, v->fec->roots <<SECTOR_SHIFT , &rem); + *offset = (unsigned )rem; - res =dm_bufio_read (v->fec->bufio, v->fec->start + block, buf); + res =dm_bufio_read (v->fec->bufio, block, buf);if (IS_ERR (res)) {DMERR ("%s: FEC %llu: parity read failed (block %llu): %ld" , v->data_dev->name, (unsigned long long )rsb, - (unsigned long long )(v->fec->start + block), -PTR_ERR (res)); + (unsigned long long )block,PTR_ERR (res)); *buf =NULL ; }
@@ -155,7 +154,7 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio,/* read the next block when we run out of parity bytes */ offset += v->fec->roots; -if (offset >=1 << v->data_dev_block_bits) { +if (offset >= v->fec->roots <<SECTOR_SHIFT ) {dm_bufio_release (buf); par =fec_read_parity (v, rsb, block_offset, &offset, &buf);
@@ -674,7 +673,7 @@ int verity_fec_ctr(struct dm_verity *v) {struct dm_verity_fec *f = v->fec;struct dm_target *ti = v->ti; -u64 hash_blocks; +u64 hash_blocks, fec_blocks;int ret;if (!verity_fec_is_enabled (v)) {
@@ -744,15 +743,17 @@ int verity_fec_ctr(struct dm_verity *v) } f->bufio =dm_bufio_client_create (f->dev->bdev, -1 << v->data_dev_block_bits, + f->roots <<SECTOR_SHIFT ,1 ,0 ,NULL ,NULL );if (IS_ERR (f->bufio)) { ti->error ="Cannot initialize FEC bufio client" ;return PTR_ERR (f->bufio); } -if (dm_bufio_get_device_size (f->bufio) < - ((f->start + f->rounds * f->roots) >> v->data_dev_block_bits)) { +dm_bufio_set_sector_offset (f->bufio, f->start << (v->data_dev_block_bits -SECTOR_SHIFT )); + + fec_blocks =div64_u64 (f->rounds * f->roots, v->fec->roots <<SECTOR_SHIFT ); +if (dm_bufio_get_device_size (f->bufio) < fec_blocks) { ti->error ="FEC device is too small" ;return -E2BIG ; }
drivers/net/ethernet/realtek/r8169_main.c +2 -0
@@ -2244,6 +2244,7 @@ static void rtl_pll_power_down(struct rtl8169_private *tp)switch (tp->mac_version) { case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26: + case RTL_GIGA_MAC_VER_29 ... RTL_GIGA_MAC_VER_30: case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33:case RTL_GIGA_MAC_VER_37 :case RTL_GIGA_MAC_VER_39 :
@@ -2271,6 +2272,7 @@ static void rtl_pll_power_up(struct rtl8169_private *tp) {switch (tp->mac_version) { case RTL_GIGA_MAC_VER_25 ... RTL_GIGA_MAC_VER_26: + case RTL_GIGA_MAC_VER_29 ... RTL_GIGA_MAC_VER_30: case RTL_GIGA_MAC_VER_32 ... RTL_GIGA_MAC_VER_33:case RTL_GIGA_MAC_VER_37 :case RTL_GIGA_MAC_VER_39 :
drivers/of/address.c +42 -0
48 lines not on this page · raw message
drivers/of/unittest.c +21 -0
@@ -869,6 +869,26 @@ static void __init of_unittest_changeset(void)#endif } +static void __init of_unittest_dma_get_max_cpu_address (void ) +{ +struct device_node *np; +phys_addr_t cpu_addr; + +if (!IS_ENABLED (CONFIG_OF_ADDRESS )) +return ; + + np =of_find_node_by_path ("/testcase-data/address-tests" ); +if (!np) { +pr_err ("missing testcase data\n" ); +return ; + } + + cpu_addr =of_dma_get_max_cpu_address (np); +unittest (cpu_addr ==0x4fffffff , +"of_dma_get_max_cpu_address: wrong CPU addr %pad (expecting %x)\n" , + &cpu_addr,0x4fffffff ); +} +static void __init of_unittest_dma_ranges_one (const char *path,u64 expect_dma_addr,u64 expect_paddr) {
@@ -3266,6 +3286,7 @@ static int __init of_unittest(void)of_unittest_changeset ();of_unittest_parse_interrupts ();of_unittest_parse_interrupts_extended (); +of_unittest_dma_get_max_cpu_address ();of_unittest_parse_dma_ranges ();of_unittest_pci_dma_ranges ();of_unittest_match_node ();
fs/btrfs/block-group.c +32 -1
@@ -1229,6 +1229,11 @@ static int inc_block_group_ro(struct btrfs_block_group *cache, int force)spin_lock (&sinfo->lock);spin_lock (&cache->lock); +if (cache->swap_extents) { + ret = -ETXTBSY ; + goto out; + } +if (cache->ro) { cache->ro++; ret =0 ;
@@ -2274,7 +2279,7 @@ int btrfs_inc_block_group_ro(struct btrfs_block_group *cache, } ret =inc_block_group_ro (cache,0 ); -if (!do_chunk_alloc) +if (!do_chunk_alloc || ret == -ETXTBSY ) goto unlock_out;if (!ret) goto out;
@@ -2283,6 +2288,8 @@ int btrfs_inc_block_group_ro(struct btrfs_block_group *cache,if (ret <0 ) goto out; ret =inc_block_group_ro (cache,0 ); +if (ret == -ETXTBSY ) + goto unlock_out; out:if (cache->flags &BTRFS_BLOCK_GROUP_SYSTEM ) { alloc_flags =btrfs_get_alloc_profile (fs_info, cache->flags);
@@ -3363,6 +3370,7 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)ASSERT (list_empty (&block_group->io_list));ASSERT (list_empty (&block_group->bg_list));ASSERT (refcount_read (&block_group->refs) ==1 ); +ASSERT (block_group->swap_extents ==0 );btrfs_put_block_group (block_group);spin_lock (&info->block_group_cache_lock);
@@ -3429,3 +3437,26 @@ void btrfs_unfreeze_block_group(struct btrfs_block_group *block_group)__btrfs_remove_free_space_cache (block_group->free_space_ctl); } } + +bool btrfs_inc_block_group_swap_extents (struct btrfs_block_group *bg) +{ +bool ret = true; + +spin_lock (&bg->lock); +if (bg->ro) + ret = false; +else + bg->swap_extents++; +spin_unlock (&bg->lock); + +return ret; +} + +void btrfs_dec_block_group_swap_extents (struct btrfs_block_group *bg,int amount) +{ +spin_lock (&bg->lock); +ASSERT (!bg->ro); +ASSERT (bg->swap_extents >= amount); + bg->swap_extents -= amount; +spin_unlock (&bg->lock); +}
fs/btrfs/block-group.h +9 -0
@@ -181,6 +181,12 @@ struct btrfs_block_group {*/ int needs_free_space; +/* +* Number of extents in this block group used for swap files. +* All accesses protected by the spinlock 'lock'. +*/ +int swap_extents; +/* Record locked full stripes for RAID5/6 block group */ struct btrfs_full_stripe_locks_tree full_stripe_locks_root; };
@@ -299,4 +305,7 @@ int btrfs_rmap_block(struct btrfs_fs_info *fs_info, u64 chunk_start, u64 physical, u64 **logical, int *naddrs, int *stripe_len);#endif +bool btrfs_inc_block_group_swap_extents (struct btrfs_block_group *bg); +void btrfs_dec_block_group_swap_extents (struct btrfs_block_group *bg,int amount); +#endif /* BTRFS_BLOCK_GROUP_H */
fs/btrfs/ctree.h +5 -0
@@ -522,6 +522,11 @@ struct btrfs_swapfile_pin {* points to a struct btrfs_device. */ bool is_block_group; +/* +* Only used when 'is_block_group' is true and it is the number of +* extents used by a swapfile for this block group ('ptr' field). +*/ +int bg_extent_count; };bool btrfs_pinned_by_swapfile (struct btrfs_fs_info *fs_info,void *ptr);
fs/btrfs/delayed-inode.c +1 -1
@@ -649,7 +649,7 @@ static int btrfs_delayed_inode_reserve_metadata(btrfs_ino (inode), num_bytes, 1); }else { -btrfs_qgroup_free_meta_prealloc (root, fs_info->nodesize); +btrfs_qgroup_free_meta_prealloc (root, num_bytes); }return ret; }
fs/btrfs/file.c +4 -1
@@ -3236,8 +3236,11 @@ static int btrfs_zero_range(struct inode *inode, goto out; ret =btrfs_qgroup_reserve_data (BTRFS_I (inode), &data_reserved, alloc_start, bytes_to_reserve); -if (ret) +if (ret) { +unlock_extent_cached (&BTRFS_I (inode)->io_tree, lockstart, + lockend, &cached_state); goto out; + } ret = btrfs_prealloc_file_range(inode, mode, alloc_start, alloc_end - alloc_start, i_blocksize(inode),
fs/btrfs/free-space-cache.c +8 -6
@@ -2714,8 +2714,10 @@ static void __btrfs_return_cluster_to_free_space(struct rb_node *node;spin_lock (&cluster->lock); -if (cluster->block_group != block_group) - goto out; +if (cluster->block_group != block_group) { +spin_unlock (&cluster->lock); +return ; + } cluster->block_group =NULL ; cluster->window_start =0 ;
@@ -2753,8 +2755,6 @@ static void __btrfs_return_cluster_to_free_space( entry->offset, &entry->offset_index, bitmap); } cluster->root =RB_ROOT ; - -out:spin_unlock (&cluster->lock);btrfs_put_block_group (block_group); }
@@ -3034,8 +3034,6 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group *block_group, entry->bytes -= bytes; } -if (entry->bytes ==0 ) -rb_erase (&entry->offset_index, &cluster->root);break ; } out:
@@ -3052,7 +3050,10 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group *block_group, ctl->free_space -= bytes;if (!entry->bitmap && !btrfs_free_space_trimmed (entry)) ctl->discardable_bytes[BTRFS_STAT_CURR ] -= bytes; + +spin_lock (&cluster->lock);if (entry->bytes ==0 ) { +rb_erase (&entry->offset_index, &cluster->root); ctl->free_extents--;if (entry->bitmap) { kmem_cache_free(btrfs_free_space_bitmap_cachep,
@@ -3065,6 +3066,7 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group *block_group,kmem_cache_free (btrfs_free_space_cachep, entry); } +spin_unlock (&cluster->lock);spin_unlock (&ctl->tree_lock);return ret;
fs/btrfs/inode.c +37 -3
@@ -9993,6 +9993,7 @@ static int btrfs_add_swapfile_pin(struct inode *inode, void *ptr, sp->ptr = ptr; sp->inode = inode; sp->is_block_group = is_block_group; + sp->bg_extent_count =1 ;spin_lock (&fs_info->swapfile_pins_lock); p = &fs_info->swapfile_pins.rb_node;
@@ -10006,6 +10007,8 @@ static int btrfs_add_swapfile_pin(struct inode *inode, void *ptr, (sp->ptr == entry->ptr && sp->inode > entry->inode)) { p = &(*p)->rb_right; } else { +if (is_block_group) + entry->bg_extent_count++;spin_unlock (&fs_info->swapfile_pins_lock);kfree (sp);return 1 ;
@@ -10031,8 +10034,11 @@ static void btrfs_free_swapfile_pins(struct inode *inode) sp = rb_entry(node, struct btrfs_swapfile_pin, node);if (sp->inode == inode) {rb_erase (&sp->node, &fs_info->swapfile_pins); -if (sp->is_block_group) +if (sp->is_block_group) { +btrfs_dec_block_group_swap_extents (sp->ptr, + sp->bg_extent_count);btrfs_put_block_group (sp->ptr); + }kfree (sp); } node = next;
@@ -10093,7 +10099,8 @@ static int btrfs_swap_activate(struct swap_info_struct *sis, struct file *file, sector_t *span) {struct inode *inode =file_inode (file); -struct btrfs_fs_info *fs_info =BTRFS_I (inode)->root->fs_info; +struct btrfs_root *root =BTRFS_I (inode)->root; +struct btrfs_fs_info *fs_info = root->fs_info;struct extent_io_tree *io_tree = &BTRFS_I (inode)->io_tree;struct extent_state *cached_state =NULL ;struct extent_map *em =NULL ;
@@ -10144,13 +10151,27 @@ static int btrfs_swap_activate(struct swap_info_struct *sis, struct file *file, "cannot activate swapfile while exclusive operation is running");return -EBUSY ; } + +/* +* Prevent snapshot creation while we are activating the swap file. +* We do not want to race with snapshot creation. If snapshot creation +* already started before we bumped nr_swapfiles from 0 to 1 and +* completes before the first write into the swap file after it is +* activated, than that write would fallback to COW. +*/ +if (!btrfs_drew_try_write_lock (&root->snapshot_lock)) { +btrfs_exclop_finish (fs_info); +btrfs_warn (fs_info, +"cannot activate swapfile because snapshot creation is in progress" ); +return -EINVAL ; + }/* * Snapshots can create extents which require COW even if NODATACOW is * set. We use this counter to prevent snapshots. We must increment it * before walking the extents because we don't want a concurrent * snapshot to run after we've already checked the extents. */ -atomic_inc (&BTRFS_I (inode)->root->nr_swapfiles); +atomic_inc (&root->nr_swapfiles); isize =ALIGN_DOWN (inode->i_size, fs_info->sectorsize);
@@ -10247,6 +10268,17 @@ static int btrfs_swap_activate(struct swap_info_struct *sis, struct file *file, goto out; } +if (!btrfs_inc_block_group_swap_extents (bg)) { +btrfs_warn (fs_info, +"block group for swapfile at %llu is read-only%s" , + bg->start, +atomic_read (&fs_info->scrubs_running) ? +" (scrub running)" :"" ); +btrfs_put_block_group (bg); + ret = -EINVAL ; + goto out; + } + ret =btrfs_add_swapfile_pin (inode, bg, true);if (ret) {btrfs_put_block_group (bg);
@@ -10285,6 +10317,8 @@ static int btrfs_swap_activate(struct swap_info_struct *sis, struct file *file,if (ret)btrfs_swap_deactivate (file); +btrfs_drew_write_unlock (&root->snapshot_lock); +btrfs_exclop_finish (fs_info);if (ret)
fs/btrfs/ioctl.c +18 -1
@@ -1914,7 +1914,10 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file,if (vol_args->flags &BTRFS_SUBVOL_RDONLY ) readonly = true;if (vol_args->flags &BTRFS_SUBVOL_QGROUP_INHERIT ) { -if (vol_args->size >PAGE_SIZE ) { +u64 nums; + +if (vol_args->size <sizeof (*inherit) || + vol_args->size >PAGE_SIZE ) { ret = -EINVAL ; goto free_args; }
@@ -1923,6 +1926,20 @@ static noinline int btrfs_ioctl_snap_create_v2(struct file *file, ret =PTR_ERR (inherit); goto free_args; } + +if (inherit->num_qgroups >PAGE_SIZE || + inherit->num_ref_copies >PAGE_SIZE || + inherit->num_excl_copies >PAGE_SIZE ) { + ret = -EINVAL ; + goto free_inherit; + } + + nums = inherit->num_qgroups +2 * inherit->num_ref_copies + +2 * inherit->num_excl_copies; +if (vol_args->size !=struct_size (inherit, qgroups, nums)) { + ret = -EINVAL ; + goto free_inherit; + } } ret = __btrfs_ioctl_snap_create(file, vol_args->name, vol_args->fd,
fs/btrfs/raid56.c +10 -11
@@ -2363,16 +2363,21 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,SetPageUptodate (p_page);if (has_qstripe) { +/* RAID6, allocate and map temp space for the Q stripe */ q_page =alloc_page (GFP_NOFS | __GFP_HIGHMEM);if (!q_page) {__free_page (p_page); goto cleanup; }SetPageUptodate (q_page); + pointers[rbio->real_stripes -1 ] =kmap (q_page); }atomic_set (&rbio->error,0 ); +/* Map the parity stripe just once */ + pointers[nr_data] =kmap (p_page); +for_each_set_bit (pagenr, rbio->dbitmap, rbio->stripe_npages) {struct page *p;void *parity;
@@ -2382,16 +2387,8 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio, pointers[stripe] =kmap (p); } -/* then add the parity stripe */ - pointers[stripe++] =kmap (p_page); -if (has_qstripe) { -/* -* raid6, add the qstripe and call the -* library function to fill in our p/q -*/ - pointers[stripe++] =kmap (q_page); - +/* RAID6, call the library function to fill in our P/Q */ raid6_call.gen_syndrome (rbio->real_stripes,PAGE_SIZE , pointers); }else {
@@ -2412,12 +2409,14 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,for (stripe =0 ; stripe < nr_data; stripe++)kunmap (page_in_rbio (rbio, stripe, pagenr,0 )); -kunmap (p_page); } +kunmap (p_page);__free_page (p_page); -if (q_page) +if (q_page) { +kunmap (q_page);__free_page (q_page); + } writeback:/*
fs/btrfs/reflink.c +18 -0
@@ -548,6 +548,24 @@ static int btrfs_clone(struct inode *src, struct inode *inode,btrfs_release_path (path); path->leave_spinning =0 ; +/* +* When using NO_HOLES and we are cloning a range that covers +* only a hole (no extents) into a range beyond the current +* i_size, punching a hole in the target range will not create +* an extent map defining a hole, because the range starts at or +* beyond current i_size. If the file previously had an i_size +* greater than the new i_size set by this clone operation, we +* need to make sure the next fsync is a full fsync, so that it +* detects and logs a hole covering a range from the current +* i_size to the new i_size. If the clone range covers extents, +* besides a hole, then we know the full sync flag was already +* set by previous calls to btrfs_replace_file_extents() that +* replaced file extent items. +*/ +if (last_dest_end >=i_size_read (inode)) +set_bit (BTRFS_INODE_NEEDS_FULL_SYNC , + &BTRFS_I (inode)->runtime_flags); + ret =btrfs_replace_file_extents (inode, path, last_dest_end, destoff + len -1 ,NULL , &trans);if (ret)
fs/btrfs/scrub.c +8 -1
@@ -3568,6 +3568,13 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,* commit_transactions. */ ro_set =0 ; + }else if (ret == -ETXTBSY ) { +btrfs_warn (fs_info, +"skipping scrub of block group %llu due to active swapfile" , + cache->start); +scrub_pause_off (fs_info); + ret =0 ; + goto skip_unfreeze; }else {btrfs_warn (fs_info,"failed setting block group ro: %d" , ret);
@@ -3657,7 +3664,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx, }else {spin_unlock (&cache->lock); } - +skip_unfreeze:btrfs_unfreeze_block_group (cache);btrfs_put_block_group (cache);if (ret)
fs/btrfs/xattr.c +27 -4
@@ -229,11 +229,33 @@ int btrfs_setxattr_trans(struct inode *inode, const char *name, {struct btrfs_root *root =BTRFS_I (inode)->root;struct btrfs_trans_handle *trans; +const bool start_trans = (current->journal_info ==NULL );int ret; - trans =btrfs_start_transaction (root,2 ); -if (IS_ERR (trans)) -return PTR_ERR (trans); +if (start_trans) { +/* +* 1 unit for inserting/updating/deleting the xattr +* 1 unit for the inode item update +*/ + trans =btrfs_start_transaction (root,2 ); +if (IS_ERR (trans)) +return PTR_ERR (trans); + }else { +/* +* This can happen when smack is enabled and a directory is being +* created. It happens through d_instantiate_new(), which calls +* smack_d_instantiate(), which in turn calls __vfs_setxattr() to +* set the transmute xattr (XATTR_NAME_SMACKTRANSMUTE) on the +* inode. We have already reserved space for the xattr and inode +* update at btrfs_mkdir(), so just use the transaction handle. +* We don't join or start a transaction, as that will reset the +* block_rsv of the handle and trigger a warning for the start +* case. +*/ +ASSERT (strncmp (name,XATTR_SECURITY_PREFIX , +XATTR_SECURITY_PREFIX_LEN ) ==0 ); + trans = current->journal_info; + } ret =btrfs_setxattr (trans, inode, name, value, size, flags);if (ret)
@@ -244,7 +266,8 @@ int btrfs_setxattr_trans(struct inode *inode, const char *name, ret =btrfs_update_inode (trans, root, inode);BUG_ON (ret); out: -btrfs_end_transaction (trans); +if (start_trans) +btrfs_end_transaction (trans);return ret; }
fs/io_uring.c +3 -0
@@ -5083,6 +5083,9 @@ static void __io_queue_proc(struct io_poll_iocb *poll, struct io_poll_table *pt, pt->error = -EINVAL ;return ; } +/* double add on the same waitqueue head, ignore */ +if (poll->head == head) +return ; poll =kmalloc (sizeof (*poll),GFP_ATOMIC );if (!poll) { pt->error = -ENOMEM ;
include/crypto/hash.h +4 -4
@@ -149,7 +149,7 @@ struct ahash_alg {struct shash_desc {struct crypto_shash *tfm; - void *__ctx[] CRYPTO_MINALIGN_ATTR; +void *__ctx[]__aligned(ARCH_SLAB_MINALIGN) ; };#define HASH_MAX_DIGESTSIZE 64
@@ -162,9 +162,9 @@ struct shash_desc {#define HASH_MAX_STATESIZE 512 -#define SHASH_DESC_ON_STACK (shash, ctx) \ - char __##shash##_desc[sizeof(struct shash_desc) + \ - HASH_MAX_DESCSIZE] CRYPTO_MINALIGN_ATTR; \ +#define SHASH_DESC_ON_STACK (shash, ctx) \ + char __##shash##_desc[sizeof(struct shash_desc) + HASH_MAX_DESCSIZE] \ + __aligned(__alignof__(struct shash_desc)); \ struct shash_desc *shash = (struct shash_desc *)__##shash##_desc/**
include/linux/acpi_iort.h +4 -0
@@ -38,6 +38,7 @@ void iort_dma_setup(struct device *dev, u64 *dma_addr, u64 *size);const struct iommu_ops *iort_iommu_configure_id (struct device *dev,const u32 *id_in);int iort_iommu_msi_get_resv_regions (struct device *dev,struct list_head *head); +phys_addr_t acpi_iort_dma_get_max_cpu_address (void );#else static inline void acpi_iort_init (void ) { }static inline u32 iort_msi_map_id (struct device *dev,u32 id)
@@ -55,6 +56,9 @@ static inline const struct iommu_ops *iort_iommu_configure_id(static inline int iort_iommu_msi_get_resv_regions (struct device *dev,struct list_head *head) {return 0 ; } + +static inline phys_addr_t acpi_iort_dma_get_max_cpu_address (void ) +{return PHYS_ADDR_MAX ; }#endif #endif /* __ACPI_IORT_H__ */
include/linux/crypto.h +6 -3
@@ -151,9 +151,12 @@* The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual * declaration) is used to ensure that the crypto_tfm context structure is * aligned correctly for the given architecture so that there are no alignment -* faults for C data types. In particular, this is required on platforms such -* as arm where pointers are 32-bit aligned but there are data types such as -* u64 which require 64-bit alignment. +* faults for C data types. On architectures that support non-cache coherent +* DMA, such as ARM or arm64, it also takes into account the minimal alignment +* that is required to ensure that the context struct member does not share any +* cachelines with the rest of the struct. This is needed to ensure that cache +* maintenance for non-coherent DMA (cache invalidation in particular) does not +* affect data that may be accessed by the CPU concurrently. */ #define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN
include/linux/mmzone.h +0 -20
@@ -354,26 +354,6 @@ enum zone_type {* DMA mask is assumed when ZONE_DMA32 is defined. Some 64-bit * platforms may need both zones as they support peripherals with * different DMA addressing limitations. -* -* Some examples: -* -* - i386 and x86_64 have a fixed 16M ZONE_DMA and ZONE_DMA32 for the -* rest of the lower 4G. -* -* - arm only uses ZONE_DMA, the size, up to 4G, may vary depending on -* the specific device. -* -* - arm64 has a fixed 1G ZONE_DMA and ZONE_DMA32 for the rest of the -* lower 4G. -* -* - powerpc only uses ZONE_DMA, the size, up to 2G, may vary -* depending on the specific device. -* -* - s390 uses ZONE_DMA fixed to the lower 2G. -* -* - ia64 and riscv only use ZONE_DMA32. -* -* - parisc uses neither. */ #ifdef CONFIG_ZONE_DMA ZONE_DMA,
include/linux/of.h +7 -0
@@ -558,6 +558,8 @@ int of_map_id(struct device_node *np, u32 id, const char *map_name, const char *map_mask_name, struct device_node **target, u32 *id_out); +phys_addr_t of_dma_get_max_cpu_address (struct device_node *np); +#else /* CONFIG_OF */ static inline void of_core_init (void )
@@ -995,6 +997,11 @@ static inline int of_map_id(struct device_node *np, u32 id, return -EINVAL; } +static inline phys_addr_t of_dma_get_max_cpu_address (struct device_node *np) +{ +return PHYS_ADDR_MAX ; +} +#define of_match_ptr (_ptr) NULL#define of_match_node (_matches, _node) NULL#endif /* CONFIG_OF */
include/sound/intel-nhlt.h +5 -0
@@ -112,6 +112,11 @@ struct nhlt_vendor_dmic_array_config {/* TODO add vendor mic config */ } __packed; +enum { +NHLT_CONFIG_TYPE_GENERIC =0 , +NHLT_CONFIG_TYPE_MIC_ARRAY =1 +}; +enum {NHLT_MIC_ARRAY_2CH_SMALL =0xa ,NHLT_MIC_ARRAY_2CH_BIG =0xb ,
kernel/trace/ring_buffer.c +11 -0
@@ -2836,6 +2836,17 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer, write_stamp, write_stamp - delta))return 0 ; +/* +* It's possible that the event time delta is zero +* (has the same time stamp as the previous event) +* in which case write_stamp and before_stamp could +* be the same. In such a case, force before_stamp +* to be different than write_stamp. It doesn't +* matter what it is, as long as its different. +*/ +if (!delta) +rb_time_set (&cpu_buffer->before_stamp,0 ); +/* * If an event were to come in now, it would see that the * write_stamp and the before_stamp are different, and assume
scripts/recordmcount.c +1 -1
@@ -438,7 +438,7 @@ static int arm_is_fake_mcount(Elf32_Rel const *rp)static int arm64_is_fake_mcount (Elf64_Rel const *rp) { -return ELF64_R_TYPE (w (rp->r_info)) !=R_AARCH64_CALL26 ; +return ELF64_R_TYPE (w8 (rp->r_info)) !=R_AARCH64_CALL26 ; }/* 64-bit EM_MIPS has weird ELF64_Rela.r_info.
security/tomoyo/network.c +1 -1
@@ -613,7 +613,7 @@ static int tomoyo_check_unix_address(struct sockaddr *addr,static bool tomoyo_kernel_service (void ) {/* Nothing to do if I am a kernel service. */ -return uaccess_kernel (); +return (current->flags & (PF_KTHREAD |PF_IO_WORKER )) ==PF_KTHREAD ; }/**
sound/hda/intel-nhlt.c +45 -9
76 lines not on this page · raw message
sound/pci/ctxfi/cthw20k2.c +1 -1
@@ -991,7 +991,7 @@ static int daio_mgr_dao_init(void *blk, unsigned int idx, unsigned int conf)if (idx <4 ) {/* S/PDIF output */ -switch ((conf &0x7 )) { +switch ((conf &0xf )) {case 1 :set_field (&ctl->txctl[idx],ATXCTL_NUC ,0 );break ;
sound/pci/hda/patch_realtek.c +13 -0
@@ -6408,6 +6408,7 @@ enum {ALC236_FIXUP_DELL_AIO_HEADSET_MIC ,ALC282_FIXUP_ACER_DISABLE_LINEOUT ,ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST , + ALC256_FIXUP_ACER_HEADSET_MIC, }; static const struct hda_fixup alc269_fixups[] = {
@@ -7864,6 +7865,16 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, }, + [ALC256_FIXUP_ACER_HEADSET_MIC] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl []) { + {0x19 ,0x02a1113c },/* use as headset mic, without its own jack detect */ + {0x1a ,0x90a1092f },/* use as internal mic */ + { } + }, + .chained = true, + .chain_id =ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7890,9 +7901,11 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x1246 ,"Acer Predator Helios 500" ,ALC299_FIXUP_PREDATOR_SPK ),SND_PCI_QUIRK (0x1025 ,0x1247 ,"Acer vCopperbox" ,ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS ),SND_PCI_QUIRK (0x1025 ,0x1248 ,"Acer Veriton N4660G" ,ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1025 ,0x1269 ,"Acer SWIFT SF314-54" ,ALC256_FIXUP_ACER_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x128f ,"Acer Veriton Z6860G" ,ALC286_FIXUP_ACER_AIO_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x1290 ,"Acer Veriton Z4860G" ,ALC286_FIXUP_ACER_AIO_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x1291 ,"Acer Veriton Z4660G" ,ALC286_FIXUP_ACER_AIO_HEADSET_MIC ), +SND_PCI_QUIRK (0x1025 ,0x129c ,"Acer SWIFT SF314-55" ,ALC256_FIXUP_ACER_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x1308 ,"Acer Aspire Z24-890" ,ALC286_FIXUP_ACER_AIO_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x132a ,"Acer TravelMate B114-21" ,ALC233_FIXUP_ACER_HEADSET_MIC ), SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
sound/usb/mixer.c +11 -0
@@ -1301,6 +1301,17 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,/* totally crap, return an error */ return -EINVAL ; } + }else { +/* if the max volume is too low, it's likely a bogus range; +* here we use -96dB as the threshold +*/ +if (cval->dBmax <=-9600 ) { +usb_audio_info (cval->head.mixer->chip, +"%d:%d: bogus dB values (%d/%d), disabling dB reporting\n" , + cval->head.id,mixer_ctrl_intf (cval->head.mixer), + cval->dBmin, cval->dBmax); + cval->dBmin = cval->dBmax =0 ; + } }return 0 ;
sound/usb/mixer_maps.c +10 -0
@@ -536,6 +536,16 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = { .id = USB_ID(0x05a7, 0x1020), .map = bose_companion5_map, }, + { + /* Corsair Virtuoso SE (wired mode) */ + .id = USB_ID(0x1b1c, 0x0a3d), + .map = corsair_virtuoso_map, + }, + { + /* Corsair Virtuoso SE (wireless mode) */ + .id = USB_ID(0x1b1c, 0x0a3e), + .map = corsair_virtuoso_map, + }, { /* Corsair Virtuoso (wired mode) */ .id = USB_ID(0x1b1c, 0x0a41),