Linux 2.6.39.2
Subsystems (50)
I'm announcing the release of the 2.6.39.2 kernel.
All users of the 2.6.39 kernel series must upgrade.
The updated 2.6.39.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.39.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.39.y.git;a=summarythanks,
greg k-h
------------
Documentation/kernel-parameters.txt | 2 Makefile | 2 arch/powerpc/kernel/head_32.S | 2 arch/powerpc/kernel/smp.c | 4 - arch/tile/kernel/pci.c | 11 +-- arch/x86/kernel/amd_iommu.c | 48 +++++++++++++++- arch/x86/kernel/amd_iommu_init.c | 8 +- arch/x86/kernel/devicetree.c | 11 +++ arch/x86/kernel/process_32.c | 1 arch/x86/kernel/process_64.c | 1 arch/x86/kernel/setup.c | 7 -- arch/x86/kernel/smpboot.c | 13 ++++ arch/x86/lguest/boot.c | 1 arch/x86/platform/efi/efi.c | 45 --------------- arch/x86/platform/efi/efi_64.c | 5 - arch/x86/xen/multicalls.c | 12 ++-- block/blk-core.c | 2 drivers/block/nbd.c | 6 ++ drivers/cpufreq/cpufreq_stats.c | 1 drivers/gpu/drm/i915/intel_lvds.c | 8 ++ drivers/gpu/drm/radeon/atombios_crtc.c | 12 ++-- drivers/gpu/drm/radeon/r100_track.h | 8 ++ drivers/gpu/drm/radeon/radeon_device.c | 1 drivers/hwmon/coretemp.c | 21 +------ drivers/md/md.c | 2 drivers/md/raid5.c | 8 +- drivers/media/media-devnode.c | 4 - drivers/net/igb/igb_main.c | 3 + drivers/net/usb/cdc_ncm.c | 1 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 10 ++- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 10 ++- drivers/net/wireless/ath/ath9k/main.c | 4 + drivers/net/wireless/ath/ath9k/rc.c | 3 - drivers/net/wireless/iwlegacy/iwl-4965-lib.c | 4 - drivers/net/wireless/iwlegacy/iwl-4965.c | 14 ++-- drivers/net/wireless/iwlegacy/iwl-core.c | 30 ++++------ drivers/net/wireless/iwlegacy/iwl-core.h | 2 drivers/net/wireless/iwlegacy/iwl-dev.h | 13 ---- drivers/net/wireless/iwlegacy/iwl4965-base.c | 19 +++--- drivers/net/wireless/iwlwifi/iwl-2000.c | 74 ------------------------- drivers/net/wireless/iwlwifi/iwl-5000.c | 3 - drivers/net/wireless/iwlwifi/iwl-6000.c | 2 drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 12 ---- drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 19 +++++- drivers/net/wireless/iwlwifi/iwl-agn.c | 19 +++--- drivers/net/wireless/iwlwifi/iwl-core.c | 6 -- drivers/net/wireless/iwlwifi/iwl-core.h | 2 drivers/net/wireless/iwlwifi/iwl-dev.h | 13 ---- drivers/net/wireless/iwlwifi/iwl-rx.c | 24 ++++---- drivers/net/wireless/zd1211rw/zd_usb.c | 53 ++++++++++++++--- drivers/oprofile/buffer_sync.c | 21 +++---- drivers/pci/hotplug/pcihp_slot.c | 45 +++++++++++++++ drivers/pci/intel-iommu.c | 48 +++++++++++----- drivers/pci/iova.c | 12 +++- drivers/platform/x86/asus-wmi.c | 2 drivers/scsi/scsi_scan.c | 2 drivers/scsi/scsi_sysfs.c | 1 drivers/staging/gma500/psb_fb.c | 10 +++ drivers/tty/serial/serial_core.c | 63 +++------------------ drivers/usb/class/cdc-acm.c | 2 drivers/usb/core/hub.c | 6 +- drivers/usb/host/xhci-dbg.c | 8 +- drivers/usb/host/xhci-mem.c | 14 ++++ drivers/usb/host/xhci-pci.c | 14 ++++ drivers/usb/host/xhci.c | 14 ++++ drivers/usb/host/xhci.h | 6 ++ drivers/usb/serial/ftdi_sio.c | 1 drivers/usb/serial/ftdi_sio_ids.h | 1 drivers/usb/serial/option.c | 34 ++++++++--- drivers/usb/storage/transport.c | 29 +++++++++ drivers/usb/storage/unusual_devs.h | 19 ++++++ drivers/usb/storage/usb.c | 13 ++++ drivers/usb/storage/usb.h | 2 drivers/video/vga16fb.c | 2 fs/block_dev.c | 4 - fs/cifs/cifsencrypt.c | 2 fs/cifs/connect.c | 6 +- fs/dcookies.c | 3 + fs/exec.c | 5 - fs/fat/file.c | 2 fs/ubifs/journal.c | 1 fs/ubifs/shrinker.c | 6 +- include/linux/efi.h | 1 include/linux/usb_usual.h | 4 + kernel/irq/irqdesc.c | 8 +- kernel/lockdep.c | 2 mm/hugetlb.c | 4 - net/mac80211/ibss.c | 6 +- net/wireless/nl80211.c | 2 security/apparmor/lsm.c | 2 security/tomoyo/mount.c | 2 sound/pci/hda/patch_realtek.c | 1 sound/soc/codecs/ad1836.c | 14 ++-- sound/soc/codecs/ad1836.h | 6 ++ sound/soc/codecs/wm8804.c | 9 ++- sound/soc/codecs/wm8962.c | 4 - sound/soc/samsung/i2s.c | 4 - sound/soc/soc-dapm.c | 17 ++--- 98 files changed, 616 insertions(+), 454 deletions(-)
Alan Stern (1):
usb-storage: redo incorrect reads
Alex Deucher (1):
drm/radeon/kms: viewport height has to be even
Alex Williamson (2):
intel-iommu: Flush unmaps at domain_exit
intel-iommu: Only unlink device domains from iommu
Artem Bityutskiy (2):
UBIFS: fix shrinker object count reports
UBIFS: fix memory leak on error path
Bruno Prémont (1):
video: Fix use-after-free by vga16fb on rmmod
Chris Metcalf (1):
arch/tile: allocate PCI IRQs later in boot
Chris Wright (2):
intel-iommu: Check for identity mapping candidate using system dma mask
intel-iommu: Dont cache iova above 32bit
Dan Carpenter (1):
xen: off by one errors in multicalls.c
Dan Williams (3):
option: add Zoom 4597 modem USB IDs
option: add Alcatel X200 to sendsetup blacklist
option: add Prolink PH300 modem IDs
Daniel Haid (1):
drm/radeon/kms: fix for radeon on systems >4GB without hardware iommu
Daniel Halperin (1):
ath9k: fix two more bugs in tx power
Daniel T Chen (1):
ALSA: hda: Fix quirk for Dell Inspiron 910
Dave Jones (1):
CPUFREQ: Remove cpufreq_stats sysfs entries on module unload.
Dmitry Torokhov (1):
USB: xhci - fix interval calculation for FS isoc endpoints
Florian Fainelli (1):
x86: devicetree: Add missing early_init_dt_setup_initrd_arch stub
Greg Kroah-Hartman (3):
Revert "USB: option: add ID for ZTE MF 330"
Revert "x86, efi: Retain boot service code until after switching to virtual mode" Linux 2.6.39.2
Guenter Roeck (1):
hwmon: (coretemp) Fix TjMax detection for older CPUs
Hans de Goede (1):
drm/i915: Add a no lvds quirk for the Asus EeeBox PC EB1007
Hugh Dickins (1):
mm: fix ENOSPC returned by handle_mm_fault()
James Bottomley (1):
Fix oops caused by queue refcounting failure
Jean Delvare (1):
hwmon: (coretemp) Relax target temperature range check
Jeff Layton (2):
cifs: silence printk when establishing first session on socket
cifs: don't allow cifs_reconnect to exit with NULL socket pointer
Jens Axboe (1):
block: export blk_{get,put}_queue()
Jiri Slaby (3):
serial: core, move termios handling to uart_startup
serial: core, do not set DTR/RTS twice on startup
serial: core, remove uart_update_termios
Joe Perches (1):
asus-wmi: Remove __init from asus_wmi_platform_init
Joerg Roedel (3):
x86/amd-iommu: Use only per-device dma_ops x86/amd-iommu: Fix 3 possible endless loops x86/amd-iommu: Fix boot crash with hidden PCI devices
Johannes Berg (1):
mac80211: fix IBSS teardown race
John Johansen (1):
AppArmor: Fix sleep in invalid context from task_setrlimit
[email protected] (1):
PCI: Set PCIE maxpayload for card during hotplug insertion
Josh Boyer (1):
powerpc: Fix 32-bit SMP build
Jussi Kivilinna (1):
zd1211rw: fix to work on OHCI
Lars-Peter Clausen (2):
ASoC: AD1836: Fix setting the PCM format
ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
Laurent Pinchart (1):
media: Fix media device minor registration
Libor Pechacek (1):
USB: core: Tolerate protocol stall during hub and port status read
Linus Walleij (1):
genirq: Fix descriptor init on non-sparse IRQs
Luciano Coelho (1):
nl80211: fix check for valid SSID size in scan operations
Maarten Lankhorst (2):
xhci: Add defines for hardcoded slot states
xhci: Do not issue device reset when device is not setup
Marek Olšák (1):
drm/radeon/kms: do bounds checking for 3D_LOAD_VBPNTR and bump array limit
Mark Brown (2):
ASoC: Fix WM8962 headphone volume update for use of advanced caches
ASoC: WM8804 does not support sample rates below 32kHz
Mathias Krause (1):
exec: delay address limit change until point of no return
Michael Chang (1):
staging: gma500: get control from firmware framebuffer if conflicts
Mike Habeck (1):
intel-iommu: Add domain check in domain_remove_one_dev_info
Mike Travis (3):
intel-iommu: Speed up processing of the identity_mapping function
intel-iommu: Use coherent DMA mask when requested
intel-iommu: Remove Host Bridge devices from identity mapping
Namhyung Kim (4):
nbd: limit module parameters to a sane value
md: check ->hot_remove_disk when removing disk md/raid5: fix raid5_set_bi_hw_segments md/raid5: fix FUA request handling in ops_run_io()
OGAWA Hirofumi (1):
fat: Fix corrupt inode flags when remove ATTR_SYS flag
Peter Zijlstra (1):
lockdep: Fix lock_is_held() on recursion
Rajkumar Manoharan (2):
ath9k: Reset chip on baseband hang
ath9k: set 40 Mhz rate only if hw is configured in ht40
Robert Richter (3):
oprofile: Free potentially owned tasks in case of errors
oprofile: Fix locking dependency in sync_start() oprofile, dcookies: Fix possible circular locking dependency
Rusty Russell (1):
lguest: fix timer interrupt setup
Sangbeom Kim (1):
ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
Sarah Sharp (1):
xhci: Disable MSI for some Fresco Logic hosts.
Stanislaw Gruszka (6):
iwl4965: fix 5GHz operation
iwl4965: correctly validate temperature value
iwlagn: use cts-to-self protection on 5000 adapters series
iwl4965: set tx power after rxon_assoc
iwlagn: fix channel switch locking
iwlegacy: fix channel switch locking
Stefan Metzmacher (1):
usbnet/cdc_ncm: add missing .reset_resume hook
Steffen Sledz (1):
USB: serial: add another 4N-GALAXY.DE PID to ftdi_sio driver
Tejun Heo (1):
block: blkdev_get() should access ->bd_disk only after success
Tetsuo Handa (1):
TOMOYO: Fix oops in tomoyo_mount_acl().
Thomas Gleixner (1):
x86: cpu-hotplug: Prevent softirq wakeup on wrong CPU
Toby Gray (1):
USB: cdc-acm: Adding second ACM channel support for Nokia E7 and C7
Torsten Hilbrich (1):
USB: option Add blacklist for ZTE K3765-Z (19d2:2002)
Wey-Yi Guy (1):
iwlagn: send tx power command if defer cause by RXON not match
Williams, Mitch A (1):
igb: fix i350 SR-IOV failture
kerstin jonsson (1):
powerpc/4xx: Fix regression in SMP on 476
Documentation/kernel-parameters.txt +2 -0
@@ -2590,6 +2590,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. unlock ejectable media); m = MAX_SECTORS_64 (don't transfer more than 64 sectors = 32 KB at a time); + n = INITIAL_READ10 (force a retry of the + initial READ(10) command); o = CAPACITY_OK (accept the capacity reported by the device); r = IGNORE_RESIDUE (the device reports
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 39 -EXTRAVERSION = .1 +EXTRAVERSION = .2 NAME = Flesh-Eating Bats with Fangs # *DOCUMENTATION*
arch/powerpc/kernel/head_32.S +1 -1
@@ -896,7 +896,7 @@ _GLOBAL(start_secondary_resume) rlwinm r1,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */ addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD li r3,0 - std r3,0(r1) /* Zero the stack frame pointer */ + stw r3,0(r1) /* Zero the stack frame pointer */ bl start_secondary b . #endif /* CONFIG_SMP */
arch/powerpc/kernel/smp.c +2 -2
@@ -410,8 +410,6 @@ int __cpuinit __cpu_up(unsigned int cpu) {int rc, c; - secondary_ti = current_set[cpu]; -if (smp_ops ==NULL || (smp_ops->cpu_bootable && !smp_ops->cpu_bootable (cpu)))return -EINVAL ;
@@ -421,6 +419,8 @@ int __cpuinit __cpu_up(unsigned int cpu)if (rc)return rc; + secondary_ti = current_set[cpu]; +/* Make sure callin-map entry is 0 (can be leftover a CPU * hotplug */
arch/tile/kernel/pci.c +5 -6
@@ -179,12 +179,6 @@ int __init tile_pci_init(void) controller = &controllers[num_controllers]; -if (tile_init_irqs (i, controller)) { -pr_err ("PCI: Could not initialize " -"IRQs, aborting.\n" ); - goto err_cont; - } - controller->index = num_controllers; controller->hv_cfg_fd[0 ] = hv_cfg_fd0; controller->hv_cfg_fd[1 ] = hv_cfg_fd1;
@@ -300,6 +294,11 @@ static int __init pcibios_init(void)struct pci_controller *controller = &controllers[i];struct pci_bus *bus; +if (tile_init_irqs (i, controller)) { +pr_err ("PCI: Could not initialize IRQS\n" ); +continue ; + } +pr_info ("PCI: initializing controller #%d\n" , i);/*
arch/x86/kernel/amd_iommu.c +45 -3
90 lines not on this page · raw message
arch/x86/kernel/amd_iommu_init.c +4 -4
@@ -701,8 +701,8 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, {u8 *p = (u8 *)h;u8 *end = p, flags =0 ; -u16 dev_i, devid =0 , devid_start =0 , devid_to =0 ; -u32 ext_flags =0 ; +u16 devid =0 , devid_start =0 , devid_to =0 ; +u32 dev_i, ext_flags =0 ;bool alias = false;struct ivhd_entry *e;
@@ -857,7 +857,7 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu,/* Initializes the device->iommu mapping for the driver */ static int __init init_iommu_devices (struct amd_iommu *iommu) { -u16 i; +u32 i;for (i = iommu->first_device; i <= iommu->last_device; ++i)set_iommu_for_device (iommu, i);
@@ -1146,7 +1146,7 @@ static int __init init_memory_definitions(struct acpi_table_header *table)*/ static void init_device_table (void ) { -u16 devid; +u32 devid;for (devid =0 ; devid <= amd_iommu_last_bdf; ++devid) {set_dev_entry_bit (devid,DEV_ENTRY_VALID );
arch/x86/kernel/devicetree.c +11 -0
@@ -13,6 +13,7 @@#include <linux/slab.h> #include <linux/pci.h> #include <linux/of_pci.h> +#include <linux/initrd.h> #include <asm/hpet.h> #include <asm/irq_controller.h>
@@ -98,6 +99,16 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)return __alloc_bootmem (size, align,__pa (MAX_DMA_ADDRESS )); } +#ifdef CONFIG_BLK_DEV_INITRD +void __init early_init_dt_setup_initrd_arch (unsigned long start, +unsigned long end) +{ + initrd_start = (unsigned long )__va (start); + initrd_end = (unsigned long )__va (end); + initrd_below_start_ok =1 ; +} +#endif +void __init add_dtb (u64 data) { initial_dtb = data + offsetof(struct setup_data , data);
arch/x86/kernel/process_32.c +0 -1
@@ -245,7 +245,6 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) {set_user_gs (regs,0 ); regs->fs =0 ; -set_fs (USER_DS ); regs->ds = __USER_DS; regs->es = __USER_DS; regs->ss = __USER_DS;
arch/x86/kernel/process_64.c +0 -1
@@ -338,7 +338,6 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip, regs->cs = _cs; regs->ss = _ss; regs->flags =X86_EFLAGS_IF ; -set_fs (USER_DS );/* * Free the old FP and other extended state */
arch/x86/kernel/setup.c +0 -7
@@ -912,13 +912,6 @@ void __init setup_arch(char **cmdline_p) memblock.current_limit =get_max_mapped ();memblock_x86_fill (); -/* -* The EFI specification says that boot service code won't be called -* after ExitBootServices(). This is, in fact, a lie. -*/ -if (efi_enabled) -efi_reserve_boot_services (); -/* preallocate 4k for mptable mpc */ early_reserve_e820_mpc_new ();
arch/x86/kernel/smpboot.c +13 -0
@@ -285,6 +285,19 @@ notrace static void __cpuinit start_secondary(void *unused)per_cpu (cpu_state,smp_processor_id ()) =CPU_ONLINE ; x86_platform.nmi_init (); +/* +* Wait until the cpu which brought this one up marked it +* online before enabling interrupts. If we don't do that then +* we can end up waking up the softirq thread before this cpu +* reached the active state, which makes the scheduler unhappy +* and schedule the softirq thread on the wrong cpu. This is +* only observable with forced threaded interrupts, but in +* theory it could also happen w/o them. It's just way harder +* to achieve. +*/ +while (!cpumask_test_cpu (smp_processor_id (), cpu_active_mask)) +cpu_relax (); +/* enable local interrupts */ local_irq_enable ();
arch/x86/lguest/boot.c +1 -0
@@ -995,6 +995,7 @@ static void lguest_time_irq(unsigned int irq, struct irq_desc *desc)static void lguest_time_init (void ) {/* Set up the timer interrupt (0) to go to our simple timer routine */ +lguest_setup_irq (0 );irq_set_handler (0 , lguest_time_irq);clocksource_register (&lguest_clock);
arch/x86/platform/efi/efi.c +1 -44
63 lines not on this page · raw message
arch/x86/platform/efi/efi_64.c +2 -3
@@ -64,11 +64,10 @@ static void __init early_runtime_code_mapping_set_exec(int executable)if (!(__supported_pte_mask & _PAGE_NX))return ; -/* Make EFI service code area executable */ +/* Make EFI runtime service code area executable */ for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { md = p; -if (md->type ==EFI_RUNTIME_SERVICES_CODE || - md->type ==EFI_BOOT_SERVICES_CODE ) { +if (md->type ==EFI_RUNTIME_SERVICES_CODE ) {unsigned long end; end = md->phys_addr + (md->num_pages <<EFI_PAGE_SHIFT );early_mapping_set_exec (md->phys_addr, end, executable);
arch/x86/xen/multicalls.c +6 -6
@@ -189,10 +189,10 @@ struct multicall_space __xen_mc_entry(size_t args)unsigned argidx =roundup (b->argidx,sizeof (u64));BUG_ON (preemptible ()); -BUG_ON (b->argidx >MC_ARGS ); +BUG_ON (b->argidx >=MC_ARGS );if (b->mcidx ==MC_BATCH || - (argidx + args) >MC_ARGS ) { + (argidx + args) >=MC_ARGS ) {mc_stats_flush (b->mcidx ==MC_BATCH ?FL_SLOTS :FL_ARGS );xen_mc_flush (); argidx =roundup (b->argidx,sizeof (u64));
@@ -206,7 +206,7 @@ struct multicall_space __xen_mc_entry(size_t args) ret.args = &b->args[argidx]; b->argidx = argidx + args; -BUG_ON (b->argidx >MC_ARGS ); +BUG_ON (b->argidx >=MC_ARGS );return ret; }
@@ -216,7 +216,7 @@ struct multicall_space xen_mc_extend_args(unsigned long op, size_t size)struct multicall_space ret = {NULL ,NULL };BUG_ON (preemptible ()); -BUG_ON (b->argidx >MC_ARGS ); +BUG_ON (b->argidx >=MC_ARGS );if (b->mcidx ==0 )return ret;
@@ -224,14 +224,14 @@ struct multicall_space xen_mc_extend_args(unsigned long op, size_t size)if (b->entries[b->mcidx -1 ].op != op)return ret; -if ((b->argidx + size) >MC_ARGS ) +if ((b->argidx + size) >=MC_ARGS )return ret; ret.mc = &b->entries[b->mcidx -1 ]; ret.args = &b->args[b->argidx]; b->argidx += size; -BUG_ON (b->argidx >MC_ARGS ); +BUG_ON (b->argidx >=MC_ARGS );return ret; }
block/blk-core.c +2 -0
@@ -345,6 +345,7 @@ void blk_put_queue(struct request_queue *q) {kobject_put (&q->kobj); } +EXPORT_SYMBOL (blk_put_queue);/* * Note: If a driver supplied the queue lock, it should not zap that lock
@@ -566,6 +567,7 @@ int blk_get_queue(struct request_queue *q)return 1 ; } +EXPORT_SYMBOL (blk_get_queue);static inline void blk_free_request (struct request_queue *q,struct request *rq) {
drivers/block/nbd.c +6 -0
@@ -756,6 +756,12 @@ static int __init nbd_init(void)if (max_part >0 ) part_shift =fls (max_part); +if ((1UL << part_shift) >DISK_MAX_PARTS ) +return -EINVAL ; + +if (nbds_max >1UL << (MINORBITS - part_shift)) +return -EINVAL ; +for (i =0 ; i < nbds_max; i++) {struct gendisk *disk =alloc_disk (1 << part_shift);if (!disk)
drivers/cpufreq/cpufreq_stats.c +1 -0
@@ -388,6 +388,7 @@ static void __exit cpufreq_stats_exit(void)unregister_hotcpu_notifier (&cpufreq_stat_cpu_notifier);for_each_online_cpu (cpu) {cpufreq_stats_free_table (cpu); +cpufreq_stats_free_sysfs (cpu); } }
drivers/gpu/drm/i915/intel_lvds.c +8 -0
@@ -727,6 +727,14 @@ static const struct dmi_system_id intel_no_lvds[] = { DMI_MATCH(DMI_PRODUCT_NAME, "U800"), }, }, + { + .callback = intel_no_lvds_dmi_callback, + .ident = "Asus EeeBox PC EB1007", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer INC."), + DMI_MATCH(DMI_PRODUCT_NAME, "EB1007"), + }, + }, { }/* terminating entry */ };
drivers/gpu/drm/radeon/atombios_crtc.c +8 -4
@@ -1011,7 +1011,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,uint64_t fb_location;uint32_t fb_format, fb_pitch_pixels, tiling_flags;u32 fb_swap =EVERGREEN_GRPH_ENDIAN_SWAP (EVERGREEN_GRPH_ENDIAN_NONE ); -u32 tmp; +u32 tmp, viewport_w, viewport_h;int r;/* no fb bound */
@@ -1137,8 +1137,10 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, y &= ~1 ;WREG32 (EVERGREEN_VIEWPORT_START + radeon_crtc->crtc_offset, (x <<16 ) | y); + viewport_w = crtc->mode.hdisplay; + viewport_h = (crtc->mode.vdisplay +1 ) & ~1 ;WREG32 (EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, - (crtc->mode.hdisplay <<16 ) | crtc->mode.vdisplay); + (viewport_w <<16 ) | viewport_h);/* pageflip setup */ /* make sure flip is at vb rather than hb */
@@ -1179,7 +1181,7 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc,uint64_t fb_location;uint32_t fb_format, fb_pitch_pixels, tiling_flags;u32 fb_swap =R600_D1GRPH_SWAP_ENDIAN_NONE ; -u32 tmp; +u32 tmp, viewport_w, viewport_h;int r;/* no fb bound */
@@ -1304,8 +1306,10 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc, y &= ~1 ;WREG32 (AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset, (x <<16 ) | y); + viewport_w = crtc->mode.hdisplay; + viewport_h = (crtc->mode.vdisplay +1 ) & ~1 ;WREG32 (AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, - (crtc->mode.hdisplay <<16 ) | crtc->mode.vdisplay); + (viewport_w <<16 ) | viewport_h);/* pageflip setup */ /* make sure flip is at vb rather than hb */
drivers/gpu/drm/radeon/r100_track.h +7 -1
@@ -63,7 +63,7 @@ struct r100_cs_track {unsigned num_arrays;unsigned max_indx;unsigned color_channel_mask; -struct r100_cs_track_array arrays[11 ]; +struct r100_cs_track_array arrays[16 ];struct r100_cs_track_cb cb[R300_MAX_CB ];struct r100_cs_track_cb zb;struct r100_cs_track_cb aa;
@@ -146,6 +146,12 @@ static inline int r100_packet3_load_vbpntr(struct radeon_cs_parser *p, ib = p->ib->ptr; track = (struct r100_cs_track *)p->track; c =radeon_get_ib_value (p, idx++) &0x1F ; +if (c >16 ) { +DRM_ERROR ("Only 16 vertex buffers are allowed %d\n" , + pkt->opcode); +r100_cs_dump_packet (p, pkt); +return -EINVAL ; + } track->num_arrays = c;for (i =0 ; i < (c -1 ); i+=2 , idx+=3 ) { r =r100_cs_packet_next_reloc (p, &reloc);
drivers/gpu/drm/radeon/radeon_device.c +1 -0
@@ -752,6 +752,7 @@ int radeon_device_init(struct radeon_device *rdev, dma_bits = rdev->need_dma32 ?32 :40 ; r =pci_set_dma_mask (rdev->pdev,DMA_BIT_MASK (dma_bits));if (r) { + rdev->need_dma32 = true;printk (KERN_WARNING "radeon: No suitable DMA available.\n" ); }
drivers/hwmon/coretemp.c +3 -18
@@ -263,7 +263,7 @@ static int __devinit get_tjmax(struct cpuinfo_x86 *c, u32 id,* If the TjMax is not plausible, an assumption * will be used */ -if ((val >80 ) && (val <120 )) { +if (val >=70 && val <=125 ) {dev_info (dev,"TjMax is %d C.\n" , val);return val *1000 ; }
@@ -271,24 +271,9 @@ static int __devinit get_tjmax(struct cpuinfo_x86 *c, u32 id,/* * An assumption is made for early CPUs and unreadable MSR. -* NOTE: the given value may not be correct. +* NOTE: the calculated value may not be correct. */ - -switch (c->x86_model) { -case 0xe : -case 0xf : -case 0x16 : -case 0x1a : -dev_warn (dev,"TjMax is assumed as 100 C!\n" ); -return 100000 ; -case 0x17 : -case 0x1c :/* Atom CPUs */ -return adjust_tjmax (c, id, dev); -default : -dev_warn (dev,"CPU (model=0x%x) is not supported yet," -" using default TjMax of 100C.\n" , c->x86_model); -return 100000 ; - } +return adjust_tjmax (c, id, dev); }static void __devinit get_ucode_rev_on_cpu (void *edx)
drivers/md/md.c +1 -1
@@ -2462,7 +2462,7 @@ slot_store(mdk_rdev_t *rdev, const char *buf, size_t len)if (rdev->raid_disk ==-1 )return -EEXIST ;/* personality does all needed checks */ -if (rdev->mddev->pers->hot_add_disk ==NULL ) +if (rdev->mddev->pers->hot_remove_disk ==NULL )return -EINVAL ; err = rdev->mddev->pers->hot_remove_disk (rdev->mddev, rdev->raid_disk);
drivers/md/raid5.c +4 -4
@@ -129,7 +129,7 @@ static inline int raid5_dec_bi_hw_segments(struct bio *bio)static inline void raid5_set_bi_hw_segments (struct bio *bio,unsigned int cnt) { - bio->bi_phys_segments =raid5_bi_phys_segments (bio) || (cnt <<16 ); + bio->bi_phys_segments =raid5_bi_phys_segments (bio) | (cnt <<16 ); }/* Find first data disk in a raid6 stripe */
@@ -514,7 +514,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) bi = &sh->dev[i].req; bi->bi_rw = rw; -if (rw ==WRITE ) +if (rw &WRITE ) bi->bi_end_io = raid5_end_write_request;else bi->bi_end_io = raid5_end_read_request;
@@ -548,13 +548,13 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) bi->bi_io_vec[0 ].bv_offset =0 ; bi->bi_size =STRIPE_SIZE ; bi->bi_next =NULL ; -if (rw ==WRITE && +if ((rw &WRITE ) &&test_bit (R5_ReWrite, &sh->dev[i].flags))atomic_add (STRIPE_SECTORS , &rdev->corrected_errors);generic_make_request (bi); }else { -if (rw ==WRITE ) +if (rw &WRITE )set_bit (STRIPE_DEGRADED , &sh->state);pr_debug ("skip op %ld on disc %d for sector %llu\n" , bi->bi_rw, i, (unsigned long long )sh->sector);
drivers/media/media-devnode.c +2 -2
@@ -213,14 +213,14 @@ int __must_check media_devnode_register(struct media_devnode *mdev)/* Part 1: Find a free minor number */ mutex_lock (&media_devnode_lock); - minor =find_next_zero_bit (media_devnode_nums,0 ,MEDIA_NUM_DEVICES ); + minor =find_next_zero_bit (media_devnode_nums,MEDIA_NUM_DEVICES ,0 );if (minor ==MEDIA_NUM_DEVICES ) {mutex_unlock (&media_devnode_lock);printk (KERN_ERR "could not get a free minor\n" );return -ENFILE ; } -set_bit (mdev->minor, media_devnode_nums); +set_bit (minor, media_devnode_nums);mutex_unlock (&media_devnode_lock); mdev->minor = minor;
drivers/net/igb/igb_main.c +3 -0
@@ -2372,6 +2372,9 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter) }#endif /* CONFIG_PCI_IOV */ adapter->rss_queues =min_t (u32,IGB_MAX_RX_QUEUES ,num_online_cpus ()); +/* i350 cannot do RSS and SR-IOV at the same time */ +if (hw->mac.type == e1000_i350 && adapter->vfs_allocated_count) + adapter->rss_queues =1 ;/* * if rss_queues > 4 or vfs are going to be allocated with rss_queues
drivers/net/usb/cdc_ncm.c +1 -0
@@ -1254,6 +1254,7 @@ static struct usb_driver cdc_ncm_driver = { .disconnect = cdc_ncm_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .reset_resume = usbnet_resume, .supports_autosuspend = 1, };
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +8 -2
@@ -4598,10 +4598,16 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,case 1 :break ;case 2 : - scaledPower -=REDUCE_SCALED_POWER_BY_TWO_CHAIN ; +if (scaledPower >REDUCE_SCALED_POWER_BY_TWO_CHAIN ) + scaledPower -=REDUCE_SCALED_POWER_BY_TWO_CHAIN ; +else + scaledPower =0 ;break ;case 3 : - scaledPower -=REDUCE_SCALED_POWER_BY_THREE_CHAIN ; +if (scaledPower >REDUCE_SCALED_POWER_BY_THREE_CHAIN ) + scaledPower -=REDUCE_SCALED_POWER_BY_THREE_CHAIN ; +else + scaledPower =0 ;break ; }
drivers/net/wireless/ath/ath9k/eeprom_9287.c +8 -2
@@ -522,10 +522,16 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah,case 1 :break ;case 2 : - scaledPower -=REDUCE_SCALED_POWER_BY_TWO_CHAIN ; +if (scaledPower >REDUCE_SCALED_POWER_BY_TWO_CHAIN ) + scaledPower -=REDUCE_SCALED_POWER_BY_TWO_CHAIN ; +else + scaledPower =0 ;break ;case 3 : - scaledPower -=REDUCE_SCALED_POWER_BY_THREE_CHAIN ; +if (scaledPower >REDUCE_SCALED_POWER_BY_THREE_CHAIN ) + scaledPower -=REDUCE_SCALED_POWER_BY_THREE_CHAIN ; +else + scaledPower =0 ;break ; } scaledPower =max ((u16 )0 , scaledPower);
drivers/net/wireless/ath/ath9k/main.c +3 -1
@@ -633,7 +633,8 @@ void ath9k_tasklet(unsigned long data)u32 status = sc->intrstatus;u32 rxmask; -if (status &ATH9K_INT_FATAL ) { +if ((status &ATH9K_INT_FATAL ) || + (status &ATH9K_INT_BB_WATCHDOG )) {ath_reset (sc, true);return ; }
@@ -699,6 +700,7 @@ irqreturn_t ath_isr(int irq, void *dev) {#define SCHED_INTR ( \ ATH9K_INT_FATAL | \ + ATH9K_INT_BB_WATCHDOG | \ ATH9K_INT_RXORN | \ ATH9K_INT_RXEOL | \ ATH9K_INT_RX | \
drivers/net/wireless/ath/ath9k/rc.c +2 -1
@@ -689,7 +689,8 @@ static void ath_rc_rate_set_series(const struct ath_rate_table *rate_table,if (WLAN_RC_PHY_HT (rate_table->info[rix].phy)) { rate->flags |=IEEE80211_TX_RC_MCS ; -if (WLAN_RC_PHY_40 (rate_table->info[rix].phy)) +if (WLAN_RC_PHY_40 (rate_table->info[rix].phy) && +conf_is_ht40 (&txrc->hw->conf)) rate->flags |=IEEE80211_TX_RC_40_MHZ_WIDTH ;if (WLAN_RC_PHY_SGI (rate_table->info[rix].phy)) rate->flags |=IEEE80211_TX_RC_SHORT_GI ;
drivers/net/wireless/iwlegacy/iwl-4965-lib.c +2 -2
@@ -628,11 +628,11 @@ void iwl4965_rx_reply_rx(struct iwl_priv *priv,/* rx_status carries information about the packet to mac80211 */ rx_status.mactime =le64_to_cpu (phy_res->timestamp); + rx_status.band = (phy_res->phy_flags &RX_RES_PHY_FLAGS_BAND_24_MSK ) ? +IEEE80211_BAND_2GHZ :IEEE80211_BAND_5GHZ ; rx_status.freq =ieee80211_channel_to_frequency (le16_to_cpu (phy_res->channel), rx_status.band); - rx_status.band = (phy_res->phy_flags &RX_RES_PHY_FLAGS_BAND_24_MSK ) ? -IEEE80211_BAND_2GHZ :IEEE80211_BAND_5GHZ ; rx_status.rate_idx =iwl4965_hwrate_to_mac80211_idx (rate_n_flags, rx_status.band); rx_status.flag =0 ;
drivers/net/wireless/iwlegacy/iwl-4965.c +6 -8
@@ -1218,10 +1218,10 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c* receive commit_rxon request * abort any previous channel switch if still in process */ -if (priv->switch_rxon.switch_in_progress && - (priv->switch_rxon.channel != ctx->staging.channel)) { +if (test_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status) && + (priv->switch_channel != ctx->staging.channel)) {IWL_DEBUG_11H (priv,"abort channel switch on %d\n" , -le16_to_cpu (priv->switch_rxon.channel)); +le16_to_cpu (priv->switch_channel));iwl_legacy_chswitch_done (priv, false); }
@@ -1237,7 +1237,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *cmemcpy (active_rxon, &ctx->staging,sizeof (*active_rxon));iwl_legacy_print_rx_config_cmd (priv, ctx); -return 0 ; + goto set_tx_power; }/* If we are currently associated and the new config requires
@@ -1317,6 +1317,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ciwl4965_init_sensitivity (priv); +set_tx_power:/* 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_legacy_set_tx_power (priv, priv->tx_power_next, true);
@@ -1403,9 +1404,6 @@ static int iwl4965_hw_channel_switch(struct iwl_priv *priv,return rc; } - priv->switch_rxon.channel = cmd.channel; - priv->switch_rxon.switch_in_progress = true; -return iwl_legacy_send_cmd_pdu (priv,REPLY_CHANNEL_SWITCH ,sizeof (cmd), &cmd); }
@@ -1543,7 +1541,7 @@ static void iwl4965_temperature_calib(struct iwl_priv *priv)s32 temp; temp =iwl4965_hw_get_temperature (priv); -if (temp <0 ) +if (IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE (temp))return ;if (priv->temperature != temp) {
drivers/net/wireless/iwlegacy/iwl-core.c +13 -17
@@ -862,12 +862,8 @@ void iwl_legacy_chswitch_done(struct iwl_priv *priv, bool is_success)if (test_bit (STATUS_EXIT_PENDING , &priv->status))return ; -if (priv->switch_rxon.switch_in_progress) { +if (test_and_clear_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status))ieee80211_chswitch_done (ctx->vif, is_success); -mutex_lock (&priv->mutex); - priv->switch_rxon.switch_in_progress = false; -mutex_unlock (&priv->mutex); - } }EXPORT_SYMBOL (iwl_legacy_chswitch_done);
@@ -879,19 +875,19 @@ void iwl_legacy_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS ];struct iwl_legacy_rxon_cmd *rxon = (void *)&ctx->active; -if (priv->switch_rxon.switch_in_progress) { -if (!le32_to_cpu (csa->status) && - (csa->channel == priv->switch_rxon.channel)) { - rxon->channel = csa->channel; - ctx->staging.channel = csa->channel; -IWL_DEBUG_11H (priv,"CSA notif: channel %d\n" , -le16_to_cpu (csa->channel)); -iwl_legacy_chswitch_done (priv, true); - }else { -IWL_ERR (priv,"CSA notif (fail) : channel %d\n" , +if (!test_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status)) +return ; + +if (!le32_to_cpu (csa->status) && csa->channel == priv->switch_channel) { + rxon->channel = csa->channel; + ctx->staging.channel = csa->channel; +IWL_DEBUG_11H (priv,"CSA notif: channel %d\n" ,le16_to_cpu (csa->channel)); -iwl_legacy_chswitch_done (priv, false); - } +iwl_legacy_chswitch_done (priv, true); + }else { +IWL_ERR (priv,"CSA notif (fail) : channel %d\n" , +le16_to_cpu (csa->channel)); +iwl_legacy_chswitch_done (priv, false); } }EXPORT_SYMBOL (iwl_legacy_rx_csa);
drivers/net/wireless/iwlegacy/iwl-core.h +1 -1
@@ -561,7 +561,7 @@ void iwl_legacy_free_geos(struct iwl_priv *priv);#define STATUS_SCAN_HW 15#define STATUS_POWER_PMI 16#define STATUS_FW_ERROR 17 - +#define STATUS_CHANNEL_SWITCH_PENDING 18static inline int iwl_legacy_is_ready (struct iwl_priv *priv) {
drivers/net/wireless/iwlegacy/iwl-dev.h +1 -12
@@ -854,17 +854,6 @@ struct traffic_stats { };/* -* iwl_switch_rxon: "channel switch" structure -* -* @ switch_in_progress: channel switch in progress -* @ channel: new channel -*/ -struct iwl_switch_rxon { -bool switch_in_progress; -__le16 channel; -}; - -/* * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds * to perform continuous uCode event logging operation if enabled */
@@ -1115,7 +1104,7 @@ struct iwl_priv {struct iwl_rxon_context contexts[NUM_IWL_RXON_CTX ]; -struct iwl_switch_rxon switch_rxon; +__le16 switch_channel;/* 1st responses from initialize and runtime uCode images. * _4965's initialize alive response contains some calibration data. */
drivers/net/wireless/iwlegacy/iwl4965-base.c +10 -9
@@ -2851,16 +2851,13 @@ void iwl4965_mac_channel_switch(struct ieee80211_hw *hw, goto out_exit;if (test_bit (STATUS_EXIT_PENDING , &priv->status) || -test_bit (STATUS_SCANNING , &priv->status)) +test_bit (STATUS_SCANNING , &priv->status) || +test_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status)) goto out_exit;if (!iwl_legacy_is_associated_ctx (ctx)) goto out_exit; -/* channel switch in progress */ -if (priv->switch_rxon.switch_in_progress == true) - goto out_exit; -mutex_lock (&priv->mutex);if (priv->cfg->ops->lib->set_channel_switch) {
@@ -2910,16 +2907,20 @@ void iwl4965_mac_channel_switch(struct ieee80211_hw *hw,* at this point, staging_rxon has the * configuration for channel switch */ +set_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status); + priv->switch_channel =cpu_to_le16 (ch);if (priv->cfg->ops->lib->set_channel_switch (priv, - ch_switch)) - priv->switch_rxon.switch_in_progress = false; + ch_switch)) { +clear_bit (STATUS_CHANNEL_SWITCH_PENDING , + &priv->status); + priv->switch_channel =0 ; +ieee80211_chswitch_done (ctx->vif, false); + } } } out:mutex_unlock (&priv->mutex); out_exit: -if (!priv->switch_rxon.switch_in_progress) -ieee80211_chswitch_done (ctx->vif, false);IWL_DEBUG_MAC80211 (priv,"leave\n" ); }
drivers/net/wireless/iwlwifi/iwl-2000.c +0 -74
86 lines not on this page · raw message
drivers/net/wireless/iwlwifi/iwl-5000.c +0 -3
@@ -337,8 +337,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, ctx->active.channel, ch);return -EFAULT ; } - priv->switch_rxon.channel = cmd.channel; - priv->switch_rxon.switch_in_progress = true;return iwl_send_cmd_sync (priv, &hcmd); }
@@ -513,7 +511,6 @@ static struct iwl_base_params iwl5000_base_params = { };static struct iwl_ht_params iwl5000_ht_params = { .ht_greenfield_support = true, - .use_rts_for_aggregation = true,/* use rts/cts protection */ };#define IWL_DEVICE_5000 \
drivers/net/wireless/iwlwifi/iwl-6000.c +0 -2
@@ -277,8 +277,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, ctx->active.channel, ch);return -EFAULT ; } - priv->switch_rxon.channel = cmd.channel; - priv->switch_rxon.switch_in_progress = true;return iwl_send_cmd_sync (priv, &hcmd); }
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +2 -10
@@ -217,17 +217,9 @@ static void iwlagn_tx_cmd_protection(struct iwl_priv *priv, __le16 fc, __le32 *tx_flags) {if (info->control.rates[0 ].flags &IEEE80211_TX_RC_USE_RTS_CTS || - info->control.rates[0 ].flags &IEEE80211_TX_RC_USE_CTS_PROTECT ) { + info->control.rates[0 ].flags &IEEE80211_TX_RC_USE_CTS_PROTECT || + info->flags &IEEE80211_TX_CTL_AMPDU ) *tx_flags |=TX_CMD_FLG_PROT_REQUIRE_MSK ; -return ; - } - -if (priv->cfg->ht_params && - priv->cfg->ht_params->use_rts_for_aggregation && - info->flags &IEEE80211_TX_CTL_AMPDU ) { - *tx_flags |=TX_CMD_FLG_PROT_REQUIRE_MSK ; -return ; - } }/* Calc max signal level (dBm) among 3 possible receivers */
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +16 -3
@@ -173,6 +173,14 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)return 0 ; } +/* +* force CTS-to-self frames protection if RTS-CTS is not preferred +* one aggregation protection method +*/ +if (!(priv->cfg->ht_params && + priv->cfg->ht_params->use_rts_for_aggregation)) + ctx->staging.flags |=RXON_FLG_SELF_CTS_EN ; +if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) || !(ctx->staging.flags &RXON_FLG_BAND_24G_MSK )) ctx->staging.flags |=RXON_FLG_SHORT_SLOT_MSK ;
@@ -189,10 +197,10 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)* receive commit_rxon request * abort any previous channel switch if still in process */ -if (priv->switch_rxon.switch_in_progress && - (priv->switch_rxon.channel != ctx->staging.channel)) { +if (test_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status) && + (priv->switch_channel != ctx->staging.channel)) {IWL_DEBUG_11H (priv,"abort channel switch on %d\n" , -le16_to_cpu (priv->switch_rxon.channel)); +le16_to_cpu (priv->switch_channel));iwl_chswitch_done (priv, false); }
@@ -210,6 +218,11 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)memcpy (active, &ctx->staging,sizeof (*active));iwl_print_rx_config_cmd (priv, ctx); +/* +* We do not commit tx power settings while channel changing, +* do it now if after settings changed. +*/ +iwl_set_tx_power (priv, priv->tx_power_next, false);return 0 ; }
drivers/net/wireless/iwlwifi/iwl-agn.c +10 -9
@@ -3461,16 +3461,13 @@ void iwlagn_mac_channel_switch(struct ieee80211_hw *hw, goto out_exit;if (test_bit (STATUS_EXIT_PENDING , &priv->status) || -test_bit (STATUS_SCANNING , &priv->status)) +test_bit (STATUS_SCANNING , &priv->status) || +test_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status)) goto out_exit;if (!iwl_is_associated_ctx (ctx)) goto out_exit; -/* channel switch in progress */ -if (priv->switch_rxon.switch_in_progress == true) - goto out_exit; -mutex_lock (&priv->mutex);if (priv->cfg->ops->lib->set_channel_switch) {
@@ -3520,16 +3517,20 @@ void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,* at this point, staging_rxon has the * configuration for channel switch */ +set_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status); + priv->switch_channel =cpu_to_le16 (ch);if (priv->cfg->ops->lib->set_channel_switch (priv, - ch_switch)) - priv->switch_rxon.switch_in_progress = false; + ch_switch)) { +clear_bit (STATUS_CHANNEL_SWITCH_PENDING , + &priv->status); + priv->switch_channel =0 ; +ieee80211_chswitch_done (ctx->vif, false); + } } } out:mutex_unlock (&priv->mutex); out_exit: -if (!priv->switch_rxon.switch_in_progress) -ieee80211_chswitch_done (ctx->vif, false);IWL_DEBUG_MAC80211 (priv,"leave\n" ); }
drivers/net/wireless/iwlwifi/iwl-core.c +1 -5
@@ -861,12 +861,8 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)if (test_bit (STATUS_EXIT_PENDING , &priv->status))return ; -if (priv->switch_rxon.switch_in_progress) { +if (test_and_clear_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status))ieee80211_chswitch_done (ctx->vif, is_success); -mutex_lock (&priv->mutex); - priv->switch_rxon.switch_in_progress = false; -mutex_unlock (&priv->mutex); - } }#ifdef CONFIG_IWLWIFI_DEBUG
drivers/net/wireless/iwlwifi/iwl-core.h +1 -1
@@ -662,7 +662,7 @@ void iwlcore_free_geos(struct iwl_priv *priv);#define STATUS_SCAN_HW 15#define STATUS_POWER_PMI 16#define STATUS_FW_ERROR 17 - +#define STATUS_CHANNEL_SWITCH_PENDING 19static inline int iwl_is_ready (struct iwl_priv *priv) {
drivers/net/wireless/iwlwifi/iwl-dev.h +1 -12
@@ -1037,17 +1037,6 @@ struct traffic_stats { };/* -* iwl_switch_rxon: "channel switch" structure -* -* @ switch_in_progress: channel switch in progress -* @ channel: new channel -*/ -struct iwl_switch_rxon { -bool switch_in_progress; -__le16 channel; -}; - -/* * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds * to perform continuous uCode event logging operation if enabled */
@@ -1344,7 +1333,7 @@ struct iwl_priv {struct iwl_rxon_context contexts[NUM_IWL_RXON_CTX ]; -struct iwl_switch_rxon switch_rxon; +__le16 switch_channel;/* 1st responses from initialize and runtime uCode images. * _agn's initialize alive response contains some calibration data. */
drivers/net/wireless/iwlwifi/iwl-rx.c +12 -12
@@ -299,19 +299,19 @@ static void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS ];struct iwl_rxon_cmd *rxon = (void *)&ctx->active; -if (priv->switch_rxon.switch_in_progress) { -if (!le32_to_cpu (csa->status) && - (csa->channel == priv->switch_rxon.channel)) { - rxon->channel = csa->channel; - ctx->staging.channel = csa->channel; -IWL_DEBUG_11H (priv,"CSA notif: channel %d\n" , -le16_to_cpu (csa->channel)); -iwl_chswitch_done (priv, true); - }else { -IWL_ERR (priv,"CSA notif (fail) : channel %d\n" , +if (!test_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status)) +return ; + +if (!le32_to_cpu (csa->status) && csa->channel == priv->switch_channel) { + rxon->channel = csa->channel; + ctx->staging.channel = csa->channel; +IWL_DEBUG_11H (priv,"CSA notif: channel %d\n" ,le16_to_cpu (csa->channel)); -iwl_chswitch_done (priv, false); - } +iwl_chswitch_done (priv, true); + }else { +IWL_ERR (priv,"CSA notif (fail) : channel %d\n" , +le16_to_cpu (csa->channel)); +iwl_chswitch_done (priv, false); } }
drivers/net/wireless/zd1211rw/zd_usb.c +42 -11
87 lines not on this page · raw message
drivers/oprofile/buffer_sync.c +11 -10
@@ -141,6 +141,13 @@ static struct notifier_block module_load_nb = { .notifier_call = module_load_notify, }; +static void free_all_tasks (void ) +{ +/* make sure we don't leak task structs */ +process_task_mortuary (); +process_task_mortuary (); +} +int sync_start (void ) {int err;
@@ -148,8 +155,6 @@ int sync_start(void)if (!zalloc_cpumask_var (&marked_cpus,GFP_KERNEL ))return -ENOMEM ; -mutex_lock (&buffer_mutex); - err =task_handoff_register (&task_free_nb);if (err) goto out1;
@@ -166,7 +171,6 @@ int sync_start(void)start_cpu_work (); out: -mutex_unlock (&buffer_mutex);return err; out4:profile_event_unregister (PROFILE_MUNMAP , &munmap_nb);
@@ -174,6 +178,7 @@ out3:profile_event_unregister (PROFILE_TASK_EXIT , &task_exit_nb); out2:task_handoff_unregister (&task_free_nb); +free_all_tasks (); out1:free_cpumask_var (marked_cpus); goto out;
@@ -182,20 +187,16 @@ out1:void sync_stop (void ) { -/* flush buffers */ -mutex_lock (&buffer_mutex);end_cpu_work ();unregister_module_notifier (&module_load_nb);profile_event_unregister (PROFILE_MUNMAP , &munmap_nb);profile_event_unregister (PROFILE_TASK_EXIT , &task_exit_nb);task_handoff_unregister (&task_free_nb); -mutex_unlock (&buffer_mutex); -flush_cpu_work (); +barrier ();/* do all of the above first */ -/* make sure we don't leak task structs */ -process_task_mortuary (); -process_task_mortuary (); +flush_cpu_work (); +free_all_tasks ();free_cpumask_var (marked_cpus); }
drivers/pci/hotplug/pcihp_slot.c +45 -0
57 lines not on this page · raw message
drivers/pci/intel-iommu.c +35 -13
97 lines not on this page · raw message
drivers/pci/iova.c +10 -2
@@ -63,8 +63,16 @@ __cached_rbnode_delete_update(struct iova_domain *iovad, struct iova *free) curr = iovad->cached32_node; cached_iova = container_of(curr, struct iova, node); -if (free->pfn_lo >= cached_iova->pfn_lo) - iovad->cached32_node =rb_next (&free->node); +if (free->pfn_lo >= cached_iova->pfn_lo) { +struct rb_node *node =rb_next (&free->node); + struct iova *iova = container_of(node, struct iova, node); + +/* only cache if it's below 32bit pfn */ +if (node && iova->pfn_lo < iovad->dma_32bit_pfn) + iovad->cached32_node = node; +else + iovad->cached32_node =NULL ; + } }/* Computes the padding size required, to make the
drivers/platform/x86/asus-wmi.c +1 -1
@@ -1223,7 +1223,7 @@ static int asus_wmi_sysfs_init(struct platform_device *device)/* * Platform device */ -static int __init asus_wmi_platform_init (struct asus_wmi *asus) +static int asus_wmi_platform_init (struct asus_wmi *asus) {int rv;
drivers/scsi/scsi_scan.c +1 -1
@@ -297,7 +297,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,kfree (sdev); goto out; } - +blk_get_queue (sdev->request_queue); sdev->request_queue->queuedata = sdev;scsi_adjust_queue_depth (sdev,0 , sdev->host->cmd_per_lun);
drivers/scsi/scsi_sysfs.c +1 -0
@@ -322,6 +322,7 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)kfree (evt); } +blk_put_queue (sdev->request_queue);/* NULL queue means the device can't be used */ sdev->request_queue =NULL ;
drivers/staging/gma500/psb_fb.c +10 -0
@@ -489,6 +489,16 @@ static int psbfb_create(struct psb_fbdev *fbdev, info->screen_size = size;memset (info->screen_base,0 , size); +if (dev_priv->pg->stolen_size) { + info->apertures =alloc_apertures (1 ); +if (!info->apertures) { + ret = -ENOMEM ; + goto out_err0; + } + info->apertures->ranges[0 ].base = dev->mode_config.fb_base; + info->apertures->ranges[0 ].size = dev_priv->pg->stolen_size; + } +drm_fb_helper_fill_fix (info, fb->pitch, fb->depth);drm_fb_helper_fill_var (info, &fbdev->psb_fb_helper, sizes->fb_width, sizes->fb_height);
drivers/tty/serial/serial_core.c +10 -53
83 lines not on this page · raw message
drivers/usb/class/cdc-acm.c +2 -0
@@ -1617,6 +1617,8 @@ static const struct usb_device_id acm_ids[] = { { NOKIA_PCSUITE_ACM_INFO(0x04ce), }, /* Nokia E90 */ { NOKIA_PCSUITE_ACM_INFO(0x01d4), }, /* Nokia E55 */ { NOKIA_PCSUITE_ACM_INFO(0x0302), }, /* Nokia N8 */ + { NOKIA_PCSUITE_ACM_INFO(0x0335), }, /* Nokia E7 */ + { NOKIA_PCSUITE_ACM_INFO(0x03cd), }, /* Nokia C7 */ { SAMSUNG_PCSUITE_ACM_INFO(0x6651), }, /* Samsung GTi8510 (INNOV8) *//* NOTE: non-Nokia COMM/ACM/0xff is likely MSFT RNDIS... NOT a modem! */
drivers/usb/core/hub.c +4 -2
@@ -339,7 +339,8 @@ static int get_hub_status(struct usb_device *hdev, {int i, status = -ETIMEDOUT ; -for (i =0 ; i <USB_STS_RETRIES && status == -ETIMEDOUT ; i++) { +for (i =0 ; i <USB_STS_RETRIES && + (status == -ETIMEDOUT || status == -EPIPE ); i++) { status =usb_control_msg (hdev,usb_rcvctrlpipe (hdev,0 ),USB_REQ_GET_STATUS ,USB_DIR_IN |USB_RT_HUB ,0 ,0 , data,sizeof (*data),USB_STS_TIMEOUT );
@@ -355,7 +356,8 @@ static int get_port_status(struct usb_device *hdev, int port1, {int i, status = -ETIMEDOUT ; -for (i =0 ; i <USB_STS_RETRIES && status == -ETIMEDOUT ; i++) { +for (i =0 ; i <USB_STS_RETRIES && + (status == -ETIMEDOUT || status == -EPIPE ); i++) { status =usb_control_msg (hdev,usb_rcvctrlpipe (hdev,0 ),USB_REQ_GET_STATUS ,USB_DIR_IN |USB_RT_PORT ,0 , port1, data,sizeof (*data),USB_STS_TIMEOUT );
drivers/usb/host/xhci-dbg.c +4 -4
@@ -437,13 +437,13 @@ char *xhci_get_slot_state(struct xhci_hcd *xhci,struct xhci_slot_ctx *slot_ctx =xhci_get_slot_ctx (xhci, ctx);switch (GET_SLOT_STATE (slot_ctx->dev_state)) { -case 0 : +case SLOT_STATE_ENABLED :return "enabled/disabled" ; -case 1 : +case SLOT_STATE_DEFAULT :return "default" ; -case 2 : +case SLOT_STATE_ADDRESSED :return "addressed" ; -case 3 : +case SLOT_STATE_CONFIGURED :return "configured" ;default :return "reserved" ;
drivers/usb/host/xhci-mem.c +12 -2
@@ -986,9 +986,19 @@ static unsigned int xhci_parse_exponent_interval(struct usb_device *udev, interval =clamp_val (ep->desc.bInterval,1 ,16 ) -1 ;if (interval != ep->desc.bInterval -1 )dev_warn (&udev->dev, -"ep %#x - rounding interval to %d microframes\n" , +"ep %#x - rounding interval to %d %sframes\n" , ep->desc.bEndpointAddress, -1 << interval); +1 << interval, + udev->speed ==USB_SPEED_FULL ?"" :"micro" ); + +if (udev->speed ==USB_SPEED_FULL ) { +/* +* Full speed isoc endpoints specify interval in frames, +* not microframes. We are using microframes everywhere, +* so adjust accordingly. +*/ + interval +=3 ;/* 1 frame = 2^3 uframes */ + }return interval; }
drivers/usb/host/xhci-pci.c +12 -2
@@ -105,12 +105,22 @@ static int xhci_pci_setup(struct usb_hcd *hcd)/* Look for vendor-specific quirks */ if (pdev->vendor ==PCI_VENDOR_ID_FRESCO_LOGIC && - pdev->device ==PCI_DEVICE_ID_FRESCO_LOGIC_PDK && - pdev->revision ==0x0 ) { + pdev->device ==PCI_DEVICE_ID_FRESCO_LOGIC_PDK ) { +if (pdev->revision ==0x0 ) { xhci->quirks |=XHCI_RESET_EP_QUIRK ;xhci_dbg (xhci,"QUIRK: Fresco Logic xHC needs configure" " endpoint cmd after reset endpoint\n" ); + } +/* Fresco Logic confirms: all revisions of this chip do not +* support MSI, even though some of them claim to in their PCI +* capabilities. +*/ + xhci->quirks |=XHCI_BROKEN_MSI ; +xhci_dbg (xhci,"QUIRK: Fresco Logic revision %u " +"has broken MSI implementation\n" , + pdev->revision); } +if (pdev->vendor ==PCI_VENDOR_ID_NEC ) xhci->quirks |=XHCI_NEC_HOST ;
drivers/usb/host/xhci.c +14 -0
@@ -430,12 +430,19 @@ int xhci_run(struct usb_hcd *hcd)free_irq (hcd->irq, hcd); hcd->irq =-1 ; +/* Some Fresco Logic host controllers advertise MSI, but fail to +* generate interrupts. Don't even try to enable MSI. +*/ +if (xhci->quirks &XHCI_BROKEN_MSI ) + goto legacy_irq; + ret =xhci_setup_msix (xhci);if (ret)/* fall back to msi*/ ret =xhci_setup_msi (xhci);if (ret) { +legacy_irq:/* fall back to legacy interrupt*/ ret =request_irq (pdev->irq, &usb_hcd_irq,IRQF_SHARED , hcd->irq_descr, hcd);
@@ -2284,6 +2291,7 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)struct xhci_command *reset_device_cmd;int timeleft;int last_freed_endpoint; +struct xhci_slot_ctx *slot_ctx; ret =xhci_check_args (hcd, udev,NULL ,0 , false, __func__);if (ret <=0 )
@@ -2316,6 +2324,12 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)return -EINVAL ; } +/* If device is not setup, there is no point in resetting it */ + slot_ctx =xhci_get_slot_ctx (xhci, virt_dev->out_ctx); +if (GET_SLOT_STATE (le32_to_cpu (slot_ctx->dev_state)) == +SLOT_STATE_DISABLED ) +return 0 ; +xhci_dbg (xhci,"Resetting device with slot ID %u\n" , slot_id);/* Allocate the command structure that holds the struct completion. * Assume we're in process context, since the normal device reset
drivers/usb/host/xhci.h +6 -0
@@ -560,6 +560,11 @@ struct xhci_slot_ctx {#define SLOT_STATE (0x1f << 27)#define GET_SLOT_STATE (p) (((p) & (0x1f << 27)) >> 27) +#define SLOT_STATE_DISABLED 0 +#define SLOT_STATE_ENABLED SLOT_STATE_DISABLED +#define SLOT_STATE_DEFAULT 1 +#define SLOT_STATE_ADDRESSED 2 +#define SLOT_STATE_CONFIGURED 3/** * struct xhci_ep_ctx
@@ -1281,6 +1286,7 @@ struct xhci_hcd {#define XHCI_RESET_EP_QUIRK (1 << 1)#define XHCI_NEC_HOST (1 << 2)#define XHCI_AMD_PLL_FIX (1 << 3) +#define XHCI_BROKEN_MSI (1 << 6)/* There are two roothubs to keep track of bus suspend info for */ struct xhci_bus_state bus_state[2 ];/* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */
drivers/usb/serial/ftdi_sio.c +1 -0
@@ -647,6 +647,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) }, { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) }, { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_3_PID) }, { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_0_PID) }, { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_1_PID) }, { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_2_PID) },
drivers/usb/serial/ftdi_sio_ids.h +1 -0
@@ -351,6 +351,7 @@*/ #define FTDI_4N_GALAXY_DE_1_PID 0xF3C0#define FTDI_4N_GALAXY_DE_2_PID 0xF3C1 +#define FTDI_4N_GALAXY_DE_3_PID 0xF3C2/* * Linx Technologies product ids
drivers/usb/serial/option.c +26 -8
@@ -311,10 +311,6 @@ static void option_instat_callback(struct urb *urb);#define ZTE_PRODUCT_AC2726 0xfff5#define ZTE_PRODUCT_AC8710T 0xffff -/* ZTE PRODUCTS -- alternate vendor ID */ -#define ZTE_VENDOR_ID2 0x1d6b -#define ZTE_PRODUCT_MF_330 0x0002 -#define BENQ_VENDOR_ID 0x04a5#define BENQ_PRODUCT_H10 0x4068
@@ -340,11 +336,12 @@ static void option_instat_callback(struct urb *urb);#define TOSHIBA_PRODUCT_G450 0x0d45#define ALINK_VENDOR_ID 0x1e0e +#define ALINK_PRODUCT_PH300 0x9100#define ALINK_PRODUCT_3GU 0x9200/* ALCATEL PRODUCTS */ #define ALCATEL_VENDOR_ID 0x1bbb -#define ALCATEL_PRODUCT_X060S 0x0000 +#define ALCATEL_PRODUCT_X060S_X200 0x0000#define PIRELLI_VENDOR_ID 0x1266#define PIRELLI_PRODUCT_C100_1 0x1002
@@ -379,6 +376,9 @@ static void option_instat_callback(struct urb *urb);* It seems to contain a Qualcomm QSC6240/6290 chipset */ #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603 +/* Zoom */ +#define ZOOM_PRODUCT_4597 0x9607 +/* Haier products */ #define HAIER_VENDOR_ID 0x201e#define HAIER_PRODUCT_CE100 0x2009
@@ -432,6 +432,20 @@ static const struct option_blacklist_info four_g_w14_blacklist = { .reason = OPTION_BLACKLIST_SENDSETUP }; +static const u8 alcatel_x200_no_sendsetup[] = {0 ,1 }; +static const struct option_blacklist_info alcatel_x200_blacklist = { + .infolen =ARRAY_SIZE (alcatel_x200_no_sendsetup), + .ifaceinfo = alcatel_x200_no_sendsetup, + .reason =OPTION_BLACKLIST_SENDSETUP +}; + +static const u8 zte_k3765_z_no_sendsetup[] = {0 ,1 ,2 }; +static const struct option_blacklist_info zte_k3765_z_blacklist = { + .infolen =ARRAY_SIZE (zte_k3765_z_no_sendsetup), + .ifaceinfo = zte_k3765_z_no_sendsetup, + .reason =OPTION_BLACKLIST_SENDSETUP +}; +static const struct usb_device_id option_ids[] = { {USB_DEVICE (OPTION_VENDOR_ID ,OPTION_PRODUCT_COLT ) }, {USB_DEVICE (OPTION_VENDOR_ID ,OPTION_PRODUCT_RICOLA ) },
@@ -916,13 +930,13 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, + 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, - { USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) }, { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */
@@ -935,13 +949,17 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) }, { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, + { USB_DEVICE(ALINK_VENDOR_ID, ALINK_PRODUCT_PH300) }, { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) }, - { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), + .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist + }, { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), .driver_info = (kernel_ulong_t)&four_g_w14_blacklist }, + { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) }, { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },/* Pirelli */ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1)},
drivers/usb/storage/transport.c +29 -0
@@ -819,6 +819,35 @@ Retry_Sense: } } +/* +* Some devices don't work or return incorrect data the first +* time they get a READ(10) command, or for the first READ(10) +* after a media change. If the INITIAL_READ10 flag is set, +* keep track of whether READ(10) commands succeed. If the +* previous one succeeded and this one failed, set the REDO_READ10 +* flag to force a retry. +*/ +if (unlikely ((us->fflags &US_FL_INITIAL_READ10 ) && + srb->cmnd[0 ] ==READ_10 )) { +if (srb->result ==SAM_STAT_GOOD ) { +set_bit (US_FLIDX_READ10_WORKED , &us->dflags); + }else if (test_bit (US_FLIDX_READ10_WORKED , &us->dflags)) { +clear_bit (US_FLIDX_READ10_WORKED , &us->dflags); +set_bit (US_FLIDX_REDO_READ10 , &us->dflags); + } + +/* +* Next, if the REDO_READ10 flag is set, return a result +* code that will cause the SCSI core to retry the READ(10) +* command immediately. +*/ +if (test_bit (US_FLIDX_REDO_READ10 , &us->dflags)) { +clear_bit (US_FLIDX_REDO_READ10 , &us->dflags); + srb->result =DID_IMM_RETRY <<16 ; + srb->sense_buffer[0 ] =0 ; + } + } +/* Did we transfer less than the minimum amount required? */ if ((srb->result ==SAM_STAT_GOOD || srb->sense_buffer[2 ] ==0 ) &&scsi_bufflen (srb) -scsi_get_resid (srb) < srb->underflow)
drivers/usb/storage/unusual_devs.h +19 -0
@@ -1114,6 +1114,16 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), +/* Reported by Paul Hartman <[email protected]> +* This card reader returns "Illegal Request, Logical Block Address +* Out of Range" for the first READ(10) after a new card is inserted. +*/ +UNUSUAL_DEV (0x090c ,0x6000 ,0x0100 ,0x0100 , +"Feiya" , +"SD/SDHC Card Reader" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_INITIAL_READ10 ), +/* This Pentax still camera is not conformant * to the USB storage specification: - * - It does not like the INQUIRY command. So we must handle this command
@@ -1888,6 +1898,15 @@ UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0200, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_READ_DISC_INFO ), +/* Reported by Sven Geggus <[email protected]> +* This encrypted pen drive returns bogus data for the initial READ(10). +*/ +UNUSUAL_DEV (0x1b1c ,0x1ab5 ,0x0200 ,0x0200 , +"Corsair" , +"Padlock v2" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_INITIAL_READ10 ), +/* Patch by Richard Schütz <[email protected]> * This external hard drive enclosure uses a JMicron chip which * needs the US_FL_IGNORE_RESIDUE flag to work properly. */
drivers/usb/storage/usb.c +12 -1
@@ -439,7 +439,8 @@ static void adjust_quirks(struct us_data *us)US_FL_CAPACITY_HEURISTICS |US_FL_IGNORE_DEVICE |US_FL_NOT_LOCKABLE |US_FL_MAX_SECTORS_64 |US_FL_CAPACITY_OK |US_FL_IGNORE_RESIDUE | - US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT); +US_FL_SINGLE_LUN |US_FL_NO_WP_DETECT | + US_FL_INITIAL_READ10); p = quirks;while (*p) {
@@ -483,6 +484,9 @@ static void adjust_quirks(struct us_data *us)case 'm' : f |=US_FL_MAX_SECTORS_64 ;break ; +case 'n' : + f |=US_FL_INITIAL_READ10 ; +break ;case 'o' : f |=US_FL_CAPACITY_OK ;break ;
@@ -946,6 +950,13 @@ int usb_stor_probe2(struct us_data *us)if (result) goto BadDevice; +/* +* If the device returns invalid data for the first READ(10) +* command, indicate the command should be retried. +*/ +if (us->fflags &US_FL_INITIAL_READ10 ) +set_bit (US_FLIDX_REDO_READ10 , &us->dflags); +/* Acquire all the other resources and add the host */ result =usb_stor_acquire_resources (us);if (result)
drivers/usb/storage/usb.h +2 -0
@@ -73,6 +73,8 @@ struct us_unusual_dev {#define US_FLIDX_RESETTING 4/* device reset in progress */ #define US_FLIDX_TIMED_OUT 5/* SCSI midlayer timed out */ #define US_FLIDX_DONT_SCAN 6/* don't scan (disconnect) */ +#define US_FLIDX_REDO_READ10 7/* redo READ(10) command */ +#define US_FLIDX_READ10_WORKED 8/* previous READ(10) succeeded */ #define USB_STOR_STRING_LEN 32
drivers/video/vga16fb.c +2 -0
@@ -1265,9 +1265,11 @@ static void vga16fb_imageblit(struct fb_info *info, const struct fb_image *imagestatic void vga16fb_destroy (struct fb_info *info) { + struct platform_device *dev = container_of(info->device, struct platform_device, dev);iounmap (info->screen_base);fb_dealloc_cmap (&info->cmap);/* XXX unshare VGA regions */ +platform_set_drvdata (dev,NULL );framebuffer_release (info); }
fs/block_dev.c +2 -2
@@ -1272,8 +1272,8 @@ int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder)* individual writeable reference is too fragile given the * way @mode is used in blkdev_get/put(). */ -if ((disk->flags &GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE ) && - !res && (mode &FMODE_WRITE ) && !bdev->bd_write_holder) { +if (!res && (mode &FMODE_WRITE ) && !bdev->bd_write_holder && + (disk->flags &GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE )) { bdev->bd_write_holder = true;disk_block_events (disk); }
fs/cifs/cifsencrypt.c +1 -1
@@ -184,7 +184,7 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu,if (cifs_pdu ==NULL || server ==NULL )return -EINVAL ; -if (cifs_pdu->Command ==SMB_COM_NEGOTIATE ) +if (!server->session_estab)return 0 ;if (cifs_pdu->Command ==SMB_COM_LOCKING_ANDX ) {
fs/cifs/connect.c +3 -3
@@ -199,7 +199,7 @@ cifs_reconnect(struct TCP_Server_Info *server) }spin_unlock (&GlobalMid_Lock); -while (server->tcpStatus == CifsNeedReconnect) { + do { try_to_freeze(); /* we should try only the port we connected to before */
@@ -214,7 +214,7 @@ cifs_reconnect(struct TCP_Server_Info *server) server->tcpStatus = CifsNeedNegotiate;spin_unlock (&GlobalMid_Lock); } - } + }while (server->tcpStatus == CifsNeedReconnect);return rc; }
@@ -3208,7 +3208,7 @@ int cifs_negotiate_protocol(unsigned int xid, struct cifsSesInfo *ses) }if (rc ==0 ) {spin_lock (&GlobalMid_Lock); -if (server->tcpStatus != CifsExiting) +if (server->tcpStatus == CifsNeedNegotiate) server->tcpStatus = CifsGood;else rc = -EHOSTDOWN ;
fs/dcookies.c +3 -0
@@ -178,6 +178,8 @@ SYSCALL_DEFINE(lookup_dcookie)(u64 cookie64, char __user * buf, size_t len)/* FIXME: (deleted) ? */ path =d_path (&dcs->path, kbuf,PAGE_SIZE ); +mutex_unlock (&dcookie_mutex); +if (IS_ERR (path)) { err =PTR_ERR (path); goto out_free;
@@ -194,6 +196,7 @@ SYSCALL_DEFINE(lookup_dcookie)(u64 cookie64, char __user * buf, size_t len) out_free:kfree (kbuf); +return err; out:mutex_unlock (&dcookie_mutex);return err;
fs/exec.c +1 -4
@@ -1046,6 +1046,7 @@ int flush_old_exec(struct linux_binprm * bprm) bprm->mm =NULL ;/* We're using it now */ +set_fs (USER_DS ); current->flags &= ~(PF_RANDOMIZE |PF_KTHREAD );flush_thread (); current->personality &= ~bprm->per_clear;
@@ -1310,10 +1311,6 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)if (retval)return retval; -/* kernel module loader fixup */ -/* so we don't try to load run modprobe in kernel space. */ -set_fs (USER_DS ); - retval =audit_bprm (bprm);if (retval)return retval;
fs/fat/file.c +1 -1
@@ -102,7 +102,7 @@ static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr)if (attr &ATTR_SYS ) inode->i_flags |=S_IMMUTABLE ;else - inode->i_flags &=S_IMMUTABLE ; + inode->i_flags &= ~S_IMMUTABLE ; }fat_save_attrs (inode, attr);
fs/ubifs/journal.c +1 -0
@@ -666,6 +666,7 @@ out_free: out_release:release_head (c,BASEHD ); +kfree (dent); out_ro:ubifs_ro_mode (c, err);if (last_reference)
fs/ubifs/shrinker.c +5 -1
@@ -283,7 +283,11 @@ int ubifs_shrinker(struct shrinker *shrink, int nr, gfp_t gfp_mask)long clean_zn_cnt =atomic_long_read (&ubifs_clean_zn_cnt);if (nr ==0 ) -return clean_zn_cnt; +/* +* Due to the way UBIFS updates the clean znode counter it may +* temporarily be negative. +*/ +return clean_zn_cnt >=0 ? clean_zn_cnt :1 ;if (!clean_zn_cnt) {/*
include/linux/efi.h +0 -1
@@ -299,7 +299,6 @@ extern void efi_initialize_iomem_resources(struct resource *code_resource, struct resource *data_resource, struct resource *bss_resource);extern unsigned long efi_get_time (void );extern int efi_set_rtc_mmss (unsigned long nowtime); -extern void efi_reserve_boot_services (void );extern struct efi_memory_map memmap;/**
include/linux/usb_usual.h +3 -1
@@ -62,7 +62,9 @@US_FLAG (NO_READ_DISC_INFO ,0x00040000 ) \ /* cannot handle READ_DISC_INFO */ \US_FLAG (NO_READ_CAPACITY_16 ,0x00080000 ) \ - /* cannot handle READ_CAPACITY_16 */ + /* cannot handle READ_CAPACITY_16 */ \ +US_FLAG (INITIAL_READ10 ,0x00100000 ) \ + /* Initial READ(10) (and others) must be retried */#define US_FLAG (name, value) US_FL_##name = value ,enum {US_DO_ALL_FLAGS };
kernel/irq/irqdesc.c +3 -5
@@ -257,13 +257,11 @@ int __init early_irq_init(void) count =ARRAY_SIZE (irq_desc);for (i =0 ; i < count; i++) { - desc[i].irq_data.irq = i; - desc[i].irq_data.chip = &no_irq_chip; desc[i].kstat_irqs = alloc_percpu(unsigned int); -irq_settings_clr_and_set (desc, ~0 , _IRQ_DEFAULT_INIT_FLAGS); -alloc_masks (desc + i,GFP_KERNEL , node); -desc_smp_init (desc + i, node); +alloc_masks (&desc[i],GFP_KERNEL , node); +raw_spin_lock_init (&desc[i].lock);lockdep_set_class (&desc[i].lock, &irq_desc_lock_class); +desc_set_defaults (i, &desc[i], node); }return arch_early_irq_init (); }
kernel/lockdep.c +1 -1
@@ -3242,7 +3242,7 @@ int lock_is_held(struct lockdep_map *lock)int ret =0 ;if (unlikely (current->lockdep_recursion)) -return ret; +return 1 ;/* avoid false negative lockdep_assert_held() */ raw_local_irq_save (flags);check_flags (flags);
mm/hugetlb.c +2 -2
@@ -1033,10 +1033,10 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma,*/ chg =vma_needs_reservation (h, vma, addr);if (chg <0 ) -return ERR_PTR (chg); +return ERR_PTR (-VM_FAULT_OOM );if (chg)if (hugetlb_get_quota (inode->i_mapping, chg)) -return ERR_PTR (-ENOSPC ); +return ERR_PTR (-VM_FAULT_SIGBUS );spin_lock (&hugetlb_lock); page =dequeue_huge_page_vma (h, vma, addr, avoid_reserve);
net/mac80211/ibss.c +4 -2
@@ -967,6 +967,10 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)mutex_lock (&sdata->u.ibss.mtx); + sdata->u.ibss.state =IEEE80211_IBSS_MLME_SEARCH ; +memset (sdata->u.ibss.bssid,0 ,ETH_ALEN ); + sdata->u.ibss.ssid_len =0 ; + active_ibss =ieee80211_sta_active_ibss (sdata);if (!active_ibss && !is_zero_ether_addr (ifibss->bssid)) {
@@ -1000,8 +1004,6 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)kfree_skb (skb);skb_queue_purge (&sdata->skb_queue); -memset (sdata->u.ibss.bssid,0 ,ETH_ALEN ); - sdata->u.ibss.ssid_len =0 ;del_timer_sync (&sdata->u.ibss.timer);
net/wireless/nl80211.c +1 -1
@@ -3239,12 +3239,12 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) i =0 ;if (info->attrs[NL80211_ATTR_SCAN_SSIDS ]) {nla_for_each_nested (attr, info->attrs[NL80211_ATTR_SCAN_SSIDS ], tmp) { + request->ssids[i].ssid_len =nla_len (attr);if (request->ssids[i].ssid_len >IEEE80211_MAX_SSID_LEN ) { err = -EINVAL ; goto out_free; }memcpy (request->ssids[i].ssid,nla_data (attr),nla_len (attr)); - request->ssids[i].ssid_len =nla_len (attr); i++; } }
security/apparmor/lsm.c +1 -1
@@ -612,7 +612,7 @@ static int apparmor_setprocattr(struct task_struct *task, char *name,static int apparmor_task_setrlimit (struct task_struct *task,unsigned int resource,struct rlimit *new_rlim) { -struct aa_profile *profile =aa_current_profile (); +struct aa_profile *profile =__aa_current_profile ();int error =0 ;if (!unconfined (profile))
security/tomoyo/mount.c +1 -1
@@ -138,7 +138,7 @@ static int tomoyo_mount_acl(struct tomoyo_request_info *r, char *dev_name, }if (need_dev) {/* Get mount point or device file. */ -if (kern_path (dev_name,LOOKUP_FOLLOW , &path)) { +if (!dev_name ||kern_path (dev_name,LOOKUP_FOLLOW , &path)) { error = -ENOENT ; goto out; }
sound/pci/hda/patch_realtek.c +1 -0
@@ -13804,6 +13804,7 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x015b ,"Acer Aspire One" ,ALC268_ACER_ASPIRE_ONE ),SND_PCI_QUIRK (0x1028 ,0x0253 ,"Dell OEM" ,ALC268_DELL ), +SND_PCI_QUIRK (0x1028 ,0x02b0 ,"Dell Inspiron 910" ,ALC268_AUTO ),SND_PCI_QUIRK_MASK (0x1028 ,0xfff0 ,0x02b0 , "Dell Inspiron Mini9/Vostro A90", ALC268_DELL),/* almost compatible with toshiba but with optional digital outs;
sound/soc/codecs/ad1836.c +7 -7
@@ -145,22 +145,22 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream,/* bit size */ switch (params_format (params)) {case SNDRV_PCM_FORMAT_S16_LE : - word_len =3 ; + word_len =AD1836_WORD_LEN_16 ;break ;case SNDRV_PCM_FORMAT_S20_3LE : - word_len =1 ; + word_len =AD1836_WORD_LEN_20 ;break ;case SNDRV_PCM_FORMAT_S24_LE :case SNDRV_PCM_FORMAT_S32_LE : - word_len =0 ; + word_len =AD1836_WORD_LEN_24 ;break ; } -snd_soc_update_bits (codec,AD1836_DAC_CTRL1 , -AD1836_DAC_WORD_LEN_MASK , word_len); +snd_soc_update_bits (codec,AD1836_DAC_CTRL1 ,AD1836_DAC_WORD_LEN_MASK , + word_len <<AD1836_DAC_WORD_LEN_OFFSET ); -snd_soc_update_bits (codec,AD1836_ADC_CTRL2 , -AD1836_ADC_WORD_LEN_MASK , word_len); +snd_soc_update_bits (codec,AD1836_ADC_CTRL2 ,AD1836_ADC_WORD_LEN_MASK , + word_len <<AD1836_ADC_WORD_OFFSET );return 0 ; }
sound/soc/codecs/ad1836.h +6 -0
@@ -25,6 +25,7 @@#define AD1836_DAC_SERFMT_PCK256 (0x4 << 5)#define AD1836_DAC_SERFMT_PCK128 (0x5 << 5)#define AD1836_DAC_WORD_LEN_MASK 0x18 +#define AD1836_DAC_WORD_LEN_OFFSET 3#define AD1836_DAC_CTRL2 1#define AD1836_DACL1_MUTE 0
@@ -51,6 +52,7 @@#define AD1836_ADCL2_MUTE 2#define AD1836_ADCR2_MUTE 3#define AD1836_ADC_WORD_LEN_MASK 0x30 +#define AD1836_ADC_WORD_OFFSET 5#define AD1836_ADC_SERFMT_MASK (7 << 6)#define AD1836_ADC_SERFMT_PCK256 (0x4 << 6)#define AD1836_ADC_SERFMT_PCK128 (0x5 << 6)
@@ -60,4 +62,8 @@#define AD1836_NUM_REGS 16 +#define AD1836_WORD_LEN_24 0x0 +#define AD1836_WORD_LEN_20 0x1 +#define AD1836_WORD_LEN_16 0x2 +#endif
sound/soc/codecs/wm8804.c +7 -2
@@ -680,20 +680,25 @@ static struct snd_soc_dai_ops wm8804_dai_ops = {#define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_LE) +#define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ + SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ + SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \ + SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000) +static struct snd_soc_dai_driver wm8804_dai = { .name ="wm8804-spdif" , .playback = { .stream_name ="Playback" , .channels_min =2 , .channels_max =2 , - .rates =SNDRV_PCM_RATE_8000_192000 , + .rates =WM8804_RATES , .formats =WM8804_FORMATS , }, .capture = { .stream_name ="Capture" , .channels_min =2 , .channels_max =2 , - .rates =SNDRV_PCM_RATE_8000_192000 , + .rates =WM8804_RATES , .formats =WM8804_FORMATS , }, .ops = &wm8804_dai_ops,
sound/soc/codecs/wm8962.c +2 -2
@@ -1998,12 +1998,12 @@ static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,return 0 ;/* If the left PGA is enabled hit that VU bit... */ -if (reg_cache[WM8962_PWR_MGMT_2 ] &WM8962_HPOUTL_PGA_ENA ) +if (snd_soc_read (codec,WM8962_PWR_MGMT_2 ) &WM8962_HPOUTL_PGA_ENA )return snd_soc_write (codec,WM8962_HPOUTL_VOLUME , reg_cache[WM8962_HPOUTL_VOLUME ]);/* ...otherwise the right. The VU is stereo. */ -if (reg_cache[WM8962_PWR_MGMT_2 ] &WM8962_HPOUTR_PGA_ENA ) +if (snd_soc_read (codec,WM8962_PWR_MGMT_2 ) &WM8962_HPOUTR_PGA_ENA )return snd_soc_write (codec,WM8962_HPOUTR_VOLUME , reg_cache[WM8962_HPOUTR_VOLUME ]);
sound/soc/samsung/i2s.c +2 -2
@@ -191,7 +191,7 @@ static inline bool tx_active(struct i2s_dai *i2s)if (!i2s)return false; - active =readl (i2s->addr +I2SMOD ); + active =readl (i2s->addr +I2SCON );if (is_secondary (i2s)) active &=CON_TXSDMA_ACTIVE ;
@@ -223,7 +223,7 @@ static inline bool rx_active(struct i2s_dai *i2s)if (!i2s)return false; - active =readl (i2s->addr +I2SMOD ) &CON_RXDMA_ACTIVE ; + active =readl (i2s->addr +I2SCON ) &CON_RXDMA_ACTIVE ;return active ? true : false; }
sound/soc/soc-dapm.c +8 -9
@@ -362,9 +362,9 @@ static int dapm_update_bits(struct snd_soc_dapm_widget *widget) }/* create new dapm mixer control */ -static int dapm_new_mixer (struct snd_soc_dapm_context *dapm, -struct snd_soc_dapm_widget *w) +static int dapm_new_mixer (struct snd_soc_dapm_widget *w) { +struct snd_soc_dapm_context *dapm = w->dapm;int i, ret =0 ;size_t name_len, prefix_len;struct snd_soc_dapm_path *path;
@@ -443,9 +443,9 @@ static int dapm_new_mixer(struct snd_soc_dapm_context *dapm, }/* create new dapm mux control */ -static int dapm_new_mux (struct snd_soc_dapm_context *dapm, -struct snd_soc_dapm_widget *w) +static int dapm_new_mux (struct snd_soc_dapm_widget *w) { +struct snd_soc_dapm_context *dapm = w->dapm;struct snd_soc_dapm_path *path =NULL ;struct snd_kcontrol *kcontrol;struct snd_card *card = dapm->card->snd_card;
@@ -490,8 +490,7 @@ err: }/* create new dapm volume control */ -static int dapm_new_pga (struct snd_soc_dapm_context *dapm, -struct snd_soc_dapm_widget *w) +static int dapm_new_pga (struct snd_soc_dapm_widget *w) {if (w->num_kcontrols) dev_err(w->dapm->dev,
@@ -1735,13 +1734,13 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)case snd_soc_dapm_mixer:case snd_soc_dapm_mixer_named_ctl: w->power_check = dapm_generic_check_power; -dapm_new_mixer (dapm, w); +dapm_new_mixer (w);break ;case snd_soc_dapm_mux:case snd_soc_dapm_virt_mux:case snd_soc_dapm_value_mux: w->power_check = dapm_generic_check_power; -dapm_new_mux (dapm, w); +dapm_new_mux (w);break ;case snd_soc_dapm_adc:case snd_soc_dapm_aif_out:
@@ -1754,7 +1753,7 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)case snd_soc_dapm_pga:case snd_soc_dapm_out_drv: w->power_check = dapm_generic_check_power; -dapm_new_pga (dapm, w); +dapm_new_pga (w);break ;case snd_soc_dapm_input:case snd_soc_dapm_output: