Linux 3.10.73
Greg KH
maintainerI'm announcing the release of the 3.10.73 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-at91/pm.h | 2 arch/powerpc/kernel/smp.c | 4 - arch/sparc/kernel/perf_event.c | 15 +----- arch/sparc/kernel/process_64.c | 4 + arch/sparc/kernel/sys_sparc_64.c | 2 arch/sparc/lib/memmove.S | 35 +++++++++++++- arch/sparc/mm/srmmu.c | 11 ++-- arch/x86/crypto/aesni-intel_glue.c | 4 - arch/x86/include/asm/fpu-internal.h | 2 arch/x86/kernel/xsave.c | 7 +- arch/x86/vdso/vdso32/sigreturn.S | 1 drivers/char/tpm/tpm_ibmvtpm.c | 10 ++-- drivers/char/tpm/tpm_ibmvtpm.h | 6 +- drivers/char/virtio_console.c | 3 - drivers/gpu/drm/radeon/evergreen.c | 3 + drivers/gpu/drm/radeon/r100.c | 4 + drivers/gpu/drm/radeon/r600.c | 3 + drivers/gpu/drm/radeon/radeon_cs.c | 4 + drivers/gpu/drm/radeon/rs600.c | 4 + drivers/gpu/drm/radeon/si.c | 9 ++- drivers/net/can/dev.c | 8 +++ drivers/net/usb/cx82310_eth.c | 11 ++++ drivers/regulator/core.c | 34 +++++++------- drivers/scsi/libsas/sas_discover.c | 6 +- drivers/spi/spi-pl022.c | 2 drivers/target/iscsi/iscsi_target.c | 14 ++++- drivers/target/target_core_pr.c | 43 ++++++++++++++++- drivers/target/target_core_pscsi.c | 2 drivers/target/target_core_transport.c | 4 + drivers/tty/serial/8250/8250_pci.c | 2 drivers/xen/xen-pciback/conf_space.c | 2 drivers/xen/xen-pciback/conf_space.h | 2 drivers/xen/xen-pciback/conf_space_header.c | 61 +++++++++++++++++++------ fs/fuse/dev.c | 7 ++ fs/nilfs2/segment.c | 7 +- include/linux/workqueue.h | 3 - kernel/workqueue.c | 56 +++++++++++++++++++++-- net/caif/caif_socket.c | 2 net/can/af_can.c | 3 + net/compat.c | 7 ++ net/core/sysctl_net_core.c | 10 ++-- net/ipv4/inet_diag.c | 18 ++++++- net/ipv4/tcp_output.c | 68 +++++++++++----------------- net/netfilter/ipvs/ip_vs_core.c | 33 +++++++++---- net/netfilter/ipvs/ip_vs_sync.c | 3 + net/rds/iw_rdma.c | 40 +++++++++------- net/rxrpc/ar-recvmsg.c | 2 sound/core/control.c | 4 + sound/pci/hda/hda_generic.c | 47 ++++++++++++++++--- sound/pci/hda/hda_proc.c | 38 ++++++++++++--- sound/pci/hda/patch_cirrus.c | 2 sound/pci/hda/patch_conexant.c | 11 ++++ 53 files changed, 494 insertions(+), 193 deletions(-)
Al Viro (2):
caif: fix MSG_OOB test in caif_seqpkt_recvmsg()
rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg()
Alex Deucher (5):
drm/radeon: do a posting read in evergreen_set_irq drm/radeon: do a posting read in r100_set_irq drm/radeon: do a posting read in r600_set_irq drm/radeon: do a posting read in si_set_irq drm/radeon: do a posting read in rs600_set_irq
Alexander Sverdlin (1):
spi: pl022: Fix race in giveback() leading to driver lock-up
Alexandre Belloni (1):
ARM: at91: pm: fix at91rm9200 standby
Alexey Kodanev (1):
net: sysctl_net_core: check SNDBUF and RCVBUF for min length
Andreas Larsson (1):
sparc32: destroy_context() and switch_mm() needs to disable interrupts.
Arnd Bergmann (1):
rds: avoid potential stack overflow
Bart Van Assche (1):
target: Fix reference leak in target_get_sess_cmd() error path
Catalin Marinas (1):
net: compat: Update get_compat_msghdr() to match copy_msghdr_from_user() behaviour
Christian König (1):
drm/radeon: drop setting UPLL to sleep mode
David Ahern (3):
sparc: perf: Remove redundant perf_pmu_{en|dis}able calls
sparc: perf: Make counting mode actually work
sparc: Touch NMI watchdog when walking cpus and calling printk
David S. Miller (1):
sparc64: Fix several bugs in memmove().
Doug Anderson (1):
regulator: core: Fix enable GPIO reference counting
Eric Dumazet (2):
inet_diag: fix possible overflow in inet_diag_dump_one_icsk()
tcp: make connect() mem charging friendly
Greg Kroah-Hartman (1):
Linux 3.10.73
James Bottomley (1):
libsas: Fix Kernel Crash in smp_execute_task
Jan Beulich (1):
xen-pciback: limit guest control of command register
Javier Martinez Canillas (1):
regulator: Only enable disabled regulators on resume
Jiri Slaby (1):
x86/vdso: Fix the build on GCC5
Josh Hunt (1):
tcp: fix tcp fin memory accounting
Julian Anastasov (2):
ipvs: add missing ip_vs_pe_put in sync code
ipvs: rerouting to local clients is not needed anymore
Lee Duncan (1):
target: Allow Write Exclusive non-reservation holders to READ
Michael Ellerman (1):
powerpc/smp: Wait until secondaries are active & online
Michael S. Tsirkin (1):
virtio_console: init work unconditionally
Miklos Szeredi (2):
fuse: set stolen page uptodate
fuse: notify: don't move pages
Nicholas Bellinger (4):
iscsi-target: Avoid early conn_logout_comp for iser connections target/pscsi: Fix NULL pointer dereference in get_device_type
target: Fix R_HOLDER bit usage for AllRegistrants
target: Allow AllRegistrants to re-RESERVE existing reservation
Oleg Nesterov (2):
x86/fpu: Avoid math_state_restore() without used_math() in __restore_xstate_sig() x86/fpu: Drop_fpu() should not assume that tsk equals current
Oliver Hartkopp (1):
can: add missing initialisations in CAN related skbuffs
Ondrej Zary (1):
Revert "net: cx82310_eth: use common match macro"
Rob Gardner (1):
sparc: semtimedop() unreachable due to comparison error
Russell King (1):
Change email address for 8250_pci
Ryusuke Konishi (1):
nilfs2: fix deadlock of segment constructor during recovery
Stephan Mueller (1):
crypto: aesni - fix memory usage in GCM decryption
Takashi Iwai (6):
ALSA: control: Add sanity checks for user ctl id name string
ALSA: hda - Fix built-in mic on Compaq Presario CQ60
ALSA: hda - Don't access stereo amps for mono channel widgets
ALSA: hda - Set single_adc_amp flag for CS420x codecs
ALSA: hda - Add workaround for MacBook Air 5,2 built-in mic
ALSA: hda - Treat stereo-to-mono mix properly
Tejun Heo (1):
workqueue: fix hang involving racing cancel[_delayed]_work_sync()'s for PREEMPT_NONE
Tommi Rantala (1):
drm/radeon: fix DRM_IOCTL_RADEON_CS oops
[email protected] (1):
tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 72 +SUBLEVEL = 73 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/mach-at91/pm.h +1 -1
@@ -37,7 +37,7 @@ static inline void at91rm9200_standby(void) " mcr p15, 0, %0, c7, c0, 4\n\t" " str %5, [%1, %2]" : - : "r" (0), "r" (AT91_BASE_SYS), "r" (AT91RM9200_SDRAMC_LPR), + : "r" (0), "r" (at91_ramc_base[0]), "r" (AT91RM9200_SDRAMC_LPR),"r" (1 ),"r" (AT91RM9200_SDRAMC_SRR ), "r" (lpr)); }
arch/powerpc/kernel/smp.c +2 -2
@@ -544,8 +544,8 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)if (smp_ops->give_timebase) smp_ops->give_timebase (); -/* Wait until cpu puts itself in the online map */ -while (!cpu_online (cpu)) +/* Wait until cpu puts itself in the online & active maps */ +while (!cpu_online (cpu) || !cpu_active (cpu))cpu_relax ();return 0 ;
arch/sparc/kernel/perf_event.c +3 -12
@@ -960,6 +960,8 @@ out: cpuc->pcr[0 ] |= cpuc->event[0 ]->hw.config_base; } +static void sparc_pmu_start (struct perf_event *event,int flags); +/* On this PMU each PIC has it's own PCR control register. */ static void calculate_multiple_pcrs (struct cpu_hw_events *cpuc) {
@@ -972,20 +974,13 @@ static void calculate_multiple_pcrs(struct cpu_hw_events *cpuc)struct perf_event *cp = cpuc->event[i];struct hw_perf_event *hwc = &cp->hw;int idx = hwc->idx; -u64 enc;if (cpuc->current_idx[i] !=PIC_NO_INDEX )continue ; -sparc_perf_event_set_period (cp, hwc, idx); cpuc->current_idx[i] = idx; - enc =perf_event_get_enc (cpuc->events[i]); - cpuc->pcr[idx] &= ~mask_for_index (idx); -if (hwc->state &PERF_HES_STOPPED ) - cpuc->pcr[idx] |=nop_for_index (idx); -else - cpuc->pcr[idx] |=event_encoding (enc, idx); +sparc_pmu_start (cp,PERF_EF_RELOAD ); } out:for (i =0 ; i < cpuc->n_events; i++) {
@@ -1101,7 +1096,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags)int i;local_irq_save (flags); -perf_pmu_disable (event->pmu);for (i =0 ; i < cpuc->n_events; i++) {if (event == cpuc->event[i]) {
@@ -1127,7 +1121,6 @@ static void sparc_pmu_del(struct perf_event *event, int _flags) } } -perf_pmu_enable (event->pmu);local_irq_restore (flags); }
@@ -1361,7 +1354,6 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags)unsigned long flags;local_irq_save (flags); -perf_pmu_disable (event->pmu); n0 = cpuc->n_events;if (n0 >= sparc_pmu->max_hw_events)
@@ -1394,7 +1386,6 @@ nocheck: ret =0 ; out: -perf_pmu_enable (event->pmu);local_irq_restore (flags);return ret; }
arch/sparc/kernel/process_64.c +4 -0
@@ -280,6 +280,8 @@ void arch_trigger_all_cpu_backtrace(void)printk (" TPC[%lx] O7[%lx] I7[%lx] RPC[%lx]\n" , gp->tpc, gp->o7, gp->i7, gp->rpc); } + +touch_nmi_watchdog (); }memset (global_cpu_snapshot,0 ,sizeof (global_cpu_snapshot));
@@ -352,6 +354,8 @@ static void pmu_snapshot_all_cpus(void) (cpu == this_cpu ?'*' :' ' ), cpu, pp->pcr[0 ], pp->pcr[1 ], pp->pcr[2 ], pp->pcr[3 ], pp->pic[0], pp->pic[1], pp->pic[2], pp->pic[3]); + +touch_nmi_watchdog (); }memset (global_cpu_snapshot,0 ,sizeof (global_cpu_snapshot));
arch/sparc/kernel/sys_sparc_64.c +1 -1
@@ -336,7 +336,7 @@ SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, secondlong err;/* No need for backward compatibility. We can start fresh... */ -if (call <=SEMCTL ) { +if (call <=SEMTIMEDOP ) {switch (call) {case SEMOP : err = sys_semtimedop(first, ptr,
arch/sparc/lib/memmove.S +32 -3
@@ -8,9 +8,11 @@ .text ENTRY(memmove) /* o0=dst o1=src o2=len */ - mov %o0, %g1 + brz,pn %o2, 99f + mov %o0, %g1 + cmp %o0, %o1 - bleu,pt %xcc, memcpy + bleu,pt %xcc, 2f add %o1, %o2, %g7 cmp %g7, %o0 bleu,pt %xcc, memcpy
@@ -24,7 +26,34 @@ ENTRY(memmove) /* o0=dst o1=src o2=len */ stb %g7, [%o0] bne,pt %icc, 1b sub %o0, 1, %o0 - +99: retl mov %g1, %o0 + + /* We can't just call memcpy for these memmove cases. On some + * chips the memcpy uses cache initializing stores and when dst + * and src are close enough, those can clobber the source data + * before we've loaded it in. + */ +2: or %o0, %o1, %g7 + or %o2, %g7, %g7 + andcc %g7, 0x7, %g0 + bne,pn %xcc, 4f + nop + +3: ldx [%o1], %g7 + add %o1, 8, %o1 + subcc %o2, 8, %o2 + add %o0, 8, %o0 + bne,pt %icc, 3b + stx %g7, [%o0 - 0x8] + ba,a,pt %xcc, 99b + +4: ldub [%o1], %g7 + add %o1, 1, %o1 + subcc %o2, 1, %o2 + add %o0, 1, %o0 + bne,pt %icc, 4b + stb %g7, [%o0 - 0x1] + ba,a,pt %xcc, 99b ENDPROC(memmove)
arch/sparc/mm/srmmu.c +7 -4
@@ -455,10 +455,12 @@ static void __init sparc_context_init(int numctx)void switch_mm (struct mm_struct *old_mm,struct mm_struct *mm,struct task_struct *tsk) { +unsigned long flags; +if (mm->context ==NO_CONTEXT ) { -spin_lock (&srmmu_context_spinlock); +spin_lock_irqsave (&srmmu_context_spinlock, flags);alloc_context (old_mm, mm); -spin_unlock (&srmmu_context_spinlock); +spin_unlock_irqrestore (&srmmu_context_spinlock, flags);srmmu_ctxd_set (&srmmu_context_table[mm->context], mm->pgd); }
@@ -983,14 +985,15 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)void destroy_context (struct mm_struct *mm) { +unsigned long flags;if (mm->context !=NO_CONTEXT ) {flush_cache_mm (mm);srmmu_ctxd_set (&srmmu_context_table[mm->context], srmmu_swapper_pg_dir);flush_tlb_mm (mm); -spin_lock (&srmmu_context_spinlock); +spin_lock_irqsave (&srmmu_context_spinlock, flags);free_context (mm->context); -spin_unlock (&srmmu_context_spinlock); +spin_unlock_irqrestore (&srmmu_context_spinlock, flags); mm->context =NO_CONTEXT ; } }
arch/x86/crypto/aesni-intel_glue.c +2 -2
@@ -989,7 +989,7 @@ static int __driver_rfc4106_decrypt(struct aead_request *req) src =kmalloc (req->cryptlen + req->assoclen,GFP_ATOMIC );if (!src)return -ENOMEM ; - assoc = (src + req->cryptlen + auth_tag_len); + assoc = (src + req->cryptlen);scatterwalk_map_and_copy (src, req->src,0 , req->cryptlen,0 );scatterwalk_map_and_copy (assoc, req->assoc,0 , req->assoclen,0 );
@@ -1014,7 +1014,7 @@ static int __driver_rfc4106_decrypt(struct aead_request *req)scatterwalk_done (&src_sg_walk,0 ,0 );scatterwalk_done (&assoc_sg_walk,0 ,0 ); }else { -scatterwalk_map_and_copy (dst, req->dst,0 , req->cryptlen,1 ); +scatterwalk_map_and_copy (dst, req->dst,0 , tempCipherLen,1 );kfree (src); }return retval;
arch/x86/include/asm/fpu-internal.h +1 -1
@@ -370,7 +370,7 @@ static inline void drop_fpu(struct task_struct *tsk)preempt_disable (); tsk->fpu_counter =0 ;__drop_fpu (tsk); -clear_used_math (); +clear_stopped_child_used_math (tsk);preempt_enable (); }
arch/x86/kernel/xsave.c +4 -3
@@ -376,7 +376,7 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size)* thread's fpu state, reconstruct fxstate from the fsave * header. Sanitize the copied state etc. */ -struct xsave_struct *xsave = &tsk->thread.fpu.state->xsave; +struct fpu *fpu = &tsk->thread.fpu;struct user_i387_ia32_struct env;int err =0 ;
@@ -390,14 +390,15 @@ int __restore_xstate_sig(void __user *buf, void __user *buf_fx, int size)*/ drop_fpu (tsk); -if (__copy_from_user (xsave, buf_fx, state_size) || +if (__copy_from_user (&fpu->state->xsave, buf_fx, state_size) ||__copy_from_user (&env, buf,sizeof (env))) { +fpu_finit (fpu); err =-1 ; }else {sanitize_restored_xstate (tsk, &env, xstate_bv, fx_only); -set_used_math (); } +set_used_math ();if (use_eager_fpu ()) {preempt_disable ();math_state_restore ();
arch/x86/vdso/vdso32/sigreturn.S +1 -0
@@ -17,6 +17,7 @@ .text .globl __kernel_sigreturn .type __kernel_sigreturn,@function + nop /* this guy is needed for .LSTARTFDEDLSI1 below (watch for HACK) */ ALIGN __kernel_sigreturn: .LSTART_sigreturn:
drivers/char/tpm/tpm_ibmvtpm.c +5 -5
@@ -124,7 +124,7 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count) {struct ibmvtpm_dev *ibmvtpm;struct ibmvtpm_crq crq; -u64 *word = (u64 *) &crq; +__be64 *word = (__be64 *)&crq;int rc; ibmvtpm = (struct ibmvtpm_dev *)TPM_VPRIV (chip);
@@ -145,11 +145,11 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)memcpy ((void *)ibmvtpm->rtce_buf, (void *)buf, count); crq.valid = (u8 )IBMVTPM_VALID_CMD ; crq.msg = (u8 )VTPM_TPM_COMMAND ; - crq.len = (u16 )count; - crq.data = ibmvtpm->rtce_dma_handle; + crq.len =cpu_to_be16 (count); + crq.data =cpu_to_be32 (ibmvtpm->rtce_dma_handle); - rc =ibmvtpm_send_crq (ibmvtpm->vdev,cpu_to_be64 (word[0 ]), -cpu_to_be64 (word[1 ])); + rc =ibmvtpm_send_crq (ibmvtpm->vdev,be64_to_cpu (word[0 ]), +be64_to_cpu (word[1 ]));if (rc !=H_SUCCESS ) {dev_err (ibmvtpm->dev,"tpm_ibmvtpm_send failed rc=%d\n" , rc); rc =0 ;
drivers/char/tpm/tpm_ibmvtpm.h +3 -3
@@ -22,9 +22,9 @@struct ibmvtpm_crq {u8 valid;u8 msg; -u16 len; -u32 data; -u64 reserved; +__be16 len; +__be32 data; +__be64 reserved; } __attribute__((packed,aligned (8 )));struct ibmvtpm_crq_queue {
drivers/char/virtio_console.c +2 -1
@@ -2023,12 +2023,13 @@ static int virtcons_probe(struct virtio_device *vdev)spin_lock_init (&portdev->ports_lock);INIT_LIST_HEAD (&portdev->ports); +INIT_WORK (&portdev->control_work, &control_work_handler); +if (multiport) {unsigned int nr_added_bufs;spin_lock_init (&portdev->c_ivq_lock);spin_lock_init (&portdev->c_ovq_lock); -INIT_WORK (&portdev->control_work, &control_work_handler); nr_added_bufs =fill_queue (portdev->c_ivq, &portdev->c_ivq_lock);
drivers/gpu/drm/radeon/evergreen.c +3 -0
@@ -4016,6 +4016,9 @@ int evergreen_irq_set(struct radeon_device *rdev)WREG32 (AFMT_AUDIO_PACKET_CONTROL +EVERGREEN_CRTC4_REGISTER_OFFSET , afmt5);WREG32 (AFMT_AUDIO_PACKET_CONTROL +EVERGREEN_CRTC5_REGISTER_OFFSET , afmt6); +/* posting read */ +RREG32 (SRBM_STATUS ); +return 0 ; }
drivers/gpu/drm/radeon/r100.c +4 -0
@@ -743,6 +743,10 @@ int r100_irq_set(struct radeon_device *rdev) tmp |=RADEON_FP2_DETECT_MASK ; }WREG32 (RADEON_GEN_INT_CNTL , tmp); + +/* read back to post the write */ +RREG32 (RADEON_GEN_INT_CNTL ); +return 0 ; }
drivers/gpu/drm/radeon/r600.c +3 -0
@@ -3459,6 +3459,9 @@ int r600_init(struct radeon_device *rdev) rdev->accel_working = false; } +/* posting read */ +RREG32 (R_000E50_SRBM_STATUS ); +return 0 ; }
drivers/gpu/drm/radeon/radeon_cs.c +3 -1
@@ -177,11 +177,13 @@ int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data)u32 ring =RADEON_CS_RING_GFX ;s32 priority =0 ; +INIT_LIST_HEAD (&p->validated); +if (!cs->num_chunks) {return 0 ; } +/* get chunks */ -INIT_LIST_HEAD (&p->validated); p->idx =0 ; p->ib.sa_bo =NULL ; p->ib.semaphore =NULL ;
drivers/gpu/drm/radeon/rs600.c +4 -0
@@ -636,6 +636,10 @@ int rs600_irq_set(struct radeon_device *rdev)WREG32 (R_007D18_DC_HOT_PLUG_DETECT2_INT_CONTROL , hpd2);if (ASIC_IS_DCE2 (rdev))WREG32 (R_007408_HDMI0_AUDIO_PACKET_CONTROL , hdmi0); + +/* posting read */ +RREG32 (R_000040_GEN_INT_CNTL ); +return 0 ; }
drivers/gpu/drm/radeon/si.c +5 -4
@@ -5704,8 +5704,7 @@ int si_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk)WREG32_P (CG_UPLL_FUNC_CNTL ,UPLL_BYPASS_EN_MASK , ~UPLL_BYPASS_EN_MASK );if (!vclk || !dclk) { -/* keep the Bypass mode, put PLL to sleep */ -WREG32_P (CG_UPLL_FUNC_CNTL ,UPLL_SLEEP_MASK , ~UPLL_SLEEP_MASK ); +/* keep the Bypass mode */ return 0 ; }
@@ -5721,8 +5720,7 @@ int si_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk)/* set VCO_MODE to 1 */ WREG32_P (CG_UPLL_FUNC_CNTL ,UPLL_VCO_MODE_MASK , ~UPLL_VCO_MODE_MASK ); -/* toggle UPLL_SLEEP to 1 then back to 0 */ -WREG32_P (CG_UPLL_FUNC_CNTL ,UPLL_SLEEP_MASK , ~UPLL_SLEEP_MASK ); +/* disable sleep mode */ WREG32_P (CG_UPLL_FUNC_CNTL ,0 , ~UPLL_SLEEP_MASK );/* deassert UPLL_RESET */
@@ -5778,5 +5776,8 @@ int si_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk)mdelay (100 ); +/* posting read */ +RREG32 (SRBM_STATUS ); +return 0 ; }
drivers/net/can/dev.c +8 -0
@@ -503,6 +503,14 @@ struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf) skb->pkt_type =PACKET_BROADCAST ; skb->ip_summed =CHECKSUM_UNNECESSARY ; +skb_reset_mac_header (skb); +skb_reset_network_header (skb); +skb_reset_transport_header (skb); + +skb_reset_mac_header (skb); +skb_reset_network_header (skb); +skb_reset_transport_header (skb); +can_skb_reserve (skb);can_skb_prv (skb)->ifindex = dev->ifindex;
drivers/net/usb/cx82310_eth.c +10 -1
@@ -302,9 +302,18 @@ static const struct driver_info cx82310_info = { .tx_fixup = cx82310_tx_fixup, }; +#define USB_DEVICE_CLASS (vend, prod, cl, sc, pr) \ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ + USB_DEVICE_ID_MATCH_DEV_INFO, \ + .idVendor = (vend), \ + .idProduct = (prod), \ + .bDeviceClass = (cl), \ + .bDeviceSubClass = (sc), \ + .bDeviceProtocol = (pr) +static const struct usb_device_id products[] = { { -USB_DEVICE_AND_INTERFACE_INFO (0x0572 ,0xcb01 ,0xff ,0 ,0 ), +USB_DEVICE_CLASS (0x0572 ,0xcb01 ,0xff ,0 ,0 ), .driver_info = (unsigned long ) &cx82310_info }, { },
drivers/regulator/core.c +17 -17
@@ -1596,10 +1596,12 @@ static int _regulator_do_enable(struct regulator_dev *rdev)trace_regulator_enable (rdev_get_name (rdev));if (rdev->ena_pin) { - ret =regulator_ena_gpio_ctrl (rdev, true); -if (ret <0 ) -return ret; - rdev->ena_gpio_state =1 ; +if (!rdev->ena_gpio_state) { + ret =regulator_ena_gpio_ctrl (rdev, true); +if (ret <0 ) +return ret; + rdev->ena_gpio_state =1 ; + } }else if (rdev->desc->ops->enable) { ret = rdev->desc->ops->enable (rdev);if (ret <0 )
@@ -1701,10 +1703,12 @@ static int _regulator_do_disable(struct regulator_dev *rdev)trace_regulator_disable (rdev_get_name (rdev));if (rdev->ena_pin) { - ret =regulator_ena_gpio_ctrl (rdev, false); -if (ret <0 ) -return ret; - rdev->ena_gpio_state =0 ; +if (rdev->ena_gpio_state) { + ret =regulator_ena_gpio_ctrl (rdev, false); +if (ret <0 ) +return ret; + rdev->ena_gpio_state =0 ; + } }else if (rdev->desc->ops->disable) { ret = rdev->desc->ops->disable (rdev);
@@ -3614,12 +3618,6 @@ regulator_register(const struct regulator_desc *regulator_desc, config->ena_gpio, ret); goto wash; } - -if (config->ena_gpio_flags &GPIOF_OUT_INIT_HIGH ) - rdev->ena_gpio_state =1 ; - -if (config->ena_gpio_invert) - rdev->ena_gpio_state = !rdev->ena_gpio_state; }/* set regulator constraints */
@@ -3788,9 +3786,11 @@ int regulator_suspend_finish(void)list_for_each_entry (rdev, ®ulator_list, list) {mutex_lock (&rdev->mutex);if (rdev->use_count >0 || rdev->constraints->always_on) { - error =_regulator_do_enable (rdev); -if (error) - ret = error; +if (!_regulator_is_enabled (rdev)) { + error =_regulator_do_enable (rdev); +if (error) + ret = error; + } }else {if (!has_full_constraints) goto unlock;
drivers/scsi/libsas/sas_discover.c +4 -2
@@ -500,6 +500,7 @@ static void sas_revalidate_domain(struct work_struct *work)struct sas_discovery_event *ev =to_sas_discovery_event (work);struct asd_sas_port *port = ev->port;struct sas_ha_struct *ha = port->ha; +struct domain_device *ddev = port->port_dev;/* prevent revalidation from finding sata links in recovery */ mutex_lock (&ha->disco_mutex);
@@ -514,8 +515,9 @@ static void sas_revalidate_domain(struct work_struct *work)SAS_DPRINTK ("REVALIDATING DOMAIN on port %d, pid:%d\n" , port->id,task_pid_nr (current)); -if (port->port_dev) - res =sas_ex_revalidate_domain (port->port_dev); +if (ddev && (ddev->dev_type ==SAS_FANOUT_EXPANDER_DEVICE || + ddev->dev_type ==SAS_EDGE_EXPANDER_DEVICE )) + res =sas_ex_revalidate_domain (ddev);SAS_DPRINTK ("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n" , port->id,task_pid_nr (current), res);
drivers/spi/spi-pl022.c +1 -1
@@ -508,12 +508,12 @@ static void giveback(struct pl022 *pl022) pl022->cur_msg =NULL ; pl022->cur_transfer =NULL ; pl022->cur_chip =NULL ; -spi_finalize_current_message (pl022->master);/* disable the SPI/SSP operation */ writew ((readw (SSP_CR1 (pl022->virtbase)) & (~SSP_CR1_MASK_SSE )),SSP_CR1 (pl022->virtbase)); +spi_finalize_current_message (pl022->master); }/**
drivers/target/iscsi/iscsi_target.c +10 -4
@@ -4136,11 +4136,17 @@ int iscsit_close_connection(pr_debug ("Closing iSCSI connection CID %hu on SID:" " %u\n" , conn->cid, sess->sid);/* -* Always up conn_logout_comp just in case the RX Thread is sleeping -* and the logout response never got sent because the connection -* failed. +* Always up conn_logout_comp for the traditional TCP case just in case +* the RX Thread in iscsi_target_rx_opcode() is sleeping and the logout +* response never got sent because the connection failed. +* +* However for iser-target, isert_wait4logout() is using conn_logout_comp +* to signal logout response TX interrupt completion. Go ahead and skip +* this for iser since isert_rx_opcode() does not wait on logout failure, +* and to avoid iscsi_conn pointer dereference in iser-target code. */ -complete (&conn->conn_logout_comp); +if (conn->conn_transport->transport_type ==ISCSI_TCP ) +complete (&conn->conn_logout_comp);iscsi_release_thread_set (conn);
drivers/target/target_core_pr.c +39 -4
85 lines not on this page · raw message
drivers/target/target_core_pscsi.c +1 -1
@@ -1112,7 +1112,7 @@ static u32 pscsi_get_device_type(struct se_device *dev)struct pscsi_dev_virt *pdv =PSCSI_DEV (dev);struct scsi_device *sd = pdv->pdv_sd; -return sd->type; +return (sd) ? sd->type :TYPE_NO_LUN ; }static sector_t pscsi_get_blocks (struct se_device *dev)
drivers/target/target_core_transport.c +4 -0
@@ -2222,6 +2222,10 @@ int target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd, out:spin_unlock_irqrestore (&se_sess->sess_cmd_lock, flags); + +if (ret && ack_kref) +target_put_sess_cmd (se_sess, se_cmd); +return ret; }EXPORT_SYMBOL (target_get_sess_cmd);
drivers/tty/serial/8250/8250_pci.c +1 -1
@@ -68,7 +68,7 @@ static void moan_device(const char *str, struct pci_dev *dev)"Please send the output of lspci -vv, this\n" "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n" "manufacturer and name of serial board or\n" -"modem board to [email protected].\n" , +"modem board to <[email protected]>.\n" ,pci_name (dev), str, dev->vendor, dev->device, dev->subsystem_vendor, dev->subsystem_device); }
drivers/xen/xen-pciback/conf_space.c +1 -1
@@ -16,7 +16,7 @@#include "conf_space.h" #include "conf_space_quirks.h" -static bool permissive; +bool permissive;module_param (permissive, bool,0644 );/* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word,
drivers/xen/xen-pciback/conf_space.h +2 -0
@@ -64,6 +64,8 @@ struct config_field_entry {void *data; }; +extern bool permissive; +#define OFFSET (cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset)/* Add fields to a device - the add_fields macro expects to get a pointer to
drivers/xen/xen-pciback/conf_space_header.c +48 -13
94 lines not on this page · raw message
fs/fuse/dev.c +5 -2
@@ -819,8 +819,8 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep) newpage = buf->page; -if (WARN_ON (!PageUptodate (newpage))) -return -EIO ; +if (!PageUptodate (newpage)) +SetPageUptodate (newpage);ClearPageMappedToDisk (newpage);
@@ -1725,6 +1725,9 @@ copy_finish:static int fuse_notify (struct fuse_conn *fc,enum fuse_notify_code code,unsigned int size,struct fuse_copy_state *cs) { +/* Don't try to move pages (yet) */ + cs->move_pages =0 ; +switch (code) {case FUSE_NOTIFY_POLL :return fuse_notify_poll (fc, size, cs);
fs/nilfs2/segment.c +4 -3
@@ -1906,6 +1906,7 @@ static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci, struct the_nilfs *nilfs) {struct nilfs_inode_info *ii, *n; +int during_mount = !(sci->sc_super->s_flags &MS_ACTIVE );int defer_iput = false;spin_lock (&nilfs->ns_inode_lock);
@@ -1918,10 +1919,10 @@ static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci,brelse (ii->i_bh); ii->i_bh =NULL ;list_del_init (&ii->i_dirty); -if (!ii->vfs_inode.i_nlink) { +if (!ii->vfs_inode.i_nlink || during_mount) {/* -* Defer calling iput() to avoid a deadlock -* over I_SYNC flag for inodes with i_nlink == 0 +* Defer calling iput() to avoid deadlocks if +* i_nlink == 0 or mount is not yet finished. */ list_add_tail (&ii->i_dirty, &sci->sc_iput_queue); defer_iput = true;
include/linux/workqueue.h +2 -1
@@ -71,7 +71,8 @@ enum {/* data contains off-queue information when !WORK_STRUCT_PWQ */ WORK_OFFQ_FLAG_BASE =WORK_STRUCT_COLOR_SHIFT , - WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE), + __WORK_OFFQ_CANCELING =WORK_OFFQ_FLAG_BASE , + WORK_OFFQ_CANCELING = (1 << __WORK_OFFQ_CANCELING),/* * When a work item is off queue, its high bits point to the last
kernel/workqueue.c +52 -4
77 lines not on this page · raw message
net/caif/caif_socket.c +1 -1
@@ -283,7 +283,7 @@ static int caif_seqpkt_recvmsg(struct kiocb *iocb, struct socket *sock,int copylen; ret = -EOPNOTSUPP ; -if (m->msg_flags&MSG_OOB ) +if (flags &MSG_OOB ) goto read_error; skb =skb_recv_datagram (sk, flags,0 , &ret);
net/can/af_can.c +3 -0
@@ -262,6 +262,9 @@ int can_send(struct sk_buff *skb, int loop) goto inval_skb; } + skb->ip_summed =CHECKSUM_UNNECESSARY ; + +skb_reset_mac_header (skb);skb_reset_network_header (skb);skb_reset_transport_header (skb);
net/compat.c +7 -0
@@ -71,6 +71,13 @@ int get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg)__get_user (kmsg->msg_controllen, &umsg->msg_controllen) || __get_user(kmsg->msg_flags, &umsg->msg_flags)) return -EFAULT; + +if (!tmp1) + kmsg->msg_namelen =0 ; + +if (kmsg->msg_namelen <0 ) +return -EINVAL ; +if (kmsg->msg_namelen >sizeof (struct sockaddr_storage )) kmsg->msg_namelen =sizeof (struct sockaddr_storage ); kmsg->msg_name =compat_ptr (tmp1);
net/core/sysctl_net_core.c +6 -4
@@ -23,6 +23,8 @@static int zero =0 ;static int one =1 ;static int ushort_max =USHRT_MAX ; +static int min_sndbuf =SOCK_MIN_SNDBUF ; +static int min_rcvbuf =SOCK_MIN_RCVBUF ;#ifdef CONFIG_RPS static int rps_sock_flow_sysctl(ctl_table *table, int write,
@@ -97,7 +99,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &one, + .extra1 = &min_sndbuf, }, { .procname = "rmem_max",
@@ -105,7 +107,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &one, + .extra1 = &min_rcvbuf, }, { .procname = "wmem_default",
@@ -113,7 +115,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &one, + .extra1 = &min_sndbuf, }, { .procname = "rmem_default",
@@ -121,7 +123,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = &one, + .extra1 = &min_rcvbuf, }, { .procname = "dev_weight",
net/ipv4/inet_diag.c +15 -3
@@ -71,6 +71,20 @@ static inline void inet_diag_unlock_handler(mutex_unlock (&inet_diag_table_mutex); } +static size_t inet_sk_attr_size (void ) +{ +return nla_total_size (sizeof (struct tcp_info )) + +nla_total_size (1 )/* INET_DIAG_SHUTDOWN */ + +nla_total_size (1 )/* INET_DIAG_TOS */ + +nla_total_size (1 )/* INET_DIAG_TCLASS */ + +nla_total_size (sizeof (struct inet_diag_meminfo )) + +nla_total_size (sizeof (struct inet_diag_msg )) + +nla_total_size (SK_MEMINFO_VARS *sizeof (u32)) + +nla_total_size (TCP_CA_NAME_MAX ) + +nla_total_size (sizeof (struct tcpvegas_info )) + +64 ; +} + int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, struct sk_buff *skb, struct inet_diag_req_v2 *req, struct user_namespace *user_ns,
@@ -326,9 +340,7 @@ int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo, struct sk_buff *in_sif (err) goto out; - rep =nlmsg_new (sizeof (struct inet_diag_msg ) + -sizeof (struct inet_diag_meminfo ) + -sizeof (struct tcp_info ) +64 ,GFP_KERNEL ); + rep =nlmsg_new (inet_sk_attr_size (),GFP_KERNEL );if (!rep) { err = -ENOMEM ; goto out;
net/ipv4/tcp_output.c +28 -40
114 lines not on this page · raw message
net/netfilter/ipvs/ip_vs_core.c +22 -11
@@ -650,16 +650,24 @@ static inline int ip_vs_gather_frags(struct sk_buff *skb, u_int32_t user)return err; } -static int ip_vs_route_me_harder (int af,struct sk_buff *skb) +static int ip_vs_route_me_harder (int af,struct sk_buff *skb, +unsigned int hooknum) { +if (!sysctl_snat_reroute (skb)) +return 0 ; +/* Reroute replies only to remote clients (FORWARD and LOCAL_OUT) */ +if (NF_INET_LOCAL_IN == hooknum) +return 0 ;#ifdef CONFIG_IP_VS_IPV6 if (af ==AF_INET6 ) { -if (sysctl_snat_reroute (skb) &&ip6_route_me_harder (skb) !=0 ) +struct dst_entry *dst =skb_dst (skb); + +if (dst->dev && !(dst->dev->flags &IFF_LOOPBACK ) && +ip6_route_me_harder (skb) !=0 )return 1 ; } else#endif -if ((sysctl_snat_reroute (skb) || -skb_rtable (skb)->rt_flags &RTCF_LOCAL ) && +if (!(skb_rtable (skb)->rt_flags &RTCF_LOCAL ) &&ip_route_me_harder (skb,RTN_LOCAL ) !=0 )return 1 ;
@@ -782,7 +790,8 @@ static int handle_response_icmp(int af, struct sk_buff *skb,union nf_inet_addr *snet, __u8 protocol, struct ip_vs_conn *cp, struct ip_vs_protocol *pp, - unsigned int offset, unsigned int ihl) + unsigned int offset, unsigned int ihl, + unsigned int hooknum) { unsigned int verdict = NF_DROP;
@@ -812,7 +821,7 @@ static int handle_response_icmp(int af, struct sk_buff *skb,#endif ip_vs_nat_icmp (skb, pp, cp,1 ); -if (ip_vs_route_me_harder (af, skb)) +if (ip_vs_route_me_harder (af, skb, hooknum)) goto out;/* do the statistics and put it back */
@@ -907,7 +916,7 @@ static int ip_vs_out_icmp(struct sk_buff *skb, int *related, snet.ip = iph->saddr;return handle_response_icmp (AF_INET , skb, &snet, cih->protocol, cp, - pp, ciph.len, ihl); + pp, ciph.len, ihl, hooknum); }#ifdef CONFIG_IP_VS_IPV6
@@ -972,7 +981,8 @@ static int ip_vs_out_icmp_v6(struct sk_buff *skb, int *related, snet.in6 = ciph.saddr.in6; writable = ciph.len;return handle_response_icmp (AF_INET6 , skb, &snet, ciph.protocol, cp, - pp, writable, sizeof(struct ipv6hdr)); + pp, writable,sizeof (struct ipv6hdr ), + hooknum); }#endif
@@ -1031,7 +1041,8 @@ static inline bool is_new_conn(const struct sk_buff *skb,*/ static unsigned int handle_response (int af,struct sk_buff *skb,struct ip_vs_proto_data *pd, -struct ip_vs_conn *cp,struct ip_vs_iphdr *iph) +struct ip_vs_conn *cp,struct ip_vs_iphdr *iph, +unsigned int hooknum) {struct ip_vs_protocol *pp = pd->pp;
@@ -1069,7 +1080,7 @@ handle_response(int af, struct sk_buff *skb, struct ip_vs_proto_data *pd,* if it came from this machine itself. So re-compute * the routing information. */ -if (ip_vs_route_me_harder (af, skb)) +if (ip_vs_route_me_harder (af, skb, hooknum)) goto drop;IP_VS_DBG_PKT (10 , af, pp, skb,0 ,"After SNAT" );
@@ -1172,7 +1183,7 @@ ip_vs_out(unsigned int hooknum, struct sk_buff *skb, int af) cp = pp->conn_out_get (af, skb, &iph,0 );if (likely (cp)) -return handle_response (af, skb, pd, cp, &iph); +return handle_response (af, skb, pd, cp, &iph, hooknum); if (sysctl_nat_icmp_send(net) && (pp->protocol == IPPROTO_TCP || pp->protocol == IPPROTO_UDP ||
net/netfilter/ipvs/ip_vs_sync.c +3 -0
@@ -878,6 +878,8 @@ static void ip_vs_proc_conn(struct net *net, struct ip_vs_conn_param *param,IP_VS_DBG (2 ,"BACKUP, add new conn. failed\n" );return ; } +if (!(flags &IP_VS_CONN_F_TEMPLATE )) +kfree (param->pe_data); }if (opt)
@@ -1151,6 +1153,7 @@ static inline int ip_vs_proc_sync_conn(struct net *net, __u8 *p, __u8 *msg_end) (opt_flags &IPVS_OPT_F_SEQ_DATA ? &opt :NULL ) );#endif +ip_vs_pe_put (param.pe);return 0 ;/* Error exit */ out:
net/rds/iw_rdma.c +22 -18
@@ -88,7 +88,9 @@ static unsigned int rds_iw_unmap_fastreg_list(struct rds_iw_mr_pool *pool, int *unpinned);static void rds_iw_destroy_fastreg (struct rds_iw_mr_pool *pool,struct rds_iw_mr *ibmr); -static int rds_iw_get_device (struct rds_sock *rs,struct rds_iw_device **rds_iwdev,struct rdma_cm_id **cm_id) +static int rds_iw_get_device (struct sockaddr_in *src,struct sockaddr_in *dst, +struct rds_iw_device **rds_iwdev, +struct rdma_cm_id **cm_id) {struct rds_iw_device *iwdev;struct rds_iw_cm_id *i_cm_id;
@@ -112,15 +114,15 @@ static int rds_iw_get_device(struct rds_sock *rs, struct rds_iw_device **rds_iwd src_addr->sin_port, dst_addr->sin_addr.s_addr, dst_addr->sin_port, - rs->rs_bound_addr, - rs->rs_bound_port, - rs->rs_conn_addr, - rs->rs_conn_port); + src->sin_addr.s_addr, + src->sin_port, + dst->sin_addr.s_addr, + dst->sin_port);#ifdef WORKING_TUPLE_DETECTION -if (src_addr->sin_addr.s_addr == rs->rs_bound_addr && - src_addr->sin_port == rs->rs_bound_port && - dst_addr->sin_addr.s_addr == rs->rs_conn_addr && - dst_addr->sin_port == rs->rs_conn_port) { +if (src_addr->sin_addr.s_addr == src->sin_addr.s_addr && + src_addr->sin_port == src->sin_port && + dst_addr->sin_addr.s_addr == dst->sin_addr.s_addr && + dst_addr->sin_port == dst->sin_port) {#else /* FIXME - needs to compare the local and remote * ipaddr/port tuple, but the ipaddr is the only
@@ -128,7 +130,7 @@ static int rds_iw_get_device(struct rds_sock *rs, struct rds_iw_device **rds_iwd* zero'ed. It doesn't appear to be properly populated * during connection setup... */ -if (src_addr->sin_addr.s_addr == rs->rs_bound_addr) { +if (src_addr->sin_addr.s_addr == src->sin_addr.s_addr) {#endif spin_unlock_irq (&iwdev->spinlock); *rds_iwdev = iwdev;
@@ -180,19 +182,13 @@ int rds_iw_update_cm_id(struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_i {struct sockaddr_in *src_addr, *dst_addr;struct rds_iw_device *rds_iwdev_old; -struct rds_sock rs;struct rdma_cm_id *pcm_id;int rc; src_addr = (struct sockaddr_in *)&cm_id->route.addr.src_addr; dst_addr = (struct sockaddr_in *)&cm_id->route.addr.dst_addr; - rs.rs_bound_addr = src_addr->sin_addr.s_addr; - rs.rs_bound_port = src_addr->sin_port; - rs.rs_conn_addr = dst_addr->sin_addr.s_addr; - rs.rs_conn_port = dst_addr->sin_port; - - rc =rds_iw_get_device (&rs, &rds_iwdev_old, &pcm_id); + rc =rds_iw_get_device (src_addr, dst_addr, &rds_iwdev_old, &pcm_id);if (rc)rds_iw_remove_cm_id (rds_iwdev, cm_id);
@@ -598,9 +594,17 @@ void *rds_iw_get_mr(struct scatterlist *sg, unsigned long nents,struct rds_iw_device *rds_iwdev;struct rds_iw_mr *ibmr =NULL ;struct rdma_cm_id *cm_id; +struct sockaddr_in src = { + .sin_addr.s_addr = rs->rs_bound_addr, + .sin_port = rs->rs_bound_port, + }; +struct sockaddr_in dst = { + .sin_addr.s_addr = rs->rs_conn_addr, + .sin_port = rs->rs_conn_port, + };int ret; - ret =rds_iw_get_device (rs, &rds_iwdev, &cm_id); + ret =rds_iw_get_device (&src, &dst, &rds_iwdev, &cm_id);if (ret || !cm_id) { ret = -ENODEV ; goto out;
net/rxrpc/ar-recvmsg.c +1 -1
@@ -87,7 +87,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,if (!skb) {/* nothing remains on the queue */ if (copied && - (msg->msg_flags &MSG_PEEK || timeo ==0 )) + (flags &MSG_PEEK || timeo ==0 )) goto out;/* wait for a message to turn up */
sound/core/control.c +4 -0
@@ -1168,6 +1168,10 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,if (info->count <1 )return -EINVAL ; +if (!*info->id.name) +return -EINVAL ; +if (strnlen (info->id.name,sizeof (info->id.name)) >=sizeof (info->id.name)) +return -EINVAL ; access = info->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : (info->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE| SNDRV_CTL_ELEM_ACCESS_INACTIVE|
sound/pci/hda/hda_generic.c +39 -8
71 lines not on this page · raw message
sound/pci/hda/hda_proc.c +30 -8
@@ -129,13 +129,38 @@ static void print_amp_caps(struct snd_info_buffer *buffer, (caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT); } +/* is this a stereo widget or a stereo-to-mono mix? */ +static bool is_stereo_amps (struct hda_codec *codec,hda_nid_t nid, +int dir,unsigned int wcaps,int indices) +{ +hda_nid_t conn; + +if (wcaps &AC_WCAP_STEREO ) +return true; +/* check for a stereo-to-mono mix; it must be: +* only a single connection, only for input, and only a mixer widget +*/ +if (indices !=1 || dir !=HDA_INPUT || +get_wcaps_type (wcaps) !=AC_WID_AUD_MIX ) +return false; + +if (snd_hda_get_raw_connections (codec, nid, &conn,1 ) <0 ) +return false; +/* the connection source is a stereo? */ + wcaps =snd_hda_param_read (codec, conn,AC_PAR_AUDIO_WIDGET_CAP ); +return !!(wcaps &AC_WCAP_STEREO ); +} +static void print_amp_vals (struct snd_info_buffer *buffer,struct hda_codec *codec,hda_nid_t nid, -int dir,int stereo,int indices) +int dir,unsigned int wcaps,int indices) {unsigned int val; +bool stereo;int i; + stereo =is_stereo_amps (codec, nid, dir, wcaps, indices); + dir = dir ==HDA_OUTPUT ?AC_AMP_GET_OUTPUT :AC_AMP_GET_INPUT ;for (i =0 ; i < indices; i++) {snd_iprintf (buffer," [" );
@@ -682,12 +707,10 @@ static void print_codec_info(struct snd_info_entry *entry, (codec->single_adc_amp && wid_type == AC_WID_AUD_IN))print_amp_vals (buffer, codec, nid,HDA_INPUT , - wid_caps &AC_WCAP_STEREO , -1 ); + wid_caps,1 ); elseprint_amp_vals (buffer ,codec ,nid ,HDA_INPUT , - wid_caps & AC_WCAP_STEREO, - conn_len); +wid_caps ,conn_len ); }if (wid_caps &AC_WCAP_OUT_AMP ) {snd_iprintf (buffer," Amp-Out caps: " );
@@ -696,11 +719,10 @@ static void print_codec_info(struct snd_info_entry *entry,if (wid_type ==AC_WID_PIN && codec->pin_amp_workaround)print_amp_vals (buffer, codec, nid,HDA_OUTPUT , - wid_caps &AC_WCAP_STEREO , - conn_len); + wid_caps, conn_len);else print_amp_vals (buffer, codec, nid,HDA_OUTPUT , - wid_caps &AC_WCAP_STEREO ,1 ); + wid_caps,1 ); }switch (wid_type) {
sound/pci/hda/patch_cirrus.c +2 -0
@@ -363,6 +363,7 @@ static const struct snd_pci_quirk cs420x_fixup_tbl[] = {SND_PCI_QUIRK (0x106b ,0x1c00 ,"MacBookPro 8,1" ,CS420X_MBP81 ),SND_PCI_QUIRK (0x106b ,0x2000 ,"iMac 12,2" ,CS420X_IMAC27_122 ),SND_PCI_QUIRK (0x106b ,0x2800 ,"MacBookPro 10,1" ,CS420X_MBP101 ), +SND_PCI_QUIRK (0x106b ,0x5600 ,"MacBookAir 5,2" ,CS420X_MBP81 ),SND_PCI_QUIRK (0x106b ,0x5b00 ,"MacBookAir 4,2" ,CS420X_MBA42 ), SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE), {} /* terminator */
@@ -531,6 +532,7 @@ static int patch_cs420x(struct hda_codec *codec)return -ENOMEM ; spec->gen.automute_hook = cs_automute; + codec->single_adc_amp =1 ;snd_hda_pick_fixup (codec, cs420x_models, cs420x_fixup_tbl, cs420x_fixups);
sound/pci/hda/patch_conexant.c +11 -0
@@ -3223,6 +3223,7 @@ enum {CXT_PINCFG_LENOVO_TP410 ,CXT_PINCFG_LEMOTE_A1004 ,CXT_PINCFG_LEMOTE_A1205 , +CXT_PINCFG_COMPAQ_CQ60 ,CXT_FIXUP_STEREO_DMIC ,CXT_FIXUP_INC_MIC_BOOST , CXT_FIXUP_GPIO1,
@@ -3296,6 +3297,15 @@ static const struct hda_fixup cxt_fixups[] = { .type = HDA_FIXUP_PINS, .v.pins = cxt_pincfg_lemote, }, + [CXT_PINCFG_COMPAQ_CQ60] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl []) { +/* 0x17 was falsely set up as a mic, it should 0x1d */ + {0x17 ,0x400001f0 }, + {0x1d ,0x97a70120 }, + { } + } + }, [CXT_FIXUP_STEREO_DMIC] = { .type = HDA_FIXUP_FUNC, .v.func = cxt_fixup_stereo_dmic,
@@ -3316,6 +3326,7 @@ static const struct hda_fixup cxt_fixups[] = { };static const struct snd_pci_quirk cxt5051_fixups[] = { +SND_PCI_QUIRK (0x103c ,0x360b ,"Compaq CQ60" ,CXT_PINCFG_COMPAQ_CQ60 ),SND_PCI_QUIRK (0x17aa ,0x20f2 ,"Lenovo X200" ,CXT_PINCFG_LENOVO_X200 ), {} };