From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbcAWLfW (ORCPT ); Sat, 23 Jan 2016 06:35:22 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35058 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940AbcAWLfM (ORCPT ); Sat, 23 Jan 2016 06:35:12 -0500 Message-ID: <1453548898.3734.160.camel@decadent.org.uk> Subject: Linux 3.2.76 From: Ben Hutchings To: linux-kernel@vger.kernel.org, Andrew Morton , torvalds@linux-foundation.org, Jiri Slaby , stable@vger.kernel.org Cc: lwn@lwn.net Date: Sat, 23 Jan 2016 11:34:58 +0000 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-iCq0hir2FG/TBCRvGrFS" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.4.247 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-iCq0hir2FG/TBCRvGrFS Content-Type: multipart/mixed; boundary="=-gMWI29aFGPEkQeCTQa1S" --=-gMWI29aFGPEkQeCTQa1S Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 SSdtIGFubm91bmNpbmcgdGhlIHJlbGVhc2Ugb2YgdGhlIDMuMi43NiBrZXJuZWwuCgpBbGwgdXNl cnMgb2YgdGhlIDMuMiBrZXJuZWwgc2VyaWVzIHNob3VsZCB1cGdyYWRlLgoKVGhlIHVwZGF0ZWQg My4yLnkgZ2l0IHRyZWUgY2FuIGJlIGZvdW5kIGF0OgrCoMKgwqDCoMKgwqDCoMKgaHR0cHM6Ly9n aXQua2VybmVsLm9yZy9wdWIvc2NtL2xpbnV4L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="UTF-8"; name="linux-3.2.76.patch" Content-Disposition: attachment; filename="linux-3.2.76.patch" Content-Transfer-Encoding: quoted-printable diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i= 2c-i801 index 99d4e44..4341d87 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 @@ -22,6 +22,17 @@ Supported adapters: * Intel Panther Point (PCH) * Intel Lynx Point (PCH) * Intel Lynx Point-LP (PCH) + * Intel Avoton (SOC) + * Intel Wellsburg (PCH) + * Intel Coleto Creek (PCH) + * Intel Wildcat Point (PCH) + * Intel Wildcat Point-LP (PCH) + * Intel BayTrail (SOC) + * Intel Sunrise Point-H (PCH) + * Intel Sunrise Point-LP (PCH) + * Intel DNV (SOC) + * Intel Broxton (SOC) + * Intel Lewisburg (PCH) Datasheets: Publicly available at the Intel website =20 On Intel Patsburg and later chipsets, both the normal host SMBus controlle= r diff --git a/Makefile b/Makefile index 1fbb6f4..289ca14 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION =3D 3 PATCHLEVEL =3D 2 -SUBLEVEL =3D 75 +SUBLEVEL =3D 76 EXTRAVERSION =3D NAME =3D Saber-toothed Squirrel =20 diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.= S index 1d39bea..532a330 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -192,6 +192,7 @@ illegal_syscall: sll t1, t0, 3 beqz v0, einval lw t2, sys_call_table(t1) # syscall routine + sw a0, PT_R2(sp) # call routine directly on restart =20 /* Some syscalls like execve get their arguments from struct pt_regs and claim zero arguments in the syscall table. Thus we have to diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.= S index a56175b..6651759 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S @@ -180,6 +180,7 @@ LEAF(sys32_syscall) dsll t1, t0, 3 beqz v0, einval ld t2, sys_call_table(t1) # syscall routine + sd a0, PT_R2(sp) # call routine directly on restart =20 move a0, a1 # shift argument registers move a1, a2 diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 12c1ed3..f7c8352 100644 --- a/arch/parisc/kernel/signal.c +++ b/arch/parisc/kernel/signal.c @@ -468,6 +468,55 @@ handle_signal(unsigned long sig, siginfo_t *info, stru= ct k_sigaction *ka, return 1; } =20 +/* + * Check how the syscall number gets loaded into %r20 within + * the delay branch in userspace and adjust as needed. + */ + +static void check_syscallno_in_delay_branch(struct pt_regs *regs) +{ + u32 opcode, source_reg; + u32 __user *uaddr; + int err; + + /* Usually we don't have to restore %r20 (the system call number) + * because it gets loaded in the delay slot of the branch external + * instruction via the ldi instruction. + * In some cases a register-to-register copy instruction might have + * been used instead, in which case we need to copy the syscall + * number into the source register before returning to userspace. + */ + + /* A syscall is just a branch, so all we have to do is fiddle the + * return pointer so that the ble instruction gets executed again. + */ + regs->gr[31] -=3D 8; /* delayed branching */ + + /* Get assembler opcode of code in delay branch */ + uaddr =3D (unsigned int *) ((regs->gr[31] & ~3) + 4); + err =3D get_user(opcode, uaddr); + if (err) + return; + + /* Check if delay branch uses "ldi int,%r20" */ + if ((opcode & 0xffff0000) =3D=3D 0x34140000) + return; /* everything ok, just return */ + + /* Check if delay branch uses "nop" */ + if (opcode =3D=3D INSN_NOP) + return; + + /* Check if delay branch uses "copy %rX,%r20" */ + if ((opcode & 0xffe0ffff) =3D=3D 0x08000254) { + source_reg =3D (opcode >> 16) & 31; + regs->gr[source_reg] =3D regs->gr[20]; + return; + } + + pr_warn("syscall restart: %s (pid %d): unexpected opcode 0x%08x\n", + current->comm, task_pid_nr(current), opcode); +} + static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka) { @@ -489,10 +538,7 @@ syscall_restart(struct pt_regs *regs, struct k_sigacti= on *ka) } /* fallthrough */ case -ERESTARTNOINTR: - /* A syscall is just a branch, so all - * we have to do is fiddle the return pointer. - */ - regs->gr[31] -=3D 8; /* delayed branching */ + check_syscallno_in_delay_branch(regs); /* Preserve original r28. */ regs->gr[28] =3D regs->orig_r28; break; @@ -543,18 +589,12 @@ insert_restart_trampoline(struct pt_regs *regs) } case -ERESTARTNOHAND: case -ERESTARTSYS: - case -ERESTARTNOINTR: { - /* Hooray for delayed branching. We don't - * have to restore %r20 (the system call - * number) because it gets loaded in the delay - * slot of the branch external instruction. - */ - regs->gr[31] -=3D 8; + case -ERESTARTNOINTR: + check_syscallno_in_delay_branch(regs); /* Preserve original r28. */ regs->gr[28] =3D regs->orig_r28; =20 return; - } default: break; } diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index 45df6d4..847ea15 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c @@ -1503,14 +1503,21 @@ static int print_insn(char *buffer, unsigned char *= code, unsigned long addr) } if (separator) ptr +=3D sprintf(ptr, "%c", separator); + /* + * Use four '%' characters below because of the + * following two conversions: + * + * 1) sprintf: %%%%r -> %%r + * 2) printk : %%r -> %r + */ if (operand->flags & OPERAND_GPR) - ptr +=3D sprintf(ptr, "%%r%i", value); + ptr +=3D sprintf(ptr, "%%%%r%i", value); else if (operand->flags & OPERAND_FPR) - ptr +=3D sprintf(ptr, "%%f%i", value); + ptr +=3D sprintf(ptr, "%%%%f%i", value); else if (operand->flags & OPERAND_AR) - ptr +=3D sprintf(ptr, "%%a%i", value); + ptr +=3D sprintf(ptr, "%%%%a%i", value); else if (operand->flags & OPERAND_CR) - ptr +=3D sprintf(ptr, "%%c%i", value); + ptr +=3D sprintf(ptr, "%%%%c%i", value); else if (operand->flags & OPERAND_PCREL) ptr +=3D sprintf(ptr, "%lx", (signed int) value + addr); diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index ab98fe5..aa21aa1 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -437,6 +437,7 @@ void kvm_pit_load_count(struct kvm *kvm, int channel, u= 32 val, int hpet_legacy_s u8 saved_mode; if (hpet_legacy_start) { /* save existing mode for later reenablement */ + WARN_ON(channel !=3D 0); saved_mode =3D kvm->arch.vpit->pit_state.channels[0].mode; kvm->arch.vpit->pit_state.channels[0].mode =3D 0xff; /* disable timer */ pit_load_count(kvm, channel, val); diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0e3289b..80c6d68 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3434,10 +3434,11 @@ static int kvm_vm_ioctl_get_pit(struct kvm *kvm, st= ruct kvm_pit_state *ps) static int kvm_vm_ioctl_set_pit(struct kvm *kvm, struct kvm_pit_state *ps) { int r =3D 0; - + int i; mutex_lock(&kvm->arch.vpit->pit_state.lock); memcpy(&kvm->arch.vpit->pit_state, ps, sizeof(struct kvm_pit_state)); - kvm_pit_load_count(kvm, 0, ps->channels[0].count, 0); + for (i =3D 0; i < 3; i++) + kvm_pit_load_count(kvm, i, ps->channels[i].count, 0); mutex_unlock(&kvm->arch.vpit->pit_state.lock); return r; } @@ -3458,6 +3459,7 @@ static int kvm_vm_ioctl_get_pit2(struct kvm *kvm, str= uct kvm_pit_state2 *ps) static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, struct kvm_pit_state2 *p= s) { int r =3D 0, start =3D 0; + int i; u32 prev_legacy, cur_legacy; mutex_lock(&kvm->arch.vpit->pit_state.lock); prev_legacy =3D kvm->arch.vpit->pit_state.flags & KVM_PIT_FLAGS_HPET_LEGA= CY; @@ -3467,7 +3469,9 @@ static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, str= uct kvm_pit_state2 *ps) memcpy(&kvm->arch.vpit->pit_state.channels, &ps->channels, sizeof(kvm->arch.vpit->pit_state.channels)); kvm->arch.vpit->pit_state.flags =3D ps->flags; - kvm_pit_load_count(kvm, 0, kvm->arch.vpit->pit_state.channels[0].count, s= tart); + for (i =3D 0; i < 3; i++) + kvm_pit_load_count(kvm, i, kvm->arch.vpit->pit_state.channels[i].count, + start && i =3D=3D 0); mutex_unlock(&kvm->arch.vpit->pit_state.lock); return r; } diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index d53a30b..6eb6eb1 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -280,12 +280,12 @@ static int ablkcipher_walk_first(struct ablkcipher_re= quest *req, if (WARN_ON_ONCE(in_irq())) return -EDEADLK; =20 + walk->iv =3D req->info; walk->nbytes =3D walk->total; if (unlikely(!walk->total)) return 0; =20 walk->iv_buffer =3D NULL; - walk->iv =3D req->info; if (unlikely(((unsigned long)walk->iv & alignmask))) { int err =3D ablkcipher_copy_iv(walk, tfm, alignmask); if (err) diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 04f0f38..3041504 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -329,12 +329,12 @@ static int blkcipher_walk_first(struct blkcipher_desc= *desc, if (WARN_ON_ONCE(in_irq())) return -EDEADLK; =20 + walk->iv =3D desc->info; walk->nbytes =3D walk->total; if (unlikely(!walk->total)) return 0; =20 walk->buffer =3D NULL; - walk->iv =3D desc->info; if (unlikely(((unsigned long)walk->iv & alignmask))) { int err =3D blkcipher_copy_iv(walk, tfm, alignmask); if (err) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index e2958aa..7117457 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -324,6 +324,8 @@ static const struct pci_device_id ahci_pci_tbl[] =3D { { PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */ { PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */ { PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */ + { PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */ { PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */ { PCI_VDEVICE(INTEL, 0x8d04), board_ahci }, /* Wellsburg RAID */ { PCI_VDEVICE(INTEL, 0x8d06), board_ahci }, /* Wellsburg RAID */ @@ -348,15 +350,29 @@ static const struct pci_device_id ahci_pci_tbl[] =3D = { { PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */ { PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */ { PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */ + { PCI_VDEVICE(INTEL, 0xa102), board_ahci }, /* Sunrise Point-H AHCI */ { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */ - { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */ + { PCI_VDEVICE(INTEL, 0xa106), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa107), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */ + { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa182), board_ahci }, /* Lewisburg AHCI*/ + { PCI_VDEVICE(INTEL, 0xa184), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa186), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa18e), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa202), board_ahci }, /* Lewisburg AHCI*/ + { PCI_VDEVICE(INTEL, 0xa204), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa20e), board_ahci }, /* Lewisburg RAID*/ =20 /* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr }, + /* JMicron 362B and 362C have an AHCI function with IDE class code */ + { PCI_VDEVICE(JMICRON, 0x2362), board_ahci_ign_iferr }, + { PCI_VDEVICE(JMICRON, 0x236f), board_ahci_ign_iferr }, =20 /* ATI */ { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */ @@ -494,6 +510,8 @@ static const struct pci_device_id ahci_pci_tbl[] =3D { .driver_data =3D board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte *= / { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a0), .driver_data =3D board_ahci_yes_fbs }, + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a2), /* 88se91a2 */ + .driver_data =3D board_ahci_yes_fbs }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), .driver_data =3D board_ahci_yes_fbs }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230), diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback= /common.h index f67985d..2c6205e 100644 --- a/drivers/block/xen-blkback/common.h +++ b/drivers/block/xen-blkback/common.h @@ -238,11 +238,11 @@ static inline void blkif_get_x86_32_req(struct blkif_= request *dst, struct blkif_x86_32_request *src) { int i, n =3D BLKIF_MAX_SEGMENTS_PER_REQUEST; - dst->operation =3D src->operation; + dst->operation =3D ACCESS_ONCE(src->operation); dst->nr_segments =3D src->nr_segments; dst->handle =3D src->handle; dst->id =3D src->id; - switch (src->operation) { + switch (dst->operation) { case BLKIF_OP_READ: case BLKIF_OP_WRITE: case BLKIF_OP_WRITE_BARRIER: @@ -267,11 +267,11 @@ static inline void blkif_get_x86_64_req(struct blkif_= request *dst, struct blkif_x86_64_request *src) { int i, n =3D BLKIF_MAX_SEGMENTS_PER_REQUEST; - dst->operation =3D src->operation; + dst->operation =3D ACCESS_ONCE(src->operation); dst->nr_segments =3D src->nr_segments; dst->handle =3D src->handle; dst->id =3D src->id; - switch (src->operation) { + switch (dst->operation) { case BLKIF_OP_READ: case BLKIF_OP_WRITE: case BLKIF_OP_WRITE_BARRIER: diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 1331740..a03e849 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -873,6 +873,7 @@ static int cdrom_is_dvd_rw(struct cdrom_device_info *cd= i) switch (cdi->mmc3_profile) { case 0x12: /* DVD-RAM */ case 0x1A: /* DVD+RW */ + case 0x43: /* BD-RE */ return 0; default: return 1; diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/rade= on/radeon_irq_kms.c index 42f5a2b..931a8a9 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c @@ -51,6 +51,11 @@ static void radeon_hotplug_work_func(struct work_struct = *work) struct drm_mode_config *mode_config =3D &dev->mode_config; struct drm_connector *connector; =20 + /* we can race here at startup, some boards seem to trigger + * hotplug irqs when they shouldn't. */ + if (!rdev->mode_info.mode_config_initialized) + return; + mutex_lock(&mode_config->mutex); if (mode_config->num_connector) { list_for_each_entry(connector, &mode_config->connector_list, head) diff --git a/drivers/hid/hid-dr.c b/drivers/hid/hid-dr.c index e832f44..b50dab3 100644 --- a/drivers/hid/hid-dr.c +++ b/drivers/hid/hid-dr.c @@ -236,6 +236,58 @@ static __u8 pid0011_rdesc_fixed[] =3D { 0xC0 /* End Collection */ }; =20 +static __u8 pid0006_rdesc_fixed[] =3D { + 0x05, 0x01, /* Usage Page (Generic Desktop) */ + 0x09, 0x04, /* Usage (Joystick) */ + 0xA1, 0x01, /* Collection (Application) */ + 0xA1, 0x02, /* Collection (Logical) */ + 0x75, 0x08, /* Report Size (8) */ + 0x95, 0x05, /* Report Count (5) */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ + 0x35, 0x00, /* Physical Minimum (0) */ + 0x46, 0xFF, 0x00, /* Physical Maximum (255) */ + 0x09, 0x30, /* Usage (X) */ + 0x09, 0x33, /* Usage (Ry) */ + 0x09, 0x32, /* Usage (Z) */ + 0x09, 0x31, /* Usage (Y) */ + 0x09, 0x34, /* Usage (Ry) */ + 0x81, 0x02, /* Input (Variable) */ + 0x75, 0x04, /* Report Size (4) */ + 0x95, 0x01, /* Report Count (1) */ + 0x25, 0x07, /* Logical Maximum (7) */ + 0x46, 0x3B, 0x01, /* Physical Maximum (315) */ + 0x65, 0x14, /* Unit (Centimeter) */ + 0x09, 0x39, /* Usage (Hat switch) */ + 0x81, 0x42, /* Input (Variable) */ + 0x65, 0x00, /* Unit (None) */ + 0x75, 0x01, /* Report Size (1) */ + 0x95, 0x0C, /* Report Count (12) */ + 0x25, 0x01, /* Logical Maximum (1) */ + 0x45, 0x01, /* Physical Maximum (1) */ + 0x05, 0x09, /* Usage Page (Button) */ + 0x19, 0x01, /* Usage Minimum (0x01) */ + 0x29, 0x0C, /* Usage Maximum (0x0C) */ + 0x81, 0x02, /* Input (Variable) */ + 0x06, 0x00, 0xFF, /* Usage Page (Vendor Defined) */ + 0x75, 0x01, /* Report Size (1) */ + 0x95, 0x08, /* Report Count (8) */ + 0x25, 0x01, /* Logical Maximum (1) */ + 0x45, 0x01, /* Physical Maximum (1) */ + 0x09, 0x01, /* Usage (0x01) */ + 0x81, 0x02, /* Input (Variable) */ + 0xC0, /* End Collection */ + 0xA1, 0x02, /* Collection (Logical) */ + 0x75, 0x08, /* Report Size (8) */ + 0x95, 0x07, /* Report Count (7) */ + 0x46, 0xFF, 0x00, /* Physical Maximum (255) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ + 0x09, 0x02, /* Usage (0x02) */ + 0x91, 0x02, /* Output (Variable) */ + 0xC0, /* End Collection */ + 0xC0 /* End Collection */ +}; + static __u8 *dr_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { @@ -246,6 +298,12 @@ static __u8 *dr_report_fixup(struct hid_device *hdev, = __u8 *rdesc, *rsize =3D sizeof(pid0011_rdesc_fixed); } break; + case 0x0006: + if (*rsize =3D=3D sizeof(pid0006_rdesc_fixed)) { + rdesc =3D pid0006_rdesc_fixed; + *rsize =3D sizeof(pid0006_rdesc_fixed); + } + break; } return rdesc; } diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 949ea640..ca1b2a4 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -105,6 +105,17 @@ config I2C_I801 Panther Point (PCH) Lynx Point (PCH) Lynx Point-LP (PCH) + Avoton (SOC) + Wellsburg (PCH) + Coleto Creek (PCH) + Wildcat Point (PCH) + Wildcat Point-LP (PCH) + BayTrail (SOC) + Sunrise Point-H (PCH) + Sunrise Point-LP (PCH) + DNV (SOC) + Broxton (SOC) + Lewisburg (PCH) =20 This driver can also be built as a module. If so, the module will be called i2c-i801. diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 817d025..9ce14ac 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -22,48 +22,63 @@ */ =20 /* - Supports the following Intel I/O Controller Hubs (ICH): - - I/O Block I2C - region SMBus Block proc. block - Chip name PCI ID size PEC buffer call read - ---------------------------------------------------------------------- - 82801AA (ICH) 0x2413 16 no no no no - 82801AB (ICH0) 0x2423 16 no no no no - 82801BA (ICH2) 0x2443 16 no no no no - 82801CA (ICH3) 0x2483 32 soft no no no - 82801DB (ICH4) 0x24c3 32 hard yes no no - 82801E (ICH5) 0x24d3 32 hard yes yes yes - 6300ESB 0x25a4 32 hard yes yes yes - 82801F (ICH6) 0x266a 32 hard yes yes yes - 6310ESB/6320ESB 0x269b 32 hard yes yes yes - 82801G (ICH7) 0x27da 32 hard yes yes yes - 82801H (ICH8) 0x283e 32 hard yes yes yes - 82801I (ICH9) 0x2930 32 hard yes yes yes - EP80579 (Tolapai) 0x5032 32 hard yes yes yes - ICH10 0x3a30 32 hard yes yes yes - ICH10 0x3a60 32 hard yes yes yes - 5/3400 Series (PCH) 0x3b30 32 hard yes yes yes - 6 Series (PCH) 0x1c22 32 hard yes yes yes - Patsburg (PCH) 0x1d22 32 hard yes yes yes - Patsburg (PCH) IDF 0x1d70 32 hard yes yes yes - Patsburg (PCH) IDF 0x1d71 32 hard yes yes yes - Patsburg (PCH) IDF 0x1d72 32 hard yes yes yes - DH89xxCC (PCH) 0x2330 32 hard yes yes yes - Panther Point (PCH) 0x1e22 32 hard yes yes yes - Lynx Point (PCH) 0x8c22 32 hard yes yes yes - Lynx Point-LP (PCH) 0x9c22 32 hard yes yes yes - - Features supported by this driver: - Software PEC no - Hardware PEC yes - Block buffer yes - Block process call transaction no - I2C block read transaction yes (doesn't use the block buffer) - Slave mode no - - See the file Documentation/i2c/busses/i2c-i801 for details. -*/ + * Supports the following Intel I/O Controller Hubs (ICH): + * + * I/O Block I2C + * region SMBus Block proc. block + * Chip name PCI ID size PEC buffer call read + * -----------------------------------------------------------------------= ---- + * 82801AA (ICH) 0x2413 16 no no no no + * 82801AB (ICH0) 0x2423 16 no no no no + * 82801BA (ICH2) 0x2443 16 no no no no + * 82801CA (ICH3) 0x2483 32 soft no no no + * 82801DB (ICH4) 0x24c3 32 hard yes no no + * 82801E (ICH5) 0x24d3 32 hard yes yes yes + * 6300ESB 0x25a4 32 hard yes yes yes + * 82801F (ICH6) 0x266a 32 hard yes yes yes + * 6310ESB/6320ESB 0x269b 32 hard yes yes yes + * 82801G (ICH7) 0x27da 32 hard yes yes yes + * 82801H (ICH8) 0x283e 32 hard yes yes yes + * 82801I (ICH9) 0x2930 32 hard yes yes yes + * EP80579 (Tolapai) 0x5032 32 hard yes yes yes + * ICH10 0x3a30 32 hard yes yes yes + * ICH10 0x3a60 32 hard yes yes yes + * 5/3400 Series (PCH) 0x3b30 32 hard yes yes yes + * 6 Series (PCH) 0x1c22 32 hard yes yes yes + * Patsburg (PCH) 0x1d22 32 hard yes yes yes + * Patsburg (PCH) IDF 0x1d70 32 hard yes yes yes + * Patsburg (PCH) IDF 0x1d71 32 hard yes yes yes + * Patsburg (PCH) IDF 0x1d72 32 hard yes yes yes + * DH89xxCC (PCH) 0x2330 32 hard yes yes yes + * Panther Point (PCH) 0x1e22 32 hard yes yes yes + * Lynx Point (PCH) 0x8c22 32 hard yes yes yes + * Lynx Point-LP (PCH) 0x9c22 32 hard yes yes yes + * Avoton (SOC) 0x1f3c 32 hard yes yes yes + * Wellsburg (PCH) 0x8d22 32 hard yes yes yes + * Wellsburg (PCH) MS 0x8d7d 32 hard yes yes yes + * Wellsburg (PCH) MS 0x8d7e 32 hard yes yes yes + * Wellsburg (PCH) MS 0x8d7f 32 hard yes yes yes + * Coleto Creek (PCH) 0x23b0 32 hard yes yes yes + * Wildcat Point (PCH) 0x8ca2 32 hard yes yes yes + * Wildcat Point-LP (PCH) 0x9ca2 32 hard yes yes yes + * BayTrail (SOC) 0x0f12 32 hard yes yes yes + * Sunrise Point-H (PCH) 0xa123 32 hard yes yes yes + * Sunrise Point-LP (PCH) 0x9d23 32 hard yes yes yes + * DNV (SOC) 0x19df 32 hard yes yes yes + * Broxton (SOC) 0x5ad4 32 hard yes yes yes + * Lewisburg (PCH) 0xa1a3 32 hard yes yes yes + * Lewisburg Supersku (PCH) 0xa223 32 hard yes yes yes + * + * Features supported by this driver: + * Software PEC no + * Hardware PEC yes + * Block buffer yes + * Block process call transaction no + * I2C block read transaction yes (doesn't use the block buffer) + * Slave mode no + * + * See the file Documentation/i2c/busses/i2c-i801 for details. + */ =20 #include #include @@ -138,17 +153,33 @@ SMBHSTSTS_INTR) =20 /* Older devices have their ID defined in */ -#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 -#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 +#define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12 +#define PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS 0x2292 +#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 +#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 /* Patsburg also has three 'Integrated Device Function' SMBus controllers = */ -#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0 0x1d70 -#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1 0x1d71 -#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2 0x1d72 -#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22 -#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330 -#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30 -#define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS 0x8c22 -#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS 0x9c22 +#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0 0x1d70 +#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1 0x1d71 +#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2 0x1d72 +#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22 +#define PCI_DEVICE_ID_INTEL_AVOTON_SMBUS 0x1f3c +#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330 +#define PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS 0x23b0 +#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30 +#define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS 0x8c22 +#define PCI_DEVICE_ID_INTEL_WILDCATPOINT_SMBUS 0x8ca2 +#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS 0x8d22 +#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS0 0x8d7d +#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1 0x8d7e +#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2 0x8d7f +#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS 0x9c22 +#define PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS 0x9ca2 +#define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBUS 0xa123 +#define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMBUS 0x9d23 +#define PCI_DEVICE_ID_INTEL_DNV_SMBUS 0x19df +#define PCI_DEVICE_ID_INTEL_BROXTON_SMBUS 0x5ad4 +#define PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS 0xa1a3 +#define PCI_DEVICE_ID_INTEL_LEWISBURG_SSKU_SMBUS 0xa223 =20 struct i801_priv { struct i2c_adapter adapter; @@ -639,6 +670,22 @@ static const struct pci_device_id i801_ids[] =3D { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS)= }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS)= }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_AVOTON_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS0= ) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1= ) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2= ) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS) = }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_SMBUS)= }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMB= US) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBU= S) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMB= US) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BROXTON_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LEWISBURG_SSKU_SMBU= S) }, { 0, } }; =20 @@ -786,6 +833,9 @@ static int __devinit i801_probe(struct pci_dev *dev, case PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0: case PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1: case PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2: + case PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS0: + case PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1: + case PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2: priv->features |=3D FEATURE_IDF; /* fall through */ default: diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-= gigaset.c index 86a5c4f..cf3c1d4 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c @@ -371,19 +371,23 @@ static void gigaset_freecshw(struct cardstate *cs) tasklet_kill(&cs->write_tasklet); if (!cs->hw.ser) return; - dev_set_drvdata(&cs->hw.ser->dev.dev, NULL); platform_device_unregister(&cs->hw.ser->dev); - kfree(cs->hw.ser); - cs->hw.ser =3D NULL; } =20 static void gigaset_device_release(struct device *dev) { struct platform_device *pdev =3D to_platform_device(dev); + struct cardstate *cs =3D dev_get_drvdata(dev); =20 /* adapted from platform_device_release() in drivers/base/platform.c */ kfree(dev->platform_data); kfree(pdev->resource); + + if (!cs) + return; + dev_set_drvdata(dev, NULL); + kfree(cs->hw.ser); + cs->hw.ser =3D NULL; } =20 /* diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardwar= e/mISDN/mISDNipac.c index d2ffb1d..6614b28 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c @@ -1156,7 +1156,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) =20 if (ipac->type & IPAC_TYPE_IPACX) { ista =3D ReadIPAC(ipac, ISACX_ISTA); - while (ista && cnt--) { + while (ista && --cnt) { pr_debug("%s: ISTA %02x\n", ipac->name, ista); if (ista & IPACX__ICA) ipac_irq(&ipac->hscx[0], ista); @@ -1168,7 +1168,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) } } else if (ipac->type & IPAC_TYPE_IPAC) { ista =3D ReadIPAC(ipac, IPAC_ISTA); - while (ista && cnt--) { + while (ista && --cnt) { pr_debug("%s: ISTA %02x\n", ipac->name, ista); if (ista & (IPAC__ICD | IPAC__EXD)) { istad =3D ReadISAC(isac, ISAC_ISTA); @@ -1186,7 +1186,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) ista =3D ReadIPAC(ipac, IPAC_ISTA); } } else if (ipac->type & IPAC_TYPE_HSCX) { - while (cnt) { + while (--cnt) { ista =3D ReadIPAC(ipac, IPAC_ISTAB + ipac->hscx[1].off); pr_debug("%s: B2 ISTA %02x\n", ipac->name, ista); if (ista) @@ -1197,7 +1197,6 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) mISDNisac_irq(isac, istad); if (0 =3D=3D (ista | istad)) break; - cnt--; } } if (cnt > maxloop) /* only for ISAC/HSCX without PCI IRQ test */ diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/r= enesas/sh_eth.c index e49208d..9842fd9 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -1499,8 +1499,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, str= uct net_device *ndev) txdesc =3D &mdp->tx_ring[entry]; /* soft swap. */ if (!mdp->cd->hw_swap) - sh_eth_soft_swap(phys_to_virt(ALIGN(txdesc->addr, 4)), - skb->len + 2); + sh_eth_soft_swap(PTR_ALIGN(skb->data, 4), skb->len + 2); txdesc->addr =3D dma_map_single(&ndev->dev, skb->data, skb->len, DMA_TO_DEVICE); if (skb->len < ETHERSMALL) diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/ne= tback.c index b2528f6..7b71257 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -406,17 +406,17 @@ static struct netbk_rx_meta *get_next_rx_buffer(struc= t xenvif *vif, struct netrx_pending_operations *npo) { struct netbk_rx_meta *meta; - struct xen_netif_rx_request *req; + struct xen_netif_rx_request req; =20 - req =3D RING_GET_REQUEST(&vif->rx, vif->rx.req_cons++); + RING_COPY_REQUEST(&vif->rx, vif->rx.req_cons++, &req); =20 meta =3D npo->meta + npo->meta_prod++; meta->gso_size =3D 0; meta->size =3D 0; - meta->id =3D req->id; + meta->id =3D req.id; =20 npo->copy_off =3D 0; - npo->copy_gref =3D req->gref; + npo->copy_gref =3D req.gref; =20 return meta; } @@ -518,7 +518,7 @@ static int netbk_gop_skb(struct sk_buff *skb, struct xenvif *vif =3D netdev_priv(skb->dev); int nr_frags =3D skb_shinfo(skb)->nr_frags; int i; - struct xen_netif_rx_request *req; + struct xen_netif_rx_request req; struct netbk_rx_meta *meta; unsigned char *data; int head =3D 1; @@ -528,14 +528,14 @@ static int netbk_gop_skb(struct sk_buff *skb, =20 /* Set up a GSO prefix descriptor, if necessary */ if (skb_shinfo(skb)->gso_size && vif->gso_prefix) { - req =3D RING_GET_REQUEST(&vif->rx, vif->rx.req_cons++); + RING_COPY_REQUEST(&vif->rx, vif->rx.req_cons++, &req); meta =3D npo->meta + npo->meta_prod++; meta->gso_size =3D skb_shinfo(skb)->gso_size; meta->size =3D 0; - meta->id =3D req->id; + meta->id =3D req.id; } =20 - req =3D RING_GET_REQUEST(&vif->rx, vif->rx.req_cons++); + RING_COPY_REQUEST(&vif->rx, vif->rx.req_cons++, &req); meta =3D npo->meta + npo->meta_prod++; =20 if (!vif->gso_prefix) @@ -544,9 +544,9 @@ static int netbk_gop_skb(struct sk_buff *skb, meta->gso_size =3D 0; =20 meta->size =3D 0; - meta->id =3D req->id; + meta->id =3D req.id; npo->copy_off =3D 0; - npo->copy_gref =3D req->gref; + npo->copy_gref =3D req.gref; =20 data =3D skb->data; while (data < skb_tail_pointer(skb)) { @@ -864,9 +864,7 @@ static void tx_add_credit(struct xenvif *vif) * Allow a burst big enough to transmit a jumbo packet of up to 128kB. * Otherwise the interface can seize up due to insufficient credit. */ - max_burst =3D RING_GET_REQUEST(&vif->tx, vif->tx.req_cons)->size; - max_burst =3D min(max_burst, 131072UL); - max_burst =3D max(max_burst, vif->credit_bytes); + max_burst =3D max(131072UL, vif->credit_bytes); =20 /* Take care that adding a new chunk of credit doesn't wrap to zero. */ max_credit =3D vif->remaining_credit + vif->credit_bytes; @@ -892,7 +890,7 @@ static void netbk_tx_err(struct xenvif *vif, make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR); if (cons =3D=3D end) break; - txp =3D RING_GET_REQUEST(&vif->tx, cons++); + RING_COPY_REQUEST(&vif->tx, cons++, txp); } while (1); vif->tx.req_cons =3D cons; xen_netbk_check_rx_xenvif(vif); @@ -959,8 +957,7 @@ static int netbk_count_requests(struct xenvif *vif, if (drop_err) txp =3D &dropped_tx; =20 - memcpy(txp, RING_GET_REQUEST(&vif->tx, cons + slots), - sizeof(*txp)); + RING_COPY_REQUEST(&vif->tx, cons + slots, txp); =20 /* If the guest submitted a frame >=3D 64 KiB then * first->size overflowed and following slots will @@ -1248,8 +1245,7 @@ static int xen_netbk_get_extras(struct xenvif *vif, return -EBADR; } =20 - memcpy(&extra, RING_GET_REQUEST(&vif->tx, cons), - sizeof(extra)); + RING_COPY_REQUEST(&vif->tx, cons, &extra); if (unlikely(!extra.type || extra.type >=3D XEN_NETIF_EXTRA_TYPE_MAX)) { vif->tx.req_cons =3D ++cons; @@ -1444,7 +1440,7 @@ static unsigned xen_netbk_tx_build_gops(struct xen_ne= tbk *netbk) =20 idx =3D vif->tx.req_cons; rmb(); /* Ensure that we see the request before we copy it. */ - memcpy(&txreq, RING_GET_REQUEST(&vif->tx, idx), sizeof(txreq)); + RING_COPY_REQUEST(&vif->tx, idx, &txreq); =20 /* Credit-based scheduling. */ if (txreq.size > vif->remaining_credit && diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index eba183c..3643bbf 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -70,6 +70,7 @@ static int ses_probe(struct device *dev) static int ses_recv_diag(struct scsi_device *sdev, int page_code, void *buf, int bufflen) { + int ret; unsigned char cmd[] =3D { RECEIVE_DIAGNOSTIC, 1, /* Set PCV bit */ @@ -78,9 +79,26 @@ static int ses_recv_diag(struct scsi_device *sdev, int p= age_code, bufflen & 0xff, 0 }; + unsigned char recv_page_code; =20 - return scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen, + ret =3D scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen, NULL, SES_TIMEOUT, SES_RETRIES, NULL); + if (unlikely(!ret)) + return ret; + + recv_page_code =3D ((unsigned char *)buf)[0]; + + if (likely(recv_page_code =3D=3D page_code)) + return ret; + + /* successful diagnostic but wrong page code. This happens to some + * USB devices, just print a message and pretend there was an error */ + + sdev_printk(KERN_ERR, sdev, + "Wrong diagnostic page; asked for %d got %u\n", + page_code, recv_page_code); + + return -EINVAL; } =20 static int ses_send_diag(struct scsi_device *sdev, int page_code, @@ -436,7 +454,15 @@ static void ses_enclosure_data_process(struct enclosur= e_device *edev, if (desc_ptr) desc_ptr +=3D len; =20 - if (addl_desc_ptr) + if (addl_desc_ptr && + /* only find additional descriptions for specific devices */ + (type_ptr[0] =3D=3D ENCLOSURE_COMPONENT_DEVICE || + type_ptr[0] =3D=3D ENCLOSURE_COMPONENT_ARRAY_DEVICE || + type_ptr[0] =3D=3D ENCLOSURE_COMPONENT_SAS_EXPANDER || + /* these elements are optional */ + type_ptr[0] =3D=3D ENCLOSURE_COMPONENT_SCSI_TARGET_PORT || + type_ptr[0] =3D=3D ENCLOSURE_COMPONENT_SCSI_INITIATOR_PORT || + type_ptr[0] =3D=3D ENCLOSURE_COMPONENT_CONTROLLER_ELECTRONICS)) addl_desc_ptr +=3D addl_desc_ptr[1] + 2; =20 } diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index b2ccdea..f978051 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -554,7 +554,7 @@ struct spi_master *spi_alloc_master(struct device *dev,= unsigned size) =20 device_initialize(&master->dev); master->dev.class =3D &spi_master_class; - master->dev.parent =3D get_device(dev); + master->dev.parent =3D dev; spi_master_set_devdata(master, &master[1]); =20 return master; diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 4f02f9c..a846618 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -442,10 +442,12 @@ static void flush_to_ldisc(struct work_struct *work) char_buf =3D head->char_buf_ptr + head->read; flag_buf =3D head->flag_buf_ptr + head->read; head->read +=3D count; - spin_unlock_irqrestore(&tty->buf.lock, flags); - disc->ops->receive_buf(tty, char_buf, + if (disc->ops->receive_buf) { + spin_unlock_irqrestore(&tty->buf.lock, flags); + disc->ops->receive_buf(tty, char_buf, flag_buf, count); - spin_lock_irqsave(&tty->buf.lock, flags); + spin_lock_irqsave(&tty->buf.lock, flags); + } } clear_bit(TTY_FLUSHING, &tty->flags); } diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 7cfe286..dde0330 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -153,7 +153,7 @@ EXPORT_SYMBOL_GPL(ehci_cf_port_reset_rwsem); #define HUB_DEBOUNCE_STEP 25 #define HUB_DEBOUNCE_STABLE 100 =20 - +static void hub_release(struct kref *kref); static int usb_reset_and_verify_device(struct usb_device *udev); =20 static inline char *portspeed(struct usb_hub *hub, int portstatus) @@ -792,10 +792,20 @@ static void hub_activate(struct usb_hub *hub, enum hu= b_activation_type type) unsigned delay; =20 /* Continue a partial initialization */ - if (type =3D=3D HUB_INIT2) - goto init2; - if (type =3D=3D HUB_INIT3) + if (type =3D=3D HUB_INIT2 || type =3D=3D HUB_INIT3) { + device_lock(hub->intfdev); + + /* Was the hub disconnected while we were waiting? */ + if (hub->disconnected) { + device_unlock(hub->intfdev); + kref_put(&hub->kref, hub_release); + return; + } + if (type =3D=3D HUB_INIT2) + goto init2; goto init3; + } + kref_get(&hub->kref); =20 /* The superspeed hub except for root hub has to use Hub Depth * value as an offset into the route string to locate the bits @@ -984,6 +994,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_= activation_type type) PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func3); schedule_delayed_work(&hub->init_work, msecs_to_jiffies(delay)); + device_unlock(hub->intfdev); return; /* Continues at init3: below */ } else { msleep(delay); @@ -1004,6 +1015,11 @@ static void hub_activate(struct usb_hub *hub, enum h= ub_activation_type type) /* Allow autosuspend if it was suppressed */ if (type <=3D HUB_INIT3) usb_autopm_put_interface_async(to_usb_interface(hub->intfdev)); + + if (type =3D=3D HUB_INIT2 || type =3D=3D HUB_INIT3) + device_unlock(hub->intfdev); + + kref_put(&hub->kref, hub_release); } =20 /* Implement the continuations for the delays above */ diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 4735931..fa3ddf9 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c @@ -582,7 +582,8 @@ static int ipaq_open(struct tty_struct *tty, * through. Since this has a reasonably high failure rate, we retry * several times. */ - while (retries--) { + while (retries) { + retries--; result =3D usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21, 0x1, 0, NULL, 0, 100); diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index a16beeb..b7f6485 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -446,7 +446,10 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(= const char *s) port =3D FSL_DIU_PORT_DLVDS; } =20 - return diu_ops.valid_monitor_port(port); + if (diu_ops.valid_monitor_port) + port =3D diu_ops.valid_monitor_port(port); + + return port; } =20 /** @@ -1759,6 +1762,14 @@ static int __init fsl_diu_init(void) #else monitor_port =3D fsl_diu_name_to_port(monitor_string); #endif + + /* + * Must to verify set_pixel_clock. If not implement on platform, + * then that means that there is no platform support for the DIU. + */ + if (!diu_ops.set_pixel_clock) + return -ENODEV; + pr_info("Freescale Display Interface Unit (DIU) framebuffer driver\n"); =20 #ifdef CONFIG_NOT_COHERENT_CACHE diff --git a/drivers/xen/xen-pciback/pciback.h b/drivers/xen/xen-pciback/pc= iback.h index e9b4011..9447fcb 100644 --- a/drivers/xen/xen-pciback/pciback.h +++ b/drivers/xen/xen-pciback/pciback.h @@ -37,6 +37,7 @@ struct xen_pcibk_device { struct xen_pci_sharedinfo *sh_info; unsigned long flags; struct work_struct op_work; + struct xen_pci_op op; }; =20 struct xen_pcibk_dev_data { diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pcibac= k/pciback_ops.c index e947e78..31c8580 100644 --- a/drivers/xen/xen-pciback/pciback_ops.c +++ b/drivers/xen/xen-pciback/pciback_ops.c @@ -68,6 +68,13 @@ static void xen_pcibk_control_isr(struct pci_dev *dev, i= nt reset) enable ? "enable" : "disable"); =20 if (enable) { + /* + * The MSI or MSI-X should not have an IRQ handler. Otherwise + * if the guest terminates we BUG_ON in free_msi_irqs. + */ + if (dev->msi_enabled || dev->msix_enabled) + goto out; + rc =3D request_irq(dev_data->irq, xen_pcibk_guest_interrupt, IRQF_SHARED, dev_data->irq_name, dev); @@ -142,7 +149,12 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev= , if (unlikely(verbose_request)) printk(KERN_DEBUG DRV_NAME ": %s: enable MSI\n", pci_name(dev)); =20 - status =3D pci_enable_msi(dev); + if (dev->msi_enabled) + status =3D -EALREADY; + else if (dev->msix_enabled) + status =3D -ENXIO; + else + status =3D pci_enable_msi(dev); =20 if (status) { pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err= %d\n", @@ -171,20 +183,23 @@ static int xen_pcibk_disable_msi(struct xen_pcibk_device *pdev, struct pci_dev *dev, struct xen_pci_op *op) { - struct xen_pcibk_dev_data *dev_data; - if (unlikely(verbose_request)) printk(KERN_DEBUG DRV_NAME ": %s: disable MSI\n", pci_name(dev)); - pci_disable_msi(dev); =20 + if (dev->msi_enabled) { + struct xen_pcibk_dev_data *dev_data; + + pci_disable_msi(dev); + + dev_data =3D pci_get_drvdata(dev); + if (dev_data) + dev_data->ack_intr =3D 1; + } op->value =3D dev->irq ? xen_pirq_from_irq(dev->irq) : 0; if (unlikely(verbose_request)) printk(KERN_DEBUG DRV_NAME ": %s: MSI: %d\n", pci_name(dev), op->value); - dev_data =3D pci_get_drvdata(dev); - if (dev_data) - dev_data->ack_intr =3D 1; return 0; } =20 @@ -195,13 +210,26 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pd= ev, struct xen_pcibk_dev_data *dev_data; int i, result; struct msix_entry *entries; + u16 cmd; =20 if (unlikely(verbose_request)) printk(KERN_DEBUG DRV_NAME ": %s: enable MSI-X\n", pci_name(dev)); + if (op->value > SH_INFO_MAX_VEC) return -EINVAL; =20 + if (dev->msix_enabled) + return -EALREADY; + + /* + * PCI_COMMAND_MEMORY must be enabled, otherwise we may not be able + * to access the BARs where the MSI-X entries reside. + */ + pci_read_config_word(dev, PCI_COMMAND, &cmd); + if (dev->msi_enabled || !(cmd & PCI_COMMAND_MEMORY)) + return -ENXIO; + entries =3D kmalloc(op->value * sizeof(*entries), GFP_KERNEL); if (entries =3D=3D NULL) return -ENOMEM; @@ -243,23 +271,27 @@ static int xen_pcibk_disable_msix(struct xen_pcibk_device *pdev, struct pci_dev *dev, struct xen_pci_op *op) { - struct xen_pcibk_dev_data *dev_data; if (unlikely(verbose_request)) printk(KERN_DEBUG DRV_NAME ": %s: disable MSI-X\n", pci_name(dev)); - pci_disable_msix(dev); =20 + if (dev->msix_enabled) { + struct xen_pcibk_dev_data *dev_data; + + pci_disable_msix(dev); + + dev_data =3D pci_get_drvdata(dev); + if (dev_data) + dev_data->ack_intr =3D 1; + } /* * SR-IOV devices (which don't have any legacy IRQ) have * an undefined IRQ value of zero. */ op->value =3D dev->irq ? xen_pirq_from_irq(dev->irq) : 0; if (unlikely(verbose_request)) - printk(KERN_DEBUG DRV_NAME ": %s: MSI-X: %d\n", pci_name(dev), - op->value); - dev_data =3D pci_get_drvdata(dev); - if (dev_data) - dev_data->ack_intr =3D 1; + printk(KERN_DEBUG DRV_NAME ": %s: MSI-X: %d\n", + pci_name(dev), op->value); return 0; } #endif @@ -296,9 +328,11 @@ void xen_pcibk_do_op(struct work_struct *data) container_of(data, struct xen_pcibk_device, op_work); struct pci_dev *dev; struct xen_pcibk_dev_data *dev_data =3D NULL; - struct xen_pci_op *op =3D &pdev->sh_info->op; + struct xen_pci_op *op =3D &pdev->op; int test_intx =3D 0; =20 + *op =3D pdev->sh_info->op; + barrier(); dev =3D xen_pcibk_get_pci_dev(pdev, op->domain, op->bus, op->devfn); =20 if (dev =3D=3D NULL) @@ -340,6 +374,17 @@ void xen_pcibk_do_op(struct work_struct *data) if ((dev_data->enable_intx !=3D test_intx)) xen_pcibk_control_isr(dev, 0 /* no reset */); } + pdev->sh_info->op.err =3D op->err; + pdev->sh_info->op.value =3D op->value; +#ifdef CONFIG_PCI_MSI + if (op->cmd =3D=3D XEN_PCI_OP_enable_msix && op->err =3D=3D 0) { + unsigned int i; + + for (i =3D 0; i < op->value; i++) + pdev->sh_info->op.msix_entries[i].vector =3D + op->msix_entries[i].vector; + } +#endif /* Tell the driver domain that we're done. */ wmb(); clear_bit(_XEN_PCIF_active, (unsigned long *)&pdev->sh_info->flags); diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c index ec55add..2ca64fa 100644 --- a/fs/ocfs2/resize.c +++ b/fs/ocfs2/resize.c @@ -56,11 +56,12 @@ static u16 ocfs2_calc_new_backup_super(struct inode *in= ode, int new_clusters, u32 first_new_cluster, u16 cl_cpg, + u16 old_bg_clusters, int set) { int i; u16 backups =3D 0; - u32 cluster; + u32 cluster, lgd_cluster; u64 blkno, gd_blkno, lgd_blkno =3D le64_to_cpu(gd->bg_blkno); =20 for (i =3D 0; i < OCFS2_MAX_BACKUP_SUPERBLOCKS; i++) { @@ -73,6 +74,12 @@ static u16 ocfs2_calc_new_backup_super(struct inode *ino= de, else if (gd_blkno > lgd_blkno) break; =20 + /* check if already done backup super */ + lgd_cluster =3D ocfs2_blocks_to_clusters(inode->i_sb, lgd_blkno); + lgd_cluster +=3D old_bg_clusters; + if (lgd_cluster >=3D cluster) + continue; + if (set) ocfs2_set_bit(cluster % cl_cpg, (unsigned long *)gd->bg_bitmap); @@ -101,6 +108,7 @@ static int ocfs2_update_last_group_and_inode(handle_t *= handle, u16 chain, num_bits, backups =3D 0; u16 cl_bpc =3D le16_to_cpu(cl->cl_bpc); u16 cl_cpg =3D le16_to_cpu(cl->cl_cpg); + u16 old_bg_clusters; =20 trace_ocfs2_update_last_group_and_inode(new_clusters, first_new_cluster); @@ -114,6 +122,7 @@ static int ocfs2_update_last_group_and_inode(handle_t *= handle, =20 group =3D (struct ocfs2_group_desc *)group_bh->b_data; =20 + old_bg_clusters =3D le16_to_cpu(group->bg_bits) / cl_bpc; /* update the group first. */ num_bits =3D new_clusters * cl_bpc; le16_add_cpu(&group->bg_bits, num_bits); @@ -129,7 +138,7 @@ static int ocfs2_update_last_group_and_inode(handle_t *= handle, group, new_clusters, first_new_cluster, - cl_cpg, 1); + cl_cpg, old_bg_clusters, 1); le16_add_cpu(&group->bg_free_bits_count, -1 * backups); } =20 @@ -169,7 +178,7 @@ out_rollback: group, new_clusters, first_new_cluster, - cl_cpg, 0); + cl_cpg, old_bg_clusters, 0); le16_add_cpu(&group->bg_free_bits_count, backups); le16_add_cpu(&group->bg_bits, -1 * num_bits); le16_add_cpu(&group->bg_free_bits_count, -1 * num_bits); diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h index 9a33c5f..f6c229e 100644 --- a/include/linux/enclosure.h +++ b/include/linux/enclosure.h @@ -29,7 +29,11 @@ /* A few generic types ... taken from ses-2 */ enum enclosure_component_type { ENCLOSURE_COMPONENT_DEVICE =3D 0x01, + ENCLOSURE_COMPONENT_CONTROLLER_ELECTRONICS =3D 0x07, + ENCLOSURE_COMPONENT_SCSI_TARGET_PORT =3D 0x14, + ENCLOSURE_COMPONENT_SCSI_INITIATOR_PORT =3D 0x15, ENCLOSURE_COMPONENT_ARRAY_DEVICE =3D 0x17, + ENCLOSURE_COMPONENT_SAS_EXPANDER =3D 0x18, }; =20 /* ses-2 common element status */ diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d0c9e6d..d9c4a60 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2134,8 +2134,7 @@ extern int skb_copy_datagram_iovec(const struc= t sk_buff *from, int size); extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, int hlen, - struct iovec *iov, - int len); + struct iovec *iov); extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset, const struct iovec *from, diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 2cccd82..9069f8d 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -1586,7 +1586,8 @@ struct sctp_association { * : order. When DATA chunks are out of order, * : SACK's are not delayed (see Section 6). */ - __u8 sack_needed; /* Do we need to sack the peer? */ + __u8 sack_needed:1, /* Do we need to sack the peer? */ + zero_window_announced:1; __u32 sack_cnt; =20 /* These are capabilities which our peer advertised. */ diff --git a/include/net/sock.h b/include/net/sock.h index ce6f641..38fcee9 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -302,8 +302,8 @@ struct sock { sk_no_check : 2, sk_userlocks : 4, sk_protocol : 8, -#define SK_PROTOCOL_MAX ((u8)~0U) sk_type : 16; +#define SK_PROTOCOL_MAX ((u8)~0U) kmemcheck_bitfield_end(flags); int sk_wmem_queued; gfp_t sk_allocation; diff --git a/include/sound/tlv.h b/include/sound/tlv.h index 7067e2d..49e7bd6 100644 --- a/include/sound/tlv.h +++ b/include/sound/tlv.h @@ -38,21 +38,26 @@ #define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ #define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute= */ =20 +#define TLV_ITEM(type, ...) \ + (type), TLV_LENGTH(__VA_ARGS__), __VA_ARGS__ +#define TLV_LENGTH(...) \ + ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) + #define TLV_DB_SCALE_MASK 0xffff #define TLV_DB_SCALE_MUTE 0x10000 #define TLV_DB_SCALE_ITEM(min, step, mute) \ - SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \ - (min), ((step) & TLV_DB_SCALE_MASK) | ((mute) ? TLV_DB_SCALE_MUTE : 0) + TLV_ITEM(SNDRV_CTL_TLVT_DB_SCALE, \ + (min), \ + ((step) & TLV_DB_SCALE_MASK) | \ + ((mute) ? TLV_DB_SCALE_MUTE : 0)) #define DECLARE_TLV_DB_SCALE(name, min, step, mute) \ unsigned int name[] =3D { TLV_DB_SCALE_ITEM(min, step, mute) } =20 /* dB scale specified with min/max values instead of step */ #define TLV_DB_MINMAX_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVT_DB_MINMAX, 2 * sizeof(unsigned int), \ - (min_dB), (max_dB) + TLV_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB)) #define TLV_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVT_DB_MINMAX_MUTE, 2 * sizeof(unsigned int), \ - (min_dB), (max_dB) + TLV_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB)) #define DECLARE_TLV_DB_MINMAX(name, min_dB, max_dB) \ unsigned int name[] =3D { TLV_DB_MINMAX_ITEM(min_dB, max_dB) } #define DECLARE_TLV_DB_MINMAX_MUTE(name, min_dB, max_dB) \ @@ -60,13 +65,16 @@ =20 /* linear volume between min_dB and max_dB (.01dB unit) */ #define TLV_DB_LINEAR_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \ - (min_dB), (max_dB) + TLV_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB)) #define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB) \ unsigned int name[] =3D { TLV_DB_LINEAR_ITEM(min_dB, max_dB) } =20 /* dB range container */ /* Each item is: */ +#define TLV_DB_RANGE_ITEM(...) \ + TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__) +#define DECLARE_TLV_DB_RANGE(name, ...) \ + unsigned int name[] =3D { TLV_DB_RANGE_ITEM(__VA_ARGS__) } /* The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR= */ #define TLV_DB_RANGE_HEAD(num) \ SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int) diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/rin= g.h index 7d28aff..7dc685b4 100644 --- a/include/xen/interface/io/ring.h +++ b/include/xen/interface/io/ring.h @@ -181,6 +181,20 @@ struct __name##_back_ring { \ #define RING_GET_REQUEST(_r, _idx) \ (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req)) =20 +/* + * Get a local copy of a request. + * + * Use this in preference to RING_GET_REQUEST() so all processing is + * done on a local copy that cannot be modified by the other end. + * + * Note that https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58145 may caus= e this + * to be ineffective where _req is a struct which consists of only bitfiel= ds. + */ +#define RING_COPY_REQUEST(_r, _idx, _req) do { \ + /* Use volatile to force the copy into _req. */ \ + *(_req) =3D *(volatile typeof(_req))RING_GET_REQUEST(_r, _idx); \ +} while (0) + #define RING_GET_RESPONSE(_r, _idx) \ (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp)) =20 diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 127a32e..8080f98 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1200,6 +1200,7 @@ static struct irqaction *__free_irq(unsigned int irq,= void *dev_id) if (!desc) return NULL; =20 + chip_bus_lock(desc); raw_spin_lock_irqsave(&desc->lock, flags); =20 /* @@ -1213,7 +1214,7 @@ static struct irqaction *__free_irq(unsigned int irq,= void *dev_id) if (!action) { WARN(1, "Trying to free already-free IRQ %d\n", irq); raw_spin_unlock_irqrestore(&desc->lock, flags); - + chip_bus_sync_unlock(desc); return NULL; } =20 @@ -1242,6 +1243,7 @@ static struct irqaction *__free_irq(unsigned int irq,= void *dev_id) #endif =20 raw_spin_unlock_irqrestore(&desc->lock, flags); + chip_bus_sync_unlock(desc); =20 unregister_handler_proc(irq, action); =20 @@ -1316,9 +1318,7 @@ void free_irq(unsigned int irq, void *dev_id) desc->affinity_notify =3D NULL; #endif =20 - chip_bus_lock(desc); kfree(__free_irq(irq, dev_id)); - chip_bus_sync_unlock(desc); } EXPORT_SYMBOL(free_irq); =20 diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 09d87b7..223232a 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -716,23 +716,30 @@ int is_mem_section_removable(unsigned long start_pfn,= unsigned long nr_pages) */ static int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end= _pfn) { - unsigned long pfn; + unsigned long pfn, sec_end_pfn; struct zone *zone =3D NULL; struct page *page; int i; - for (pfn =3D start_pfn; + for (pfn =3D start_pfn, sec_end_pfn =3D SECTION_ALIGN_UP(start_pfn); pfn < end_pfn; - pfn +=3D MAX_ORDER_NR_PAGES) { - i =3D 0; - /* This is just a CONFIG_HOLES_IN_ZONE check.*/ - while ((i < MAX_ORDER_NR_PAGES) && !pfn_valid_within(pfn + i)) - i++; - if (i =3D=3D MAX_ORDER_NR_PAGES) + pfn =3D sec_end_pfn + 1, sec_end_pfn +=3D PAGES_PER_SECTION) { + /* Make sure the memory section is present first */ + if (!present_section_nr(pfn_to_section_nr(pfn))) continue; - page =3D pfn_to_page(pfn + i); - if (zone && page_zone(page) !=3D zone) - return 0; - zone =3D page_zone(page); + for (; pfn < sec_end_pfn && pfn < end_pfn; + pfn +=3D MAX_ORDER_NR_PAGES) { + i =3D 0; + /* This is just a CONFIG_HOLES_IN_ZONE check.*/ + while ((i < MAX_ORDER_NR_PAGES) && + !pfn_valid_within(pfn + i)) + i++; + if (i =3D=3D MAX_ORDER_NR_PAGES) + continue; + page =3D pfn_to_page(pfn + i); + if (zone && page_zone(page) !=3D zone) + return 0; + zone =3D page_zone(page); + } } return 1; } diff --git a/mm/vmstat.c b/mm/vmstat.c index 14d8cb4..887e83f 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1203,9 +1203,10 @@ static int __init setup_vmstat(void) #ifdef CONFIG_SMP int cpu; =20 + vmstat_wq =3D alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); + register_cpu_notifier(&vmstat_notifier); =20 - vmstat_wq =3D alloc_workqueue("vmstat", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0); for_each_online_cpu(cpu) start_cpu_timer(cpu); #endif diff --git a/net/core/datagram.c b/net/core/datagram.c index 6616bfb..a496313 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -709,7 +709,6 @@ EXPORT_SYMBOL(__skb_checksum_complete); * @skb: skbuff * @hlen: hardware length * @iov: io vector - * @len: amount of data to copy from skb to iov * * Caller _must_ check that skb will fit to this iovec. * @@ -719,14 +718,11 @@ EXPORT_SYMBOL(__skb_checksum_complete); * can be modified! */ int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, - int hlen, struct iovec *iov, int len) + int hlen, struct iovec *iov) { __wsum csum; int chunk =3D skb->len - hlen; =20 - if (chunk > len) - chunk =3D len; - if (!chunk) return 0; =20 diff --git a/net/core/dev.c b/net/core/dev.c index 9a95205..ec29958 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5446,7 +5446,10 @@ int __netdev_update_features(struct net_device *dev) netdev_err(dev, "set_features() failed (%d); wanted 0x%08x, left 0x%08x\n", err, features, dev->features); - return 0; + /* return non-0 since some features might have changed and + * it's better to fire a spurious notification than miss it + */ + return -1; } =20 if (!err) diff --git a/net/core/dst.c b/net/core/dst.c index 946e214..59381de 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -269,10 +269,11 @@ void dst_release(struct dst_entry *dst) { if (dst) { int newrefcnt; + unsigned short nocache =3D dst->flags & DST_NOCACHE; =20 newrefcnt =3D atomic_dec_return(&dst->__refcnt); WARN_ON(newrefcnt < 0); - if (!newrefcnt && unlikely(dst->flags & DST_NOCACHE)) { + if (!newrefcnt && unlikely(nocache)) { dst =3D dst_destroy(dst); if (dst) __dst_free(dst); diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 3877e16..039e40f 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -5198,7 +5198,7 @@ static int tcp_copy_to_iovec(struct sock *sk, struct = sk_buff *skb, int hlen) err =3D skb_copy_datagram_iovec(skb, hlen, tp->ucopy.iov, chunk); else err =3D skb_copy_and_csum_datagram_iovec(skb, hlen, - tp->ucopy.iov, chunk); + tp->ucopy.iov); =20 if (!err) { tp->ucopy.len -=3D chunk; diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index b111221..f602611 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1172,6 +1172,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, = struct msghdr *msg, int peeked; int err; int is_udplite =3D IS_UDPLITE(sk); + bool checksum_valid =3D false; bool slow; =20 if (flags & MSG_ERRQUEUE) @@ -1197,17 +1198,18 @@ try_again: */ =20 if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { - if (udp_lib_checksum_complete(skb)) + checksum_valid =3D !udp_lib_checksum_complete(skb); + if (!checksum_valid) goto csum_copy_err; } =20 - if (skb_csum_unnecessary(skb)) + if (checksum_valid || skb_csum_unnecessary(skb)) err =3D skb_copy_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov, copied); else { err =3D skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), - msg->msg_iov, copied); + msg->msg_iov); =20 if (err =3D=3D -EINVAL) goto csum_copy_err; diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 2d8ddba..c8c6a12 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -558,7 +558,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struc= t nlmsghdr* nlh, =20 rcu_read_lock(); p =3D __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index= ); - if (p && ip6addrlbl_hold(p)) + if (p && !ip6addrlbl_hold(p)) p =3D NULL; lseq =3D ip6addrlbl_table.seq; rcu_read_unlock(); diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index d1e528c..bebc821 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -479,7 +479,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct soc= k *sk, goto csum_copy_err; err =3D skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); } else { - err =3D skb_copy_and_csum_datagram_iovec(skb, 0, msg->msg_iov, copied); + err =3D skb_copy_and_csum_datagram_iovec(skb, 0, msg->msg_iov); if (err =3D=3D -EINVAL) goto csum_copy_err; } diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 3308803..03a7ed1 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -344,6 +344,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, int peeked; int err; int is_udplite =3D IS_UDPLITE(sk); + bool checksum_valid =3D false; int is_udp4; bool slow; =20 @@ -375,16 +376,16 @@ try_again: */ =20 if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) { - if (udp_lib_checksum_complete(skb)) + checksum_valid =3D !udp_lib_checksum_complete(skb); + if (!checksum_valid) goto csum_copy_err; } =20 - if (skb_csum_unnecessary(skb)) + if (checksum_valid || skb_csum_unnecessary(skb)) err =3D skb_copy_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov, copied ); else { - err =3D skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), - msg->msg_iov, copied); + err =3D skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg= ->msg_iov); if (err =3D=3D -EINVAL) goto csum_copy_err; } diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 5be1957..13d0fb6 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -50,7 +50,6 @@ struct rfkill { spinlock_t lock; =20 - const char *name; enum rfkill_type type; =20 unsigned long state; @@ -74,6 +73,7 @@ struct rfkill { struct delayed_work poll_work; struct work_struct uevent_work; struct work_struct sync_work; + char name[]; }; #define to_rfkill(d) container_of(d, struct rfkill, dev) =20 @@ -848,14 +848,14 @@ struct rfkill * __must_check rfkill_alloc(const char = *name, if (WARN_ON(type =3D=3D RFKILL_TYPE_ALL || type >=3D NUM_RFKILL_TYPES)) return NULL; =20 - rfkill =3D kzalloc(sizeof(*rfkill), GFP_KERNEL); + rfkill =3D kzalloc(sizeof(*rfkill) + strlen(name) + 1, GFP_KERNEL); if (!rfkill) return NULL; =20 spin_lock_init(&rfkill->lock); INIT_LIST_HEAD(&rfkill->node); rfkill->type =3D type; - rfkill->name =3D name; + strcpy(rfkill->name, name); rfkill->ops =3D ops; rfkill->data =3D ops_data; =20 diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c index c67f5d3..5cc2da5 100644 --- a/net/rxrpc/ar-recvmsg.c +++ b/net/rxrpc/ar-recvmsg.c @@ -185,8 +185,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *so= ck, msg->msg_iov, copy); } else { ret =3D skb_copy_and_csum_datagram_iovec(skb, offset, - msg->msg_iov, - copy); + msg->msg_iov); if (ret =3D=3D -EINVAL) goto csum_copy_error; } diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 1f9a6f7..054c6a2 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -314,14 +314,13 @@ static void sctp_v6_get_dst(struct sctp_transport *t,= union sctp_addr *saddr, } } } - rcu_read_unlock(); - if (baddr) { ipv6_addr_copy(&fl6->saddr, &baddr->v6.sin6_addr); fl6->fl6_sport =3D baddr->v6.sin6_port; final_p =3D fl6_update_dst(fl6, np->opt, &final); dst =3D ip6_dst_lookup_flow(sk, fl6, final_p, false); } + rcu_read_unlock(); =20 out: if (!IS_ERR(dst)) { diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 3dd7207..7b28546 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ -1265,6 +1265,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_s= ackhdr *sack) */ =20 sack_a_rwnd =3D ntohl(sack->a_rwnd); + asoc->peer.zero_window_announced =3D !sack_a_rwnd; outstanding =3D q->outstanding_bytes; =20 if (outstanding < sack_a_rwnd) diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index d02dd3c..eb638dd 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -5302,7 +5302,8 @@ sctp_disposition_t sctp_sf_do_6_3_3_rtx(const struct = sctp_endpoint *ep, SCTP_INC_STATS(SCTP_MIB_T3_RTX_EXPIREDS); =20 if (asoc->overall_error_count >=3D asoc->max_retrans) { - if (asoc->state =3D=3D SCTP_STATE_SHUTDOWN_PENDING) { + if (asoc->peer.zero_window_announced && + asoc->state =3D=3D SCTP_STATE_SHUTDOWN_PENDING) { /* * We are here likely because the receiver had its rwnd * closed for a while and we have not been able to diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index ee52cb8..0d5ae4a 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -35,12 +35,17 @@ =20 static int fd_map; /* File descriptor for file being modified. */ static int mmap_failed; /* Boolean flag. */ -static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */ static char gpfx; /* prefix for global symbol name (sometimes '_') */ static struct stat sb; /* Remember .st_size, etc. */ static jmp_buf jmpenv; /* setjmp/longjmp per-file error escape */ static const char *altmcount; /* alternate mcount symbol name */ static int warn_on_notrace_sect; /* warn when section has mcount not being= recorded */ +static void *file_map; /* pointer of the mapped file */ +static void *file_end; /* pointer to the end of the mapped file */ +static int file_updated; /* flag to state file was changed */ +static void *file_ptr; /* current file pointer location */ +static void *file_append; /* added to the end of the file */ +static size_t file_append_size; /* how much is added to end of file */ =20 /* setjmp() return values */ enum { @@ -54,10 +59,14 @@ static void cleanup(void) { if (!mmap_failed) - munmap(ehdr_curr, sb.st_size); + munmap(file_map, sb.st_size); else - free(ehdr_curr); - close(fd_map); + free(file_map); + file_map =3D NULL; + free(file_append); + file_append =3D NULL; + file_append_size =3D 0; + file_updated =3D 0; } =20 static void __attribute__((noreturn)) @@ -79,12 +88,22 @@ succeed_file(void) static off_t ulseek(int const fd, off_t const offset, int const whence) { - off_t const w =3D lseek(fd, offset, whence); - if (w =3D=3D (off_t)-1) { - perror("lseek"); + switch (whence) { + case SEEK_SET: + file_ptr =3D file_map + offset; + break; + case SEEK_CUR: + file_ptr +=3D offset; + break; + case SEEK_END: + file_ptr =3D file_map + (sb.st_size - offset); + break; + } + if (file_ptr < file_map) { + fprintf(stderr, "lseek: seek before file\n"); fail_file(); } - return w; + return file_ptr - file_map; } =20 static size_t @@ -101,12 +120,38 @@ uread(int const fd, void *const buf, size_t const cou= nt) static size_t uwrite(int const fd, void const *const buf, size_t const count) { - size_t const n =3D write(fd, buf, count); - if (n !=3D count) { - perror("write"); - fail_file(); + size_t cnt =3D count; + off_t idx =3D 0; + + file_updated =3D 1; + + if (file_ptr + count >=3D file_end) { + off_t aoffset =3D (file_ptr + count) - file_end; + + if (aoffset > file_append_size) { + file_append =3D realloc(file_append, aoffset); + file_append_size =3D aoffset; + } + if (!file_append) { + perror("write"); + fail_file(); + } + if (file_ptr < file_end) { + cnt =3D file_end - file_ptr; + } else { + cnt =3D 0; + idx =3D aoffset - count; + } } - return n; + + if (cnt) + memcpy(file_ptr, buf, cnt); + + if (cnt < count) + memcpy(file_append + idx, buf + cnt, count - cnt); + + file_ptr +=3D count; + return count; } =20 static void * @@ -163,9 +208,7 @@ static int make_nop_x86(void *map, size_t const offset) */ static void *mmap_file(char const *fname) { - void *addr; - - fd_map =3D open(fname, O_RDWR); + fd_map =3D open(fname, O_RDONLY); if (fd_map < 0 || fstat(fd_map, &sb) < 0) { perror(fname); fail_file(); @@ -174,15 +217,58 @@ static void *mmap_file(char const *fname) fprintf(stderr, "not a regular file: %s\n", fname); fail_file(); } - addr =3D mmap(0, sb.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, - fd_map, 0); + file_map =3D mmap(0, sb.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, + fd_map, 0); mmap_failed =3D 0; - if (addr =3D=3D MAP_FAILED) { + if (file_map =3D=3D MAP_FAILED) { mmap_failed =3D 1; - addr =3D umalloc(sb.st_size); - uread(fd_map, addr, sb.st_size); + file_map =3D umalloc(sb.st_size); + uread(fd_map, file_map, sb.st_size); + } + close(fd_map); + + file_end =3D file_map + sb.st_size; + + return file_map; +} + +static void write_file(const char *fname) +{ + char tmp_file[strlen(fname) + 4]; + size_t n; + + if (!file_updated) + return; + + sprintf(tmp_file, "%s.rc", fname); + + /* + * After reading the entire file into memory, delete it + * and write it back, to prevent weird side effects of modifying + * an object file in place. + */ + fd_map =3D open(tmp_file, O_WRONLY | O_TRUNC | O_CREAT, sb.st_mode); + if (fd_map < 0) { + perror(fname); + fail_file(); + } + n =3D write(fd_map, file_map, sb.st_size); + if (n !=3D sb.st_size) { + perror("write"); + fail_file(); + } + if (file_append_size) { + n =3D write(fd_map, file_append, file_append_size); + if (n !=3D file_append_size) { + perror("write"); + fail_file(); + } + } + close(fd_map); + if (rename(tmp_file, fname) < 0) { + perror(fname); + fail_file(); } - return addr; } =20 /* w8rev, w8nat, ...: Handle endianness. */ @@ -289,7 +375,6 @@ do_file(char const *const fname) Elf32_Ehdr *const ehdr =3D mmap_file(fname); unsigned int reltype =3D 0; =20 - ehdr_curr =3D ehdr; w =3D w4nat; w2 =3D w2nat; w8 =3D w8nat; @@ -401,6 +486,7 @@ do_file(char const *const fname) } } /* end switch */ =20 + write_file(fname); cleanup(); } =20 @@ -453,11 +539,14 @@ main(int argc, char *argv[]) case SJ_SETJMP: /* normal sequence */ /* Avoid problems if early cleanup() */ fd_map =3D -1; - ehdr_curr =3D NULL; mmap_failed =3D 1; + file_map =3D NULL; + file_ptr =3D NULL; + file_updated =3D 0; do_file(file); break; case SJ_FAIL: /* error in do_file or below */ + fprintf(stderr, "%s: failed\n", file); ++n_error; break; case SJ_SUCCEED: /* premature success */ diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index b70eaa2..234ce30 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -688,16 +688,16 @@ long keyctl_read_key(key_serial_t keyid, char __user = *buffer, size_t buflen) =20 /* the key is probably readable - now try to read it */ can_read_key: - ret =3D key_validate(key); - if (ret =3D=3D 0) { - ret =3D -EOPNOTSUPP; - if (key->type->read) { - /* read the data with the semaphore held (since we - * might sleep) */ - down_read(&key->sem); + ret =3D -EOPNOTSUPP; + if (key->type->read) { + /* Read the data with the semaphore held (since we might sleep) + * to protect against the key being updated or revoked. + */ + down_read(&key->sem); + ret =3D key_validate(key); + if (ret =3D=3D 0) ret =3D key->type->read(key, buffer, buflen); - up_read(&key->sem); - } + up_read(&key->sem); } =20 error2: diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 488e531..2dc90a4 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -1213,6 +1213,8 @@ static void build_feature_ctl(struct mixer_build *sta= te, void *raw_desc, break; } =20 + snd_usb_mixer_fu_apply_quirk(state->mixer, cval, unitid, kctl); + range =3D (cval->max - cval->min) / cval->res; /* Are there devices with volume range more than 255? I use a bit more * to be sure. 384 is a resolution magic number found on Logitech diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c index 893b750..cb98040 100644 --- a/sound/usb/mixer_maps.c +++ b/sound/usb/mixer_maps.c @@ -319,13 +319,6 @@ static struct usbmix_name_map bose_companion5_map[] = =3D { { 0 } /* terminator */ }; =20 -/* Dragonfly DAC 1.2, the dB conversion factor is 1 instead of 256 */ -static struct usbmix_dB_map dragonfly_1_2_dB =3D {0, 5000}; -static struct usbmix_name_map dragonfly_1_2_map[] =3D { - { 7, NULL, .dB =3D &dragonfly_1_2_dB }, - { 0 } /* terminator */ -}; - /* * Control map entries */ @@ -413,11 +406,6 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] =3D { .id =3D USB_ID(0x05a7, 0x1020), .map =3D bose_companion5_map, }, - { - /* Dragonfly DAC 1.2 */ - .id =3D USB_ID(0x21b4, 0x0081), - .map =3D dragonfly_1_2_map, - }, { 0 } /* terminator */ }; =20 diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 040d101..21f4d44 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c @@ -34,6 +34,7 @@ #include #include #include +#include =20 #include "usbaudio.h" #include "mixer.h" @@ -682,3 +683,39 @@ void snd_usb_mixer_rc_memory_change(struct usb_mixer_i= nterface *mixer, } } =20 +static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer= , + struct snd_kcontrol *kctl) +{ + /* Approximation using 10 ranges based on output measurement on hw v1.2. + * This seems close to the cubic mapping e.g. alsamixer uses. */ + static const DECLARE_TLV_DB_RANGE(scale, + 0, 1, TLV_DB_MINMAX_ITEM(-5300, -4970), + 2, 5, TLV_DB_MINMAX_ITEM(-4710, -4160), + 6, 7, TLV_DB_MINMAX_ITEM(-3884, -3710), + 8, 14, TLV_DB_MINMAX_ITEM(-3443, -2560), + 15, 16, TLV_DB_MINMAX_ITEM(-2475, -2324), + 17, 19, TLV_DB_MINMAX_ITEM(-2228, -2031), + 20, 26, TLV_DB_MINMAX_ITEM(-1910, -1393), + 27, 31, TLV_DB_MINMAX_ITEM(-1322, -1032), + 32, 40, TLV_DB_MINMAX_ITEM(-968, -490), + 41, 50, TLV_DB_MINMAX_ITEM(-441, 0), + ); + + dev_info(&mixer->chip->dev->dev, "applying DragonFly dB scale quirk\n"); + kctl->tlv.p =3D scale; + kctl->vd[0].access |=3D SNDRV_CTL_ELEM_ACCESS_TLV_READ; + kctl->vd[0].access &=3D ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; +} + +void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer, + struct usb_mixer_elem_info *cval, int unitid, + struct snd_kcontrol *kctl) +{ + switch (mixer->chip->usb_id) { + case USB_ID(0x21b4, 0x0081): /* AudioQuest DragonFly */ + if (unitid =3D=3D 7 && cval->min =3D=3D 0 && cval->max =3D=3D 50) + snd_dragonfly_quirk_db_scale(mixer, kctl); + break; + } +} + diff --git a/sound/usb/mixer_quirks.h b/sound/usb/mixer_quirks.h index bdbfab0..177c329 100644 --- a/sound/usb/mixer_quirks.h +++ b/sound/usb/mixer_quirks.h @@ -9,5 +9,9 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip, void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer, int unitid); =20 +void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer, + struct usb_mixer_elem_info *cval, int unitid, + struct snd_kcontrol *kctl); + #endif /* SND_USB_MIXER_QUIRKS_H */ =20 =0D --=-gMWI29aFGPEkQeCTQa1S-- --=-iCq0hir2FG/TBCRvGrFS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAVqNlYue/yOyVhhEJAQp3XQ//fvS9ROuyRYsoZaWic70CqwOYE6p2J9q9 VWy+PgI6uHQ2zecHF2gKJxchSVqEaRO/ZZWAtcTwDCNHxI2lmJniY4CfoEJDWECm BWNtKXihhf6WAdgxPTftgVR8EDwLgaqjrVV3WA5GHJWEHXdbxEN5Gy6lZiDo3Wbk M79S8R79H6oCIs9QaHqWYlXodcSmHC0HhcNBiu/6XYFpAe0hZddPSQ5DL1epINnf xEeij9oSnxo0V6nrZn4gfQ7iSdedq2NgGWcmorHGZC8zSIlGD1Y4Bc185degpt98 xRWzCud8Tk/n61Sc10kCIzHcWONAT2vAlbUvW8oMPdoS/+VLctIKJlZLbvdiIsic CmwHF4OYkEniV+K69LlO+eZt270/3SMoobAHP5DfnZypAUdNz7TKtsTvNtryFCba SiQhp93j1KaCkC0BlqW0HsGE8YPUZfdqxRR0SB5D9nsRi5FxYqhDSAUeHN5yELH6 Qi7K4gb9hFWVqAfK/GtIeOKpdwBFeahKyfr6sgxXAE21bU+wbUwM4KTbFiNxxpPr 8CSJ2NwXy57KUTZT/GVdpmxLuWCB9rFnkUBnaIQEA58zc6+BvzV9XTtZV+NI++wk XwOquKP6d/zXC5sJGBofLah4fnT18oLFXWYPvtWoMeri9zdX/GWcheYHw/G8igI/ GUyMmxG+hsU= =+bCj -----END PGP SIGNATURE----- --=-iCq0hir2FG/TBCRvGrFS--