Linux 3.1.10
I'm announcing the release of the 3.1.10 kernel.
All users of the 3.1 kernel series must upgrade.
This is the LAST release of the 3.1 kernel series, please move to the 3.2 kernel series at this time. Again, 3.1.y is end-of-life.
The updated 3.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.1.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
------------
Documentation/virtual/kvm/api.txt | 7 ++ Makefile | 2 arch/x86/include/asm/amd_nb.h | 2 arch/x86/kernel/amd_nb.c | 31 +++++++++ arch/x86/kernel/kvmclock.c | 5 - arch/x86/kvm/i8254.c | 10 ++ arch/x86/mm/mmap.c | 4 - arch/x86/pci/Makefile | 3 arch/x86/pci/acpi.c | 18 ++++- arch/x86/pci/amd_bus.c | 42 +++--------- drivers/gpu/drm/radeon/r100.c | 5 - drivers/gpu/drm/radeon/r600_hdmi.c | 7 ++ drivers/gpu/drm/radeon/radeon_device.c | 5 + drivers/gpu/drm/radeon/rs600.c | 4 - drivers/hid/hid-core.c | 2 drivers/md/raid1.c | 11 ++- drivers/mtd/mtd_blkdevs.c | 3 drivers/mtd/mtdoops.c | 5 + drivers/mtd/tests/mtd_stresstest.c | 7 ++ drivers/mtd/ubi/eba.c | 6 + drivers/mtd/ubi/ubi.h | 2 drivers/mtd/ubi/wl.c | 12 ++- drivers/net/wireless/rtlwifi/rtl8192se/fw.c | 4 + drivers/pci/msi.c | 10 ++ drivers/platform/x86/ideapad-laptop.c | 2 drivers/pnp/quirks.c | 42 ++++++++++++ drivers/rtc/interface.c | 4 - drivers/scsi/mpt2sas/mpt2sas_base.c | 83 +++++++----------------- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 11 +-- drivers/xen/xenbus/xenbus_xs.c | 6 + fs/ext4/super.c | 7 -- fs/nfs/callback_proc.c | 2 fs/nfs/file.c | 4 - fs/nfs/nfs4proc.c | 96 ++++++++++++++++------------ fs/nfs/nfs4xdr.c | 31 ++++++--- fs/nfs/super.c | 43 +++++------- include/linux/memcontrol.h | 6 + include/linux/nfs_xdr.h | 5 + include/linux/pci_regs.h | 2 include/linux/sunrpc/xdr.h | 2 include/xen/interface/io/xs_wire.h | 3 init/do_mounts.c | 35 +++++++++- mm/filemap.c | 18 ----- mm/memcontrol.c | 44 ++++++++++++ mm/slub.c | 5 + net/mac80211/wpa.c | 2 net/sunrpc/xdr.c | 3 security/integrity/ima/ima_api.c | 4 - security/integrity/ima/ima_queue.c | 17 +++- sound/pci/hda/hda_local.h | 7 +- sound/pci/hda/hda_proc.c | 2 sound/pci/hda/patch_cirrus.c | 27 ++----- sound/pci/hda/patch_conexant.c | 2 sound/pci/hda/patch_sigmatel.c | 36 ++++++---- sound/pci/hda/patch_via.c | 5 + sound/pci/ice1712/amp.c | 7 +- sound/usb/usx2y/usb_stream.c | 6 - virt/kvm/assigned-dev.c | 93 ++++++++++++++++++++++++--- 58 files changed, 589 insertions(+), 280 deletions(-)
Alex Deucher (1):
drm/radeon/kms: disable writeback on pre-R300 asics
Alex Williamson (3):
KVM: Remove ability to assign a device without iommu support
KVM: Device assignment permission checks
PCI: Fix PCI_EXP_TYPE_RC_EC value
Andy Adamson (2):
NFSv4.1: fix backchannel slotid off-by-one bug
NFSv4: include bitmap in nfsv4 get acl data
Artem Bityutskiy (1):
UBI: fix use-after-free on error path
Avi Kivity (1):
KVM guest: prevent tracing recursion with kvmclock
Ben Hutchings (1):
drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range
Bhavesh Parekh (1):
UBI: fix missing scrub when there is a bit-flip
Bjorn Helgaas (3):
x86/PCI: amd: factor out MMCONFIG discovery
x86/PCI: build amd_bus.o only when CONFIG_AMD_NB=y
PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
Brian Norris (1):
mtd: mtd_blkdevs: don't increase 'open' count on error path
Chase Douglas (1):
HID: bump maximum global item tag report size to 96 bytes
Chuck Lever (1):
NFS: Retry mounting NFSROOT
David Henningsson (2):
ALSA: HDA: Fix master control for Cirrus Logic 421X
ALSA: HDA: Fix automute for Cirrus Logic 421x
Eric Dumazet (1):
slub: fix a possible memleak in __slab_alloc()
Eric W. Biederman (1):
PCI: msi: Disable msi interrupts when we initialize a pci device
Gary Hade (1):
x86/PCI: Ignore CPU non-addressable _CRS reserved memory resources
Greg Kroah-Hartman (1):
Linux 3.1.10
Ian Campbell (1):
xen/xenbus: Reject replies with payload > XENSTORE_PAYLOAD_MAX.
Jan Kiszka (1):
KVM: x86: Prevent starting PIT timers in the absence of irqchip support
Jeff Layton (1):
nfs: fix regression in handling of context= option in NFSv4
KAMEZAWA Hiroyuki (1):
memcg: add mem_cgroup_replace_page_cache() to fix LRU issue
Karsten Wiese (1):
ALSA: snd-usb-us122l: Delete calls to preempt_disable
Larry Finger (1):
rtl8192se: Fix BUG caused by failure to check skb allocation
Ludwig Nussel (1):
x86: Fix mmap random address range
Michel Dänzer (1):
radeon: Fix disabling PCI bus mastering on big endian hosts.
NeilBrown (2):
NFS - fix recent breakage to NFS error handling. md/raid1: perform bad-block tests for WriteMostly devices too.
Pavel Hofman (1):
ALSA: ice1724 - Check for ac97 to avoid kernel oops
Rafał Miłecki (1):
drm/radeon/kms: workaround invalid AVI infoframe checksum issue
Rene Bollford (1):
ideapad: Check if acpi already handle backlight power to avoid a page fault
Roberto Sassu (2):
ima: free duplicate measurement memory
ima: fix invalid memory reference
Roman Tereshonkov (2):
mtdoops: fix the oops_page_used array size
mtd: mtdoops: skip reading initially bad blocks
Stanislaw Gruszka (1):
mac80211: fix rx->key NULL pointer dereference in promiscuous mode
Takashi Iwai (4):
ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
Wolfram Sang (1):
mtd: tests: stresstest: bail out if device has not enough eraseblocks
Xi Wang (1):
ext4: fix undefined behavior in ext4_fill_flex_info()
[email protected] (2):
SCSI: mpt2sas: Release spinlock for the raid device list before blocking it
SCSI: mpt2sas : Fix for memory allocation error for large host credits
Documentation/virtual/kvm/api.txt +7 -0
@@ -1131,6 +1131,13 @@ following flags are specified: /* Depends on KVM_CAP_IOMMU */ #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) +The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure +isolation of the device. Usages not specifying this flag are deprecated. + +Only PCI header type 0 devices with PCI BAR resources are supported by +device assignment. The user requesting this ioctl must have read/write +access to the PCI sysfs resource files associated with the device. + 4.49 KVM_DEASSIGN_PCI_DEVICE Capability: KVM_CAP_DEVICE_DEASSIGNMENT
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 1 -SUBLEVEL = 9 +SUBLEVEL = 10 EXTRAVERSION = NAME = "Divemaster Edition"
arch/x86/include/asm/amd_nb.h +2 -0
@@ -1,6 +1,7 @@#ifndef _ASM_X86_AMD_NB_H#define _ASM_X86_AMD_NB_H +#include <linux/ioport.h> #include <linux/pci.h> struct amd_nb_bus_dev_range {
@@ -13,6 +14,7 @@ extern const struct pci_device_id amd_nb_misc_ids[];extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];extern bool early_is_amd_nb (u32 value); +extern struct resource *amd_get_mmconfig_range (struct resource *res);extern int amd_cache_northbridges (void );extern void amd_flush_garts (void );extern int amd_numa_init (void );
arch/x86/kernel/amd_nb.c +31 -0
@@ -119,6 +119,37 @@ bool __init early_is_amd_nb(u32 device)return false; } +struct resource *amd_get_mmconfig_range (struct resource *res) +{ +u32 address; +u64 base, msr; +unsigned segn_busn_bits; + +if (boot_cpu_data.x86_vendor !=X86_VENDOR_AMD ) +return NULL ; + +/* assume all cpus from fam10h have mmconfig */ +if (boot_cpu_data.x86 <0x10 ) +return NULL ; + + address =MSR_FAM10H_MMIO_CONF_BASE ; +rdmsrl (address, msr); + +/* mmconfig is not enabled */ +if (!(msr &FAM10H_MMIO_CONF_ENABLE )) +return NULL ; + + base = msr & (FAM10H_MMIO_CONF_BASE_MASK <<FAM10H_MMIO_CONF_BASE_SHIFT ); + + segn_busn_bits = (msr >>FAM10H_MMIO_CONF_BUSRANGE_SHIFT ) & +FAM10H_MMIO_CONF_BUSRANGE_MASK ; + + res->flags =IORESOURCE_MEM ; + res->start = base; + res->end = base + (1ULL <<(segn_busn_bits +20 )) -1 ; +return res; +} +int amd_get_subcaches (int cpu) {struct pci_dev *link =node_to_amd_nb (amd_get_nb_id (cpu))->link;
arch/x86/kernel/kvmclock.c +3 -2
@@ -74,9 +74,10 @@ static cycle_t kvm_clock_read(void)struct pvclock_vcpu_time_info *src;cycle_t ret; - src = &get_cpu_var (hv_clock); +preempt_disable_notrace (); + src = &__get_cpu_var (hv_clock); ret =pvclock_clocksource_read (src); -put_cpu_var (hv_clock); +preempt_enable_notrace ();return ret; }
arch/x86/kvm/i8254.c +7 -3
@@ -338,11 +338,15 @@ static enum hrtimer_restart pit_timer_fn(struct hrtimer *data)return HRTIMER_NORESTART ; } -static void create_pit_timer (struct kvm_kpit_state *ps,u32 val,int is_period) +static void create_pit_timer (struct kvm *kvm,u32 val,int is_period) { +struct kvm_kpit_state *ps = &kvm->arch.vpit->pit_state;struct kvm_timer *pt = &ps->pit_timer;s64 interval; +if (!irqchip_in_kernel (kvm)) +return ; + interval =muldiv64 (val,NSEC_PER_SEC ,KVM_PIT_FREQ );pr_debug ("create pit timer, interval is %llu nsec\n" , interval);
@@ -394,13 +398,13 @@ static void pit_load_count(struct kvm *kvm, int channel, u32 val)/* FIXME: enhance mode 4 precision */ case 4 :if (!(ps->flags &KVM_PIT_FLAGS_HPET_LEGACY )) { -create_pit_timer (ps, val,0 ); +create_pit_timer (kvm, val,0 ); }break ;case 2 :case 3 :if (!(ps->flags &KVM_PIT_FLAGS_HPET_LEGACY )){ -create_pit_timer (ps, val,1 ); +create_pit_timer (kvm, val,1 ); }break ;default :
arch/x86/mm/mmap.c +2 -2
@@ -87,9 +87,9 @@ static unsigned long mmap_rnd(void)*/ if (current->flags &PF_RANDOMIZE ) {if (mmap_is_ia32 ()) - rnd = (long )get_random_int () % (1 <<8 ); + rnd =get_random_int () % (1 <<8 );else - rnd = (long )(get_random_int () % (1 <<28 )); + rnd =get_random_int () % (1 <<28 ); }return rnd <<PAGE_SHIFT ; }
arch/x86/pci/Makefile +2 -1
@@ -18,8 +18,9 @@ obj-$(CONFIG_X86_NUMAQ) += numaq_32.o obj-$(CONFIG_X86_MRST) += mrst.o obj-y += common.o early.o -obj-y += amd_bus.o bus_numa.o +obj-y += bus_numa.o +obj-$(CONFIG_AMD_NB) += amd_bus.o obj-$(CONFIG_PCI_CNB20LE_QUIRK) += broadcom_bus.o ifeq ($(CONFIG_PCI_DEBUG),y)
arch/x86/pci/acpi.c +16 -2
@@ -149,7 +149,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data)struct acpi_resource_address64 addr;acpi_status status;unsigned long flags; -u64 start, end; +u64 start, orig_end, end; status =resource_to_addr (acpi_res, &addr);if (!ACPI_SUCCESS (status))
@@ -165,7 +165,21 @@ setup_resource(struct acpi_resource *acpi_res, void *data)return AE_OK ; start = addr.minimum + addr.translation_offset; - end = addr.maximum + addr.translation_offset; + orig_end = end = addr.maximum + addr.translation_offset; + +/* Exclude non-addressable range or non-addressable portion of range */ + end =min (end, (u64 )iomem_resource.end); +if (end <= start) { +dev_info (&info->bridge->dev, +"host bridge window [%#llx-%#llx] " +"(ignored, not CPU addressable)\n" , start, orig_end); +return AE_OK ; + }else if (orig_end != end) { +dev_info (&info->bridge->dev, +"host bridge window [%#llx-%#llx] " +"([%#llx-%#llx] ignored, not CPU addressable)\n" , + start, orig_end, end +1 , orig_end); + } res = &info->res[info->res_num]; res->name = info->name;
arch/x86/pci/amd_bus.c +11 -31
63 lines not on this page · raw message
drivers/gpu/drm/radeon/r100.c +3 -2
@@ -2069,6 +2069,7 @@ bool r100_gpu_is_lockup(struct radeon_device *rdev)void r100_bm_disable (struct radeon_device *rdev) {u32 tmp; +u16 tmp16;/* disable bus mastering */ tmp =RREG32 (R_000030_BUS_CNTL );
@@ -2079,8 +2080,8 @@ void r100_bm_disable(struct radeon_device *rdev)WREG32 (R_000030_BUS_CNTL , (tmp &0xFFFFFFFF ) |0x00000040 ); tmp =RREG32 (RADEON_BUS_CNTL );mdelay (1 ); -pci_read_config_word (rdev->pdev,0x4 , (u16 *)&tmp); -pci_write_config_word (rdev->pdev,0x4 , tmp &0xFFFB ); +pci_read_config_word (rdev->pdev,0x4 , &tmp16); +pci_write_config_word (rdev->pdev,0x4 , tmp16 &0xFFFB );mdelay (1 ); }
drivers/gpu/drm/radeon/r600_hdmi.c +7 -0
@@ -196,6 +196,13 @@ static void r600_hdmi_videoinfoframe( frame[0xD ] = (right_bar >>8 );r600_hdmi_infoframe_checksum (0x82 ,0x02 ,0x0D , frame); +/* Our header values (type, version, length) should be alright, Intel +* is using the same. Checksum function also seems to be OK, it works +* fine for audio infoframe. However calculated value is always lower +* by 2 in comparison to fglrx. It breaks displaying anything in case +* of TVs that strictly check the checksum. Hack it manually here to +* workaround this issue. */ + frame[0x0 ] +=2 ;WREG32 (offset+R600_HDMI_VIDEOINFOFRAME_0 , frame[0x0 ] | (frame[0x1 ] <<8 ) | (frame[0x2 ] <<16 ) | (frame[0x3 ] <<24 ));
drivers/gpu/drm/radeon/radeon_device.c +4 -1
@@ -224,8 +224,11 @@ int radeon_wb_init(struct radeon_device *rdev)if (radeon_no_wb ==1 ) rdev->wb.enabled = false;else { -/* often unreliable on AGP */ if (rdev->flags &RADEON_IS_AGP ) { +/* often unreliable on AGP */ + rdev->wb.enabled = false; + }else if (rdev->family <CHIP_R300 ) { +/* often unreliable on pre-r300 */ rdev->wb.enabled = false; }else { rdev->wb.enabled = true;
drivers/gpu/drm/radeon/rs600.c +2 -2
@@ -324,10 +324,10 @@ void rs600_hpd_fini(struct radeon_device *rdev)void rs600_bm_disable (struct radeon_device *rdev) { -u32 tmp; +u16 tmp;/* disable bus mastering */ -pci_read_config_word (rdev->pdev,0x4 , (u16 *)&tmp); +pci_read_config_word (rdev->pdev,0x4 , &tmp);pci_write_config_word (rdev->pdev,0x4 , tmp &0xFFFB );mdelay (1 ); }
drivers/hid/hid-core.c +1 -1
@@ -361,7 +361,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)case HID_GLOBAL_ITEM_TAG_REPORT_SIZE : parser->global.report_size =item_udata (item); -if (parser->global.report_size >32 ) { +if (parser->global.report_size >96 ) {dbg_hid ("invalid report_size %d\n" , parser->global.report_size);return -1 ;
drivers/md/raid1.c +10 -1
@@ -508,8 +508,17 @@ static int read_balance(conf_t *conf, r1bio_t *r1_bio, int *max_sectors)if (test_bit (WriteMostly, &rdev->flags)) {/* Don't balance among write-mostly, just * use the first as a last resort */ -if (best_disk <0 ) +if (best_disk <0 ) { +if (is_badblock (rdev, this_sector, sectors, + &first_bad, &bad_sectors)) { +if (first_bad < this_sector) +/* Cannot use this */ +continue ; + best_good_sectors = first_bad - this_sector; + }else + best_good_sectors = sectors; best_disk = disk; + }continue ; }/* This is a reasonable device to use. It might
drivers/mtd/mtd_blkdevs.c +2 -1
@@ -215,7 +215,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)mutex_lock (&dev->lock); -if (dev->open++) +if (dev->open) goto unlock;kref_get (&dev->ref);
@@ -235,6 +235,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) goto error_release; unlock: + dev->open++;mutex_unlock (&dev->lock);blktrans_dev_put (dev);return ret;
drivers/mtd/mtdoops.c +4 -1
@@ -253,6 +253,9 @@ static void find_next_position(struct mtdoops_context *cxt)size_t retlen;for (page =0 ; page < cxt->oops_pages; page++) { +if (mtd->block_isbad && + mtd->block_isbad (mtd, page * record_size)) +continue ;/* Assume the page is used */ mark_page_used (cxt, page); ret = mtd->read(mtd, page * record_size, MTDOOPS_HEADER_SIZE,
@@ -369,7 +372,7 @@ static void mtdoops_notify_add(struct mtd_info *mtd)/* oops_page_used is a bit field */ cxt->oops_page_used =vmalloc (DIV_ROUND_UP (mtdoops_pages, -BITS_PER_LONG )); +BITS_PER_LONG ) *sizeof (unsigned long ));if (!cxt->oops_page_used) {printk (KERN_ERR "mtdoops: could not allocate page array\n" );return ;
drivers/mtd/tests/mtd_stresstest.c +7 -0
@@ -277,6 +277,12 @@ static int __init mtd_stresstest_init(void) (unsigned long long )mtd->size, mtd->erasesize, pgsize, ebcnt, pgcnt, mtd->oobsize); +if (ebcnt <2 ) { +printk (PRINT_PREF "error: need at least 2 eraseblocks\n" ); + err = -ENOSPC ; + goto out_put_mtd; + } +/* Read or write up 2 eraseblocks at a time */ bufsize = mtd->erasesize *2 ;
@@ -315,6 +321,7 @@ out:kfree (bbt);vfree (writebuf);vfree (readbuf); +out_put_mtd:put_mtd_device (mtd);if (err)printk (PRINT_PREF "error %d occurred\n" , err);
drivers/mtd/ubi/eba.c +4 -2
@@ -1028,12 +1028,14 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,* 'ubi_wl_put_peb()' function on the @ubi->move_mutex. In turn, we are * holding @ubi->move_mutex and go sleep on the LEB lock. So, if the * LEB is already locked, we just do not move it and return -* %MOVE_CANCEL_RACE, which means that UBI will re-try, but later. +* %MOVE_RETRY. Note, we do not return %MOVE_CANCEL_RACE here because +* we do not know the reasons of the contention - it may be just a +* normal I/O on this LEB, so we want to re-try. */ err =leb_write_trylock (ubi, vol_id, lnum);if (err) {dbg_wl ("contention on LEB %d:%d, cancel" , vol_id, lnum); -return MOVE_CANCEL_RACE ; +return MOVE_RETRY ; }/*
drivers/mtd/ubi/ubi.h +2 -0
@@ -120,6 +120,7 @@ enum {* PEB * MOVE_CANCEL_BITFLIPS: canceled because a bit-flip was detected in the * target PEB +* MOVE_RETRY: retry scrubbing the PEB */ enum {MOVE_CANCEL_RACE =1 ,
@@ -127,6 +128,7 @@ enum {MOVE_TARGET_RD_ERR ,MOVE_TARGET_WR_ERR ,MOVE_CANCEL_BITFLIPS , + MOVE_RETRY, };/**
drivers/mtd/ubi/wl.c +8 -4
@@ -795,7 +795,10 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk, protect =1 ; goto out_not_moved; } - +if (err ==MOVE_RETRY ) { + scrubbing =1 ; + goto out_not_moved; + }if (err ==MOVE_CANCEL_BITFLIPS || err ==MOVE_TARGET_WR_ERR || err ==MOVE_TARGET_RD_ERR ) {/*
@@ -1049,7 +1052,6 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,ubi_err ("failed to erase PEB %d, error %d" , pnum, err);kfree (wl_wrk); -kmem_cache_free (ubi_wl_entry_slab, e);if (err == -EINTR || err == -ENOMEM || err == -EAGAIN || err == -EBUSY ) {
@@ -1062,14 +1064,16 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk, goto out_ro; }return err; - }else if (err != -EIO ) { + } + +kmem_cache_free (ubi_wl_entry_slab, e); +if (err != -EIO )/* * If this is not %-EIO, we have no idea what to do. Scheduling * this physical eraseblock for erasure again would cause * errors again and again. Well, lets switch to R/O mode. */ goto out_ro; - }/* It is %-EIO, the PEB went bad */
drivers/net/wireless/rtlwifi/rtl8192se/fw.c +4 -0
@@ -196,6 +196,8 @@ static bool _rtl92s_firmware_downloadcode(struct ieee80211_hw *hw,/* Allocate skb buffer to contain firmware */ /* info and tx descriptor info. */ skb =dev_alloc_skb (frag_length); +if (!skb) +return false;skb_reserve (skb, extra_descoffset); seg_ptr = (u8 *)skb_put (skb, (u32)(frag_length - extra_descoffset));
@@ -573,6 +575,8 @@ static bool _rtl92s_firmware_set_h2c_cmd(struct ieee80211_hw *hw, u8 h2c_cmd, len =_rtl92s_get_h2c_cmdlen (MAX_TRANSMIT_BUFFER_SIZE ,1 , &cmd_len); skb =dev_alloc_skb (len); +if (!skb) +return false; cb_desc = (struct rtl_tcb_desc *)(skb->cb); cb_desc->queue_index =TXCMD_QUEUE ; cb_desc->cmd_or_init =DESC_PACKET_TYPE_NORMAL ;
drivers/pci/msi.c +10 -0
@@ -869,5 +869,15 @@ EXPORT_SYMBOL(pci_msi_enabled);void pci_msi_init_pci_dev (struct pci_dev *dev) { +int pos;INIT_LIST_HEAD (&dev->msi_list); + +/* Disable the msi hardware to avoid screaming interrupts +* during boot. This is the power on reset default so +* usually this should be a noop. +*/ + pos =pci_find_capability (dev,PCI_CAP_ID_MSI ); +if (pos) +msi_set_enable (dev, pos,0 ); +msix_set_enable (dev,0 ); }
drivers/platform/x86/ideapad-laptop.c +2 -0
@@ -493,6 +493,8 @@ static void ideapad_backlight_notify_power(struct ideapad_private *priv)unsigned long power;struct backlight_device *blightdev = priv->blightdev; +if (!blightdev) +return ;if (read_ec_data (ideapad_handle,0x18 , &power))return ; blightdev->props.power = power ?FB_BLANK_UNBLANK :FB_BLANK_POWERDOWN ;
drivers/pnp/quirks.c +42 -0
54 lines not on this page · raw message
drivers/rtc/interface.c +2 -2
@@ -227,11 +227,11 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) alarm->time.tm_hour = now.tm_hour;/* For simplicity, only support date rollover for now */ -if (alarm->time.tm_mday ==-1 ) { +if (alarm->time.tm_mday <1 || alarm->time.tm_mday >31 ) { alarm->time.tm_mday = now.tm_mday; missing = day; } -if (alarm->time.tm_mon ==-1 ) { +if ((unsigned )alarm->time.tm_mon >=12 ) { alarm->time.tm_mon = now.tm_mon;if (missing == none) missing = month;
drivers/scsi/mpt2sas/mpt2sas_base.c +27 -56
122 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_scsih.c +6 -5
@@ -978,8 +978,8 @@ _scsih_get_chain_buffer_tracker(struct MPT2SAS_ADAPTER *ioc, u16 smid)spin_lock_irqsave (&ioc->scsi_lookup_lock, flags);if (list_empty (&ioc->free_chain_list)) {spin_unlock_irqrestore (&ioc->scsi_lookup_lock, flags); -printk (MPT2SAS_WARN_FMT "chain buffers not available\n" , - ioc->name); +dfailprintk (ioc,printk (MPT2SAS_WARN_FMT "chain buffers not " +"available\n" , ioc->name));return NULL ; } chain_req = list_entry(ioc->free_chain_list.next,
@@ -6564,6 +6564,7 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid, }else sas_target_priv_data =NULL ; raid_device->responding =1 ; +spin_unlock_irqrestore (&ioc->raid_device_lock, flags);starget_printk (KERN_INFO , raid_device->starget,"handle(0x%04x), wwid(0x%016llx)\n" , handle, (unsigned long long )raid_device->wwid);
@@ -6574,16 +6575,16 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid,*/ _scsih_init_warpdrive_properties (ioc, raid_device);if (raid_device->handle == handle) - goto out; +return ;printk (KERN_INFO "\thandle changed from(0x%04x)!!!\n" , raid_device->handle); raid_device->handle = handle;if (sas_target_priv_data) sas_target_priv_data->handle = handle; - goto out; +return ; } } - out: +spin_unlock_irqrestore (&ioc->raid_device_lock, flags); }
drivers/xen/xenbus/xenbus_xs.c +6 -0
@@ -801,6 +801,12 @@ static int process_msg(void) goto out; } +if (msg->hdr.len >XENSTORE_PAYLOAD_MAX ) { +kfree (msg); + err = -EINVAL ; + goto out; + } + body =kmalloc (msg->hdr.len +1 ,GFP_NOIO | __GFP_HIGH);if (body ==NULL ) {kfree (msg);
fs/ext4/super.c +3 -4
@@ -1984,17 +1984,16 @@ static int ext4_fill_flex_info(struct super_block *sb)struct ext4_group_desc *gdp =NULL ;ext4_group_t flex_group_count;ext4_group_t flex_group; -int groups_per_flex =0 ; +unsigned int groups_per_flex =0 ;size_t size;int i; sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex; - groups_per_flex =1 << sbi->s_log_groups_per_flex; - -if (groups_per_flex <2 ) { +if (sbi->s_log_groups_per_flex <1 || sbi->s_log_groups_per_flex >31 ) { sbi->s_log_groups_per_flex =0 ;return 1 ; } + groups_per_flex =1 << sbi->s_log_groups_per_flex;/* We allocate both existing and potentially added groups */ flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) +
fs/nfs/callback_proc.c +1 -1
@@ -339,7 +339,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)dprintk ("%s enter. slotid %d seqid %d\n" , __func__, args->csa_slotid, args->csa_sequenceid); -if (args->csa_slotid >NFS41_BC_MAX_CALLBACKS ) +if (args->csa_slotid >=NFS41_BC_MAX_CALLBACKS )return htonl (NFS4ERR_BADSLOT ); slot = tbl->slots + args->csa_slotid;
fs/nfs/file.c +2 -2
@@ -321,13 +321,13 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) datasync); ret =filemap_write_and_wait_range (inode->i_mapping, start, end); -if (ret) -return ret;mutex_lock (&inode->i_mutex);nfs_inc_stats (inode,NFSIOS_VFSFSYNC ); have_error =test_and_clear_bit (NFS_CONTEXT_ERROR_WRITE , &ctx->flags); status =nfs_commit_inode (inode,FLUSH_SYNC ); +if (status >=0 && ret <0 ) + status = ret; have_error |=test_bit (NFS_CONTEXT_ERROR_WRITE , &ctx->flags);if (have_error) ret =xchg (&ctx->error,0 );
fs/nfs/nfs4proc.c +57 -39
132 lines not on this page · raw message
fs/nfs/nfs4xdr.c +23 -8
@@ -2517,11 +2517,13 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,encode_compound_hdr (xdr, req, &hdr);encode_sequence (xdr, &args->seq_args, &hdr);encode_putfh (xdr, args->fh, &hdr); - replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz +1 ; + replen = hdr.replen + op_decode_hdr_maxsz +1 ;encode_getattr_two (xdr,FATTR4_WORD0_ACL ,0 , &hdr);xdr_inline_pages (&req->rq_rcv_buf, replen <<2 , args->acl_pages, args->acl_pgbase, args->acl_len); +xdr_set_scratch_buffer (xdr,page_address (args->acl_scratch),PAGE_SIZE ); +encode_nops (&hdr); }
@@ -4957,17 +4959,18 @@ decode_restorefh(struct xdr_stream *xdr) }static int decode_getacl (struct xdr_stream *xdr,struct rpc_rqst *req, -size_t *acl_len) +struct nfs_getaclres *res) { -__be32 *savep; +__be32 *savep, *bm_p;uint32_t attrlen, bitmap[3 ] = {0 };struct kvec *iov = req->rq_rcv_buf.head;int status; - *acl_len =0 ; + res->acl_len =0 ;if ((status =decode_op_hdr (xdr,OP_GETATTR )) !=0 ) goto out; + bm_p = xdr->p;if ((status =decode_attr_bitmap (xdr, bitmap)) !=0 ) goto out;if ((status =decode_attr_length (xdr, &attrlen, &savep)) !=0 )
@@ -4979,18 +4982,30 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,size_t hdrlen;u32 recvd; +/* The bitmap (xdr len + bitmaps) and the attr xdr len words +* are stored with the acl data to handle the problem of +* variable length bitmaps.*/ + xdr->p = bm_p; + res->acl_data_offset =be32_to_cpup (bm_p) +2 ; + res->acl_data_offset <<=2 ; +/* We ignore &savep and don't do consistency checks on * the attr length. Let userspace figure it out.... */ hdrlen = (u8 *)xdr->p - (u8 *)iov->iov_base; + attrlen += res->acl_data_offset; recvd = req->rq_rcv_buf.len - hdrlen;if (attrlen > recvd) { -dprintk ("NFS: server cheating in getattr" -" acl reply: attrlen %u > recvd %u\n" , +if (res->acl_flags &NFS4_ACL_LEN_REQUEST ) { +/* getxattr interface called with a NULL buf */ + res->acl_len = attrlen; + goto out; + } +dprintk ("NFS: acl reply: attrlen %u > recvd %u\n" , attrlen, recvd);return -EINVAL ; }xdr_read_pages (xdr, attrlen); - *acl_len = attrlen; + res->acl_len = attrlen; }else status = -EOPNOTSUPP ;
@@ -6028,7 +6043,7 @@ nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr, status =decode_putfh (xdr);if (status) goto out; - status =decode_getacl (xdr, rqstp, &res->acl_len); + status =decode_getacl (xdr, rqstp, res); out:return status;
fs/nfs/super.c +19 -24
100 lines not on this page · raw message
include/linux/memcontrol.h +6 -0
@@ -116,6 +116,8 @@ struct zone_reclaim_stat* mem_cgroup_get_reclaim_stat_from_page(struct page *page);extern void mem_cgroup_print_oom_info (struct mem_cgroup *memcg,struct task_struct *p); +extern void mem_cgroup_replace_page_cache (struct page *oldpage, +struct page *newpage);#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP extern int do_swap_account;
@@ -361,6 +363,10 @@ static inlinevoid mem_cgroup_count_vm_event (struct mm_struct *mm,enum vm_event_item idx) { } +static inline void mem_cgroup_replace_page_cache (struct page *oldpage, +struct page *newpage) +{ +}#endif /* CONFIG_CGROUP_MEM_CONT */ #if !defined(CONFIG_CGROUP_MEM_RES_CTLR ) || !defined(CONFIG_DEBUG_VM )
include/linux/nfs_xdr.h +5 -0
@@ -602,11 +602,16 @@ struct nfs_getaclargs {size_t acl_len;unsigned int acl_pgbase;struct page ** acl_pages; +struct page * acl_scratch;struct nfs4_sequence_args seq_args; }; +/* getxattr ACL interface flags */ +#define NFS4_ACL_LEN_REQUEST 0x0001/* zero length getxattr buffer */ struct nfs_getaclres {size_t acl_len; +size_t acl_data_offset; +int acl_flags;struct nfs4_sequence_res seq_res; };
include/linux/pci_regs.h +1 -1
@@ -392,7 +392,7 @@#define PCI_EXP_TYPE_DOWNSTREAM 0x6/* Downstream Port */ #define PCI_EXP_TYPE_PCI_BRIDGE 0x7/* PCI/PCI-X Bridge */ #define PCI_EXP_TYPE_RC_END 0x9/* Root Complex Integrated Endpoint */ -#define PCI_EXP_TYPE_RC_EC 0x10/* Root Complex Event Collector */ +#define PCI_EXP_TYPE_RC_EC 0xa/* Root Complex Event Collector */ #define PCI_EXP_FLAGS_SLOT 0x0100/* Slot implemented */ #define PCI_EXP_FLAGS_IRQ 0x3e00/* Interrupt message number */ #define PCI_EXP_DEVCAP 4/* Device capabilities */
include/linux/sunrpc/xdr.h +2 -0
@@ -191,6 +191,8 @@ extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base, struct xdr_array2_desc *desc);extern int xdr_encode_array2 (struct xdr_buf *buf,unsigned int base,struct xdr_array2_desc *desc); +extern void _copy_from_pages (char *p,struct page **pages,size_t pgbase, +size_t len);/* * Provide some simple tools for XDR buffer overflow-checking etc.
include/xen/interface/io/xs_wire.h +3 -0
@@ -84,4 +84,7 @@ struct xenstore_domain_interface { XENSTORE_RING_IDX rsp_cons, rsp_prod; }; +/* Violating this is very bad. See docs/misc/xenstore.txt. */ +#define XENSTORE_PAYLOAD_MAX 4096 +#endif /* _XS_WIRE_H */
init/do_mounts.c +31 -4
@@ -360,15 +360,42 @@ out: }#ifdef CONFIG_ROOT_NFS + +#define NFSROOT_TIMEOUT_MIN 5 +#define NFSROOT_TIMEOUT_MAX 30 +#define NFSROOT_RETRY_MAX 5 +static int __init mount_nfs_root (void ) {char *root_dev, *root_data; +unsigned int timeout; +int try, err; -if (nfs_root_data (&root_dev, &root_data) !=0 ) -return 0 ; -if (do_mount_root (root_dev,"nfs" , root_mountflags, root_data) !=0 ) + err =nfs_root_data (&root_dev, &root_data); +if (err !=0 )return 0 ; -return 1 ; + +/* +* The server or network may not be ready, so try several +* times. Stop after a few tries in case the client wants +* to fall back to other boot methods. +*/ + timeout =NFSROOT_TIMEOUT_MIN ; +for (try =1 ; ; try++) { + err =do_mount_root (root_dev,"nfs" , + root_mountflags, root_data); +if (err ==0 ) +return 1 ; +if (try >NFSROOT_RETRY_MAX ) +break ; + +/* Wait, in case the server refused us immediately */ +ssleep (timeout); + timeout <<=1 ; +if (timeout >NFSROOT_TIMEOUT_MAX ) + timeout =NFSROOT_TIMEOUT_MAX ; + } +return 0 ; }#endif
mm/filemap.c +2 -16
@@ -393,24 +393,11 @@ EXPORT_SYMBOL(filemap_write_and_wait_range);int replace_page_cache_page (struct page *old,struct page *new,gfp_t gfp_mask) {int error; -struct mem_cgroup *memcg =NULL ;VM_BUG_ON (!PageLocked (old));VM_BUG_ON (!PageLocked (new));VM_BUG_ON (new->mapping); -/* -* This is not page migration, but prepare_migration and -* end_migration does enough work for charge replacement. -* -* In the longer term we probably want a specialized function -* for moving the charge from old to new in a more efficient -* manner. -*/ - error =mem_cgroup_prepare_migration (old, new, &memcg, gfp_mask); -if (error) -return error; - error =radix_tree_preload (gfp_mask & ~__GFP_HIGHMEM);if (!error) {struct address_space *mapping = old->mapping;
@@ -432,13 +419,12 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)if (PageSwapBacked (new))__inc_zone_page_state (new,NR_SHMEM );spin_unlock_irq (&mapping->tree_lock); +/* mem_cgroup codes must not be called under tree_lock */ +mem_cgroup_replace_page_cache (old, new);radix_tree_preload_end ();if (freepage)freepage (old);page_cache_release (old); -mem_cgroup_end_migration (memcg, old, new, true); - }else { -mem_cgroup_end_migration (memcg, old, new, false); }return error;
mm/memcontrol.c +44 -0
50 lines not on this page · raw message
mm/slub.c +5 -0
@@ -2077,6 +2077,11 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, goto new_slab; } +/* must check again c->freelist in case of cpu migration or IRQ */ + object = c->freelist; +if (object) + goto load_freelist; +stat (s,ALLOC_SLOWPATH ); do {
net/mac80211/wpa.c +1 -1
@@ -105,7 +105,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)if (status->flag &RX_FLAG_MMIC_ERROR ) goto mic_fail; -if (!(status->flag &RX_FLAG_IV_STRIPPED )) +if (!(status->flag &RX_FLAG_IV_STRIPPED ) && rx->key) goto update_iv;return RX_CONTINUE ;
net/sunrpc/xdr.c +2 -1
@@ -296,7 +296,7 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)* Copies data into an arbitrary memory location from an array of pages * The copy is assumed to be non-overlapping. */ -static void +void _copy_from_pages (char *p,struct page **pages,size_t pgbase,size_t len) {struct page **pgfrom;
@@ -324,6 +324,7 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len) }while ((len -= copy) !=0 ); } +EXPORT_SYMBOL_GPL (_copy_from_pages);/* * xdr_shrink_bufhead
security/integrity/ima/ima_api.c +2 -2
@@ -177,8 +177,8 @@ void ima_store_measurement(struct ima_iint_cache *iint, struct file *file,strncpy (entry->template.file_name, filename,IMA_EVENT_NAME_LEN_MAX ); result =ima_store_template (entry, violation, inode); -if (!result) +if (!result || result == -EEXIST ) iint->flags |=IMA_MEASURED ; -else +if (result <0 )kfree (entry); }
security/integrity/ima/ima_queue.c +12 -5
@@ -23,6 +23,8 @@#include <linux/slab.h> #include "ima.h" +#define AUDIT_CAUSE_LEN_MAX 32 +LIST_HEAD (ima_measurements);/* list of all measurements */ /* key: inode (before secure-hashing a file) */
@@ -94,7 +96,8 @@ static int ima_pcr_extend(const u8 *hash) result =tpm_pcr_extend (TPM_ANY_NUM ,CONFIG_IMA_MEASURE_PCR_IDX , hash);if (result !=0 ) -pr_err ("IMA: Error Communicating to TPM chip\n" ); +pr_err ("IMA: Error Communicating to TPM chip, result: %d\n" , + result);return result; }
@@ -106,14 +109,16 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation, {u8 digest[IMA_DIGEST_SIZE ];const char *audit_cause ="hash_added" ; +char tpm_audit_cause[AUDIT_CAUSE_LEN_MAX ];int audit_info =1 ; -int result =0 ; +int result =0 , tpmresult =0 ;mutex_lock (&ima_extend_list_mutex);if (!violation) {memcpy (digest, entry->digest,sizeof digest);if (ima_lookup_digest_entry (digest)) { audit_cause ="hash_exists" ; + result = -EEXIST ; goto out; } }
@@ -128,9 +133,11 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation,if (violation)/* invalidate pcr */ memset (digest,0xff ,sizeof digest); - result =ima_pcr_extend (digest); -if (result !=0 ) { - audit_cause ="TPM error" ; + tpmresult =ima_pcr_extend (digest); +if (tpmresult !=0 ) { +snprintf (tpm_audit_cause,AUDIT_CAUSE_LEN_MAX ,"TPM_error(%d)" , + tpmresult); + audit_cause = tpm_audit_cause; audit_info =0 ; } out:
sound/pci/hda/hda_local.h +6 -1
@@ -476,7 +476,12 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid) }/* get the widget type from widget capability bits */ -#define get_wcaps_type (wcaps) (((wcaps) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT) +static inline int get_wcaps_type (unsigned int wcaps) +{ +if (!wcaps) +return -1 ;/* invalid type */ +return (wcaps &AC_WCAP_TYPE ) >>AC_WCAP_TYPE_SHIFT ; +}static inline unsigned int get_wcaps_channels (u32 wcaps) {
sound/pci/hda/hda_proc.c +2 -0
@@ -54,6 +54,8 @@ static const char *get_wid_type_name(unsigned int wid_value) [AC_WID_BEEP] = "Beep Generator Widget", [AC_WID_VENDOR] = "Vendor Defined Widget", }; +if (wid_value ==-1 ) +return "UNKNOWN Widget" ; wid_value &=0xf ;if (names[wid_value])return names[wid_value];
sound/pci/hda/patch_cirrus.c +7 -20
@@ -916,16 +916,14 @@ static void cs_automute(struct hda_codec *codec)/* mute speakers if spdif or hp jack is plugged in */ for (i =0 ; i < cfg->speaker_outs; i++) { +int pin_ctl = hp_present ?0 :PIN_OUT ; +/* detect on spdif is specific to CS421x */ +if (spdif_present && (spec->vendor_nid ==CS421X_VENDOR_NID )) + pin_ctl =0 ; + nid = cfg->speaker_pins[i];snd_hda_codec_write (codec, nid,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL , - hp_present ?0 :PIN_OUT ); -/* detect on spdif is specific to CS421x */ -if (spec->vendor_nid ==CS421X_VENDOR_NID ) { -snd_hda_codec_write (codec, nid,0 , -AC_VERB_SET_PIN_WIDGET_CONTROL , - spdif_present ?0 :PIN_OUT ); - } +AC_VERB_SET_PIN_WIDGET_CONTROL , pin_ctl); } if (spec->board_config == CS420X_MBP53 || spec->board_config == CS420X_MBP55 ||
@@ -1756,30 +1754,19 @@ static int build_cs421x_output(struct hda_codec *codec)struct auto_pin_cfg *cfg = &spec->autocfg;struct snd_kcontrol *kctl;int err; -char *name ="HP/Speakers" ; +char *name ="Master" ;fix_volume_caps (codec, dac); -if (!spec->vmaster_sw) { - err =add_vmaster (codec, dac); -if (err <0 ) -return err; - } err =add_mute (codec, name,0 ,HDA_COMPOSE_AMP_VAL (dac,3 ,0 ,HDA_OUTPUT ),0 , &kctl);if (err <0 )return err; - err =snd_ctl_add_slave (spec->vmaster_sw, kctl); -if (err <0 ) -return err; err =add_volume (codec, name,0 ,HDA_COMPOSE_AMP_VAL (dac,3 ,0 ,HDA_OUTPUT ),0 , &kctl);if (err <0 )return err; - err =snd_ctl_add_slave (spec->vmaster_vol, kctl); -if (err <0 ) -return err;if (cfg->speaker_outs) { err = snd_hda_ctl_add(codec, 0,
sound/pci/hda/patch_conexant.c +0 -2
@@ -1119,8 +1119,6 @@ static const char * const cxt5045_models[CXT5045_MODELS] = {static const struct snd_pci_quirk cxt5045_cfg_tbl[] = {SND_PCI_QUIRK (0x103c ,0x30d5 ,"HP 530" ,CXT5045_LAPTOP_HP530 ), -SND_PCI_QUIRK_MASK (0x103c ,0xff00 ,0x3000 ,"HP DV Series" , -CXT5045_LAPTOP_HPSENSE ),SND_PCI_QUIRK (0x1179 ,0xff31 ,"Toshiba P105" ,CXT5045_LAPTOP_MICSENSE ),SND_PCI_QUIRK (0x152d ,0x0753 ,"Benq R55E" ,CXT5045_BENQ ),SND_PCI_QUIRK (0x1734 ,0x10ad ,"Fujitsu Si1520" ,CXT5045_LAPTOP_MICSENSE ),
sound/pci/hda/patch_sigmatel.c +23 -13
@@ -4306,6 +4306,27 @@ static void stac_store_hints(struct hda_codec *codec) } } +static void stac_issue_unsol_events (struct hda_codec *codec,int num_pins, +const hda_nid_t *pins) +{ +while (num_pins--) +stac_issue_unsol_event (codec, *pins++); +} + +/* fake event to set up pins */ +static void stac_fake_hp_events (struct hda_codec *codec) +{ +struct sigmatel_spec *spec = codec->spec; + +if (spec->autocfg.hp_outs) +stac_issue_unsol_events (codec, spec->autocfg.hp_outs, + spec->autocfg.hp_pins); +if (spec->autocfg.line_outs && + spec->autocfg.line_out_pins[0 ] != spec->autocfg.hp_pins[0 ]) +stac_issue_unsol_events (codec, spec->autocfg.line_outs, + spec->autocfg.line_out_pins); +} +static int stac92xx_init (struct hda_codec *codec) {struct sigmatel_spec *spec = codec->spec;
@@ -4356,10 +4377,7 @@ static int stac92xx_init(struct hda_codec *codec)stac92xx_auto_set_pinctl (codec, spec->autocfg.line_out_pins[0 ],AC_PINCTL_OUT_EN );/* fake event to set up pins */ -if (cfg->hp_pins[0 ]) -stac_issue_unsol_event (codec, cfg->hp_pins[0 ]); -else if (cfg->line_out_pins[0 ]) -stac_issue_unsol_event (codec, cfg->line_out_pins[0 ]); +stac_fake_hp_events (codec); }else {stac92xx_auto_init_multi_out (codec);stac92xx_auto_init_hp_out (codec);
@@ -5000,19 +5018,11 @@ static void stac927x_proc_hook(struct snd_info_buffer *buffer,#ifdef CONFIG_PM static int stac92xx_resume (struct hda_codec *codec) { -struct sigmatel_spec *spec = codec->spec; -stac92xx_init (codec);snd_hda_codec_resume_amp (codec);snd_hda_codec_resume_cache (codec);/* fake event to set up pins again to override cached values */ -if (spec->hp_detect) { -if (spec->autocfg.hp_pins[0 ]) -stac_issue_unsol_event (codec, spec->autocfg.hp_pins[0 ]); -else if (spec->autocfg.line_out_pins[0 ]) -stac_issue_unsol_event (codec, - spec->autocfg.line_out_pins[0 ]); - } +stac_fake_hp_events (codec);return 0 ; }
sound/pci/hda/patch_via.c +4 -1
@@ -2187,7 +2187,10 @@ static int via_auto_create_loopback_switch(struct hda_codec *codec) {struct via_spec *spec = codec->spec; -if (!spec->aa_mix_nid || !spec->out_mix_path.depth) +if (!spec->aa_mix_nid) +return 0 ;/* no loopback switching available */ +if (!(spec->out_mix_path.depth || spec->hp_mix_path.depth || + spec->speaker_path.depth))return 0 ;/* no loopback switching available */ if (!via_clone_control (spec, &via_aamix_ctl_enum))return -ENOMEM ;
sound/pci/ice1712/amp.c +5 -2
@@ -68,8 +68,11 @@ static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice)static int __devinit snd_vt1724_amp_add_controls (struct snd_ice1712 *ice) { -/* we use pins 39 and 41 of the VT1616 for left and right read outputs */ -snd_ac97_write_cache (ice->ac97,0x5a ,snd_ac97_read (ice->ac97,0x5a ) & ~0x8000 ); +if (ice->ac97) +/* we use pins 39 and 41 of the VT1616 for left and right +read outputs */ +snd_ac97_write_cache (ice->ac97,0x5a , +snd_ac97_read (ice->ac97,0x5a ) & ~0x8000 );return 0 ; }
sound/usb/usx2y/usb_stream.c +2 -4
@@ -674,7 +674,7 @@ dotry: inurb->transfer_buffer_length = inurb->number_of_packets * inurb->iso_frame_desc[0 ].length; -preempt_disable (); +if (u ==0 ) {int now;struct usb_device *dev = inurb->dev;
@@ -686,19 +686,17 @@ dotry: } err =usb_submit_urb (inurb,GFP_ATOMIC );if (err <0 ) { -preempt_enable ();snd_printk (KERN_ERR "usb_submit_urb(sk->inurb[%i])" " returned %i\n" , u, err);return err; } err =usb_submit_urb (outurb,GFP_ATOMIC );if (err <0 ) { -preempt_enable ();snd_printk (KERN_ERR "usb_submit_urb(sk->outurb[%i])" " returned %i\n" , u, err);return err; } -preempt_enable (); +if (inurb->start_frame != outurb->start_frame) { snd_printd(KERN_DEBUG "u[%i] start_frames differ in:%u out:%u\n",
virt/kvm/assigned-dev.c +84 -9
132 lines not on this page · raw message