Linux 3.6.3
I'm announcing the release of the 3.6.3 kernel.
All users of the 3.6 kernel series must upgrade.
The updated 3.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.6.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/Kconfig | 10 + arch/arm/include/asm/vfpmacros.h | 4 arch/arm/mm/cache-v7.S | 3 arch/arm/plat-omap/counter_32k.c | 21 +- arch/mips/ath79/clock.c | 109 ++++++++++---- arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 23 +++ arch/mips/kernel/kgdb.c | 9 + arch/x86/Makefile | 2 arch/x86/xen/enlighten.c | 18 ++ block/blk-core.c | 2 drivers/acpi/ec.c | 30 +++- drivers/char/tpm/tpm.c | 21 +- drivers/firewire/core-cdev.c | 4 drivers/gpu/drm/i915/i915_gem.c | 1 drivers/gpu/drm/i915/i915_reg.h | 2 drivers/gpu/drm/i915/intel_display.c | 4 drivers/gpu/drm/i915/intel_pm.c | 4 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 6 drivers/md/raid10.c | 2 drivers/mtd/nand/nand_base.c | 8 - drivers/net/ethernet/intel/e1000e/e1000.h | 6 drivers/net/ethernet/intel/e1000e/netdev.c | 2 drivers/net/usb/mcs7830.c | 30 ++-- drivers/net/wireless/ath/ath9k/beacon.c | 2 drivers/net/wireless/ath/ath9k/main.c | 2 drivers/net/wireless/ath/ath9k/xmit.c | 53 +++---- drivers/scsi/qla2xxx/qla_target.c | 2 drivers/scsi/scsi_debug.c | 2 drivers/scsi/storvsc_drv.c | 5 drivers/scsi/virtio_scsi.c | 2 drivers/target/iscsi/iscsi_target.c | 2 drivers/target/iscsi/iscsi_target_core.h | 4 drivers/target/iscsi/iscsi_target_tpg.c | 12 + drivers/target/target_core_configfs.c | 8 - drivers/target/target_core_file.c | 41 +++++ drivers/target/target_core_file.h | 1 drivers/target/target_core_spc.c | 48 +----- drivers/tty/vt/vt.c | 13 + drivers/usb/class/cdc-acm.c | 3 drivers/usb/gadget/at91_udc.c | 2 drivers/vfio/pci/vfio_pci_intrs.c | 18 ++ drivers/video/udlfb.c | 2 drivers/video/via/via_clock.c | 19 ++ drivers/xen/xenbus/xenbus_xs.c | 21 ++ fs/autofs4/root.c | 6 fs/ceph/export.c | 18 +- fs/gfs2/export.c | 4 fs/isofs/export.c | 2 fs/jbd/commit.c | 45 ++++-- fs/jbd/transaction.c | 64 +++++--- fs/lockd/mon.c | 86 +++++++++-- fs/lockd/netns.h | 4 fs/lockd/svc.c | 1 fs/namei.c | 2 fs/nfs/blocklayout/blocklayout.c | 177 ++++++++++++++++++++++-- fs/nfs/blocklayout/blocklayout.h | 1 fs/nfs/client.c | 1 fs/nfs/nfs4proc.c | 9 + fs/nfsd/nfs4idmap.c | 2 fs/nfsd/nfs4state.c | 19 ++ fs/reiserfs/inode.c | 6 fs/xfs/xfs_export.c | 3 include/linux/mtd/nand.h | 3 kernel/audit.c | 2 kernel/debug/kdb/kdb_io.c | 33 +++- kernel/module.c | 4 kernel/time/tick-sched.c | 2 kernel/time/timekeeping.c | 2 kernel/timer.c | 10 - mm/shmem.c | 6 net/core/pktgen.c | 2 net/mac80211/status.c | 4 net/mac80211/tx.c | 22 +- net/sunrpc/xprtsock.c | 21 ++ scripts/Makefile.fwinst | 4 sound/pci/ac97/ac97_codec.c | 2 sound/pci/emu10k1/emu10k1_main.c | 9 + sound/pci/hda/hda_intel.c | 40 +++-- sound/pci/hda/patch_cirrus.c | 6 sound/pci/hda/patch_realtek.c | 6 sound/pci/hda/patch_via.c | 4 sound/soc/codecs/wm2200.c | 3 sound/soc/omap/omap-abe-twl6040.c | 2 sound/soc/sh/fsi.c | 15 +- 85 files changed, 940 insertions(+), 297 deletions(-)
Alex Williamson (2):
vfio: Move PCI INTx eventfd setting earlier
vfio: Fix PCI INTx disable consistency
Alexander Holler (1):
video/udlfb: fix line counting in fb_write
Amerigo Wang (1):
pktgen: fix crash when generating IPv6 packets
Brian Norris (1):
mtd: nand: allow NAND_NO_SUBPAGE_WRITE to be set from driver
Bryan Schumaker (1):
NFS: Remove bad delegations during open recovery
Christoph Hellwig (1):
iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
Colin Cross (1):
ARM: OMAP: counter: add locking to read_persistent_clock
Dan Carpenter (2):
timekeeping: Cast raw_interval to u64 to avoid shift overflow md/raid10: use correct limit variable
Daniel Drake (1):
viafb: don't touch clock state on OLPC XO-1.5
David Henningsson (2):
ALSA: hda - do not detect jack on internal speakers for Realtek
ALSA: hda - Always check array bounds in alc_get_line_out_pfx
Egbert Eich (1):
drm/radeon: Don't destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy().
Fabio Porcedda (1):
usb: gadget: at91_udc: fix dt support
Felix Fietkau (2):
ath9k: use ieee80211_free_txskb
mac80211: use ieee80211_free_txskb to fix possible skb leaks
Feng Tang (2):
ACPI: EC: Make the GPE storm threshold a module parameter
ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop
Frederic Weisbecker (1):
nohz: Fix one jiffy count too far in idle cputime
Gabor Juhos (1):
MIPS: ath79: Fix CPU/DDR frequency calculation for SRIF PLLs
Greg Kroah-Hartman (1):
Linux 3.6.3
Guennadi Liakhovetski (1):
ASoC: fsi: don't reschedule DMA from an atomic context
Hildner, Christian (1):
timers: Fix endless looping between cascade() and internal_add_timer()
Hiroaki SHIMODA (1):
e1000e: Change wthresh to 1 to avoid possible Tx stalls
Hugh Dickins (1):
tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking
Ian Kent (1):
autofs4 - fix reset pending flag on mount fail
J. Bruce Fields (2):
nfsd4: don't pin clientids to pseudoflavors
nfsd4: fix nfs4 stateid leak
Jan Kara (1):
jbd: Fix assertion failure in commit code due to lacking transaction credits
Jani Nikula (1):
drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
Jason Wessel (2):
mips,kgdb: fix recursive page fault with CONFIG_KPROBES kdb,vt_console: Fix missed data due to pager overruns
Jean-Christian de Rivaz (1):
Add CDC-ACM support for the CX93010-2x UCMxx USB Modem
K. Y. Srinivasan (1):
SCSI: storvsc: Account for in-transit packets in the RESET path
Kenneth Graunke (1):
drm/i915: Set guardband clipping workaround bit in the right register.
Konrad Rzeszutek Wilk (3):
xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches. xen/bootup: allow {read|write}_cr8 pvops call. xen/bootup: allow read_tscp call for Xen PV guests.
Lukas Czerner (1):
SCSI: scsi_debug: Fix off-by-one bug when unmapping region
Malahal Naineni (1):
NFSD: pass null terminated buf to kstrtouint()
Mark Brown (2):
ASoC: wm2200: Use rev A register patches on rev B
ASoC: wm2200: Fix non-inverted OUT2 mute control
Matthew Garrett (1):
module: taint kernel when lve module is loaded
Maxim Kachur (1):
ALSA: emu10k1: add chip details for E-mu 1010 PCIe card
Michal Marek (1):
kbuild: Fix accidental revert in commit fe04ddf
Nicholas Bellinger (4):
iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU
iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values target/file: Re-enable optional fd_buffered_io=1 operation
Ondrej Zary (1):
mcs7830: Fix link state detection
Paolo Bonzini (2):
target: support zero allocation length in INQUIRY
target: fix truncation of mode data, support zero allocation length
Peng Tao (2):
pnfsblock: fix partial page buffer wirte
NFS41: fix error of setting blocklayoutdriver
Peter Huewe (1):
tpm: Propagate error from tpm_transmit to fix a timeout hang
Peter Senna Tschudin (1):
target: fix return code in target_core_init_configfs error path
Peter Ujfalusi (1):
ASoC: omap-abe-twl6040: Fix typo of Vibrator
Richard W.M. Jones (1):
SCSI: virtio-scsi: initialize scatterlist structure
Roland Dreier (1):
qla2xxx: Fix endianness of task management response code
Russell King (1):
ARM: vfp: fix saving d16-d31 vfp registers on v6+ kernels
Sasha Levin (2):
fs: handle failed audit_log_start properly
fs: prevent use after free in auditing when symlink following was denied
Simon Horman (1):
ARM: 7541/1: Add ARM ERRATA 775420 workaround
Stanislav Kinsbursky (3):
lockd: per-net NSM client creation and destruction helpers introduced
lockd: use rpc client's cl_nodename for id encoding
lockd: create and use per-net NSM RPC clients on MON/UNMON requests
Stefan Richter (1):
firewire: cdev: fix user memory corruption (i386 userland on amd64 kernel)
Takashi Iwai (5):
ALSA: hda - Add missing hda_gen_spec to struct via_spec
ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
ALSA: hda - Fix registration race of VGA switcheroo
ALSA: hda - Stop LPIB delay counting on broken hardware
ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
Tejun Heo (1):
block: fix request_queue->flags initialization
Trond Myklebust (1):
SUNRPC: Ensure that the TCP socket is closed when in CLOSE_WAIT
Willy Tarreau (1):
drm/i915: remove useless BUG_ON which caused a regression in 3.5.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 6 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Terrified Chipmunk
arch/arm/Kconfig +10 -0
@@ -1413,6 +1413,16 @@ config PL310_ERRATA_769419 on systems with an outer cache, the store buffer is drained explicitly. +config ARM_ERRATA_775420 + bool "ARM errata: A data cache maintenance operation which aborts, might lead to deadlock" + depends on CPU_V7 + help + This option enables the workaround for the 775420 Cortex-A9 (r2p2, + r2p6,r2p8,r2p10,r3p0) erratum. In case a date cache maintenance + operation aborts with MMU exception, it might cause the processor + to deadlock. This workaround puts DSB before executing ISB if + an abort may occur on cache maintenance. + endmenu source "arch/arm/common/Kconfig"
arch/arm/include/asm/vfpmacros.h +2 -2
@@ -28,7 +28,7 @@ ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] tst \tmp, #HWCAP_VFPv3D16 - ldceq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} + ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} addne \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
@@ -52,7 +52,7 @@ ldr \tmp, =elf_hwcap @ may not have MVFR regs ldr \tmp, [\tmp, #0] tst \tmp, #HWCAP_VFPv3D16 - stceq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} + stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} addne \base, \base, #32*4 @ step over unused register space#else VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0
arch/arm/mm/cache-v7.S +3 -0
@@ -211,6 +211,9 @@ ENTRY(v7_coherent_user_range) * isn't mapped, fail with -EFAULT. */ 9001: +#ifdef CONFIG_ARM_ERRATA_775420 + dsb +#endif mov r0, #-EFAULT mov pc, lr UNWIND(.fnend )
arch/arm/plat-omap/counter_32k.c +14 -7
@@ -55,22 +55,29 @@ static u32 notrace omap_32k_read_sched_clock(void)* nsecs and adds to a monotonically increasing timespec. */ static struct timespec persistent_ts; -static cycles_t cycles, last_cycles; +static cycles_t cycles;static unsigned int persistent_mult, persistent_shift; +static DEFINE_SPINLOCK (read_persistent_clock_lock); +static void omap_read_persistent_clock (struct timespec *ts) {unsigned long long nsecs; -cycles_t delta; -struct timespec *tsp = &persistent_ts; +cycles_t last_cycles; +unsigned long flags; + +spin_lock_irqsave (&read_persistent_clock_lock, flags); last_cycles = cycles; cycles = sync32k_cnt_reg ?__raw_readl (sync32k_cnt_reg) :0 ; - delta = cycles - last_cycles; - nsecs =clocksource_cyc2ns (delta, persistent_mult, persistent_shift); + nsecs =clocksource_cyc2ns (cycles - last_cycles, + persistent_mult, persistent_shift); + +timespec_add_ns (&persistent_ts, nsecs); + + *ts = persistent_ts; -timespec_add_ns (tsp, nsecs); - *ts = *tsp; +spin_unlock_irqrestore (&read_persistent_clock_lock, flags); }/**
arch/mips/ath79/clock.c +81 -28
137 lines not on this page · raw message
arch/mips/include/asm/mach-ath79/ar71xx_regs.h +23 -0
@@ -63,6 +63,8 @@#define AR934X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)#define AR934X_WMAC_SIZE 0x20000 +#define AR934X_SRIF_BASE (AR71XX_APB_BASE + 0x00116000) +#define AR934X_SRIF_SIZE 0x1000/* * DDR_CTRL block
@@ -399,4 +401,25 @@#define AR933X_GPIO_COUNT 30#define AR934X_GPIO_COUNT 23 +/* +* SRIF block +*/ +#define AR934X_SRIF_CPU_DPLL1_REG 0x1c0 +#define AR934X_SRIF_CPU_DPLL2_REG 0x1c4 +#define AR934X_SRIF_CPU_DPLL3_REG 0x1c8 + +#define AR934X_SRIF_DDR_DPLL1_REG 0x240 +#define AR934X_SRIF_DDR_DPLL2_REG 0x244 +#define AR934X_SRIF_DDR_DPLL3_REG 0x248 + +#define AR934X_SRIF_DPLL1_REFDIV_SHIFT 27 +#define AR934X_SRIF_DPLL1_REFDIV_MASK 0x1f +#define AR934X_SRIF_DPLL1_NINT_SHIFT 18 +#define AR934X_SRIF_DPLL1_NINT_MASK 0x1ff +#define AR934X_SRIF_DPLL1_NFRAC_MASK 0x0003ffff + +#define AR934X_SRIF_DPLL2_LOCAL_PLL BIT(30) +#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13 +#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7 +#endif /* __ASM_MACH_AR71XX_REGS_H */
arch/mips/kernel/kgdb.c +9 -0
@@ -283,6 +283,15 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd,struct pt_regs *regs = args->regs;int trap = (regs->cp0_cause &0x7c ) >>2 ; +#ifdef CONFIG_KPROBES +/* +* Return immediately if the kprobes fault notifier has set +* DIE_PAGE_FAULT. +*/ +if (cmd ==DIE_PAGE_FAULT ) +return NOTIFY_DONE ; +#endif /* CONFIG_KPROBES */ +/* Userspace events, ignore. */ if (user_mode (regs))return NOTIFY_DONE ;
arch/x86/Makefile +1 -1
@@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-avx,) KBUILD_CFLAGS += $(mflags-y) KBUILD_AFLAGS += $(mflags-y) -archscripts: +archscripts: scripts_basic $(Q)$(MAKE) $(build)=arch/x86/tools relocs ###
arch/x86/xen/enlighten.c +17 -1
@@ -984,7 +984,16 @@ static void xen_write_cr4(unsigned long cr4)native_write_cr4 (cr4); } - +#ifdef CONFIG_X86_64 +static inline unsigned long xen_read_cr8 (void ) +{ +return 0 ; +} +static inline void xen_write_cr8 (unsigned long val) +{ +BUG_ON (val); +} +#endif static int xen_write_msr_safe (unsigned int msr,unsigned low,unsigned high) {int ret;
@@ -1153,6 +1162,11 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .read_cr4_safe = native_read_cr4_safe, .write_cr4 = xen_write_cr4, +#ifdef CONFIG_X86_64 + .read_cr8 = xen_read_cr8, + .write_cr8 = xen_write_cr8, +#endif + .wbinvd = native_wbinvd, .read_msr = native_read_msr_safe,
@@ -1161,6 +1175,8 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .read_tsc = native_read_tsc, .read_pmc = native_read_pmc, + .read_tscp = native_read_tscp, + .iret = xen_iret, .irq_enable_sysexit = xen_sysexit,#ifdef CONFIG_X86_64
block/blk-core.c +1 -1
@@ -696,7 +696,7 @@ blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, q->request_fn = rfn; q->prep_rq_fn =NULL ; q->unprep_rq_fn =NULL ; - q->queue_flags =QUEUE_FLAG_DEFAULT ; + q->queue_flags |=QUEUE_FLAG_DEFAULT ;/* Override internal queue lock with supplied lock pointer */ if (lock)
drivers/acpi/ec.c +25 -5
@@ -71,9 +71,6 @@ enum ec_command {#define ACPI_EC_UDELAY_GLK 1000/* Wait 1ms max. to get global lock */ #define ACPI_EC_MSI_UDELAY 550/* Wait 550us for MSI EC */ -#define ACPI_EC_STORM_THRESHOLD 8/* number of false interrupts -per one transaction */ -enum {EC_FLAGS_QUERY_PENDING ,/* Query is pending */ EC_FLAGS_GPE_STORM ,/* GPE storm detected */
@@ -87,6 +84,15 @@ static unsigned int ec_delay __read_mostly = ACPI_EC_DELAY;module_param (ec_delay, uint,0644 );MODULE_PARM_DESC (ec_delay,"Timeout(ms) waited until an EC command completes" ); +/* +* If the number of false interrupts per one transaction exceeds +* this threshold, will think there is a GPE storm happened and +* will disable the GPE for normal transaction. +*/ +static unsigned int ec_storm_threshold__read_mostly =8 ; +module_param (ec_storm_threshold, uint,0644 ); +MODULE_PARM_DESC (ec_storm_threshold,"Maxim false GPE numbers not considered as GPE storm" ); +/* If we find an EC via the ECDT, we need to keep a ptr to its context */ /* External interfaces use first EC only, so remember */ typedef int (*acpi_ec_query_func ) (void *data);
@@ -319,7 +325,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)msleep (1 );/* It is safe to enable the GPE outside of the transaction. */ acpi_enable_gpe (NULL , ec->gpe); - }else if (t->irq_count >ACPI_EC_STORM_THRESHOLD ) { + }else if (t->irq_count > ec_storm_threshold) {pr_info (PREFIX "GPE storm detected, " "transactions will use polling mode\n" );set_bit (EC_FLAGS_GPE_STORM , &ec->flags);
@@ -924,6 +930,17 @@ static int ec_flag_msi(const struct dmi_system_id *id)return 0 ; } +/* +* Clevo M720 notebook actually works ok with IRQ mode, if we lifted +* the GPE storm threshold back to 20 +*/ +static int ec_enlarge_storm_threshold (const struct dmi_system_id *id) +{ +pr_debug ("Setting the EC GPE storm threshold to 20\n" ); + ec_storm_threshold =20 ; +return 0 ; +} +static struct dmi_system_id __initdata ec_dmi_table[] = { { ec_skip_dsdt_scan,"Compal JFL92" , {
@@ -955,10 +972,13 @@ static struct dmi_system_id __initdata ec_dmi_table[] = { { ec_validate_ecdt, "ASUS hardware", { DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc.") }, NULL}, + { + ec_enlarge_storm_threshold, "CLEVO hardware", { +DMI_MATCH (DMI_SYS_VENDOR ,"CLEVO Co." ), + DMI_MATCH(DMI_PRODUCT_NAME, "M720T/M730T"),}, NULL}, {}, }; -int __init acpi_ec_ecdt_probe (void ) {acpi_status status;
drivers/char/tpm/tpm.c +14 -7
@@ -1186,17 +1186,20 @@ ssize_t tpm_write(struct file *file, const char __user *buf, size_t size, loff_t *off) { struct tpm_chip *chip = file->private_data; -size_t in_size = size, out_size; +size_t in_size = size; +ssize_t out_size;/* cannot perform a write until the read has cleared -either via tpm_read or a user_read_timer timeout */ -while (atomic_read (&chip->data_pending) !=0 ) -msleep (TPM_TIMEOUT ); - -mutex_lock (&chip->buffer_mutex); +either via tpm_read or a user_read_timer timeout. +This also prevents splitted buffered writes from blocking here. +*/ +if (atomic_read (&chip->data_pending) !=0 ) +return -EBUSY ;if (in_size >TPM_BUFSIZE ) - in_size =TPM_BUFSIZE ; +return -E2BIG ; + +mutex_lock (&chip->buffer_mutex);if (copy_from_user (chip->data_buffer, (void __user *) buf, in_size)) {
@@ -1206,6 +1209,10 @@ ssize_t tpm_write(struct file *file, const char __user *buf,/* atomic tpm command send and result receive */ out_size =tpm_transmit (chip, chip->data_buffer,TPM_BUFSIZE ); +if (out_size <0 ) { +mutex_unlock (&chip->buffer_mutex); +return out_size; + }atomic_set (&chip->data_pending, out_size);mutex_unlock (&chip->buffer_mutex);
drivers/firewire/core-cdev.c +2 -2
@@ -473,8 +473,8 @@ static int ioctl_get_info(struct client *client, union ioctl_arg *arg) client->bus_reset_closure = a->bus_reset_closure;if (a->bus_reset !=0 ) {fill_bus_reset_event (&bus_reset, client); - ret =copy_to_user (u64_to_uptr (a->bus_reset), - &bus_reset,sizeof (bus_reset)); +/* unaligned size of bus_reset is 36 bytes */ + ret =copy_to_user (u64_to_uptr (a->bus_reset), &bus_reset,36 ); }if (ret ==0 &&list_empty (&client->link))list_add_tail (&client->link, &client->device->client_list);
drivers/gpu/drm/i915/i915_gem.c +0 -1
@@ -3893,7 +3893,6 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data,BUG_ON (!list_empty (&dev_priv->mm.active_list));BUG_ON (!list_empty (&dev_priv->mm.flushing_list)); -BUG_ON (!list_empty (&dev_priv->mm.inactive_list));mutex_unlock (&dev->struct_mutex); ret =drm_irq_install (dev);
drivers/gpu/drm/i915/i915_reg.h +1 -1
@@ -513,7 +513,7 @@*/ # define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14)#define _3D_CHICKEN3 0x02090 -#define _3D_CHICKEN_SF_DISABLE_FASTCLIP_CULL (1 << 5) +#define _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL (1 << 5)#define MI_MODE 0x0209c# define VS_TIMER_DISPATCH (1 << 6)
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -4351,7 +4351,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,/* default to 8bpc */ pipeconf &= ~(PIPECONF_BPP_MASK |PIPECONF_DITHER_EN );if (is_dp) { -if (mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ) { +if (adjusted_mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ) { pipeconf |=PIPECONF_BPP_6 |PIPECONF_DITHER_EN |PIPECONF_DITHER_TYPE_SP ;
@@ -4705,7 +4705,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,/* determine panel color depth */ temp =I915_READ (PIPECONF (pipe)); temp &= ~PIPE_BPC_MASK ; - dither =intel_choose_pipe_bpp_dither (crtc, &pipe_bpp, mode); + dither =intel_choose_pipe_bpp_dither (crtc, &pipe_bpp, adjusted_mode);switch (pipe_bpp) {case 18 : temp |=PIPE_6BPC ;
drivers/gpu/drm/i915/intel_pm.c +2 -2
@@ -3355,8 +3355,8 @@ static void gen6_init_clock_gating(struct drm_device *dev) GEN6_RCCUNIT_CLOCK_GATE_DISABLE);/* Bspec says we need to always set all mask bits. */ -I915_WRITE (_3D_CHICKEN, (0xFFFF <<16 ) | - _3D_CHICKEN_SF_DISABLE_FASTCLIP_CULL); +I915_WRITE (_3D_CHICKEN3, (0xFFFF <<16 ) | + _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL);/* * According to the spec the following bits should be
drivers/gpu/drm/radeon/radeon_legacy_encoders.c +1 -5
@@ -974,11 +974,7 @@ static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder,static void radeon_ext_tmds_enc_destroy (struct drm_encoder *encoder) {struct radeon_encoder *radeon_encoder =to_radeon_encoder (encoder); -struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; -if (tmds) { -if (tmds->i2c_bus) -radeon_i2c_destroy (tmds->i2c_bus); - } +/* don't destroy the i2c bus record here, this will be done in radeon_i2c_fini */ kfree (radeon_encoder->enc_priv);drm_encoder_cleanup (encoder);kfree (radeon_encoder);
drivers/md/raid10.c +1 -1
@@ -3158,7 +3158,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,else { bad_sectors -= (sector - first_bad);if (max_sync > bad_sectors) - max_sync = max_sync; + max_sync = bad_sectors;continue ; } }
drivers/mtd/nand/nand_base.c +3 -5
@@ -2914,8 +2914,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,if (le16_to_cpu (p->features) &1 ) *busw =NAND_BUSWIDTH_16 ; - chip->options &= ~NAND_CHIPOPTIONS_MSK ; - chip->options |=NAND_NO_READRDY &NAND_CHIPOPTIONS_MSK ; + chip->options |=NAND_NO_READRDY ;pr_info ("ONFI flash detected\n" );return 1 ;
@@ -3080,9 +3079,8 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, mtd->erasesize <<= ((id_data[3 ] &0x03 ) <<1 ); } } -/* Get chip options, preserve non chip based options */ - chip->options &= ~NAND_CHIPOPTIONS_MSK ; - chip->options |= type->options &NAND_CHIPOPTIONS_MSK ; +/* Get chip options */ + chip->options |= type->options;/* * Check if chip is not a Samsung device. Do not clear the
drivers/net/ethernet/intel/e1000e/e1000.h +3 -3
@@ -175,13 +175,13 @@ struct e1000_info;/* * in the case of WTHRESH, it appears at least the 82571/2 hardware * writes back 4 descriptors when WTHRESH=5, and 3 descriptors when -* WTHRESH=4, and since we want 64 bytes at a time written back, set -* it to 5 +* WTHRESH=4, so a setting of 5 gives the most efficient bus +* utilization but to avoid possible Tx stalls, set it to 1 */ #define E1000_TXDCTL_DMA_BURST_ENABLE \ (E1000_TXDCTL_GRAN |/* set descriptor granularity */ \E1000_TXDCTL_COUNT_DESC | \ - (5 <<16 ) |/* wthresh must be +1 more than desired */ \ + (1 <<16 ) |/* wthresh must be +1 more than desired */ \ (1 <<8 ) |/* hthresh */ \ 0x1f) /* pthresh */
drivers/net/ethernet/intel/e1000e/netdev.c +1 -1
@@ -2831,7 +2831,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)* set up some performance related parameters to encourage the * hardware to use the bus more efficiently in bursts, depends * on the tx_int_delay to be enabled, -* wthresh = 5 ==> burst write a cacheline (64 bytes) at a time +* wthresh = 1 ==> burst write is disabled to avoid Tx stalls * hthresh = 1 ==> prefetch when one or more available * pthresh = 0x1f ==> prefetch if internal cache 31 or less * BEWARE: this seems to work but should be considered first if
drivers/net/usb/mcs7830.c +21 -9
@@ -117,6 +117,7 @@ enum {struct mcs7830_data {u8 multi_filter[8 ];u8 config; +u8 link_counter; };static const char driver_name[] ="MOSCHIP usb-ethernet driver" ;
@@ -632,20 +633,31 @@ static int mcs7830_rx_fixup(struct usbnet *dev, struct sk_buff *skb)static void mcs7830_status (struct usbnet *dev,struct urb *urb) {u8 *buf = urb->transfer_buffer; -bool link; +bool link, link_changed; +struct mcs7830_data *data =mcs7830_get_data (dev);if (urb->actual_length <16 )return ; link = !(buf[1 ] &0x20 ); -if (netif_carrier_ok (dev->net) != link) { -if (link) { -netif_carrier_on (dev->net); -usbnet_defer_kevent (dev,EVENT_LINK_RESET ); - }else -netif_carrier_off (dev->net); -netdev_dbg (dev->net,"Link Status is: %d\n" , link); - } + link_changed =netif_carrier_ok (dev->net) != link; +if (link_changed) { + data->link_counter++; +/* +track link state 20 times to guard against erroneous +link state changes reported sometimes by the chip +*/ +if (data->link_counter >20 ) { + data->link_counter =0 ; +if (link) { +netif_carrier_on (dev->net); +usbnet_defer_kevent (dev,EVENT_LINK_RESET ); + }else +netif_carrier_off (dev->net); +netdev_dbg (dev->net,"Link Status is: %d\n" , link); + } + }else + data->link_counter =0 ; }static const struct driver_info moschip_info = {
drivers/net/wireless/ath/ath9k/beacon.c +1 -1
@@ -120,7 +120,7 @@ static void ath9k_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)if (ath_tx_start (hw, skb, &txctl) !=0 ) {ath_dbg (common,XMIT ,"CABQ TX failed\n" ); -dev_kfree_skb_any (skb); +ieee80211_free_txskb (hw, skb); } }
drivers/net/wireless/ath/ath9k/main.c +1 -1
@@ -767,7 +767,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)return ; exit: -dev_kfree_skb_any (skb); +ieee80211_free_txskb (hw, skb); }static void ath9k_stop (struct ieee80211_hw *hw)
drivers/net/wireless/ath/ath9k/xmit.c +29 -24
116 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_target.c +1 -1
@@ -1403,7 +1403,7 @@ static void qlt_24xx_send_task_mgmt_ctio(struct scsi_qla_host *ha, ctio->u.status1.scsi_status =__constant_cpu_to_le16 (SS_RESPONSE_INFO_LEN_VALID ); ctio->u.status1.response_len =__constant_cpu_to_le16 (8 ); - ((uint32_t *)ctio->u.status1.sense_data)[0 ] =cpu_to_be32 (resp_code); + ctio->u.status1.sense_data[0 ] = resp_code;qla2x00_start_iocbs (ha, ha->req); }
drivers/scsi/scsi_debug.c +1 -1
@@ -2054,7 +2054,7 @@ static void unmap_region(sector_t lba, unsigned int len) block = lba + alignment; rem =do_div (block, granularity); -if (rem ==0 && lba + granularity <= end && block < map_size) { +if (rem ==0 && lba + granularity < end && block < map_size) {clear_bit (block, map_storep);if (scsi_debug_lbprz) memset(fake_storep +
drivers/scsi/storvsc_drv.c +5 -0
@@ -1221,7 +1221,12 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)/* * At this point, all outstanding requests in the adapter * should have been flushed out and return to us +* There is a potential race here where the host may be in +* the process of responding when we return from here. +* Just wait for all in-transit packets to be accounted for +* before we return from here. */ +storvsc_wait_to_drain (stor_device);return SUCCESS ; }
drivers/scsi/virtio_scsi.c +1 -1
@@ -219,7 +219,7 @@ static int virtscsi_kick_event(struct virtio_scsi *vscsi,struct scatterlist sg;unsigned long flags; -sg_set_buf (&sg, &event_node->event,sizeof (struct virtio_scsi_event )); +sg_init_one (&sg, &event_node->event,sizeof (struct virtio_scsi_event ));spin_lock_irqsave (&vscsi->event_vq.vq_lock, flags);
drivers/target/iscsi/iscsi_target.c +1 -1
@@ -3271,7 +3271,6 @@ static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd) len +=1 ;if ((len + payload_len) > buffer_len) { -spin_unlock (&tiqn->tiqn_tpg_lock); end_of_buf =1 ; goto eob; }
@@ -3424,6 +3423,7 @@ static int iscsit_send_reject( hdr->opcode =ISCSI_OP_REJECT ; hdr->flags |=ISCSI_FLAG_CMD_FINAL ;hton24 (hdr->dlength,ISCSI_HDR_LEN ); + hdr->ffffffff =0xffffffff ; cmd->stat_sn = conn->stat_sn++; hdr->statsn =cpu_to_be32 (cmd->stat_sn); hdr->exp_cmdsn =cpu_to_be32 (conn->sess->exp_cmd_sn);
drivers/target/iscsi/iscsi_target_core.h +2 -2
@@ -25,10 +25,10 @@#define NA_DATAOUT_TIMEOUT_RETRIES 5#define NA_DATAOUT_TIMEOUT_RETRIES_MAX 15#define NA_DATAOUT_TIMEOUT_RETRIES_MIN 1 -#define NA_NOPIN_TIMEOUT 5 +#define NA_NOPIN_TIMEOUT 15#define NA_NOPIN_TIMEOUT_MAX 60#define NA_NOPIN_TIMEOUT_MIN 3 -#define NA_NOPIN_RESPONSE_TIMEOUT 5 +#define NA_NOPIN_RESPONSE_TIMEOUT 30#define NA_NOPIN_RESPONSE_TIMEOUT_MAX 60#define NA_NOPIN_RESPONSE_TIMEOUT_MIN 3#define NA_RANDOM_DATAIN_PDU_OFFSETS 0
drivers/target/iscsi/iscsi_target_tpg.c +12 -0
@@ -677,6 +677,12 @@ int iscsit_ta_generate_node_acls(pr_debug ("iSCSI_TPG[%hu] - Generate Initiator Portal Group ACLs: %s\n" , tpg->tpgt, (a->generate_node_acls) ?"Enabled" :"Disabled" ); +if (flag ==1 && a->cache_dynamic_acls ==0 ) { +pr_debug ("Explicitly setting cache_dynamic_acls=1 when " +"generate_node_acls=1\n" ); + a->cache_dynamic_acls =1 ; + } +return 0 ; }
@@ -716,6 +722,12 @@ int iscsit_ta_cache_dynamic_acls(return -EINVAL ; } +if (a->generate_node_acls ==1 && flag ==0 ) { +pr_debug ("Skipping cache_dynamic_acls=0 when" +" generate_node_acls=1\n" ); +return 0 ; + } + a->cache_dynamic_acls = flag; pr_debug("iSCSI_TPG[%hu] - Cache Dynamic Initiator Portal Group" " ACLs %s\n", tpg->tpgt, (a->cache_dynamic_acls) ?
drivers/target/target_core_configfs.c +7 -1
@@ -3132,6 +3132,7 @@ static int __init target_core_init_configfs(void) GFP_KERNEL);if (!target_cg->default_groups) {pr_err ("Unable to allocate target_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; }
@@ -3147,6 +3148,7 @@ static int __init target_core_init_configfs(void) GFP_KERNEL);if (!hba_cg->default_groups) {pr_err ("Unable to allocate hba_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; } config_group_init_type_name(&alua_group,
@@ -3162,6 +3164,7 @@ static int __init target_core_init_configfs(void) GFP_KERNEL);if (!alua_cg->default_groups) {pr_err ("Unable to allocate alua_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; }
@@ -3173,14 +3176,17 @@ static int __init target_core_init_configfs(void)* Add core/alua/lu_gps/default_lu_gp */ lu_gp =core_alua_allocate_lu_gp ("default_lu_gp" ,1 ); -if (IS_ERR (lu_gp)) +if (IS_ERR (lu_gp)) { + ret = -ENOMEM ; goto out_global; + } lu_gp_cg = &alua_lu_gps_group; lu_gp_cg->default_groups =kzalloc (sizeof (struct config_group ) *2 ,GFP_KERNEL );if (!lu_gp_cg->default_groups) {pr_err ("Unable to allocate lu_gp_cg->default_groups\n" ); + ret = -ENOMEM ; goto out_global; }
drivers/target/target_core_file.c +38 -3
77 lines not on this page · raw message
drivers/target/target_core_file.h +1 -0
@@ -14,6 +14,7 @@#define FBDF_HAS_PATH 0x01#define FBDF_HAS_SIZE 0x02 +#define FDBD_HAS_BUFFERED_IO_WCE 0x04struct fd_dev {u32 fbd_flags;
drivers/target/target_core_spc.c +13 -35
94 lines not on this page · raw message
drivers/tty/vt/vt.c +13 -0
@@ -3475,6 +3475,19 @@ int con_debug_enter(struct vc_data *vc) kdb_set(2, setargs); } } +if (vc->vc_cols <999 ) { +int colcount; +char cols[4 ]; +const char *setargs[3 ] = { +"set" , +"COLUMNS" , + cols, + }; +if (kdbgetintenv (setargs[0 ], &colcount)) { +snprintf (cols,4 ,"%i" , vc->vc_cols); +kdb_set (2 , setargs); + } + }#endif /* CONFIG_KGDB_KDB */ return ret; }
drivers/usb/class/cdc-acm.c +3 -0
@@ -1551,6 +1551,9 @@ static const struct usb_device_id acm_ids[] = {Maybe we should define a new quirk for this. */ }, + { USB_DEVICE(0x0572, 0x1340), /* Conexant CX93010-2x UCMxx */ + .driver_info =NO_UNION_NORMAL , + }, { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */ .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ },
drivers/usb/gadget/at91_udc.c +1 -1
@@ -1699,7 +1699,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)int retval;struct resource *res; -if (!dev->platform_data) { +if (!dev->platform_data && !pdev->dev.of_node) {/* small (so we copy it) but critical! */ DBG ("missing platform_data\n" );return -ENODEV ;
drivers/vfio/pci/vfio_pci_intrs.c +15 -3
@@ -366,6 +366,17 @@ static int vfio_intx_enable(struct vfio_pci_device *vdev)return -ENOMEM ; vdev->num_ctx =1 ; + +/* +* If the virtual interrupt is masked, restore it. Devices +* supporting DisINTx can be masked at the hardware level +* here, non-PCI-2.3 devices will have to wait until the +* interrupt is enabled. +*/ + vdev->ctx[0 ].masked = vdev->virq_disabled; +if (vdev->pci_2_3) +pci_intx (vdev->pdev, !vdev->ctx[0 ].masked); + vdev->irq_type =VFIO_PCI_INTX_IRQ_INDEX ;return 0 ;
@@ -400,25 +411,26 @@ static int vfio_intx_set_signal(struct vfio_pci_device *vdev, int fd)return PTR_ERR (trigger); } + vdev->ctx[0 ].trigger = trigger; +if (!vdev->pci_2_3) irqflags =0 ; ret =request_irq (pdev->irq, vfio_intx_handler, irqflags, vdev->ctx[0 ].name, vdev);if (ret) { + vdev->ctx[0 ].trigger =NULL ;kfree (vdev->ctx[0 ].name);eventfd_ctx_put (trigger);return ret; } - vdev->ctx[0 ].trigger = trigger; -/* * INTx disable will stick across the new irq setup, * disable_irq won't. */ spin_lock_irqsave (&vdev->irqlock, flags); -if (!vdev->pci_2_3 && (vdev->ctx[0 ].masked || vdev->virq_disabled)) +if (!vdev->pci_2_3 && vdev->ctx[0 ].masked)disable_irq_nosync (pdev->irq);spin_unlock_irqrestore (&vdev->irqlock, flags);
drivers/video/udlfb.c +1 -1
@@ -647,7 +647,7 @@ static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf, result =fb_sys_write (info, buf, count, ppos);if (result >0 ) { -int start =max ((int )(offset / info->fix.line_length) -1 ,0 ); +int start =max ((int )(offset / info->fix.line_length),0 );int lines =min ((u32)((result / info->fix.line_length) +1 ), (u32 )info->var.yres);
drivers/video/via/via_clock.c +19 -0
@@ -25,6 +25,7 @@#include <linux/kernel.h> #include <linux/via-core.h> +#include <asm/olpc.h> #include "via_clock.h" #include "global.h" #include "debug.h"
@@ -289,6 +290,10 @@ static void dummy_set_pll(struct via_pll_config config)printk (KERN_INFO "Using undocumented set PLL.\n%s" , via_slap); } +static void noop_set_clock_state (u8 state) +{ +} +void via_clock_init (struct via_clock *clock,int gfx_chip) {switch (gfx_chip) {
@@ -346,4 +351,18 @@ void via_clock_init(struct via_clock *clock, int gfx_chip)break ; } + +if (machine_is_olpc ()) { +/* The OLPC XO-1.5 cannot suspend/resume reliably if the +* IGA1/IGA2 clocks are set as on or off (memory rot +* occasionally happens during suspend under such +* configurations). +* +* The only known stable scenario is to leave this bits as-is, +* which in their default states are documented to enable the +* clock only when it is needed. +*/ + clock->set_primary_clock_state = noop_set_clock_state; + clock->set_secondary_clock_state = noop_set_clock_state; + } }
drivers/xen/xenbus/xenbus_xs.c +21 -0
@@ -47,6 +47,7 @@#include <xen/xenbus.h> #include <xen/xen.h> #include "xenbus_comms.h" +#include <asm/xen/hypervisor.h> struct xs_stored_msg {struct list_head list;
@@ -617,7 +618,24 @@ static struct xenbus_watch *find_watch(const char *token)return NULL ; } +/* +* Certain older XenBus toolstack cannot handle reading values that are +* not populated. Some Xen 3.4 installation are incapable of doing this +* so if we are running on anything older than 4 do not attempt to read +* control/platform-feature-xs_reset_watches. +*/ +static bool xen_strict_xenbus_quirk () +{ +uint32_t eax, ebx, ecx, edx, base; + + base =xen_cpuid_base (); +cpuid (base +1 , &eax, &ebx, &ecx, &edx); +if ((eax >>16 ) <4 ) +return true; +return false; + +}static void xs_reset_watches (void ) {int err, supported =0 ;
@@ -625,6 +643,9 @@ static void xs_reset_watches(void)if (!xen_hvm_domain ())return ; +if (xen_strict_xenbus_quirk ()) +return ; + err =xenbus_scanf (XBT_NIL ,"control" ,"platform-feature-xs_reset_watches" ,"%d" , &supported);if (err !=1 || !supported)
fs/autofs4/root.c +4 -2
@@ -392,10 +392,12 @@ static struct vfsmount *autofs4_d_automount(struct path *path) ino->flags |=AUTOFS_INF_PENDING ;spin_unlock (&sbi->fs_lock); status =autofs4_mount_wait (dentry); -if (status) -return ERR_PTR (status);spin_lock (&sbi->fs_lock); ino->flags &= ~AUTOFS_INF_PENDING ; +if (status) { +spin_unlock (&sbi->fs_lock); +return ERR_PTR (status); + } } done:if (!(ino->flags &AUTOFS_INF_EXPIRING )) {
fs/ceph/export.c +14 -4
@@ -99,7 +99,7 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len,* FIXME: we should try harder by querying the mds for the ino. */ static struct dentry *__fh_to_dentry (struct super_block *sb, -struct ceph_nfs_fh *fh) +struct ceph_nfs_fh *fh,int fh_len) {struct ceph_mds_client *mdsc =ceph_sb_to_client (sb)->mdsc;struct inode *inode;
@@ -107,6 +107,9 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,struct ceph_vino vino;int err; +if (fh_len <sizeof (*fh) /4 ) +return ERR_PTR (-ESTALE ); +dout ("__fh_to_dentry %llx\n" , fh->ino); vino.ino = fh->ino; vino.snap =CEPH_NOSNAP ;
@@ -150,7 +153,7 @@ static struct dentry *__fh_to_dentry(struct super_block *sb,* convert connectable fh to dentry */ static struct dentry *__cfh_to_dentry (struct super_block *sb, -struct ceph_nfs_confh *cfh) +struct ceph_nfs_confh *cfh,int fh_len) {struct ceph_mds_client *mdsc =ceph_sb_to_client (sb)->mdsc;struct inode *inode;
@@ -158,6 +161,9 @@ static struct dentry *__cfh_to_dentry(struct super_block *sb,struct ceph_vino vino;int err; +if (fh_len <sizeof (*cfh) /4 ) +return ERR_PTR (-ESTALE ); +dout ("__cfh_to_dentry %llx (%llx/%x)\n" , cfh->ino, cfh->parent_ino, cfh->parent_name_hash);
@@ -207,9 +213,11 @@ static struct dentry *ceph_fh_to_dentry(struct super_block *sb, struct fid *fid, int fh_len, int fh_type) {if (fh_type ==1 ) -return __fh_to_dentry (sb, (struct ceph_nfs_fh *)fid->raw); +return __fh_to_dentry (sb, (struct ceph_nfs_fh *)fid->raw, + fh_len);else -return __cfh_to_dentry (sb, (struct ceph_nfs_confh *)fid->raw); +return __cfh_to_dentry (sb, (struct ceph_nfs_confh *)fid->raw, + fh_len); }/*
@@ -230,6 +238,8 @@ static struct dentry *ceph_fh_to_parent(struct super_block *sb,if (fh_type ==1 )return ERR_PTR (-ESTALE ); +if (fh_len <sizeof (*cfh) /4 ) +return ERR_PTR (-ESTALE );pr_debug ("fh_to_parent %llx/%d\n" , cfh->parent_ino, cfh->parent_name_hash);
fs/gfs2/export.c +4 -0
@@ -161,6 +161,8 @@ static struct dentry *gfs2_fh_to_dentry(struct super_block *sb, struct fid *fid,case GFS2_SMALL_FH_SIZE :case GFS2_LARGE_FH_SIZE :case GFS2_OLD_FH_SIZE : +if (fh_len <GFS2_SMALL_FH_SIZE ) +return NULL ; this.no_formal_ino = ((u64 )be32_to_cpu (fh[0 ])) <<32 ; this.no_formal_ino |=be32_to_cpu (fh[1 ]); this.no_addr = ((u64 )be32_to_cpu (fh[2 ])) <<32 ;
@@ -180,6 +182,8 @@ static struct dentry *gfs2_fh_to_parent(struct super_block *sb, struct fid *fid,switch (fh_type) {case GFS2_LARGE_FH_SIZE :case GFS2_OLD_FH_SIZE : +if (fh_len <GFS2_LARGE_FH_SIZE ) +return NULL ; parent.no_formal_ino = ((u64 )be32_to_cpu (fh[4 ])) <<32 ; parent.no_formal_ino |=be32_to_cpu (fh[5 ]); parent.no_addr = ((u64 )be32_to_cpu (fh[6 ])) <<32 ;
fs/isofs/export.c +1 -1
@@ -175,7 +175,7 @@ static struct dentry *isofs_fh_to_parent(struct super_block *sb, {struct isofs_fid *ifid = (struct isofs_fid *)fid; -if (fh_type !=2 ) +if (fh_len <2 || fh_type !=2 )return NULL ; return isofs_export_iget(sb,
fs/jbd/commit.c +34 -11
58 lines not on this page · raw message
fs/jbd/transaction.c +44 -20
118 lines not on this page · raw message
fs/lockd/mon.c +69 -17
171 lines not on this page · raw message
fs/lockd/netns.h +4 -0
@@ -12,6 +12,10 @@ struct lockd_net {struct delayed_work grace_period_end;struct lock_manager lockd_manager;struct list_head grace_list; + +spinlock_t nsm_clnt_lock; +unsigned int nsm_users; +struct rpc_clnt *nsm_clnt; };extern int lockd_net_id;
fs/lockd/svc.c +1 -0
@@ -596,6 +596,7 @@ static int lockd_init_net(struct net *net)INIT_DELAYED_WORK (&ln->grace_period_end, grace_ender);INIT_LIST_HEAD (&ln->grace_list); +spin_lock_init (&ln->nsm_clnt_lock);return 0 ; }
fs/namei.c +1 -1
@@ -692,9 +692,9 @@ static inline int may_follow_link(struct path *link, struct nameidata *nd)if (parent->i_uid == inode->i_uid)return 0 ; +audit_log_link_denied ("follow_link" , link);path_put_conditional (link, nd);path_put (&nd->path); -audit_log_link_denied ("follow_link" , link);return -EACCES ; }
fs/nfs/blocklayout/blocklayout.c +165 -12
258 lines not on this page · raw message
fs/nfs/blocklayout/blocklayout.h +1 -0
@@ -41,6 +41,7 @@#define PAGE_CACHE_SECTORS (PAGE_CACHE_SIZE >> SECTOR_SHIFT)#define PAGE_CACHE_SECTOR_SHIFT (PAGE_CACHE_SHIFT - SECTOR_SHIFT) +#define SECTOR_SIZE (1 << SECTOR_SHIFT)struct block_mount_id {spinlock_t bm_lock;/* protects list */
fs/nfs/client.c +0 -1
@@ -855,7 +855,6 @@ static void nfs_server_set_fsinfo(struct nfs_server *server,if (server->wsize >NFS_MAX_FILE_IO_SIZE ) server->wsize =NFS_MAX_FILE_IO_SIZE ; server->wpages = (server->wsize +PAGE_CACHE_SIZE -1 ) >>PAGE_CACHE_SHIFT ; - server->pnfs_blksize = fsinfo->blksize; server->wtmult =nfs_block_bits (fsinfo->wtmult,NULL );
fs/nfs/nfs4proc.c +8 -1
@@ -1774,7 +1774,11 @@ static void nfs41_clear_delegation_stateid(struct nfs4_state *state)* informs us the stateid is unrecognized. */ if (status != -NFS4ERR_BAD_STATEID )nfs41_free_stateid (server, stateid); +nfs_remove_bad_delegation (state->inode); +write_seqlock (&state->seqlock); +nfs4_stateid_copy (&state->stateid, &state->open_stateid); +write_sequnlock (&state->seqlock);clear_bit (NFS_DELEGATED_STATE , &state->flags); } }
@@ -3362,8 +3366,11 @@ static int nfs4_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, snfs_fattr_init (fsinfo->fattr); error =nfs4_do_fsinfo (server, fhandle, fsinfo); -if (error ==0 ) +if (error ==0 ) { +/* block layout checks this! */ + server->pnfs_blksize = fsinfo->blksize;set_pnfs_layoutdriver (server, fhandle, fsinfo->layouttype); + }return error; }
fs/nfsd/nfs4idmap.c +1 -1
@@ -598,7 +598,7 @@ numeric_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namel/* Just to make sure it's null-terminated: */ memcpy (buf, name, namelen); buf[namelen] ='\0' ; - ret =kstrtouint (name,10 , id); + ret =kstrtouint (buf,10 , id);return ret ==0 ; }
fs/nfsd/nfs4state.c +18 -1
@@ -1223,10 +1223,26 @@ static bool groups_equal(struct group_info *g1, struct group_info *g2)return true; } +/* +* RFC 3530 language requires clid_inuse be returned when the +* "principal" associated with a requests differs from that previously +* used. We use uid, gid's, and gss principal string as our best +* approximation. We also don't want to allow non-gss use of a client +* established using gss: in theory cr_principal should catch that +* change, but in practice cr_principal can be null even in the gss case +* since gssd doesn't always pass down a principal string. +*/ +static bool is_gss_cred (struct svc_cred *cr) +{ +/* Is cr_flavor one of the gss "pseudoflavors"?: */ +return (cr->cr_flavor >RPC_AUTH_MAXFLAVOR ); +} + +static bool same_creds (struct svc_cred *cr1,struct svc_cred *cr2) { -if ((cr1->cr_flavor != cr2->cr_flavor) +if ((is_gss_cred (cr1) !=is_gss_cred (cr2)) || (cr1->cr_uid != cr2->cr_uid) || (cr1->cr_gid != cr2->cr_gid) || !groups_equal (cr1->cr_group_info, cr2->cr_group_info))
@@ -3766,6 +3782,7 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,memcpy (&close->cl_stateid, &stp->st_stid.sc_stateid,sizeof (stateid_t));nfsd4_close_open_stateid (stp); +release_last_closed_stateid (oo); oo->oo_last_closed_stid = stp;if (list_empty (&oo->oo_owner.so_stateids)) {
fs/reiserfs/inode.c +5 -1
@@ -1573,8 +1573,10 @@ struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid,reiserfs_warning (sb,"reiserfs-13077" ,"nfsd/reiserfs, fhtype=%d, len=%d - odd" , fh_type, fh_len); - fh_type =5 ; + fh_type = fh_len; } +if (fh_len <2 ) +return NULL ;return reiserfs_get_dentry (sb, fid->raw[0 ], fid->raw[1 ], (fh_type ==3 || fh_type >=5 ) ? fid->raw[2 ] :0 );
@@ -1583,6 +1585,8 @@ struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid,struct dentry *reiserfs_fh_to_parent (struct super_block *sb,struct fid *fid,int fh_len,int fh_type) { +if (fh_type > fh_len) + fh_type = fh_len;if (fh_type <4 )return NULL ;
fs/xfs/xfs_export.c +3 -0
@@ -189,6 +189,9 @@ xfs_fs_fh_to_parent(struct super_block *sb, struct fid *fid,struct xfs_fid64 *fid64 = (struct xfs_fid64 *)fid;struct inode *inode =NULL ; +if (fh_len <xfs_fileid_length (fileid_type)) +return NULL ; +switch (fileid_type) {case FILEID_INO32_GEN_PARENT : inode = xfs_nfs_get_inode(sb, fid->i32.parent_ino,
include/linux/mtd/nand.h +0 -3
@@ -212,9 +212,6 @@ typedef enum {#define NAND_SUBPAGE_READ (chip) ((chip->ecc.mode == NAND_ECC_SOFT) \ && (chip->page_shift > 9)) -/* Mask to zero out the chip options, which come from the id table */ -#define NAND_CHIPOPTIONS_MSK 0x0000ffff -/* Non chip related options */ /* This option skips the bbt scan during initialization. */ #define NAND_SKIP_BBTSCAN 0x00010000
kernel/audit.c +2 -0
@@ -1466,6 +1466,8 @@ void audit_log_link_denied(const char *operation, struct path *link) ab =audit_log_start (current->audit_context,GFP_KERNEL ,AUDIT_ANOM_LINK ); +if (!ab) +return ;audit_log_format (ab,"op=%s action=denied" , operation);audit_log_format (ab," pid=%d comm=" , current->pid);audit_log_untrustedstring (ab, current->comm);
kernel/debug/kdb/kdb_io.c +28 -5
@@ -552,6 +552,7 @@ int vkdb_printf(const char *fmt, va_list ap) {int diag;int linecount; +int colcount;int logging, saved_loglevel =0 ;int saved_trap_printk;int got_printf_lock =0 ;
@@ -584,6 +585,10 @@ int vkdb_printf(const char *fmt, va_list ap)if (diag || linecount <=1 ) linecount =24 ; + diag =kdbgetintenv ("COLUMNS" , &colcount); +if (diag || colcount <=1 ) + colcount =80 ; + diag =kdbgetintenv ("LOGGING" , &logging);if (diag) logging =0 ;
@@ -690,7 +695,7 @@ kdb_printit:gdbstub_msg_write (kdb_buffer, retlen); }else {if (dbg_io_ops && !dbg_io_ops->is_console) { - len =strlen (kdb_buffer); + len = retlen; cp = kdb_buffer;while (len--) { dbg_io_ops->write_char (*cp);
@@ -709,11 +714,29 @@ kdb_printit:printk (KERN_INFO "%s" , kdb_buffer); } -if (KDB_STATE (PAGER ) &&strchr (kdb_buffer,'\n' )) - kdb_nextline++; +if (KDB_STATE (PAGER )) { +/* +* Check printed string to decide how to bump the +* kdb_nextline to control when the more prompt should +* show up. +*/ +int got =0 ; + len = retlen; +while (len--) { +if (kdb_buffer[len] =='\n' ) { + kdb_nextline++; + got =0 ; + }else if (kdb_buffer[len] =='\r' ) { + got =0 ; + }else { + got++; + } + } + kdb_nextline += got / (colcount +1 ); + }/* check for having reached the LINES number of printed lines */ -if (kdb_nextline == linecount) { +if (kdb_nextline >= linecount) {char buf1[16 ] ="" ;/* Watch out for recursion here. Any routine that calls
@@ -765,7 +788,7 @@ kdb_printit: kdb_grepping_flag =0 ;kdb_printf ("\n" ); }else if (buf1[0 ] ==' ' ) { -kdb_printf ("\n" ); +kdb_printf ("\r" ); suspend_grep =1 ;/* for this recursion */ }else if (buf1[0 ] =='\n' ) { kdb_nextline = linecount -1 ;
kernel/module.c +4 -0
@@ -2730,6 +2730,10 @@ static int check_module_license_and_versions(struct module *mod)if (strcmp (mod->name,"driverloader" ) ==0 )add_taint_module (mod,TAINT_PROPRIETARY_MODULE ); +/* lve claims to be GPL but upstream won't provide source */ +if (strcmp (mod->name,"lve" ) ==0 ) +add_taint_module (mod,TAINT_PROPRIETARY_MODULE ); +#ifdef CONFIG_MODVERSIONS if ((mod->num_syms && !mod->crcs) || (mod->num_gpl_syms && !mod->gpl_crcs)
kernel/time/tick-sched.c +1 -1
@@ -835,7 +835,7 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)*/ if (ts->tick_stopped) {touch_softlockup_watchdog (); -if (idle_cpu (cpu)) +if (is_idle_task (current)) ts->idle_jiffies++; }update_process_times (user_mode (regs));
kernel/time/timekeeping.c +1 -1
@@ -1111,7 +1111,7 @@ static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t offset,accumulate_nsecs_to_secs (tk);/* Accumulate raw time */ - raw_nsecs = tk->raw_interval << shift; + raw_nsecs = (u64 )tk->raw_interval << shift; raw_nsecs += tk->raw_time.tv_nsec;if (raw_nsecs >=NSEC_PER_SEC ) {u64 raw_secs = raw_nsecs;
kernel/timer.c +6 -4
@@ -63,6 +63,7 @@ EXPORT_SYMBOL(jiffies_64);#define TVR_SIZE (1 << TVR_BITS)#define TVN_MASK (TVN_SIZE - 1)#define TVR_MASK (TVR_SIZE - 1) +#define MAX_TVAL ((unsigned long)((1ULL << (TVR_BITS + 4*TVN_BITS)) - 1))struct tvec {struct list_head vec[TVN_SIZE ];
@@ -358,11 +359,12 @@ __internal_add_timer(struct tvec_base *base, struct timer_list *timer) vec = base->tv1.vec + (base->timer_jiffies &TVR_MASK ); }else {int i; -/* If the timeout is larger than 0xffffffff on 64-bit -* architectures then we use the maximum timeout: +/* If the timeout is larger than MAX_TVAL (on 64-bit +* architectures or with CONFIG_BASE_SMALL=1) then we +* use the maximum timeout. */ -if (idx >0xffffffffUL ) { - idx =0xffffffffUL ; +if (idx >MAX_TVAL ) { + idx =MAX_TVAL ; expires = idx + base->timer_jiffies; } i = (expires >> (TVR_BITS +3 *TVN_BITS )) &TVN_MASK ;
mm/shmem.c +4 -2
@@ -2366,12 +2366,14 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb, {struct inode *inode;struct dentry *dentry =NULL ; -u64 inum = fid->raw[2 ]; - inum = (inum <<32 ) | fid->raw[1 ]; +u64 inum;if (fh_len <3 )return NULL ; + inum = fid->raw[2 ]; + inum = (inum <<32 ) | fid->raw[1 ]; + inode =ilookup5 (sb, (unsigned long )(inum + fid->raw[0 ]), shmem_match, fid->raw);if (inode) {
net/core/pktgen.c +1 -1
@@ -2927,7 +2927,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,sizeof (struct ipv6hdr ) -sizeof (struct udphdr ) - pkt_dev->pkt_overhead; -if (datalen <sizeof (struct pktgen_hdr )) { +if (datalen <0 || datalen <sizeof (struct pktgen_hdr )) { datalen =sizeof (struct pktgen_hdr );net_info_ratelimited ("increased datalen to %d\n" , datalen); }
net/mac80211/status.c +2 -2
@@ -34,7 +34,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,skb_queue_len (&local->skb_queue_unreliable);while (tmp >IEEE80211_IRQSAFE_QUEUE_LIMIT && (skb =skb_dequeue (&local->skb_queue_unreliable))) { -dev_kfree_skb_irq (skb); +ieee80211_free_txskb (hw, skb); tmp--;I802_DEBUG_INC (local->tx_status_drop); }
@@ -159,7 +159,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,"dropped TX filtered frame, queue_len=%d PS=%d @%lu\n" ,skb_queue_len (&sta->tx_filtered[ac]), !!test_sta_flag(sta, WLAN_STA_PS_STA), jiffies); -dev_kfree_skb (skb); +ieee80211_free_txskb (&local->hw, skb); }static void ieee80211_check_pending_bar (struct sta_info *sta,u8 *addr,u8 tid)
net/mac80211/tx.c +12 -10
@@ -354,7 +354,7 @@ static void purge_old_ps_buffers(struct ieee80211_local *local) total +=skb_queue_len (&sta->ps_tx_buf[ac]);if (skb) { purged++; -dev_kfree_skb (skb); +ieee80211_free_txskb (&local->hw, skb);break ; } }
@@ -466,7 +466,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)ps_dbg (tx->sdata,"STA %pM TX buffer for AC %d full - dropping oldest frame\n" , sta->sta.addr, ac); -dev_kfree_skb (old); +ieee80211_free_txskb (&local->hw, old); }else tx->local->total_ps_buffered++;
@@ -1103,7 +1103,7 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,spin_unlock (&tx->sta->lock);if (purge_skb) -dev_kfree_skb (purge_skb); +ieee80211_free_txskb (&tx->local->hw, purge_skb); }/* reset session timer */
@@ -1214,7 +1214,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,#ifdef CONFIG_MAC80211_VERBOSE_DEBUG if (WARN_ON_ONCE (q >= local->hw.queues)) {__skb_unlink (skb, skbs); -dev_kfree_skb (skb); +ieee80211_free_txskb (&local->hw, skb);continue ; }#endif
@@ -1356,7 +1356,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx)if (unlikely (res ==TX_DROP )) {I802_DEBUG_INC (tx->local->tx_handlers_drop);if (tx->skb) -dev_kfree_skb (tx->skb); +ieee80211_free_txskb (&tx->local->hw, tx->skb);else __skb_queue_purge (&tx->skbs);return -1 ;
@@ -1393,7 +1393,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata, res_prepare =ieee80211_tx_prepare (sdata, &tx, skb);if (unlikely (res_prepare ==TX_DROP )) { -dev_kfree_skb (skb); +ieee80211_free_txskb (&local->hw, skb); goto out; }else if (unlikely (res_prepare ==TX_QUEUED )) { goto out;
@@ -1466,7 +1466,7 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) headroom =max_t (int,0 , headroom);if (ieee80211_skb_resize (sdata, skb, headroom, may_encrypt)) { -dev_kfree_skb (skb); +ieee80211_free_txskb (&local->hw, skb);rcu_read_unlock ();return ; }
@@ -2060,8 +2060,10 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, head_need +=IEEE80211_ENCRYPT_HEADROOM ; head_need += local->tx_headroom; head_need =max_t (int,0 , head_need); -if (ieee80211_skb_resize (sdata, skb, head_need, true)) - goto fail; +if (ieee80211_skb_resize (sdata, skb, head_need, true)) { +ieee80211_free_txskb (&local->hw, skb); +return NETDEV_TX_OK ; + } }if (encaps_data) {
@@ -2196,7 +2198,7 @@ void ieee80211_tx_pending(unsigned long data)struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb);if (WARN_ON (!info->control.vif)) { -kfree_skb (skb); +ieee80211_free_txskb (&local->hw, skb);continue ; }
net/sunrpc/xprtsock.c +16 -5
@@ -1025,6 +1025,16 @@ static void xs_udp_data_ready(struct sock *sk, int len)read_unlock_bh (&sk->sk_callback_lock); } +/* +* Helper function to force a TCP close if the server is sending +* junk and/or it has put us in CLOSE_WAIT +*/ +static void xs_tcp_force_close (struct rpc_xprt *xprt) +{ +set_bit (XPRT_CONNECTION_CLOSE , &xprt->state); +xprt_force_disconnect (xprt); +} +static inline void xs_tcp_read_fraghdr (struct rpc_xprt *xprt,struct xdr_skb_reader *desc) { struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
@@ -1051,7 +1061,7 @@ static inline void xs_tcp_read_fraghdr(struct rpc_xprt *xprt, struct xdr_skb_rea/* Sanity check of the record length */ if (unlikely (transport->tcp_reclen <8 )) {dprintk ("RPC: invalid TCP record fragment length\n" ); -xprt_force_disconnect (xprt); +xs_tcp_force_close (xprt);return ; } dprintk("RPC: reading TCP record fragment of length %d\n",
@@ -1132,7 +1142,7 @@ static inline void xs_tcp_read_calldir(struct sock_xprt *transport,break ;default :dprintk ("RPC: invalid request message type\n" ); -xprt_force_disconnect (&transport->xprt); +xs_tcp_force_close (&transport->xprt); }xs_tcp_check_fraghdr (transport); }
@@ -1455,6 +1465,8 @@ static void xs_tcp_cancel_linger_timeout(struct rpc_xprt *xprt)static void xs_sock_mark_closed (struct rpc_xprt *xprt) {smp_mb__before_clear_bit (); +clear_bit (XPRT_CONNECTION_ABORT , &xprt->state); +clear_bit (XPRT_CONNECTION_CLOSE , &xprt->state);clear_bit (XPRT_CLOSE_WAIT , &xprt->state);clear_bit (XPRT_CLOSING , &xprt->state);smp_mb__after_clear_bit ();
@@ -1512,8 +1524,8 @@ static void xs_tcp_state_change(struct sock *sk)break ;case TCP_CLOSE_WAIT :/* The server initiated a shutdown of the socket */ -xprt_force_disconnect (xprt); xprt->connect_cookie++; +xs_tcp_force_close (xprt);case TCP_CLOSING :/* * If the server closed down the connection, make sure that
@@ -2199,8 +2211,7 @@ static void xs_tcp_setup_socket(struct work_struct *work)/* We're probably in TIME_WAIT. Get rid of existing socket, * and retry */ -set_bit (XPRT_CONNECTION_CLOSE , &xprt->state); -xprt_force_disconnect (xprt); +xs_tcp_force_close (xprt);break ;case -ECONNREFUSED :case -ECONNRESET :
scripts/Makefile.fwinst +2 -2
@@ -27,7 +27,7 @@ endif installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) -installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/. +installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./ # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs
@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) $(installed-fw-dirs): $(call cmd,mkdir) -$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%) +$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %) $(call cmd,install) PHONY += __fw_install __fw_modinst FORCE
sound/pci/ac97/ac97_codec.c +2 -0
@@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigne tmp.index = ac97->num; kctl =snd_ctl_new1 (&tmp, ac97); } +if (!kctl) +return -ENOMEM ;if (reg >=AC97_PHONE && reg <=AC97_PCM )set_tlv_db_scale (kctl, db_scale_5bit_12db_max);else
sound/pci/emu10k1/emu10k1_main.c +9 -0
@@ -1416,6 +1416,15 @@ static struct snd_emu_chip_details emu_chip_details[] = { .ca0108_chip = 1, .spk71 = 1, .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */ +/* Tested by Maxim Kachur <[email protected]> 17th Oct 2012. */ +/* This is MAEM8986, 0202 is MAEM8980 */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102, + .driver = "Audigy2", .name = "E-mu 1010 PCIe [MAEM8986]", + .id = "EMU1010", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 PCIe */ /* Tested by [email protected] 8th July 2005. */ /* This is MAEM8810, 0202 is MAEM8820 */ {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102,
sound/pci/hda/hda_intel.c +26 -14
@@ -487,6 +487,7 @@ struct azx {/* VGA-switcheroo setup */ unsigned int use_vga_switcheroo:1; + unsigned int vga_switcheroo_registered:1; unsigned int init_failed:1; /* delayed init failed */ unsigned int disabled:1; /* disabled by VGA-switcher */
@@ -2135,9 +2136,12 @@ static unsigned int azx_get_position(struct azx *chip,if (delay <0 ) delay += azx_dev->bufsize;if (delay >= azx_dev->period_bytes) { -snd_printdd ("delay %d > period_bytes %d\n" , - delay, azx_dev->period_bytes); - delay =0 ;/* something is wrong */ + snd_printk(KERN_WARNING SFX +"Unstable LPIB (%d >= %d); " +"disabling LPIB delay counting\n" , + delay, azx_dev->period_bytes); + delay =0 ; + chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY ; } azx_dev->substream->runtime->delay =bytes_to_frames (azx_dev->substream->runtime, delay);
@@ -2556,7 +2560,9 @@ static void azx_vs_set_state(struct pci_dev *pci,if (disabled) {azx_suspend (&pci->dev); chip->disabled = true; -snd_hda_lock_devices (chip->bus); +if (snd_hda_lock_devices (chip->bus)) + snd_printk(KERN_WARNING SFX +"Cannot lock devices!\n" ); }else {snd_hda_unlock_devices (chip->bus); chip->disabled = false;
@@ -2599,14 +2605,20 @@ static const struct vga_switcheroo_client_ops azx_vs_ops = {static int __devinit register_vga_switcheroo (struct azx *chip) { +int err; +if (!chip->use_vga_switcheroo)return 0 ;/* FIXME: currently only handling DIS controller * is there any machine with two switchable HDMI audio controllers? */ -return vga_switcheroo_register_audio_client (chip->pci, &azx_vs_ops, + err =vga_switcheroo_register_audio_client (chip->pci, &azx_vs_ops,VGA_SWITCHEROO_DIS , chip->bus !=NULL ); +if (err <0 ) +return err; + chip->vga_switcheroo_registered =1 ; +return 0 ; }#else #define init_vga_switcheroo (chip)/* NOP */
@@ -2626,7 +2638,8 @@ static int azx_free(struct azx *chip)if (use_vga_switcheroo (chip)) {if (chip->disabled && chip->bus)snd_hda_unlock_devices (chip->bus); -vga_switcheroo_unregister_client (chip->pci); +if (chip->vga_switcheroo_registered) +vga_switcheroo_unregister_client (chip->pci); }if (chip->initialized) {
@@ -2974,14 +2987,6 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, } ok: - err =register_vga_switcheroo (chip); -if (err <0 ) { - snd_printk(KERN_ERR SFX - "Error registering VGA-switcheroo client\n"); -azx_free (chip); -return err; - } - err =snd_device_new (card,SNDRV_DEV_LOWLEVEL , chip, &ops);if (err <0 ) { snd_printk(KERN_ERR SFX "Error creating device [card]!\n");
@@ -3208,6 +3213,13 @@ static int __devinit azx_probe(struct pci_dev *pci,pci_set_drvdata (pci, card); + err =register_vga_switcheroo (chip); +if (err <0 ) { + snd_printk(KERN_ERR SFX + "Error registering VGA-switcheroo client\n"); + goto out_free; + } + dev++;return 0 ;
sound/pci/hda/patch_cirrus.c +3 -3
@@ -1417,7 +1417,7 @@ static int patch_cs420x(struct hda_codec *codec)return 0 ; error: -kfree (codec->spec); +cs_free (codec); codec->spec =NULL ;return err; }
@@ -1974,7 +1974,7 @@ static int patch_cs4210(struct hda_codec *codec)return 0 ; error: -kfree (codec->spec); +cs_free (codec); codec->spec =NULL ;return err; }
@@ -1999,7 +1999,7 @@ static int patch_cs4213(struct hda_codec *codec)return 0 ; error: -kfree (codec->spec); +cs_free (codec); codec->spec =NULL ;return err; }
sound/pci/hda/patch_realtek.c +5 -1
@@ -611,6 +611,8 @@ static void alc_line_automute(struct hda_codec *codec) {struct alc_spec *spec = codec->spec; +if (spec->autocfg.line_out_type ==AUTO_PIN_SPEAKER_OUT ) +return ;/* check LO jack only when it's different from HP */ if (spec->autocfg.line_out_pins[0 ] == spec->autocfg.hp_pins[0 ])return ;
@@ -2627,8 +2629,10 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch,return "PCM" ;break ; } -if (snd_BUG_ON (ch >=ARRAY_SIZE (channel_name))) +if (ch >=ARRAY_SIZE (channel_name)) { +snd_BUG ();return "PCM" ; + }return channel_name[ch]; }
sound/pci/hda/patch_via.c +4 -0
@@ -118,6 +118,8 @@ enum { };struct via_spec { +struct hda_gen_spec gen; +/* codec parameterization */ const struct snd_kcontrol_new *mixers[6 ];unsigned int num_mixers;
@@ -246,6 +248,7 @@ static struct via_spec * via_new_spec(struct hda_codec *codec)/* VT1708BCE & VT1708S are almost same */ if (spec->codec_type ==VT1708BCE ) spec->codec_type =VT1708S ; +snd_hda_gen_init (&spec->gen);return spec; }
@@ -1628,6 +1631,7 @@ static void via_free(struct hda_codec *codec)vt1708_stop_hp_work (spec);kfree (spec->bind_cap_vol);kfree (spec->bind_cap_sw); +snd_hda_gen_free (&spec->gen);kfree (spec); }
sound/soc/codecs/wm2200.c +2 -1
@@ -1028,7 +1028,7 @@ SOC_DOUBLE_R_TLV("OUT2 Digital Volume", WM2200_DAC_DIGITAL_VOLUME_2L, WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0, digital_tlv), SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT, - WM2200_SPK1R_MUTE_SHIFT, 1, 0), + WM2200_SPK1R_MUTE_SHIFT, 1, 1), };WM2200_MIXER_ENUMS (OUT1L ,WM2200_OUT1LMIX_INPUT_1_SOURCE );
@@ -2091,6 +2091,7 @@ static __devinit int wm2200_i2c_probe(struct i2c_client *i2c,switch (wm2200->rev) {case 0 : +case 1 : ret =regmap_register_patch (wm2200->regmap, wm2200_reva_patch,ARRAY_SIZE (wm2200_reva_patch));if (ret !=0 ) {
sound/soc/omap/omap-abe-twl6040.c +1 -1
@@ -190,7 +190,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)twl6040_disconnect_pin (dapm, pdata->has_hf,"Ext Spk" );twl6040_disconnect_pin (dapm, pdata->has_ep,"Earphone Spk" );twl6040_disconnect_pin (dapm, pdata->has_aux,"Line Out" ); -twl6040_disconnect_pin (dapm, pdata->has_vibra,"Vinrator" ); +twl6040_disconnect_pin (dapm, pdata->has_vibra,"Vibrator" );twl6040_disconnect_pin (dapm, pdata->has_hsmic,"Headset Mic" );twl6040_disconnect_pin (dapm, pdata->has_mainmic,"Main Handset Mic" );twl6040_disconnect_pin (dapm, pdata->has_submic,"Sub Handset Mic" );
sound/soc/sh/fsi.c +8 -7
@@ -20,6 +20,7 @@#include <linux/sh_dma.h> #include <linux/slab.h> #include <linux/module.h> +#include <linux/workqueue.h> #include <sound/soc.h> #include <sound/sh_fsi.h>
@@ -223,7 +224,7 @@ struct fsi_stream {*/ struct dma_chan *chan;struct sh_dmae_slave slave;/* see fsi_handler_init() */ -struct tasklet_struct tasklet; +struct work_struct work;dma_addr_t dma; };
@@ -1085,9 +1086,9 @@ static void fsi_dma_complete(void *data)snd_pcm_period_elapsed (io->substream); } -static void fsi_dma_do_tasklet (unsigned long data) +static void fsi_dma_do_work (struct work_struct *work) { -struct fsi_stream *io = (struct fsi_stream *)data; + struct fsi_stream *io = container_of(work, struct fsi_stream, work);struct fsi_priv *fsi =fsi_stream_to_priv (io);struct snd_soc_dai *dai;struct dma_async_tx_descriptor *desc;
@@ -1129,7 +1130,7 @@ static void fsi_dma_do_tasklet(unsigned long data)* FIXME * * In DMAEngine case, codec and FSI cannot be started simultaneously -* since FSI is using tasklet. +* since FSI is using the scheduler work queue. * Therefore, in capture case, probably FSI FIFO will have got * overflow error in this point. * in that case, DMA cannot start transfer until error was cleared.
@@ -1153,7 +1154,7 @@ static bool fsi_dma_filter(struct dma_chan *chan, void *param)static int fsi_dma_transfer (struct fsi_priv *fsi,struct fsi_stream *io) { -tasklet_schedule (&io->tasklet); +schedule_work (&io->work);return 0 ; }
@@ -1195,14 +1196,14 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct devreturn fsi_stream_probe (fsi, dev); } -tasklet_init (&io->tasklet, fsi_dma_do_tasklet, (unsigned long )io); +INIT_WORK (&io->work, fsi_dma_do_work);return 0 ; }static int fsi_dma_remove (struct fsi_priv *fsi,struct fsi_stream *io) { -tasklet_kill (&io->tasklet); +cancel_work_sync (&io->work);fsi_stream_stop (fsi, io);