Linux 2.6.38.5
Subsystems (44)
I'm announcing the release of the 2.6.38.5 kernel.
All users of the 2.6.38 kernel series must upgrade.
The updated 2.6.38.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.38.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.38.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 arch/m68k/mm/motorola.c | 2 arch/parisc/mm/init.c | 4 arch/s390/kvm/sie64a.S | 4 arch/s390/mm/fault.c | 4 arch/um/sys-i386/Makefile | 2 arch/um/sys-i386/atomic64_cx8_32.S | 225 ++++++++++++++++++++++++++++ arch/x86/include/asm/gart.h | 4 arch/x86/kernel/aperture_64.c | 2 arch/x86/kernel/pci-gart_64.c | 9 - block/blk-sysfs.c | 4 drivers/acpi/battery.c | 22 ++ drivers/acpi/scan.c | 4 drivers/ata/ahci.c | 2 drivers/ata/libahci.c | 17 +- drivers/ata/libata-core.c | 4 drivers/ata/libata-eh.c | 6 drivers/char/agp/generic.c | 19 +- drivers/char/virtio_console.c | 11 - drivers/gpu/drm/Kconfig | 1 drivers/gpu/drm/i915/intel_display.c | 68 ++++---- drivers/gpu/drm/i915/intel_tv.c | 2 drivers/gpu/drm/nouveau/nouveau_fbcon.c | 4 drivers/gpu/drm/radeon/atom.c | 6 drivers/gpu/drm/radeon/atombios_crtc.c | 6 drivers/input/xen-kbdfront.c | 12 + drivers/media/dvb/b2c2/flexcop-pci.c | 2 drivers/net/netxen/netxen_nic.h | 4 drivers/net/netxen/netxen_nic_main.c | 17 ++ drivers/net/qlcnic/qlcnic.h | 1 drivers/net/qlcnic/qlcnic_main.c | 14 + drivers/net/wireless/ath/ath9k/ar9003_mac.c | 8 drivers/net/wireless/ath/ath9k/hw.c | 9 - drivers/net/wireless/ath/ath9k/mac.c | 39 +++- drivers/net/wireless/ath/ath9k/mac.h | 2 drivers/net/wireless/ath/ath9k/recv.c | 6 drivers/net/wireless/ath/regd_common.h | 1 drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 2 drivers/net/wireless/iwlwifi/iwl-3945.c | 2 drivers/net/wireless/iwlwifi/iwl-4965.c | 2 drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 5 drivers/net/wireless/iwlwifi/iwl-agn.c | 6 drivers/net/wireless/iwlwifi/iwl-core.c | 22 ++ drivers/net/wireless/iwlwifi/iwl-eeprom.c | 7 drivers/net/wireless/iwlwifi/iwl3945-base.c | 11 - drivers/net/wireless/p54/txrx.c | 2 drivers/pci/intel-iommu.c | 17 +- drivers/platform/x86/ideapad-laptop.c | 2 drivers/tty/n_gsm.c | 8 drivers/tty/serial/imx.c | 3 drivers/virtio/virtio_ring.c | 1 fs/file.c | 18 +- fs/nfs/nfs4state.c | 4 fs/nfs/super.c | 9 + fs/nfsd/nfs4state.c | 3 fs/ubifs/recovery.c | 26 +++ fs/ubifs/super.c | 18 +- include/linux/huge_mm.h | 2 include/linux/libata.h | 1 include/linux/mm.h | 3 init/Kconfig | 1 mm/huge_memory.c | 43 ++--- mm/memory.c | 2 mm/oom_kill.c | 9 - scripts/kconfig/conf.c | 2 sound/pci/hda/patch_realtek.c | 25 ++- sound/soc/codecs/jz4740.c | 2 sound/soc/codecs/wm_hubs.c | 8 68 files changed, 625 insertions(+), 190 deletions(-)
Alex Deucher (2):
drm/radeon/kms: pll tweaks for r7xx drm/radeon/kms: fix bad shift in atom iio table parser
Alex Williamson (2):
intel-iommu: Unlink domain from iommu
intel-iommu: Fix get_domain_for_dev() error path
Amit Kumar Salecha (1):
qlcnic: limit skb frags for non tso packet
Amit Shah (2):
virtio: Decrement avail idx on buffer detach
virtio: console: Enable call to hvc_remove() on console port remove
Andrea Arcangeli (1):
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups
Andrew Morton (1):
vfs: avoid large kmalloc()s for the fdtable
Artem Bityutskiy (2):
UBIFS: fix master node recovery
UBIFS: fix false space checking failure
Ben Hutchings (1):
kconfig: Avoid buffer underrun in choice input
Carsten Otte (1):
kvm-390: Let kernel exit SIE instruction on work
Chris Wilson (1):
drm/i915: Sanitize the output registers after resume
Christian Lamparter (1):
ath: add missing regdomain pair 0x5c mapping
Dave Airlie (1):
drm: select FRAMEBUFFER_CONSOLE_PRIMARY if we have FRAMEBUFFER_CONSOLE
David Rientjes (1):
set memory ranges in N_NORMAL_MEMORY when onlined
Felix Fietkau (2):
ath9k_hw: fix stopping rx DMA during resets
ath9k_hw: partially revert "fix dma descriptor rx error bit parsing"
Greg Kroah-Hartman (1):
Linux 2.6.38.5
Heiko Carstens (1):
pfault: fix token handling
Igor Mammedov (1):
Input: xen-kbdfront - fix mouse getting stuck after save/restore
Ike Panhc (1):
ideapad: read brightness setting on brightness key notify
J. Bruce Fields (1):
nfsd4: fix struct file leak on delegation
James Bottomley (1):
slub: fix panic with DISCONTIGMEM
Jan Kiszka (1):
intel-iommu: Fix use after release during device attach
Jason Conti (1):
p54: Initialize extra_len in p54_tx_80211
Jeff Layton (1):
nfs: don't lose MS_SYNCHRONOUS on remount of noac mount
Joerg Roedel (2):
x86, gart: Set DISTLBWALKPRB bit always
x86, gart: Make sure GART does not map physmem above 1TB
KOSAKI Motohiro (1):
oom: use pte pages in OOM score
Kyle McMartin (1):
ACPI battery: fribble sysfs files from a resume notifier
Lars-Peter Clausen (1):
ASoC: codecs: JZ4740: Fix OOPS
Liu Yuan (1):
block, blk-sysfs: Fix an err return path in blk_register_queue()
Marcin Slusarz (1):
drm/nouveau: fix notifier memory corruption bug
Mark Brown (1):
ASoC: Fix output PGA enabling in wm_hubs CODECs
Mathew McKernan (1):
drm/i915/tv: Remember the detected TV type
Maxime Bizon (1):
ahci: don't enable port irq before handler is registered
Mel Gorman (1):
mm: check if PTE is already allocated during page fault
Michael Schmitz (1):
m68k/mm: Set all online nodes in N_NORMAL_MEMORY
Mikhail Kshevetskiy (1):
tty/n_gsm: fix bug in CRC calculation for gsm1 mode
OGAWA Hirofumi (1):
nfsd4: Fix filp leak
Patrick Boettcher (1):
FLEXCOP-PCI: fix __xlate_proc_name-warning for flexcop-pci
Rafael J. Wysocki (1):
ACPI / PM: Avoid infinite recurrence while registering power resources
Richard Weinberger (1):
um: mdd support for 64 bit atomic operations
Stanislaw Gruszka (4):
iwlwifi: do not set tx power when channel is changing
iwl3945: do not deprecate software scan
iwl3945: disable hw scan by default
iwlegacy: fix tx_power initialization
Takashi Iwai (1):
ALSA: hda - Add a fix-up for Acer dmic with ALC271x codec
Tejun Heo (1):
libata: Implement ATA_FLAG_NO_DIPM and apply it to mcp65
Trond Myklebust (1):
NFSv4.1: Ensure state manager thread dies on last umount
Uwe Kleine-König (1):
serial/imx: read cts state only after acking cts change irq
Vasiliy Kulikov (2):
agp: fix arbitrary kernel memory writes
agp: fix OOM and buffer overflow
amit salecha (1):
netxen: limit skb frags for non tso packet
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 38 -EXTRAVERSION = .4 +EXTRAVERSION = .5 NAME = Flesh-Eating Bats with Fangs # *DOCUMENTATION*
arch/m68k/mm/motorola.c +2 -0
@@ -300,6 +300,8 @@ void __init paging_init(void) zones_size[ZONE_DMA ] = m68k_memory[i].size >>PAGE_SHIFT ;free_area_init_node (i, zones_size, m68k_memory[i].addr >>PAGE_SHIFT ,NULL ); +if (node_present_pages (i)) +node_set_state (i,N_NORMAL_MEMORY ); } }
arch/parisc/mm/init.c +3 -1
@@ -266,8 +266,10 @@ static void __init setup_bootmem(void) }memset (pfnnid_map,0xff ,sizeof (pfnnid_map)); -for (i =0 ; i < npmem_ranges; i++) +for (i =0 ; i < npmem_ranges; i++) { +node_set_state (i,N_NORMAL_MEMORY );node_set_online (i); + }#endif /*
arch/s390/kvm/sie64a.S +2 -2
@@ -48,10 +48,10 @@ sie_irq_handler: tm __TI_flags+7(%r2),_TIF_EXIT_SIE jz 0f larl %r2,sie_exit # work pending, leave sie - stg %r2,__LC_RETURN_PSW+8 + stg %r2,SPI_PSW+8(0,%r15) br %r14 0: larl %r2,sie_reenter # re-enter with guest id - stg %r2,__LC_RETURN_PSW+8 + stg %r2,SPI_PSW+8(0,%r15) 1: br %r14 /*
arch/s390/mm/fault.c +2 -2
@@ -558,9 +558,9 @@ static void pfault_interrupt(unsigned int ext_int_code,* Get the token (= address of the task structure of the affected task). */ #ifdef CONFIG_64BIT - tsk = *(struct task_struct **) param64; + tsk = (struct task_struct *) param64;#else - tsk = *(struct task_struct **) param32; + tsk = (struct task_struct *) param32;#endif if (subcode &0x0080 ) {
arch/um/sys-i386/Makefile +1 -1
@@ -4,7 +4,7 @@ obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ ptrace_user.o setjmp.o signal.o stub.o stub_segv.o syscalls.o sysrq.o \ - sys_call_table.o tls.o + sys_call_table.o tls.o atomic64_cx8_32.o obj-$(CONFIG_BINFMT_ELF) += elfcore.o
arch/um/sys-i386/atomic64_cx8_32.S new file +225 -0
225 lines not on this page · raw message
arch/x86/include/asm/gart.h +2 -2
@@ -66,7 +66,7 @@ static inline void gart_set_size_and_enable(struct pci_dev *dev, u32 order)* Don't enable translation but enable GART IO and CPU accesses. * Also, set DISTLBWALKPRB since GART tables memory is UC. */ - ctl =DISTLBWALKPRB | order <<1 ; + ctl = order <<1 ;pci_write_config_dword (dev,AMD64_GARTAPERTURECTL , ctl); }
@@ -83,7 +83,7 @@ static inline void enable_gart_translation(struct pci_dev *dev, u64 addr)/* Enable GART translation for this hammer. */ pci_read_config_dword (dev,AMD64_GARTAPERTURECTL , &ctl); - ctl |=GARTEN ; + ctl |=GARTEN |DISTLBWALKPRB ; ctl &= ~(DISGARTCPU |DISGARTIO );pci_write_config_dword (dev,AMD64_GARTAPERTURECTL , ctl); }
arch/x86/kernel/aperture_64.c +1 -1
@@ -500,7 +500,7 @@ out:* Don't enable translation yet but enable GART IO and CPU * accesses and set DISTLBWALKPRB since GART table memory is UC. */ -u32 ctl =DISTLBWALKPRB | aper_order <<1 ; +u32 ctl = aper_order <<1 ; bus = amd_nb_bus_dev_ranges[i].bus; dev_base = amd_nb_bus_dev_ranges[i].dev_base;
arch/x86/kernel/pci-gart_64.c +8 -1
@@ -81,6 +81,9 @@ static u32 gart_unmapped_entry;#define AGPEXTERN #endif +/* GART can only remap to physical addresses < 1TB */ +#define GART_MAX_PHYS_ADDR (1ULL << 40) +/* backdoor interface to AGP driver */ AGPEXTERN int agp_memory_reserved; AGPEXTERN __u32 *agp_gatt_table;
@@ -212,9 +215,13 @@ static dma_addr_t dma_map_area(struct device *dev, dma_addr_t phys_mem, size_t size, int dir, unsigned long align_mask) { unsigned long npages = iommu_num_pages(phys_mem, size, PAGE_SIZE); -unsigned long iommu_page =alloc_iommu (dev, npages, align_mask); +unsigned long iommu_page;int i; +if (unlikely (phys_mem + size >GART_MAX_PHYS_ADDR )) +return bad_dma_addr; + + iommu_page =alloc_iommu (dev, npages, align_mask);if (iommu_page ==-1 ) {if (!nonforced_iommu (dev, phys_mem, size))return phys_mem;
block/blk-sysfs.c +3 -1
@@ -511,8 +511,10 @@ int blk_register_queue(struct gendisk *disk)return ret; ret =kobject_add (&q->kobj,kobject_get (&dev->kobj),"%s" ,"queue" ); -if (ret <0 ) +if (ret <0 ) { +blk_trace_remove_sysfs (dev);return ret; + }kobject_uevent (&q->kobj,KOBJ_ADD );
drivers/acpi/battery.c +22 -0
@@ -33,6 +33,7 @@#include <linux/async.h> #include <linux/dmi.h> #include <linux/slab.h> +#include <linux/suspend.h> #ifdef CONFIG_ACPI_PROCFS_POWER #include <linux/proc_fs.h>
@@ -102,6 +103,7 @@ struct acpi_battery {struct mutex lock;struct power_supply bat;struct acpi_device *device; +struct notifier_block pm_nb;unsigned long update_time;int rate_now;int capacity_now;
@@ -940,6 +942,21 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)power_supply_changed (&battery->bat); } +static int battery_notify (struct notifier_block *nb, +unsigned long mode,void *_unused) +{ + struct acpi_battery *battery = container_of(nb, struct acpi_battery, + pm_nb); +switch (mode) { +case PM_POST_SUSPEND : +sysfs_remove_battery (battery); +sysfs_add_battery (battery); +break ; + } + +return 0 ; +} +static int acpi_battery_add (struct acpi_device *device) {int result =0 ;
@@ -972,6 +989,10 @@ static int acpi_battery_add(struct acpi_device *device)#endif kfree (battery); } + + battery->pm_nb.notifier_call = battery_notify; +register_pm_notifier (&battery->pm_nb); +return result; }
@@ -982,6 +1003,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)if (!device || !acpi_driver_data (device))return -EINVAL ; battery =acpi_driver_data (device); +unregister_pm_notifier (&battery->pm_nb);#ifdef CONFIG_ACPI_PROCFS_POWER acpi_battery_remove_fs (device);#endif
drivers/acpi/scan.c +4 -0
@@ -944,6 +944,10 @@ static int acpi_bus_get_flags(struct acpi_device *device)if (ACPI_SUCCESS (status)) device->flags.lockable =1 ; +/* Power resources cannot be power manageable. */ +if (device->device_type ==ACPI_BUS_TYPE_POWER ) +return 0 ; +/* Presence of _PS0|_PR0 indicates 'power manageable' */ status =acpi_get_handle (device->handle,"_PS0" , &temp);if (ACPI_FAILURE (status))
drivers/ata/ahci.c +1 -1
@@ -150,7 +150,7 @@ static const struct ata_port_info ahci_port_info[] = { {AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA |AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ), - .flags = AHCI_FLAG_COMMON, + .flags = AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM, .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops,
drivers/ata/libahci.c +15 -2
@@ -1897,7 +1897,17 @@ static void ahci_pmp_attach(struct ata_port *ap)ahci_enable_fbs (ap); pp->intr_mask |=PORT_IRQ_BAD_PMP ; -writel (pp->intr_mask, port_mmio +PORT_IRQ_MASK ); + +/* +* We must not change the port interrupt mask register if the +* port is marked frozen, the value in pp->intr_mask will be +* restored later when the port is thawed. +* +* Note that during initialization, the port is marked as +* frozen since the irq handler is not yet registered. +*/ +if (!(ap->pflags &ATA_PFLAG_FROZEN )) +writel (pp->intr_mask, port_mmio +PORT_IRQ_MASK ); }static void ahci_pmp_detach (struct ata_port *ap)
@@ -1913,7 +1923,10 @@ static void ahci_pmp_detach(struct ata_port *ap)writel (cmd, port_mmio +PORT_CMD ); pp->intr_mask &= ~PORT_IRQ_BAD_PMP ; -writel (pp->intr_mask, port_mmio +PORT_IRQ_MASK ); + +/* see comment above in ahci_pmp_attach() */ +if (!(ap->pflags &ATA_PFLAG_FROZEN )) +writel (pp->intr_mask, port_mmio +PORT_IRQ_MASK ); }int ahci_port_resume (struct ata_port *ap)
drivers/ata/libata-core.c +2 -2
@@ -5479,8 +5479,8 @@ struct ata_port *ata_port_alloc(struct ata_host *host) ap =kzalloc (sizeof (*ap),GFP_KERNEL );if (!ap)return NULL ; - - ap->pflags |=ATA_PFLAG_INITIALIZING ; + + ap->pflags |=ATA_PFLAG_INITIALIZING |ATA_PFLAG_FROZEN ; ap->lock = &host->lock; ap->print_id =-1 ; ap->host = host;
drivers/ata/libata-eh.c +4 -2
@@ -3276,6 +3276,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,struct ata_eh_context *ehc = &link->eh_context;struct ata_device *dev, *link_dev =NULL , *lpm_dev =NULL ;enum ata_lpm_policy old_policy = link->lpm_policy; +bool no_dipm = ap->flags &ATA_FLAG_NO_DIPM ;unsigned int hints =ATA_LPM_EMPTY |ATA_LPM_HIPM ;unsigned int err_mask;int rc;
@@ -3292,7 +3293,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,*/ ata_for_each_dev (dev, link,ENABLED ) {bool hipm =ata_id_has_hipm (dev->id); -bool dipm =ata_id_has_dipm (dev->id); +bool dipm =ata_id_has_dipm (dev->id) && !no_dipm;/* find the first enabled and LPM enabled devices */ if (!link_dev)
@@ -3349,7 +3350,8 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,/* host config updated, enable DIPM if transitioning to MIN_POWER */ ata_for_each_dev (dev, link,ENABLED ) { -if (policy ==ATA_LPM_MIN_POWER &&ata_id_has_dipm (dev->id)) { +if (policy ==ATA_LPM_MIN_POWER && !no_dipm && +ata_id_has_dipm (dev->id)) { err_mask =ata_dev_set_feature (dev,SETFEATURES_SATA_ENABLE ,SATA_DIPM );if (err_mask && err_mask !=AC_ERR_DEV ) {
drivers/char/agp/generic.c +15 -4
@@ -115,6 +115,9 @@ static struct agp_memory *agp_create_user_memory(unsigned long num_agp_pages)struct agp_memory *new;unsigned long alloc_size = num_agp_pages*sizeof (struct page *); +if (INT_MAX /sizeof (struct page *) < num_agp_pages) +return NULL ; + new =kzalloc (sizeof (struct agp_memory ),GFP_KERNEL );if (new ==NULL )return NULL ;
@@ -234,11 +237,14 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,int scratch_pages;struct agp_memory *new;size_t i; +int cur_memory;if (!bridge)return NULL ; -if ((atomic_read (&bridge->current_memory_agp) + page_count) > bridge->max_memory_agp) + cur_memory =atomic_read (&bridge->current_memory_agp); +if ((cur_memory + page_count > bridge->max_memory_agp) || + (cur_memory + page_count < page_count))return NULL ;if (type >=AGP_USER_TYPES ) {
@@ -1089,8 +1095,8 @@ int agp_generic_insert_memory(struct agp_memory * mem, off_t pg_start, int type)return -EINVAL ; } -/* AK: could wrap */ -if ((pg_start + mem->page_count) > num_entries) +if (((pg_start + mem->page_count) > num_entries) || + ((pg_start + mem->page_count) < pg_start))return -EINVAL ; j = pg_start;
@@ -1124,7 +1130,7 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type) {size_t i;struct agp_bridge_data *bridge; -int mask_type; +int mask_type, num_entries; bridge = mem->bridge;if (!bridge)
@@ -1136,6 +1142,11 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type)if (type != mem->type)return -EINVAL ; + num_entries =agp_num_entries (); +if (((pg_start + mem->page_count) > num_entries) || + ((pg_start + mem->page_count) < pg_start)) +return -EINVAL ; + mask_type = bridge->driver->agp_type_to_mask_type (bridge, type);if (mask_type !=0 ) {/* The generic routines know nothing of memory types */
drivers/char/virtio_console.c +0 -11
@@ -1280,18 +1280,7 @@ static void unplug_port(struct port *port)spin_lock_irq (&pdrvdata_lock);list_del (&port->cons.list);spin_unlock_irq (&pdrvdata_lock); -#if 0 -/* -* hvc_remove() not called as removing one hvc port -* results in other hvc ports getting frozen. -* -* Once this is resolved in hvc, this functionality -* will be enabled. Till that is done, the -EPIPE -* return from get_chars() above will help -* hvc_console.c to clean up on ports we remove here. -*/ hvc_remove (port->cons.hvc); -#endif }/* Remove unused data this port might have received. */
drivers/gpu/drm/Kconfig +1 -0
@@ -24,6 +24,7 @@ config DRM_KMS_HELPER depends on DRM select FB select FRAMEBUFFER_CONSOLE if !EXPERT + select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE help FB and CRTC helpers for KMS drivers.
drivers/gpu/drm/i915/intel_display.c +36 -32
86 lines not on this page · raw message
drivers/gpu/drm/i915/intel_tv.c +2 -0
@@ -1380,7 +1380,9 @@ intel_tv_detect(struct drm_connector *connector, bool force)if (type <0 )return connector_status_disconnected; + intel_tv->type = type;intel_tv_find_better_format (connector); +return connector_status_connected; }
drivers/gpu/drm/nouveau/nouveau_fbcon.c +2 -2
@@ -181,13 +181,13 @@ nouveau_fbcon_sync(struct fb_info *info)OUT_RING (chan,0 ); } -nouveau_bo_wr32 (chan->notifier_bo, chan->m2mf_ntfy +3 ,0xffffffff ); +nouveau_bo_wr32 (chan->notifier_bo, chan->m2mf_ntfy/4 +3 ,0xffffffff );FIRE_RING (chan);mutex_unlock (&chan->mutex); ret = -EBUSY ;for (i =0 ; i <100000 ; i++) { -if (!nouveau_bo_rd32 (chan->notifier_bo, chan->m2mf_ntfy +3 )) { +if (!nouveau_bo_rd32 (chan->notifier_bo, chan->m2mf_ntfy/4 +3 )) { ret =0 ;break ; }
drivers/gpu/drm/radeon/atom.c +3 -3
@@ -135,7 +135,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,case ATOM_IIO_MOVE_INDEX : temp &= ~((0xFFFFFFFF >> (32 -CU8 (base +1 ))) << -CU8 (base +2 )); +CU8 (base +3 )); temp |= ((index >>CU8 (base +2 )) & (0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base +
@@ -145,7 +145,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,case ATOM_IIO_MOVE_DATA : temp &= ~((0xFFFFFFFF >> (32 -CU8 (base +1 ))) << -CU8 (base +2 )); +CU8 (base +3 )); temp |= ((data >>CU8 (base +2 )) & (0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base +
@@ -155,7 +155,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,case ATOM_IIO_MOVE_ATTR : temp &= ~((0xFFFFFFFF >> (32 -CU8 (base +1 ))) << -CU8 (base +2 )); +CU8 (base +3 )); temp |= ((ctx-> io_attr >> CU8(base + 2)) & (0xFFFFFFFF >> (32 -
drivers/gpu/drm/radeon/atombios_crtc.c +1 -5
@@ -532,10 +532,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,else pll->flags |=RADEON_PLL_PREFER_LOW_REF_DIV ; -if ((rdev->family ==CHIP_R600 ) || - (rdev->family ==CHIP_RV610 ) || - (rdev->family ==CHIP_RV630 ) || - (rdev->family ==CHIP_RV670 )) +if (rdev->family <CHIP_RV770 ) pll->flags |=RADEON_PLL_PREFER_MINM_OVER_MAXP ; }else { pll->flags |=RADEON_PLL_LEGACY ;
@@ -565,7 +562,6 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT )) {if (ss_enabled) {if (ss->refdiv) { - pll->flags |=RADEON_PLL_PREFER_MINM_OVER_MAXP ; pll->flags |=RADEON_PLL_USE_REF_DIV ; pll->reference_div = ss->refdiv;if (ASIC_IS_AVIVO (rdev))
drivers/input/xen-kbdfront.c +11 -1
@@ -286,7 +286,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev, enum xenbus_state backend_state) {struct xenkbd_info *info =dev_get_drvdata (&dev->dev); -int val; +int ret, val;switch (backend_state) {case XenbusStateInitialising:
@@ -299,6 +299,16 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,case XenbusStateInitWait: InitWait: + ret =xenbus_scanf (XBT_NIL , info->xbdev->otherend, +"feature-abs-pointer" ,"%d" , &val); +if (ret <0 ) + val =0 ; +if (val) { + ret =xenbus_printf (XBT_NIL , info->xbdev->nodename, +"request-abs-pointer" ,"1" ); +if (ret) +pr_warning ("can't request abs-pointer\n" ); + }xenbus_switch_state (dev, XenbusStateConnected);break ;
drivers/media/dvb/b2c2/flexcop-pci.c +1 -1
@@ -38,7 +38,7 @@ MODULE_PARM_DESC(debug, DEBSTATUS);#define DRIVER_VERSION "0.1" -#define DRIVER_NAME "Technisat/B2C2 FlexCop II/IIb/III Digital TV PCI Driver" +#define DRIVER_NAME "flexcop-pci"#define DRIVER_AUTHOR "Patrick Boettcher <[email protected]>"struct flexcop_pci {
drivers/net/netxen/netxen_nic.h +2 -2
@@ -174,7 +174,7 @@#define MAX_NUM_CARDS 4 -#define MAX_BUFFERS_PER_CMD 32 +#define NETXEN_MAX_FRAGS_PER_TX 14#define MAX_TSO_HEADER_DESC 2#define MGMT_CMD_DESC_RESV 4#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \
@@ -558,7 +558,7 @@ struct netxen_recv_crb {*/ struct netxen_cmd_buffer {struct sk_buff *skb; -struct netxen_skb_frag frag_array[MAX_BUFFERS_PER_CMD +1 ]; +struct netxen_skb_frag frag_array[MAX_SKB_FRAGS +1 ];u32 frag_count; };
drivers/net/netxen/netxen_nic_main.c +17 -0
@@ -1841,6 +1841,8 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)struct cmd_desc_type0 *hwdesc, *first_desc;struct pci_dev *pdev;int i, k; +int delta =0 ; +struct skb_frag_struct *frag;u32 producer;int frag_count, no_of_desc;
@@ -1848,6 +1850,21 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) frag_count =skb_shinfo (skb)->nr_frags +1 ; +/* 14 frags supported for normal packet and +* 32 frags supported for TSO packet +*/ +if (!skb_is_gso (skb) && frag_count >NETXEN_MAX_FRAGS_PER_TX ) { + +for (i =0 ; i < (frag_count -NETXEN_MAX_FRAGS_PER_TX ); i++) { + frag = &skb_shinfo (skb)->frags[i]; + delta += frag->size; + } + +if (!__pskb_pull_tail (skb, delta)) + goto drop_packet; + + frag_count =1 +skb_shinfo (skb)->nr_frags; + }/* 4 fragments per cmd des */ no_of_desc = (frag_count +3 ) >>2 ;
drivers/net/qlcnic/qlcnic.h +1 -0
@@ -99,6 +99,7 @@#define TX_UDPV6_PKT 0x0c/* Tx defines */ +#define QLCNIC_MAX_FRAGS_PER_TX 14#define MAX_TSO_HEADER_DESC 2#define MGMT_CMD_DESC_RESV 4#define TX_STOP_THRESH ((MAX_SKB_FRAGS >> 2) + MAX_TSO_HEADER_DESC \
drivers/net/qlcnic/qlcnic_main.c +14 -0
@@ -2099,6 +2099,7 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)struct cmd_desc_type0 *hwdesc, *first_desc;struct pci_dev *pdev;struct ethhdr *phdr; +int delta =0 ;int i, k;u32 producer;
@@ -2118,6 +2119,19 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) } frag_count =skb_shinfo (skb)->nr_frags +1 ; +/* 14 frags supported for normal packet and +* 32 frags supported for TSO packet +*/ +if (!skb_is_gso (skb) && frag_count >QLCNIC_MAX_FRAGS_PER_TX ) { + +for (i =0 ; i < (frag_count -QLCNIC_MAX_FRAGS_PER_TX ); i++) + delta +=skb_shinfo (skb)->frags[i].size; + +if (!__pskb_pull_tail (skb, delta)) + goto drop_packet; + + frag_count =1 +skb_shinfo (skb)->nr_frags; + }/* 4 fragments per cmd des */ no_of_desc = (frag_count +3 ) >>2 ;
drivers/net/wireless/ath/ath9k/ar9003_mac.c +4 -4
@@ -615,7 +615,7 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,*/ if (rxsp->status11 & AR_CRCErr) rxs->rs_status |=ATH9K_RXERR_CRC ; -if (rxsp->status11 & AR_PHYErr) { +else if (rxsp->status11 & AR_PHYErr) { phyerr =MS (rxsp->status11, AR_PHYErrCode);/* * If we reach a point here where AR_PostDelimCRCErr is
@@ -638,11 +638,11 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, rxs->rs_phyerr = phyerr; } - } -if (rxsp->status11 & AR_DecryptCRCErr) + }else if (rxsp->status11 & AR_DecryptCRCErr) rxs->rs_status |=ATH9K_RXERR_DECRYPT ; -if (rxsp->status11 & AR_MichaelErr) +else if (rxsp->status11 & AR_MichaelErr) rxs->rs_status |=ATH9K_RXERR_MIC ; +if (rxsp->status11 & AR_KeyMiss) rxs->rs_status |=ATH9K_RXERR_DECRYPT ; }
drivers/net/wireless/ath/ath9k/hw.c +0 -9
@@ -1218,15 +1218,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ah->txchainmask = common->tx_chainmask; ah->rxchainmask = common->rx_chainmask; -if ((common->bus_ops->ath_bus_type !=ATH_USB ) && !ah->chip_fullsleep) { -ath9k_hw_abortpcurecv (ah); -if (!ath9k_hw_stopdmarecv (ah)) { -ath_dbg (common,ATH_DBG_XMIT , -"Failed to stop receive dma\n" ); - bChannelChange = false; - } - } -if (!ath9k_hw_setpower (ah,ATH9K_PM_AWAKE ))return -EIO ;
drivers/net/wireless/ath/ath9k/mac.c +32 -7
@@ -690,17 +690,23 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, rs->rs_flags |=ATH9K_RX_DECRYPT_BUSY ;if ((ads.ds_rxstatus8 & AR_RxFrameOK) ==0 ) { +/* +* Treat these errors as mutually exclusive to avoid spurious +* extra error reports from the hardware. If a CRC error is +* reported, then decryption and MIC errors are irrelevant, +* the frame is going to be dropped either way +*/ if (ads.ds_rxstatus8 & AR_CRCErr) rs->rs_status |=ATH9K_RXERR_CRC ; -if (ads.ds_rxstatus8 & AR_PHYErr) { +else if (ads.ds_rxstatus8 & AR_PHYErr) { rs->rs_status |=ATH9K_RXERR_PHY ; phyerr =MS (ads.ds_rxstatus8, AR_PHYErrCode); rs->rs_phyerr = phyerr; - } -if (ads.ds_rxstatus8 & AR_DecryptCRCErr) + }else if (ads.ds_rxstatus8 & AR_DecryptCRCErr) rs->rs_status |=ATH9K_RXERR_DECRYPT ; -if (ads.ds_rxstatus8 & AR_MichaelErr) +else if (ads.ds_rxstatus8 & AR_MichaelErr) rs->rs_status |=ATH9K_RXERR_MIC ; +if (ads.ds_rxstatus8 & AR_KeyMiss) rs->rs_status |=ATH9K_RXERR_DECRYPT ; }
@@ -770,28 +776,47 @@ void ath9k_hw_abortpcurecv(struct ath_hw *ah) }EXPORT_SYMBOL (ath9k_hw_abortpcurecv); -bool ath9k_hw_stopdmarecv (struct ath_hw *ah) +bool ath9k_hw_stopdmarecv (struct ath_hw *ah,bool *reset) {#define AH_RX_STOP_DMA_TIMEOUT 10000/* usec */ #define AH_RX_TIME_QUANTUM 100/* usec */ struct ath_common *common =ath9k_hw_common (ah); +u32 mac_status, last_mac_status =0 ;int i; +/* Enable access to the DMA observation bus */ +REG_WRITE (ah,AR_MACMISC , + ((AR_MACMISC_DMA_OBS_LINE_8 <<AR_MACMISC_DMA_OBS_S ) | + (AR_MACMISC_MISC_OBS_BUS_1 << +AR_MACMISC_MISC_OBS_BUS_MSB_S ))); +REG_WRITE (ah,AR_CR ,AR_CR_RXD );/* Wait for rx enable bit to go low */ for (i =AH_RX_STOP_DMA_TIMEOUT /AH_TIME_QUANTUM ; i !=0 ; i--) {if ((REG_READ (ah,AR_CR ) &AR_CR_RXE ) ==0 )break ; + +if (!AR_SREV_9300_20_OR_LATER (ah)) { + mac_status =REG_READ (ah,AR_DMADBG_7 ) &0x7f0 ; +if (mac_status ==0x1c0 && mac_status == last_mac_status) { + *reset = true; +break ; + } + + last_mac_status = mac_status; + } +udelay (AH_TIME_QUANTUM ); }if (i ==0 ) {ath_err (common, -"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n" , +"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n" ,AH_RX_STOP_DMA_TIMEOUT /1000 ,REG_READ (ah,AR_CR ), -REG_READ (ah,AR_DIAG_SW )); +REG_READ (ah,AR_DIAG_SW ), +REG_READ (ah,AR_DMADBG_7 ));return false; }else {return true;
drivers/net/wireless/ath/ath9k/mac.h +1 -1
@@ -692,7 +692,7 @@ bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set);void ath9k_hw_putrxbuf (struct ath_hw *ah,u32 rxdp);void ath9k_hw_startpcureceive (struct ath_hw *ah,bool is_scanning);void ath9k_hw_abortpcurecv (struct ath_hw *ah); -bool ath9k_hw_stopdmarecv (struct ath_hw *ah); +bool ath9k_hw_stopdmarecv (struct ath_hw *ah,bool *reset);int ath9k_hw_beaconq_setup (struct ath_hw *ah);/* Interrupt Handling */
drivers/net/wireless/ath/ath9k/recv.c +3 -3
@@ -513,12 +513,12 @@ start_recv:bool ath_stoprecv (struct ath_softc *sc) {struct ath_hw *ah = sc->sc_ah; -bool stopped; +bool stopped, reset = false;spin_lock_bh (&sc->rx.rxbuflock);ath9k_hw_abortpcurecv (ah);ath9k_hw_setrxfilter (ah,0 ); - stopped =ath9k_hw_stopdmarecv (ah); + stopped =ath9k_hw_stopdmarecv (ah, &reset);if (sc->sc_ah->caps.hw_caps &ATH9K_HW_CAP_EDMA )ath_edma_stop_recv (sc);
@@ -533,7 +533,7 @@ bool ath_stoprecv(struct ath_softc *sc) "confusing the DMA engine when we start RX up\n");ATH_DBG_WARN_ON_ONCE (!stopped); } -return stopped; +return stopped || reset; }void ath_flushrecv (struct ath_softc *sc)
drivers/net/wireless/ath/regd_common.h +1 -0
@@ -195,6 +195,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = { {APL9_WORLD, CTL_ETSI, CTL_ETSI}, {APL3_FCCA, CTL_FCC, CTL_FCC}, + {APL7_FCCA, CTL_FCC, CTL_FCC}, {APL1_ETSIC, CTL_FCC, CTL_ETSI}, {APL2_ETSIC, CTL_FCC, CTL_ETSI}, {APL2_APLD, CTL_FCC, NO_CTL},
drivers/net/wireless/iwlwifi/iwl-3945-hw.h +0 -2
@@ -74,8 +74,6 @@/* RSSI to dBm */ #define IWL39_RSSI_OFFSET 95 -#define IWL_DEFAULT_TX_POWER 0x0F -/* * EEPROM related constants, enums, and structures. */
drivers/net/wireless/iwlwifi/iwl-3945.c +1 -1
@@ -1823,7 +1823,7 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)/* If we issue a new RXON command which required a tune then we must * send a new TXPOWER command or we won't be able to Tx any frames */ - rc = priv->cfg->ops->lib->send_tx_power (priv); + rc =iwl_set_tx_power (priv, priv->tx_power_next, true);if (rc) {IWL_ERR (priv,"Error setting Tx power (%d).\n" , rc);return rc;
drivers/net/wireless/iwlwifi/iwl-4965.c +1 -1
@@ -1571,7 +1571,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c/* If we issue a new RXON command which required a tune then we must * send a new TXPOWER command or we won't be able to Tx any frames */ - ret =iwl_set_tx_power (priv, priv->tx_power_user_lmt, true); + ret =iwl_set_tx_power (priv, priv->tx_power_next, true);if (ret) {IWL_ERR (priv,"Error sending TX power (%d)\n" , ret);return ret;
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +2 -3
@@ -288,10 +288,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)* If we issue a new RXON command which required a tune then we must * send a new TXPOWER command or we won't be able to Tx any frames. * -* FIXME: which RXON requires a tune? Can we optimise this out in -* some cases? +* It's expected we set power here if channel is changing. */ - ret =iwl_set_tx_power (priv, priv->tx_power_user_lmt, true); + ret =iwl_set_tx_power (priv, priv->tx_power_next, true);if (ret) {IWL_ERR (priv,"Error sending TX power (%d)\n" , ret);return ret;
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -6
@@ -3841,12 +3841,6 @@ static int iwl_init_drv(struct iwl_priv *priv) priv->dynamic_frag_thresh =BT_FRAG_THRESHOLD_DEF ; } -/* Set the tx_power_user_lmt to the lowest power level -* this value will get overwritten by channel max power avg -* from eeprom */ - priv->tx_power_user_lmt =IWLAGN_TX_POWER_TARGET_POWER_MIN ; - priv->tx_power_next =IWLAGN_TX_POWER_TARGET_POWER_MIN ; - ret =iwl_init_channel_map (priv);if (ret) {IWL_ERR (priv,"initializing regulatory failed: %d\n" , ret);
drivers/net/wireless/iwlwifi/iwl-core.c +17 -5
@@ -168,6 +168,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)struct ieee80211_channel *geo_ch;struct ieee80211_rate *rates;int i =0 ; +s8 max_tx_power =0 ;if (priv->bands[IEEE80211_BAND_2GHZ ].n_bitrates || priv->bands[IEEE80211_BAND_5GHZ ].n_bitrates) {
@@ -244,8 +245,8 @@ int iwlcore_init_geos(struct iwl_priv *priv) geo_ch->flags |= ch->ht40_extension_channel; -if (ch->max_power_avg > priv->tx_power_device_lmt) - priv->tx_power_device_lmt = ch->max_power_avg; +if (ch->max_power_avg > max_tx_power) + max_tx_power = ch->max_power_avg; }else { geo_ch->flags |=IEEE80211_CHAN_DISABLED ; }
@@ -258,6 +259,10 @@ int iwlcore_init_geos(struct iwl_priv *priv) geo_ch->flags); } + priv->tx_power_device_lmt = max_tx_power; + priv->tx_power_user_lmt = max_tx_power; + priv->tx_power_next = max_tx_power; +if ((priv->bands[IEEE80211_BAND_5GHZ ].n_channels ==0 ) && priv->cfg->sku &IWL_SKU_A ) { IWL_INFO(priv, "Incorrectly detected BG card as ABG. "
@@ -1161,6 +1166,8 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force) {int ret;s8 prev_tx_power; +bool defer; +struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS ];lockdep_assert_held (&priv->mutex);
@@ -1188,10 +1195,15 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)if (!iwl_is_ready_rf (priv))return -EIO ; -/* scan complete use tx_power_next, need to be updated */ +/* scan complete and commit_rxon use tx_power_next value, +* it always need to be updated for newest request */ priv->tx_power_next = tx_power; -if (test_bit (STATUS_SCANNING , &priv->status) && !force) { -IWL_DEBUG_INFO (priv,"Deferring tx power set while scanning\n" ); + +/* do not set tx power when scanning or channel changing */ + defer =test_bit (STATUS_SCANNING , &priv->status) || +memcmp (&ctx->active, &ctx->staging,sizeof (ctx->staging)); +if (defer && !force) { +IWL_DEBUG_INFO (priv,"Deferring tx power set\n" );return 0 ; }
drivers/net/wireless/iwlwifi/iwl-eeprom.c +0 -7
@@ -724,13 +724,6 @@ int iwl_init_channel_map(struct iwl_priv *priv) flags & EEPROM_CHANNEL_RADAR)) ? "" : "not "); -/* Set the tx_power_user_lmt to the highest power -* supported by any channel */ -if (eeprom_ch_info[ch].max_power_avg > - priv->tx_power_user_lmt) - priv->tx_power_user_lmt = - eeprom_ch_info[ch].max_power_avg; - ch_info++; } }
drivers/net/wireless/iwlwifi/iwl3945-base.c +3 -8
@@ -94,6 +94,7 @@ MODULE_LICENSE("GPL");struct iwl_mod_params iwl3945_mod_params = { .sw_crypto =1 , .restart_fw =1 , + .disable_hw_scan =1 ,/* the rest are 0 by default */ };
@@ -3858,10 +3859,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv) priv->force_reset[IWL_FW_RESET ].reset_duration =IWL_DELAY_NEXT_FORCE_FW_RELOAD ; - - priv->tx_power_user_lmt =IWL_DEFAULT_TX_POWER ; - priv->tx_power_next =IWL_DEFAULT_TX_POWER ; -if (eeprom->version <EEPROM_3945_EEPROM_VERSION ) {IWL_WARN (priv,"Unsupported EEPROM version: 0x%04X\n" , eeprom->version);
@@ -3995,8 +3992,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e* "the hard way", rather than using device's scan. */ if (iwl3945_mod_params.disable_hw_scan) { -dev_printk (KERN_DEBUG , &(pdev->dev), -"sw scan support is deprecated\n" ); +IWL_DEBUG_INFO (priv,"Disabling hw_scan\n" ); iwl3945_hw_ops.hw_scan =NULL ; }
@@ -4318,8 +4314,7 @@ MODULE_PARM_DESC(debug, "debug output mask");#endif module_param_named (disable_hw_scan, iwl3945_mod_params.disable_hw_scan, int,S_IRUGO ); -MODULE_PARM_DESC (disable_hw_scan, -"disable hardware scanning (default 0) (deprecated)" ); +MODULE_PARM_DESC (disable_hw_scan,"disable hardware scanning (default 1)" );module_param_named (fw_restart3945, iwl3945_mod_params.restart_fw, int,S_IRUGO );MODULE_PARM_DESC (fw_restart3945,"restart firmware in case of error" );
drivers/net/wireless/p54/txrx.c +1 -1
@@ -705,7 +705,7 @@ int p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)struct p54_tx_info *p54info;struct p54_hdr *hdr;struct p54_tx_data *txhdr; -unsigned int padding, len, extra_len; +unsigned int padding, len, extra_len =0 ;int i, j, ridx;u16 hdr_flags =0 , aid =0 ;u8 rate, queue =0 , crypt_offset =0 ;
drivers/pci/intel-iommu.c +14 -3
@@ -1835,7 +1835,7 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw) ret =iommu_attach_domain (domain, iommu);if (ret) { -domain_exit (domain); +free_domain_mem (domain); goto error; }
@@ -3260,9 +3260,15 @@ static int device_notifier(struct notifier_block *nb,if (!domain)return 0 ; -if (action ==BUS_NOTIFY_UNBOUND_DRIVER && !iommu_pass_through) +if (action ==BUS_NOTIFY_UNBOUND_DRIVER && !iommu_pass_through) {domain_remove_one_dev_info (domain, pdev); +if (!(domain->flags &DOMAIN_FLAG_VIRTUAL_MACHINE ) && + !(domain->flags &DOMAIN_FLAG_STATIC_IDENTITY ) && +list_empty (&domain->devices)) +domain_exit (domain); + } +return 0 ; }
@@ -3411,6 +3417,11 @@ static void domain_remove_one_dev_info(struct dmar_domain *domain, domain->iommu_count--;domain_update_iommu_cap (domain);spin_unlock_irqrestore (&domain->iommu_lock, tmp_flags); + +spin_lock_irqsave (&iommu->lock, tmp_flags); +clear_bit (domain->id, iommu->domain_ids); + iommu->domains[domain->id] =NULL ; +spin_unlock_irqrestore (&iommu->lock, tmp_flags); }spin_unlock_irqrestore (&device_domain_lock, flags);
@@ -3627,9 +3638,9 @@ static int intel_iommu_attach_device(struct iommu_domain *domain, pte = dmar_domain->pgd;if (dma_pte_present (pte)) { -free_pgtable_page (dmar_domain->pgd); dmar_domain->pgd = (struct dma_pte *)phys_to_virt (dma_pte_addr (pte)); +free_pgtable_page (pte); } dmar_domain->agaw--; }
drivers/platform/x86/ideapad-laptop.c +2 -0
@@ -459,6 +459,8 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)if (test_bit (vpc_bit, &vpc1)) {if (vpc_bit ==9 )ideapad_sync_rfk_state (adevice); +else if (vpc_bit ==4 ) +read_ec_data (handle,0x12 , &vpc2);else ideapad_input_report (priv, vpc_bit); }
drivers/tty/n_gsm.c +6 -2
@@ -1659,8 +1659,12 @@ static void gsm_queue(struct gsm_mux *gsm)if ((gsm->control & ~PF ) ==UI ) gsm->fcs =gsm_fcs_add_block (gsm->fcs, gsm->buf, gsm->len); -/* generate final CRC with received FCS */ - gsm->fcs =gsm_fcs_add (gsm->fcs, gsm->received_fcs); +if (gsm->encoding ==0 ){ +/* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only. +In this case it contain the last piece of data +required to generate final CRC */ + gsm->fcs =gsm_fcs_add (gsm->fcs, gsm->received_fcs); + }if (gsm->fcs !=GOOD_FCS ) { gsm->bad_fcs++;if (debug &4 )
drivers/tty/serial/imx.c +2 -1
@@ -382,12 +382,13 @@ static void imx_start_tx(struct uart_port *port)static irqreturn_t imx_rtsint (int irq,void *dev_id) {struct imx_port *sport = dev_id; -unsigned int val =readl (sport->port.membase +USR1 ) &USR1_RTSS ; +unsigned int val;unsigned long flags;spin_lock_irqsave (&sport->port.lock, flags);writel (USR1_RTSD , sport->port.membase +USR1 ); + val =readl (sport->port.membase +USR1 ) &USR1_RTSS ;uart_handle_cts_change (&sport->port, !!val);wake_up_interruptible (&sport->port.state->port.delta_msr_wait);
drivers/virtio/virtio_ring.c +1 -0
@@ -371,6 +371,7 @@ void *virtqueue_detach_unused_buf(struct virtqueue *_vq)/* detach_buf clears data, so grab it now. */ buf = vq->data[i];detach_buf (vq, i); + vq->vring.avail->idx--;END_USE (vq);return buf; }
fs/file.c +11 -7
@@ -9,6 +9,7 @@#include <linux/module.h> #include <linux/fs.h> #include <linux/mm.h> +#include <linux/mmzone.h> #include <linux/time.h> #include <linux/sched.h> #include <linux/slab.h>
@@ -39,14 +40,17 @@ int sysctl_nr_open_max = 1024 * 1024; /* raised later */*/ static DEFINE_PER_CPU(struct fdtable_defer, fdtable_defer_list); -static inline void *alloc_fdmem (unsigned int size) +static void *alloc_fdmem (unsigned int size) { -void *data; - - data =kmalloc (size,GFP_KERNEL |__GFP_NOWARN); -if (data !=NULL ) -return data; - +/* +* Very large allocations can stress page reclaim, so fall back to +* vmalloc() if the allocation size will be considered "large" by the VM. +*/ +if (size <= (PAGE_SIZE <<PAGE_ALLOC_COSTLY_ORDER )) { +void *data =kmalloc (size,GFP_KERNEL |__GFP_NOWARN); +if (data !=NULL ) +return data; + }return vmalloc (size); }
fs/nfs/nfs4state.c +2 -2
@@ -1600,7 +1600,7 @@ static void nfs4_state_manager(struct nfs_client *clp)int status =0 ;/* Ensure exclusive access to NFSv4 state */ -for (;;) { + do { if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state)) { /* We're going to have to re-establish a clientid */ status = nfs4_reclaim_lease(clp);
@@ -1684,7 +1684,7 @@ static void nfs4_state_manager(struct nfs_client *clp)break ;if (test_and_set_bit (NFS4CLNT_MANAGER_RUNNING , &clp->cl_state) !=0 )break ; - } + }while (atomic_read (&clp->cl_count) >1 );return ; out_error: printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
fs/nfs/super.c +9 -0
@@ -2077,6 +2077,15 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)if (error <0 ) goto out; +/* +* noac is a special case. It implies -o sync, but that's not +* necessarily reflected in the mtab options. do_remount_sb +* will clear MS_SYNCHRONOUS if -o sync wasn't specified in the +* remount options, so we have to explicitly reset it. +*/ +if (data->flags &NFS_MOUNT_NOAC ) + *flags |=MS_SYNCHRONOUS ; +/* compare new mount options with old ones */ error =nfs_compare_remount_data (nfss, data); out:
fs/nfsd/nfs4state.c +2 -1
@@ -258,6 +258,7 @@ static void nfs4_put_deleg_lease(struct nfs4_file *fp)if (atomic_dec_and_test (&fp->fi_delegees)) {vfs_setlease (fp->fi_deleg_file,F_UNLCK , &fp->fi_lease); fp->fi_lease =NULL ; +fput (fp->fi_deleg_file); fp->fi_deleg_file =NULL ; } }
@@ -402,8 +403,8 @@ static void free_generic_stateid(struct nfs4_stateid *stp)if (stp->st_access_bmap) { oflag =nfs4_access_bmap_to_omode (stp);nfs4_file_put_access (stp->st_file, oflag); -put_nfs4_file (stp->st_file); } +put_nfs4_file (stp->st_file);kmem_cache_free (stateid_slab, stp); }
fs/ubifs/recovery.c +26 -0
@@ -300,6 +300,32 @@ int ubifs_recover_master_node(struct ubifs_info *c) goto out_free; }memcpy (c->rcvrd_mst_node, c->mst_node,UBIFS_MST_NODE_SZ ); + +/* +* We had to recover the master node, which means there was an +* unclean reboot. However, it is possible that the master node +* is clean at this point, i.e., %UBIFS_MST_DIRTY is not set. +* E.g., consider the following chain of events: +* +* 1. UBIFS was cleanly unmounted, so the master node is clean +* 2. UBIFS is being mounted R/W and starts changing the master +* node in the first (%UBIFS_MST_LNUM). A power cut happens, +* so this LEB ends up with some amount of garbage at the +* end. +* 3. UBIFS is being mounted R/O. We reach this place and +* recover the master node from the second LEB +* (%UBIFS_MST_LNUM + 1). But we cannot update the media +* because we are being mounted R/O. We have to defer the +* operation. +* 4. However, this master node (@c->mst_node) is marked as +* clean (since the step 1). And if we just return, the +* mount code will be confused and won't recover the master +* node when it is re-mounter R/W later. +* +* Thus, to force the recovery by marking the master node as +* dirty. +*/ + c->mst_node->flags |=cpu_to_le32 (UBIFS_MST_DIRTY ); }else {/* Write the recovered master node */ c->max_sqnum =le64_to_cpu (mst->ch.sqnum) -1 ;
fs/ubifs/super.c +15 -3
@@ -1643,15 +1643,27 @@ static int ubifs_remount_rw(struct ubifs_info *c)if (err) goto out; +dbg_gen ("re-mounted read-write" ); + c->remounting_rw =0 ; +if (c->need_recovery) { c->need_recovery =0 ;ubifs_msg ("deferred recovery completed" ); + }else { +/* +* Do not run the debugging space check if the were doing +* recovery, because when we saved the information we had the +* file-system in a state where the TNC and lprops has been +* modified in memory, but all the I/O operations (including a +* commit) were deferred. So the file-system was in +* "non-committed" state. Now the file-system is in committed +* state, and of course the amount of free space will change +* because, for example, the old index size was imprecise. +*/ + err =dbg_check_space_info (c); } -dbg_gen ("re-mounted read-write" ); - c->remounting_rw =0 ; c->always_chk_crc =0 ; - err =dbg_check_space_info (c);mutex_unlock (&c->umount_mutex);return err;
include/linux/huge_mm.h +1 -1
@@ -117,7 +117,7 @@ static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, unsigned long end, long adjust_next) { -if (!vma->anon_vma || vma->vm_ops || vma->vm_file) +if (!vma->anon_vma || vma->vm_ops)return ;__vma_adjust_trans_huge (vma, start, end, adjust_next); }
include/linux/libata.h +1 -0
@@ -203,6 +203,7 @@ enum {* management */ ATA_FLAG_SW_ACTIVITY = (1 <<22 ),/* driver supports sw activity * led */ + ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM *//* bits 24:31 of ap->flags are reserved for LLD specific flags */
include/linux/mm.h +2 -1
@@ -137,7 +137,8 @@ extern unsigned int kobjsize(const void *objp);#define VM_RandomReadHint (v) ((v)->vm_flags & VM_RAND_READ)/* -* special vmas that are non-mergable, non-mlock()able +* Special vmas that are non-mergable, non-mlock()able. +* Note: mm/huge_memory.c VM_NO_THP depends on this definition. */ #define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP)
init/Kconfig +1 -0
@@ -1209,6 +1209,7 @@ config SLAB per cpu and per node queues. config SLUB + depends on BROKEN || NUMA || !DISCONTIGMEM bool "SLUB (Unqueued Allocator)" help SLUB is a slab allocator that minimizes cache line usage
mm/huge_memory.c +24 -19
87 lines not on this page · raw message
mm/memory.c +1 -1
@@ -3332,7 +3332,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,* run pte_offset_map on the pmd, if an huge pmd could * materialize from under us from a different thread. */ -if (unlikely (__pte_alloc (mm, vma, pmd, address))) +if (unlikely (pmd_none (*pmd)) &&__pte_alloc (mm, vma, pmd, address))return VM_FAULT_OOM ;/* if an huge pmd materialized from under us just retry later */ if (unlikely (pmd_trans_huge (*pmd)))
mm/oom_kill.c +6 -3
@@ -172,10 +172,13 @@ unsigned int oom_badness(struct task_struct *p, struct mem_cgroup *mem,/* * The baseline for the badness score is the proportion of RAM that each -* task's rss and swap space use. +* task's rss, pagetable and swap space use. */ - points = (get_mm_rss (p->mm) +get_mm_counter (p->mm,MM_SWAPENTS )) *1000 / - totalpages; + points =get_mm_rss (p->mm) + p->mm->nr_ptes; + points +=get_mm_counter (p->mm,MM_SWAPENTS ); + + points *=1000 ; + points /= totalpages;task_unlock (p);/*
scripts/kconfig/conf.c +1 -1
@@ -332,7 +332,7 @@ static int conf_choice(struct menu *menu) }if (!child)continue ; -if (line[strlen (line) -1 ] =='?' ) { +if (line[0 ] && line[strlen (line) -1 ] =='?' ) {print_help (child);continue ; }
sound/pci/hda/patch_realtek.c +24 -1
@@ -14945,6 +14945,23 @@ static void alc269_fixup_hweq(struct hda_codec *codec,alc_write_coef_idx (codec,0x1e , coef |0x80 ); } +static void alc271_fixup_dmic (struct hda_codec *codec, +const struct alc_fixup *fix,int action) +{ +static struct hda_verb verbs[] = { + {0x20 ,AC_VERB_SET_COEF_INDEX ,0x0d }, + {0x20 ,AC_VERB_SET_PROC_COEF ,0x4000 }, + {} + }; +unsigned int cfg; + +if (strcmp (codec->chip_name,"ALC271X" )) +return ; + cfg =snd_hda_codec_get_pincfg (codec,0x12 ); +if (get_defcfg_connect (cfg) ==AC_JACK_PORT_FIXED ) +snd_hda_sequence_write (codec, verbs); +} +enum {ALC269_FIXUP_SONY_VAIO ,ALC275_FIXUP_SONY_VAIO_GPIO2 ,
@@ -14953,6 +14970,7 @@ enum {ALC269_FIXUP_ASUS_G73JW ,ALC269_FIXUP_LENOVO_EAPD ,ALC275_FIXUP_SONY_HWEQ , + ALC271_FIXUP_DMIC, }; static const struct alc_fixup alc269_fixups[] = {
@@ -15006,7 +15024,11 @@ static const struct alc_fixup alc269_fixups[] = { .v.func = alc269_fixup_hweq, .chained = true, .chain_id =ALC275_FIXUP_SONY_VAIO_GPIO2 - } + }, + [ALC271_FIXUP_DMIC] = { + .type = ALC_FIXUP_FUNC, + .v.func = alc271_fixup_dmic, + }, };static struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -15015,6 +15037,7 @@ static struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x104d ,0x9084 ,"Sony VAIO" ,ALC275_FIXUP_SONY_HWEQ ),SND_PCI_QUIRK_VENDOR (0x104d ,"Sony VAIO" ,ALC269_FIXUP_SONY_VAIO ),SND_PCI_QUIRK (0x1028 ,0x0470 ,"Dell M101z" ,ALC269_FIXUP_DELL_M101Z ), +SND_PCI_QUIRK_VENDOR (0x1025 ,"Acer Aspire" ,ALC271_FIXUP_DMIC ),SND_PCI_QUIRK (0x17aa ,0x20f2 ,"Thinkpad SL410/510" ,ALC269_FIXUP_SKU_IGNORE ),SND_PCI_QUIRK (0x17aa ,0x215e ,"Thinkpad L512" ,ALC269_FIXUP_SKU_IGNORE ), SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
sound/soc/codecs/jz4740.c +0 -2
@@ -308,8 +308,6 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)snd_soc_dapm_add_routes (dapm, jz4740_codec_dapm_routes,ARRAY_SIZE (jz4740_codec_dapm_routes)); -snd_soc_dapm_new_widgets (codec); -jz4740_codec_set_bias_level (codec,SND_SOC_BIAS_STANDBY );return 0 ;
sound/soc/codecs/wm_hubs.c +4 -4
@@ -739,12 +739,12 @@ static const struct snd_soc_dapm_route analogue_routes[] = { { "SPKL", "Input Switch", "MIXINL" }, { "SPKL", "IN1LP Switch", "IN1LP" }, - { "SPKL", "Output Switch", "Left Output Mixer" }, + { "SPKL", "Output Switch", "Left Output PGA" }, { "SPKL", NULL, "TOCLK" }, { "SPKR", "Input Switch", "MIXINR" }, { "SPKR", "IN1RP Switch", "IN1RP" }, - { "SPKR", "Output Switch", "Right Output Mixer" }, + { "SPKR", "Output Switch", "Right Output PGA" }, { "SPKR", NULL, "TOCLK" }, { "SPKL Boost", "Direct Voice Switch", "Direct Voice" },
@@ -766,8 +766,8 @@ static const struct snd_soc_dapm_route analogue_routes[] = { { "SPKOUTRP", NULL, "SPKR Driver" }, { "SPKOUTRN", NULL, "SPKR Driver" }, - { "Left Headphone Mux", "Mixer", "Left Output Mixer" }, - { "Right Headphone Mux", "Mixer", "Right Output Mixer" }, + { "Left Headphone Mux", "Mixer", "Left Output PGA" }, + { "Right Headphone Mux", "Mixer", "Right Output PGA" }, { "Headphone PGA", NULL, "Left Headphone Mux" }, { "Headphone PGA", NULL, "Right Headphone Mux" },