Linux 2.6.30.1
Subsystems (57)
I'm announcing the release of the 2.6.30.1 kernel. All users of the 2.6.30 kernel series are very strongly encouraged to upgrade.
I'll also be replying to this message with a copy of the patch between 2.6.30 and 2.6.30.1
The updated 2.6.30.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.30.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.30.y.git;a=summarythanks,
greg k-h
------------
Documentation/sysctl/vm.txt | 12 ++- Makefile | 2 arch/arm/include/asm/cacheflush.h | 8 ++ arch/x86/crypto/aesni-intel_asm.S | 5 - arch/x86/include/asm/apic.h | 2 arch/x86/include/asm/cpufeature.h | 1 arch/x86/include/asm/kvm_host.h | 2 arch/x86/include/asm/mce.h | 2 arch/x86/include/asm/uv/uv_bau.h | 2 arch/x86/include/asm/uv/uv_hub.h | 6 + arch/x86/include/asm/vmx.h | 1 arch/x86/kernel/apic/x2apic_uv_x.c | 15 ++- arch/x86/kernel/cpu/amd.c | 14 +++ arch/x86/kernel/cpu/mcheck/mce_32.c | 1 arch/x86/kernel/cpu/mcheck/mce_64.c | 1 arch/x86/kernel/hpet.c | 3 arch/x86/kernel/pci-gart_64.c | 10 ++ arch/x86/kernel/reboot.c | 9 ++ arch/x86/kernel/setup.c | 15 --- arch/x86/kernel/tlb_uv.c | 24 +++--- arch/x86/kernel/tsc.c | 11 ++ arch/x86/kernel/vm86_32.c | 9 +- arch/x86/kernel/vsyscall_64.c | 8 -- arch/x86/kvm/vmx.c | 64 +++++++++++++++- arch/x86/kvm/x86.c | 10 ++ arch/x86/mm/memtest.c | 14 +-- drivers/char/epca.c | 9 +- drivers/char/moxa.c | 7 + drivers/char/n_r3964.c | 26 +++--- drivers/char/pcmcia/cm4000_cs.c | 3 drivers/char/rocket.c | 6 - drivers/char/vt_ioctl.c | 3 drivers/firmware/memmap.c | 16 ++-- drivers/gpu/drm/i915/i915_drv.c | 4 - drivers/ide/ide-cd.c | 2 drivers/infiniband/hw/mlx4/qp.c | 4 + drivers/isdn/hisax/hfc_pci.c | 41 +++++++--- drivers/isdn/hisax/hisax.h | 2 drivers/md/dm-exception-store.c | 9 +- drivers/md/dm-exception-store.h | 2 drivers/md/dm-log.c | 2 drivers/md/dm-mpath.c | 12 +++ drivers/md/dm-table.c | 3 drivers/md/dm.c | 4 + drivers/md/raid5.c | 1 drivers/media/dvb/frontends/lgdt3305.c | 17 ---- drivers/media/video/Makefile | 77 ++++++++++--------- drivers/media/video/cx18/cx18-controls.c | 2 drivers/media/video/cx2341x.c | 2 drivers/media/video/ivtv/ivtv-controls.c | 2 drivers/media/video/pvrusb2/pvrusb2-hdw.c | 56 ++++++++------ drivers/media/video/saa7134/Makefile | 3 drivers/net/bonding/bond_sysfs.c | 1 drivers/net/e1000e/netdev.c | 2 drivers/net/mv643xx_eth.c | 7 - drivers/net/sky2.c | 31 ++++---- drivers/net/tun.c | 7 + drivers/net/usb/pegasus.c | 29 ++++--- drivers/net/via-velocity.c | 2 drivers/net/wireless/ath5k/base.c | 7 + drivers/net/wireless/ath9k/calib.c | 67 ++++++----------- drivers/net/wireless/ath9k/main.c | 28 ++++--- drivers/net/wireless/ath9k/pci.c | 18 ++++ drivers/net/wireless/ath9k/regd.c | 2 drivers/net/wireless/ath9k/xmit.c | 5 - drivers/parport/parport_pc.c | 34 +++++++- drivers/pci/pci.c | 7 + drivers/pci/pcie/aspm.c | 4 + drivers/scsi/qla2xxx/qla_dbg.c | 2 drivers/scsi/sym53c8xx_2/sym_hipd.c | 5 - drivers/serial/bfin_5xx.c | 5 + drivers/spi/spi_mpc83xx.c | 6 - drivers/staging/uc2322/aten2011.c | 4 - drivers/usb/class/usbtmc.c | 6 + drivers/usb/serial/aircable.c | 5 - drivers/usb/serial/belkin_sa.c | 7 - drivers/usb/serial/cp210x.c | 6 - drivers/usb/serial/cyberjack.c | 20 +++-- drivers/usb/serial/cypress_m8.c | 11 +- drivers/usb/serial/digi_acceleport.c | 20 +++-- drivers/usb/serial/empeg.c | 8 -- drivers/usb/serial/ftdi_sio.c | 14 --- drivers/usb/serial/garmin_gps.c | 16 +++- drivers/usb/serial/generic.c | 9 +- drivers/usb/serial/io_edgeport.c | 29 +++++-- drivers/usb/serial/io_tables.h | 12 ++- drivers/usb/serial/io_ti.c | 22 ++++- drivers/usb/serial/ipaq.c | 7 - drivers/usb/serial/iuu_phoenix.c | 6 - drivers/usb/serial/keyspan.c | 13 +++ drivers/usb/serial/keyspan.h | 12 ++- drivers/usb/serial/keyspan_pda.c | 4 - drivers/usb/serial/kl5kusb105.c | 39 +++++----- drivers/usb/serial/kobil_sct.c | 12 +-- drivers/usb/serial/mct_u232.c | 13 +-- drivers/usb/serial/mos7720.c | 9 -- drivers/usb/serial/mos7840.c | 42 +++++++++- drivers/usb/serial/omninet.c | 19 +++- drivers/usb/serial/opticon.c | 14 ++- drivers/usb/serial/option.c | 17 +++- drivers/usb/serial/oti6858.c | 7 - drivers/usb/serial/pl2303.c | 5 - drivers/usb/serial/sierra.c | 28 ++++++- drivers/usb/serial/spcp8x5.c | 5 - drivers/usb/serial/symbolserial.c | 14 ++- drivers/usb/serial/ti_usb_3410_5052.c | 10 +- drivers/usb/serial/usb-serial.c | 29 +++---- drivers/usb/serial/visor.c | 13 +-- drivers/usb/serial/whiteheat.c | 6 - fs/Kconfig | 14 +-- fs/cifs/file.c | 10 +- fs/eventpoll.c | 21 +++-- fs/fs-writeback.c | 2 fs/jfs/jfs_extent.c | 1 fs/ocfs2/super.c | 32 ++++---- fs/ramfs/inode.c | 9 +- fs/xfs/xfs_bmap.c | 1 include/linux/firmware-map.h | 12 +-- include/linux/kvm_host.h | 1 include/linux/mlx4/qp.h | 1 include/linux/serial.h | 116 +++++++++++++++++------------- include/linux/usb/serial.h | 12 ++- include/linux/vmstat.h | 3 include/net/x25.h | 2 kernel/acct.c | 6 + kernel/trace/trace_functions.c | 8 +- lib/Kconfig.debug | 2 lib/dma-debug.c | 43 ++++++++++- lib/genalloc.c | 1 mm/page_alloc.c | 6 - mm/vmscan.c | 55 ++++++++++++-- mm/vmstat.c | 3 net/ipv4/route.c | 36 ++++++++- net/mac80211/rc80211_minstrel.c | 2 net/wireless/nl80211.c | 26 ++++-- net/wireless/reg.c | 10 ++ net/x25/af_x25.c | 23 ++++- net/x25/x25_timer.c | 2 security/integrity/ima/ima_audit.c | 2 security/integrity/ima/ima_main.c | 13 ++- sound/core/seq/seq_midi_event.c | 8 +- sound/isa/cmi8330.c | 2 sound/pci/ca0106/ca0106_mixer.c | 6 + sound/pci/hda/patch_realtek.c | 2 sound/pci/intel8x0.c | 24 +++--- sound/soc/codecs/wm8903.c | 4 - virt/kvm/kvm_main.c | 18 +++- 147 files changed, 1223 insertions(+), 664 deletions(-)
Alan Stern (1):
usb-serial: replace shutdown with disconnect, release
Andi Kleen (1):
KVM: Add VT-x machine check support v4
Andreas Herrmann (3):
x86: Detect use of extended APIC ID for AMD CPUs
x86: memtest: remove 64-bit division
x86: Set cpu_llc_id on AMD CPUs
Andrew Vasquez (1):
qla2xxx: Correct (again) overflow during dump-processing on large-memory ISP23xx parts.
Andy Gospodarek (1):
e1000e: stop unnecessary polling when using msi-x
Avi Kivity (3):
KVM: Disable large pages on misaligned memory slots
KVM: Prevent overflow in largepages calculation
KVM: VMX: Handle vmx instruction vmexits
Bob Copeland (1):
mac80211: fix minstrel single-rate memory corruption
Clemens Ladisch (1):
sound: seq_midi_event: fix decoding of (N)RPN events
Cliff Wickman (2):
x86: Fix UV BAU activation descriptor init
x86: Fix uv bau sending buffer initialization
Dan Williams (1):
md/raid5: add missing call to schedule() after prepare_to_wait()
Dave Jones (1):
via-velocity: Fix velocity driver unmapping incorrect size.
Dave Kleikamp (1):
jfs: fix regression preventing coalescing of extents
David S. Miller (1):
x25: Fix sleep from timer on socket destroy.
Davide Libenzi (1):
epoll: fix nested calls support
Dimitri Sivanich (1):
mm: fix handling of pagesets for downed cpus
Dirk Eibach (1):
char: moxa, prevent opening unavailable ports
Eric Paris (3):
IMA: use current_cred() instead of current->cred
IMA: Handle dentry_open failures
IMA: open all files O_LARGEFILE
Eric W. Biederman (1):
tun: Fix unregister race
FUJITA Tomonori (1):
parport_pc: set properly the dma_mask for parport_pc device
Felix Blyakher (1):
xfs: fix freeing memory in xfs_getbmap()
Frederic Weisbecker (1):
tracing/urgent: fix unbalanced ftrace_start_up
Greg Kroah-Hartman (2):
USB: usbtmc: fix switch statment
Linux 2.6.30.1
Hans Verkuil (2):
V4L: ivtv/cx18: fix regression: class controls are no longer seen
V4L: i2c modules must be linked before the v4l2 drivers
Huang Ying (1):
crypto: aes-ni - Fix cbc mode IV saving
Izik Eidus (1):
KVM: Fix dirty bit tracking for slots with large pages
Jack Morgenstein (1):
IB/mlx4: Add strong ordering to local inval and fast reg work requests
Jack Steiner (1):
x86, UV: Fix macros for multiple coherency domains
Jean Delvare (1):
x86: Add quirk for reboot stalls on a Dell Optiplex 360
Jeff Layton (1):
cifs: fix fh_mutex locking in cifs_reopen_file
Jens Rottmann (1):
parport_pc: after superio probing restore original register values
Jesse Barnes (1):
drm/i915: correct suspend/resume ordering
Jiri Slaby (6):
serial: refactor ASYNC_ flags
rocket: fix test_bit parameters
epca: fix test_bit parameters
vt_ioctl: fix lock imbalance
pcmcia/cm4000: fix lock imbalance
n_r3964: fix lock imbalance
Joerg Roedel (1):
dma-debug: change hash_bucket_find from first-fit to best-fit
John Stoffel (1):
sym53c8xx: ratelimit parity errors
Jonathan Brassow (1):
dm exception store: fix exstore lookup to be case insensitive
Jouni Malinen (2):
ath9k: Fix PCI FATAL interrupts by restoring RETRY_TIMEOUT disabling
ath5k: avoid PCI FATAL interrupts by restoring RETRY_TIMEOUT disabling
Karsten Keil (1):
ISDN: Fix DMA alloc for hfcpci
Lubomir Rintel (1):
x86: Fix non-lazy GS handling in sys_vm86()
Luis R. Rodriguez (5):
cfg80211: fix for duplicate userspace replies
cfg80211: cleanup return calls on nl80211_set_reg()
cfg80211: return immediately if num reg rules > NL80211_MAX_SUPP_REG_RULES
cfg80211: fix in nl80211_set_reg()
ath9k: Fix bug when using a card with a busted EEPROM
Marcelo Tosatti (2):
KVM: x86: check for cr3 validity in ioctl_set_sregs
KVM: protect concurrent make_all_cpus_request
Mark Brown (1):
ASoC: Remove odd bit clock ratios for WM8903
Mark Langsdorf (1):
x86: enable GART-IOMMU only after setting up protection methods
Matt T. Yourst (1):
KVM: x86: silence preempt warning on kvm_write_guest_time
Mel Gorman (2):
vmscan: properly account for the number of page cache pages zone_reclaim() can reclaim
vmscan: count the number of times zone_reclaim() scans and fails
Michael Buesch (1):
pegasus usb-net: Fix endianness bugs
Michael Krufky (1):
DVB: lgdt3305: fix 64bit division in function lgdt3305_set_if
Mike Frysinger (3):
serial: bfin_5xx: add missing spin_lock init
ramfs: ignore unknown mount options
serial: bfin_5xx: fix building as module when early printk is enabled
Mike Isely (2):
V4L: pvrusb2: Fix hardware scaling when used with cx25840
V4L: pvrusb2: Re-fix hardware scaling on video standard change
Mikulas Patocka (4):
dm mpath: validate hw_handler argument count dm mpath: validate table argument count dm mpath: flush keventd queue in destructor
dm: use i_size_read
Milan Broz (2):
dm: sysfs skip output when device is being destroyed dm exception store: really fix type lookup
Neil Horman (2):
ipv4: fix NULL pointer + success return in route lookup path
ipv4 routing: Ensure that route cache entries are usable and reclaimable with caching is off
Nick Piggin (1):
fs: remove incorrect I_NEW warnings
Nicolas Pitre (1):
ARM: 5545/2: add flush_kernel_dcache_page() for ARM
Ondrej Zary (1):
ALSA: cmi8330: fix MPU-401 PnP init copy&paste bug
Peter Zijlstra (1):
lockdep: Select frame pointers on x86
Petr Tesarik (1):
x86: move rdtsc_barrier() into the TSC vread method
Prabhanjan Sarnaik (1):
mv643xx_eth: fix unicast filter programming in promiscuous mode
Rafael J. Wysocki (2):
PCI PM: Fix handling of devices without PM support by pci_target_state() PCI PM: Follow PCI_PM_CTRL_NO_SOFT_RESET during transitions from D3
Rainer Weikusat (1):
ide-cd: prevent null pointer deref via cdrom_newpc_intr
Renaud Lottiaux (1):
bsdacct: fix access to invalid filp in acct_on()
Roel Kluin (1):
spi: takes size of a pointer to determine the size of the pointed-to type
Shaohua Li (1):
PCI: disable ASPM on VIA root-port-under-bridge configurations
Stephen Hemminger (2):
sky2: don't look for VPD size
bonding: fix multiple module load problem
Sujith (6):
ath9k: Fix bug in calibration initialization
ath9k: Fix bug in determining calibration support
ath9k: Fix bug in checking HT flag
ath9k: Fix bug in scan termination
ath9k: Fix memleak on TX DMA failure
ath9k: Initialize ANI timers
Sunil Mushran (1):
ocfs2: Fix ocfs2_osb_dump()
Takashi Iwai (4):
ALSA: ca0106 - Add missing registrations of vmaster controls
ALSA: intel8x0 - Fix PCM position craziness
ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
ALSA: hda - Add quirk for Sony VAIO Z21MN
Thomas Gleixner (1):
x86: hpet: Mark per cpu interrupts IRQF_TIMER to prevent resume failure
Tomas Szepe (1):
CONFIG_FILE_LOCKING should not depend on CONFIG_BLOCK
Yinghai Lu (2):
firmware_map: fix hang with x86/32bit
x86: handle initrd that extends into unusable memory
Zygo Blaxell (1):
lib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy
Documentation/sysctl/vm.txt +8 -4
@@ -314,10 +314,14 @@ min_unmapped_ratio: This is available only on NUMA kernels. -A percentage of the total pages in each zone. Zone reclaim will only -occur if more than this percentage of pages are file backed and unmapped. -This is to insure that a minimal amount of local pages is still available for -file I/O even if the node is overallocated. +This is a percentage of the total pages in each zone. Zone reclaim will +only occur if more than this percentage of pages are in a state that +zone_reclaim_mode allows to be reclaimed. + +If zone_reclaim_mode has the value 4 OR'd, then the percentage is compared +against all file-backed unmapped pages including swapcache pages and tmpfs +files. Otherwise, only unmapped pages backed by normal files but not tmpfs +files and similar are considered. The default is 1 percent.
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 30 -EXTRAVERSION = +EXTRAVERSION = .1 NAME = Man-Eating Seals of Antiquity # *DOCUMENTATION*
arch/arm/include/asm/cacheflush.h +8 -0
@@ -429,6 +429,14 @@ static inline void flush_anon_page(struct vm_area_struct *vma,__flush_anon_page (vma, page, vmaddr); } +#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE +static inline void flush_kernel_dcache_page (struct page *page) +{ +/* highmem pages are always flushed upon kunmap already */ +if ((cache_is_vivt () ||cache_is_vipt_aliasing ()) && !PageHighMem (page)) +__cpuc_flush_dcache_page (page_address (page)); +} +#define flush_dcache_mmap_lock (mapping) \ spin_lock_irq(&(mapping)->tree_lock)#define flush_dcache_mmap_unlock (mapping) \
arch/x86/crypto/aesni-intel_asm.S +3 -2
@@ -845,7 +845,7 @@ ENTRY(aesni_cbc_enc) */ ENTRY(aesni_cbc_dec) cmp $16, LEN - jb .Lcbc_dec_ret + jb .Lcbc_dec_just_ret mov 480(KEYP), KLEN add $240, KEYP movups (IVP), IV
@@ -891,6 +891,7 @@ ENTRY(aesni_cbc_dec) add $16, OUTP cmp $16, LEN jge .Lcbc_dec_loop1 - movups IV, (IVP) .Lcbc_dec_ret: + movups IV, (IVP) +.Lcbc_dec_just_ret: ret
arch/x86/include/asm/apic.h +1 -1
@@ -410,7 +410,7 @@ static inline unsigned default_get_apic_id(unsigned long x) {unsigned int ver =GET_APIC_VERSION (apic_read (APIC_LVR )); -if (APIC_XAPIC (ver)) +if (APIC_XAPIC (ver) ||boot_cpu_has (X86_FEATURE_EXTD_APICID ))return (x >>24 ) &0xFF ;else return (x >>24 ) &0x0F ;
arch/x86/include/asm/cpufeature.h +1 -0
@@ -94,6 +94,7 @@#define X86_FEATURE_TSC_RELIABLE (3*32+23)/* TSC is known to be reliable */ #define X86_FEATURE_NONSTOP_TSC (3*32+24)/* TSC does not stop in C states */ #define X86_FEATURE_CLFLUSH_MONITOR (3*32+25)/* "" clflush reqd with monitor */ +#define X86_FEATURE_EXTD_APICID (3*32+26)/* has extended APICID (8 bits) */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ #define X86_FEATURE_XMM3 (4*32+ 0)/* "pni" SSE-3 */
arch/x86/include/asm/kvm_host.h +2 -0
@@ -371,6 +371,8 @@ struct kvm_vcpu_arch {unsigned long dr6;unsigned long dr7;unsigned long eff_db[KVM_NR_DB_REGS ]; + +u32 exit_reason; };struct kvm_mem_alias {
arch/x86/include/asm/mce.h +2 -0
@@ -153,5 +153,7 @@ extern void mcheck_init(struct cpuinfo_x86 *c);extern void (*mce_threshold_vector)(void ); +extern void (*machine_check_vector)(struct pt_regs *,long error_code); +#endif /* __KERNEL__ */ #endif /* _ASM_X86_MCE_H */
arch/x86/include/asm/uv/uv_bau.h +1 -1
@@ -37,7 +37,7 @@#define UV_CPUS_PER_ACT_STATUS 32#define UV_ACT_STATUS_MASK 0x3#define UV_ACT_STATUS_SIZE 2 -#define UV_ACTIVATION_DESCRIPTOR_SIZE 32 +#define UV_ADP_SIZE 32#define UV_DISTRIBUTION_SIZE 256#define UV_SW_ACK_NPENDING 8#define UV_NET_ENDPOINT_INTD 0x38
arch/x86/include/asm/uv/uv_hub.h +4 -2
@@ -133,6 +133,7 @@ struct uv_scir_s {struct uv_hub_info_s {unsigned long global_mmr_base;unsigned long gpa_mask; +unsigned int gnode_extra;unsigned long gnode_upper;unsigned long lowmem_remap_top;unsigned long lowmem_remap_base;
@@ -159,7 +160,8 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);* p - PNODE (local part of nsids, right shifted 1) */ #define UV_NASID_TO_PNODE (n) (((n) >> 1) & uv_hub_info->pnode_mask) -#define UV_PNODE_TO_NASID (p) (((p) << 1) | uv_hub_info->gnode_upper) +#define UV_PNODE_TO_GNODE (p) ((p) |uv_hub_info->gnode_extra) +#define UV_PNODE_TO_NASID (p) (UV_PNODE_TO_GNODE(p) << 1)#define UV_LOCAL_MMR_BASE 0xf4000000UL#define UV_GLOBAL_MMR32_BASE 0xf8000000UL
@@ -173,7 +175,7 @@ DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);#define UV_GLOBAL_MMR32_PNODE_BITS (p) ((p) << (UV_GLOBAL_MMR32_PNODE_SHIFT))#define UV_GLOBAL_MMR64_PNODE_BITS (p) \ - ((unsigned long)(p) << UV_GLOBAL_MMR64_PNODE_SHIFT) + ((unsigned long)(UV_PNODE_TO_GNODE(p)) << UV_GLOBAL_MMR64_PNODE_SHIFT)#define UV_APIC_PNODE_SHIFT 6
arch/x86/include/asm/vmx.h +1 -0
@@ -247,6 +247,7 @@ enum vmcs_field {#define EXIT_REASON_MSR_READ 31#define EXIT_REASON_MSR_WRITE 32#define EXIT_REASON_MWAIT_INSTRUCTION 36 +#define EXIT_REASON_MCE_DURING_VMENTRY 41#define EXIT_REASON_TPR_BELOW_THRESHOLD 43#define EXIT_REASON_APIC_ACCESS 44#define EXIT_REASON_EPT_VIOLATION 48
arch/x86/kernel/apic/x2apic_uv_x.c +9 -6
@@ -562,7 +562,7 @@ void __init uv_system_init(void)union uvh_node_id_u node_id;unsigned long gnode_upper, lowmem_redir_base, lowmem_redir_size;int bytes, nid, cpu, lcpu, pnode, blade, i, j, m_val, n_val; -int max_pnode =0 ; +int gnode_extra, max_pnode =0 ;unsigned long mmr_base, present, paddr;unsigned short pnode_mask;
@@ -574,6 +574,13 @@ void __init uv_system_init(void) mmr_base =uv_read_local_mmr (UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR ) & ~UV_MMR_ENABLE ; + pnode_mask = (1 << n_val) -1 ; + node_id.v =uv_read_local_mmr (UVH_NODE_ID ); + gnode_extra = (node_id.s.node_id & ~((1 << n_val) -1 )) >>1 ; + gnode_upper = ((unsigned long )gnode_extra << m_val); +printk (KERN_DEBUG "UV: N %d, M %d, gnode_upper 0x%lx, gnode_extra 0x%x\n" , + n_val, m_val, gnode_upper, gnode_extra); +printk (KERN_DEBUG "UV: global MMR base 0x%lx\n" , mmr_base);for (i =0 ; i <UVH_NODE_PRESENT_TABLE_DEPTH ; i++)
@@ -607,11 +614,6 @@ void __init uv_system_init(void) } } - pnode_mask = (1 << n_val) -1 ; - node_id.v =uv_read_local_mmr (UVH_NODE_ID ); - gnode_upper = (((unsigned long )node_id.s.node_id) & - ~((1 << n_val) -1 )) << m_val; -uv_bios_init ();uv_bios_get_sn_info (0 , &uv_type, &sn_partition_id, &sn_coherency_id, &sn_region_size);
@@ -634,6 +636,7 @@ void __init uv_system_init(void)uv_cpu_hub_info (cpu)->pnode_mask = pnode_mask;uv_cpu_hub_info (cpu)->gpa_mask = (1 << (m_val + n_val)) -1 ;uv_cpu_hub_info (cpu)->gnode_upper = gnode_upper; +uv_cpu_hub_info (cpu)->gnode_extra = gnode_extra;uv_cpu_hub_info (cpu)->global_mmr_base = mmr_base;uv_cpu_hub_info (cpu)->coherency_domain_number = sn_coherency_id;uv_cpu_hub_info (cpu)->scir.offset =SCIR_LOCAL_MMR_BASE + lcpu;
arch/x86/kernel/cpu/amd.c +13 -1
@@ -6,6 +6,7 @@#include <asm/processor.h> #include <asm/apic.h> #include <asm/cpu.h> +#include <asm/pci-direct.h> #ifdef CONFIG_X86_64 # include <asm/numa_64.h>
@@ -257,13 +258,15 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c) {#ifdef CONFIG_X86_HT unsigned bits; +int cpu =smp_processor_id (); bits = c->x86_coreid_bits; -/* Low order bits define the core id (index of core in socket) */ c->cpu_core_id = c->initial_apicid & ((1 << bits)-1 );/* Convert the initial APIC ID into the socket ID */ c->phys_proc_id = c->initial_apicid >> bits; +/* use socket ID also for last level cache */ +per_cpu (cpu_llc_id, cpu) = c->phys_proc_id;#endif }
@@ -351,6 +354,15 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) (c->x86_model == 8 && c->x86_mask >= 8))set_cpu_cap (c,X86_FEATURE_K6_MTRR );#endif +#if defined(CONFIG_X86_LOCAL_APIC ) && defined(CONFIG_PCI ) +/* check CPU config space for extended APIC ID */ +if (c->x86 >=0xf ) { +unsigned int val; + val =read_pci_config (0 ,24 ,0 ,0x68 ); +if ((val & ((1 <<17 ) | (1 <<18 ))) == ((1 <<17 ) | (1 <<18 ))) +set_cpu_cap (c,X86_FEATURE_EXTD_APICID ); + } +#endif }static void __cpuinit init_amd (struct cpuinfo_x86 *c)
arch/x86/kernel/cpu/mcheck/mce_32.c +1 -0
@@ -29,6 +29,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)/* Call the installed machine check handler for this CPU setup. */ void (*machine_check_vector)(struct pt_regs *,long error_code) = unexpected_machine_check; +EXPORT_SYMBOL_GPL (machine_check_vector);/* This has to be run for each processor */ void mcheck_init (struct cpuinfo_x86 *c)
arch/x86/kernel/cpu/mcheck/mce_64.c +1 -0
@@ -420,6 +420,7 @@ void do_machine_check(struct pt_regs * regs, long error_code) out2:atomic_dec (&mce_entry); } +EXPORT_SYMBOL_GPL (do_machine_check);#ifdef CONFIG_X86_MCE_INTEL /***
arch/x86/kernel/hpet.c +2 -1
@@ -510,7 +510,8 @@ static int hpet_setup_irq(struct hpet_dev *dev) {if (request_irq (dev->irq, hpet_interrupt_handler, -IRQF_DISABLED |IRQF_NOBALANCING , dev->name, dev)) +IRQF_TIMER |IRQF_DISABLED |IRQF_NOBALANCING , + dev->name, dev))return -1 ;disable_irq (dev->irq);
arch/x86/kernel/pci-gart_64.c +8 -2
@@ -688,8 +688,6 @@ static __init int init_k8_gatt(struct agp_kern_info *info) agp_gatt_table = gatt; -enable_gart_translations (); - error =sysdev_class_register (&gart_sysdev_class);if (!error) error =sysdev_register (&device_gart);
@@ -847,6 +845,14 @@ void __init gart_iommu_init(void)wbinvd ();/* +* Now all caches are flushed and we can safely enable +* GART hardware. Doing it early leaves the possibility +* of stale cache entries that can lead to GART PTE +* errors. +*/ +enable_gart_translations (); + +/* * Try to workaround a bug (thanks to BenH): * Set unmapped entries to a scratch page instead of 0. * Any prefetches that hit unmapped entries won't get an bus abort
arch/x86/kernel/reboot.c +9 -0
@@ -192,6 +192,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { DMI_MATCH(DMI_BOARD_NAME, "0KP561"), }, }, + { /* Handle problems with rebooting on Dell Optiplex 360 with 0T656F */ + .callback = set_bios_reboot, + .ident = "Dell OptiPlex 360", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"OptiPlex 360" ), + DMI_MATCH(DMI_BOARD_NAME, "0T656F"), + }, + }, { /* Handle problems with rebooting on Dell 2400's */ .callback = set_bios_reboot, .ident = "Dell PowerEdge 2400",
arch/x86/kernel/setup.c +3 -12
@@ -293,15 +293,13 @@ static void __init reserve_brk(void)#ifdef CONFIG_BLK_DEV_INITRD -#ifdef CONFIG_X86_32 -#define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT)static void __init relocate_initrd (void ) {u64 ramdisk_image = boot_params.hdr.ramdisk_image;u64 ramdisk_size = boot_params.hdr.ramdisk_size; - u64 end_of_lowmem = max_low_pfn << PAGE_SHIFT; +u64 end_of_lowmem = max_low_pfn_mapped <<PAGE_SHIFT ;u64 ramdisk_here;unsigned long slop, clen, mapaddr;char *p, *q;
@@ -357,14 +355,13 @@ static void __init relocate_initrd(void) ramdisk_image, ramdisk_image + ramdisk_size -1 , ramdisk_here, ramdisk_here + ramdisk_size - 1); } -#endif static void __init reserve_initrd (void ) {u64 ramdisk_image = boot_params.hdr.ramdisk_image;u64 ramdisk_size = boot_params.hdr.ramdisk_size;u64 ramdisk_end = ramdisk_image + ramdisk_size; -u64 end_of_lowmem = max_low_pfn <<PAGE_SHIFT ; +u64 end_of_lowmem = max_low_pfn_mapped <<PAGE_SHIFT ;if (!boot_params.hdr.type_of_loader || !ramdisk_image || !ramdisk_size)
@@ -394,14 +391,8 @@ static void __init reserve_initrd(void) return; } -#ifdef CONFIG_X86_32 relocate_initrd (); -#else -printk (KERN_ERR "initrd extends beyond end of memory " -"(0x%08llx > 0x%08llx)\ndisabling initrd\n" , - ramdisk_end, end_of_lowmem); - initrd_start =0 ; -#endif +free_early (ramdisk_image, ramdisk_end); }#else
arch/x86/kernel/tlb_uv.c +15 -9
@@ -711,25 +711,31 @@ uv_activation_descriptor_init(int node, int pnode)unsigned long pa;unsigned long m;unsigned long n; -unsigned long mmr_image;struct bau_desc *adp;struct bau_desc *ad2; - adp = (struct bau_desc *)kmalloc_node (16384 ,GFP_KERNEL , node); +/* +* each bau_desc is 64 bytes; there are 8 (UV_ITEMS_PER_DESCRIPTOR) +* per cpu; and up to 32 (UV_ADP_SIZE) cpu's per blade +*/ + adp = (struct bau_desc *)kmalloc_node (sizeof (struct bau_desc )* +UV_ADP_SIZE *UV_ITEMS_PER_DESCRIPTOR ,GFP_KERNEL , node);BUG_ON (!adp); pa =uv_gpa (adp);/* need the real nasid*/ n = pa >> uv_nshift; m = pa & uv_mmask; - mmr_image =uv_read_global_mmr64 (pnode,UVH_LB_BAU_SB_DESCRIPTOR_BASE ); -if (mmr_image) { -uv_write_global_mmr64 (pnode, (unsigned long ) -UVH_LB_BAU_SB_DESCRIPTOR_BASE , - (n <<UV_DESC_BASE_PNODE_SHIFT | m)); - } +uv_write_global_mmr64 (pnode,UVH_LB_BAU_SB_DESCRIPTOR_BASE , + (n <<UV_DESC_BASE_PNODE_SHIFT | m)); -for (i =0 , ad2 = adp; i <UV_ACTIVATION_DESCRIPTOR_SIZE ; i++, ad2++) { +/* +* initializing all 8 (UV_ITEMS_PER_DESCRIPTOR) descriptors for each +* cpu even though we only use the first one; one descriptor can +* describe a broadcast to 256 nodes. +*/ +for (i =0 , ad2 = adp; i < (UV_ADP_SIZE *UV_ITEMS_PER_DESCRIPTOR ); + i++, ad2++) {memset (ad2,0 ,sizeof (struct bau_desc )); ad2->header.sw_ack_flag =1 ;/*
arch/x86/kernel/tsc.c +10 -1
@@ -710,7 +710,16 @@ static cycle_t read_tsc(struct clocksource *cs)#ifdef CONFIG_X86_64 static cycle_t __vsyscall_fn vread_tsc(void) { -cycle_t ret = (cycle_t )vget_cycles (); +cycle_t ret; + +/* +* Surround the RDTSC by barriers, to make sure it's not +* speculated to outside the seqlock critical section and +* does not cause time warps: +*/ +rdtsc_barrier (); + ret = (cycle_t )vget_cycles (); +rdtsc_barrier ();return ret >= __vsyscall_gtod_data.clock.cycle_last ? ret : __vsyscall_gtod_data.clock.cycle_last;
arch/x86/kernel/vm86_32.c +5 -4
@@ -287,10 +287,9 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk info->regs.pt.ds =0 ; info->regs.pt.es =0 ; info->regs.pt.fs =0 ; - -/* we are clearing gs later just before "jmp resume_userspace", -* because it is not saved/restored. -*/ +#ifndef CONFIG_X86_32_LAZY_GS + info->regs.pt.gs =0 ; +#endif /* * The flags register is also special: we cannot trust that the user
@@ -343,7 +342,9 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk __asm__ __volatile__( "movl %0,%%esp\n\t" "movl %1,%%ebp\n\t" +#ifdef CONFIG_X86_32_LAZY_GS "mov %2, %%gs\n\t" +#endif"jmp resume_userspace" :/* no outputs */ :"r" (&info->regs),"r" (task_thread_info (tsk)),"r" (0 ));
arch/x86/kernel/vsyscall_64.c +0 -8
@@ -132,15 +132,7 @@ static __always_inline void do_vgettimeofday(struct timeval * tv)return ; } -/* -* Surround the RDTSC by barriers, to make sure it's not -* speculated to outside the seqlock critical section and -* does not cause time warps: -*/ -rdtsc_barrier (); now =vread (); -rdtsc_barrier (); - base = __vsyscall_gtod_data.clock.cycle_last; mask = __vsyscall_gtod_data.clock.mask; mult = __vsyscall_gtod_data.clock.mult;
arch/x86/kvm/vmx.c +61 -3
130 lines not on this page · raw message
arch/x86/kvm/x86.c +9 -1
@@ -634,10 +634,12 @@ static void kvm_write_guest_time(struct kvm_vcpu *v)if ((!vcpu->time_page))return ; +preempt_disable ();if (unlikely (vcpu->hv_clock_tsc_khz !=__get_cpu_var (cpu_tsc_khz))) {kvm_set_time_scale (__get_cpu_var (cpu_tsc_khz), &vcpu->hv_clock); vcpu->hv_clock_tsc_khz =__get_cpu_var (cpu_tsc_khz); } +preempt_enable ();/* Keep irq disabled to prevent changes to the clock */ local_irq_save (flags);
@@ -3934,7 +3936,13 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, vcpu->arch.cr2 = sregs->cr2; mmu_reset_needed |= vcpu->arch.cr3 != sregs->cr3; - vcpu->arch.cr3 = sregs->cr3; + +down_read (&vcpu->kvm->slots_lock); +if (gfn_to_memslot (vcpu->kvm, sregs->cr3 >>PAGE_SHIFT )) + vcpu->arch.cr3 = sregs->cr3; +else +set_bit (KVM_REQ_TRIPLE_FAULT , &vcpu->requests); +up_read (&vcpu->kvm->slots_lock);kvm_set_cr8 (vcpu, sregs->cr8);
arch/x86/mm/memtest.c +7 -7
@@ -40,23 +40,23 @@ static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad)static void __init memtest (u64 pattern,u64 start_phys,u64 size) { -u64 i, count; -u64 *start; +u64 *p; +void *start, *end;u64 start_bad, last_bad;u64 start_phys_aligned;size_t incr; incr =sizeof (pattern); start_phys_aligned =ALIGN (start_phys, incr); - count = (size - (start_phys_aligned - start_phys))/incr; start =__va (start_phys_aligned); + end = start + size - (start_phys_aligned - start_phys); start_bad =0 ; last_bad =0 ; -for (i =0 ; i < count; i++) - start[i] = pattern; -for (i =0 ; i < count; i++, start++, start_phys_aligned += incr) { -if (*start == pattern) +for (p = start; p < end; p++) + *p = pattern; +for (p = start; p < end; p++, start_phys_aligned += incr) { +if (*p == pattern)continue ;if (start_phys_aligned == last_bad + incr) { last_bad += incr;
drivers/char/epca.c +5 -4
@@ -1518,7 +1518,7 @@ static void doevent(int crd)if (event &MODEMCHG_IND ) {/* A modem signal change has been indicated */ ch->imodem = mstat; -if (test_bit (ASYNC_CHECK_CD , &ch->port.flags)) { +if (test_bit (ASYNCB_CHECK_CD , &ch->port.flags)) {/* We are now receiving dcd */ if (mstat & ch->dcd)wake_up_interruptible (&ch->port.open_wait);
@@ -1765,9 +1765,9 @@ static void epcaparam(struct tty_struct *tty, struct channel *ch)* that the driver will wait on carrier detect. */ if (ts->c_cflag &CLOCAL ) -clear_bit (ASYNC_CHECK_CD , &ch->port.flags); +clear_bit (ASYNCB_CHECK_CD , &ch->port.flags);else -set_bit (ASYNC_CHECK_CD , &ch->port.flags); +set_bit (ASYNCB_CHECK_CD , &ch->port.flags); mval = ch->m_dtr | ch->m_rts; }/* End CBAUD not detected */ iflag =termios2digi_i (ch, ts->c_iflag);
@@ -2244,7 +2244,8 @@ static void do_softint(struct work_struct *work)if (test_and_clear_bit (EPCA_EVENT_HANGUP , &ch->event)) {tty_hangup (tty);wake_up_interruptible (&ch->port.open_wait); -clear_bit (ASYNC_NORMAL_ACTIVE , &ch->port.flags); +clear_bit (ASYNCB_NORMAL_ACTIVE , + &ch->port.flags); } }tty_kref_put (tty);
drivers/char/moxa.c +6 -1
@@ -1184,6 +1184,11 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)return -ENODEV ; } +if (port %MAX_PORTS_PER_BOARD >= brd->numPorts) { + retval = -ENODEV ; + goto out_unlock; + } + ch = &brd->ports[port %MAX_PORTS_PER_BOARD ]; ch->port.count++; tty->driver_data = ch;
@@ -1208,8 +1213,8 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)moxa_close_port (tty); }else ch->port.flags |=ASYNC_NORMAL_ACTIVE ; +out_unlock:mutex_unlock (&moxa_openlock); -return retval; }
drivers/char/n_r3964.c +14 -12
@@ -1062,7 +1062,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,struct r3964_client_info *pClient;struct r3964_message *pMsg;struct r3964_client_message theMsg; -int count; +int ret;TRACE_L ("read()" );
@@ -1074,8 +1074,8 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,if (pMsg ==NULL ) {/* no messages available. */ if (file->f_flags &O_NONBLOCK ) { -unlock_kernel (); -return -EAGAIN ; + ret = -EAGAIN ; + goto unlock; }/* block until there is a message: */ wait_event_interruptible(pInfo->read_wait,
@@ -1085,29 +1085,31 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,/* If we still haven't got a message, we must have been signalled */ if (!pMsg) { -unlock_kernel (); -return -EINTR ; + ret = -EINTR ; + goto unlock; }/* deliver msg to client process: */ theMsg.msg_id = pMsg->msg_id; theMsg.arg = pMsg->arg; theMsg.error_code = pMsg->error_code; - count =sizeof (struct r3964_client_message ); + ret =sizeof (struct r3964_client_message );kfree (pMsg);TRACE_M ("r3964_read - msg kfree %p" , pMsg); -if (copy_to_user (buf, &theMsg, count)) { -unlock_kernel (); -return -EFAULT ; +if (copy_to_user (buf, &theMsg, ret)) { + ret = -EFAULT ; + goto unlock; } -TRACE_PS ("read - return %d" , count); -return count; +TRACE_PS ("read - return %d" , ret); + goto unlock; } + ret = -EPERM ; +unlock:unlock_kernel (); -return -EPERM ; +return ret; } static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
drivers/char/pcmcia/cm4000_cs.c +2 -1
@@ -1575,7 +1575,8 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)clear_bit (LOCK_IO , &dev->flags);wake_up_interruptible (&dev->ioq); -return 0 ; + rc =0 ; +break ;case CM_IOCSPTS : {struct ptsreq krnptsreq;
drivers/char/rocket.c +3 -3
@@ -934,7 +934,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)/* * Info->count is now 1; so it's safe to sleep now. */ -if (!test_bit (ASYNC_INITIALIZED , &port->flags)) { +if (!test_bit (ASYNCB_INITIALIZED , &port->flags)) { cp = &info->channel;sSetRxTrigger (cp,TRIG_1 );if (sGetChanStatus (cp) &CD_ACT )
@@ -958,7 +958,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)sEnRxFIFO (cp);sEnTransmit (cp); -set_bit (ASYNC_INITIALIZED , &info->port.flags); +set_bit (ASYNCB_INITIALIZED , &info->port.flags);/* * Set up the tty->alt_speed kludge
@@ -1641,7 +1641,7 @@ static int rp_write(struct tty_struct *tty,/* Write remaining data into the port's xmit_buf */ while (1 ) {/* Hung up ? */ -if (!test_bit (ASYNC_NORMAL_ACTIVE , &info->port.flags)) +if (!test_bit (ASYNCB_NORMAL_ACTIVE , &info->port.flags)) goto end; c =min (count,XMIT_BUF_SIZE - info->xmit_cnt -1 ); c =min (c,XMIT_BUF_SIZE - info->xmit_head);
drivers/char/vt_ioctl.c +2 -1
@@ -396,7 +396,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, kbd = kbd_table + console;switch (cmd) {case TIOCLINUX : -return tioclinux (tty, arg); + ret =tioclinux (tty, arg); +break ;case KIOCSOUND :if (!perm) goto eperm;
drivers/firmware/memmap.c +9 -7
@@ -31,8 +31,12 @@* information is necessary as for the resource tree. */ struct firmware_map_entry { -resource_size_t start;/* start of the memory range */ -resource_size_t end;/* end of the memory range (incl.) */ +/* +* start and end must be u64 rather than resource_size_t, because e820 +* resources can lie at addresses above 4G. +*/ +u64 start;/* start of the memory range */ +u64 end;/* end of the memory range (incl.) */ const char *type;/* type of the memory range */ struct list_head list;/* entry for the linked list */ struct kobject kobj;/* kobject for each entry */
@@ -101,7 +105,7 @@ static LIST_HEAD(map_entries);* Common implementation of firmware_map_add() and firmware_map_add_early() * which expects a pre-allocated struct firmware_map_entry. **/ -static int firmware_map_add_entry (resource_size_t start,resource_size_t end, +static int firmware_map_add_entry (u64 start,u64 end,const char *type,struct firmware_map_entry *entry) {
@@ -132,8 +136,7 @@ static int firmware_map_add_entry(resource_size_t start, resource_size_t end,* * Returns 0 on success, or -ENOMEM if no memory could be allocated. **/ -int firmware_map_add (resource_size_t start,resource_size_t end, -const char *type) +int firmware_map_add (u64 start,u64 end,const char *type) {struct firmware_map_entry *entry;
@@ -157,8 +160,7 @@ int firmware_map_add(resource_size_t start, resource_size_t end,* * Returns 0 on success, or -ENOMEM if no memory could be allocated. **/ -int __init firmware_map_add_early (resource_size_t start,resource_size_t end, -const char *type) +int __init firmware_map_add_early (u64 start,u64 end,const char *type) {struct firmware_map_entry *entry;
drivers/gpu/drm/i915/i915_drv.c +2 -2
@@ -67,8 +67,6 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)pci_save_state (dev->pdev); -i915_save_state (dev); -/* If KMS is active, we do the leavevt stuff here */ if (drm_core_check_feature (dev,DRIVER_MODESET )) {if (i915_gem_idle (dev))
@@ -77,6 +75,8 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)drm_irq_uninstall (dev); } +i915_save_state (dev); +intel_opregion_free (dev,1 );if (state.event ==PM_EVENT_SUSPEND ) {
drivers/ide/ide-cd.c +1 -1
@@ -758,7 +758,7 @@ out_end: rq->errors = -EIO ; } -if (uptodate ==0 ) +if (uptodate ==0 && rq->bio)ide_cd_error_cmd (drive, cmd);/* make sure it's fully ended */
drivers/infiniband/hw/mlx4/qp.c +4 -0
@@ -1585,12 +1585,16 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,break ;case IB_WR_LOCAL_INV : + ctrl->srcrb_flags |= +cpu_to_be32 (MLX4_WQE_CTRL_STRONG_ORDER );set_local_inv_seg (wqe, wr->ex.invalidate_rkey); wqe +=sizeof (struct mlx4_wqe_local_inval_seg ); size +=sizeof (struct mlx4_wqe_local_inval_seg ) /16 ;break ;case IB_WR_FAST_REG_MR : + ctrl->srcrb_flags |= +cpu_to_be32 (MLX4_WQE_CTRL_STRONG_ORDER );set_fmr_seg (wqe, wr); wqe +=sizeof (struct mlx4_wqe_fmr_seg ); size +=sizeof (struct mlx4_wqe_fmr_seg ) /16 ;
drivers/isdn/hisax/hfc_pci.c +30 -11
68 lines not on this page · raw message
drivers/isdn/hisax/hisax.h +1 -1
@@ -703,7 +703,7 @@ struct hfcPCI_hw {int nt_timer;struct pci_dev *dev;unsigned char *pci_io;/* start of PCI IO memory */ -void *share_start;/* shared memory for Fifos start */ +dma_addr_t dma;/* dma handle for Fifos */ void *fifos;/* FIFO memory */ int last_bfifo_cnt[2 ];/* marker saving last b-fifo frame count */ struct timer_list timer;
drivers/md/dm-exception-store.c +6 -3
@@ -195,7 +195,7 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv, struct dm_exception_store **store) {int r =0 ; -struct dm_exception_store_type *type; +struct dm_exception_store_type *type =NULL ;struct dm_exception_store *tmp_store;char persistent;
@@ -211,12 +211,15 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv, } persistent =toupper (*argv[1 ]); -if (persistent !='P' && persistent !='N' ) { +if (persistent =='P' ) + type =get_type ("P" ); +else if (persistent =='N' ) + type =get_type ("N" ); +else { ti->error ="Persistent flag is not P or N" ;return -EINVAL ; } - type =get_type (argv[1 ]);if (!type) { ti->error ="Exception store type not recognised" ; r = -EINVAL ;
drivers/md/dm-exception-store.h +1 -1
@@ -156,7 +156,7 @@ static inline void dm_consecutive_chunk_count_inc(struct dm_snap_exception *e)*/ static inline sector_t get_dev_size (struct block_device *bdev) { -return bdev->bd_inode->i_size >>SECTOR_SHIFT ; +return i_size_read (bdev->bd_inode) >>SECTOR_SHIFT ; } static inline chunk_t sector_to_chunk(struct dm_exception_store *store,
drivers/md/dm-log.c +1 -1
@@ -415,7 +415,7 @@ static int create_log_context(struct dm_dirty_log *log, struct dm_target *ti, buf_size =dm_round_up ((LOG_OFFSET <<SECTOR_SHIFT ) + bitset_size, ti->limits.hardsect_size); -if (buf_size > dev->bdev->bd_inode->i_size) { +if (buf_size >i_size_read (dev->bdev->bd_inode)) {DMWARN ("log device %s too small: need %llu bytes" , dev->name, (unsigned long long )buf_size);kfree (lc);
drivers/md/dm-mpath.c +12 -0
@@ -553,6 +553,12 @@ static int parse_path_selector(struct arg_set *as, struct priority_group *pg,return -EINVAL ; } +if (ps_argc > as->argc) { +dm_put_path_selector (pst); + ti->error ="not enough arguments for path selector" ; +return -EINVAL ; + } + r = pst->create (&pg->ps, ps_argc, as->argv);if (r) {dm_put_path_selector (pst);
@@ -699,6 +705,11 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m)if (!hw_argc)return 0 ; +if (hw_argc > as->argc) { + ti->error ="not enough arguments for hardware handler" ; +return -EINVAL ; + } + m->hw_handler_name =kstrdup (shift (as),GFP_KERNEL );request_module ("scsi_dh_%s" , m->hw_handler_name);if (scsi_dh_handler_exist (m->hw_handler_name) ==0 ) {
@@ -836,6 +847,7 @@ static void multipath_dtr(struct dm_target *ti)flush_workqueue (kmpath_handlerd);flush_workqueue (kmultipathd); +flush_scheduled_work ();free_multipath (m); }
drivers/md/dm-table.c +2 -1
@@ -387,7 +387,8 @@ static void close_dev(struct dm_dev_internal *d, struct mapped_device *md)static int check_device_area (struct dm_dev_internal *dd,sector_t start,sector_t len) { -sector_t dev_size = dd->dm_dev.bdev->bd_inode->i_size >>SECTOR_SHIFT ; +sector_t dev_size =i_size_read (dd->dm_dev.bdev->bd_inode) >> +SECTOR_SHIFT ;if (!dev_size)return 1 ;
drivers/md/dm.c +4 -0
@@ -1780,6 +1780,10 @@ struct mapped_device *dm_get_from_kobject(struct kobject *kobj)if (&md->kobj != kobj)return NULL ; +if (test_bit (DMF_FREEING , &md->flags) || +test_bit (DMF_DELETING , &md->flags)) +return NULL ; +dm_get (md);return md; }
drivers/md/raid5.c +1 -0
@@ -3696,6 +3696,7 @@ static int make_request(struct request_queue *q, struct bio * bi)spin_unlock_irq (&conf->device_lock);if (must_retry) {release_stripe (sh); +schedule (); goto retry; } }
drivers/media/dvb/frontends/lgdt3305.c +3 -14
@@ -19,6 +19,7 @@* */ +#include <asm/div64.h> #include <linux/dvb/frontend.h> #include "dvb_math.h" #include "lgdt3305.h"
@@ -496,27 +497,15 @@ static int lgdt3305_set_if(struct lgdt3305_state *state, nco = if_freq_khz /10 ; -#define LGDT3305_64BIT_DIVISION_ENABLED 0 -/* FIXME: 64bit division disabled to avoid linking error: -* WARNING: "__udivdi3" [lgdt3305.ko] undefined! -*/ switch (param->u.vsb.modulation) {case VSB_8 : -#if LGDT3305_64BIT_DIVISION_ENABLED nco <<=24 ; - nco /=625 ; -#else - nco *= ((1 <<24 ) /625 ); -#endif +do_div (nco,625 );break ;case QAM_64 :case QAM_256 : -#if LGDT3305_64BIT_DIVISION_ENABLED nco <<=28 ; - nco /=625 ; -#else - nco *= ((1 <<28 ) /625 ); -#endif +do_div (nco,625 );break ;default :return -EINVAL ;
drivers/media/video/Makefile +41 -36
139 lines not on this page · raw message
drivers/media/video/cx18/cx18-controls.c +2 -0
@@ -61,6 +61,8 @@ int cx18_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qctrl)switch (qctrl->id) {/* Standard V4L2 controls */ +case V4L2_CID_USER_CLASS : +return v4l2_ctrl_query_fill (qctrl,0 ,0 ,0 ,0 );case V4L2_CID_BRIGHTNESS :case V4L2_CID_HUE :case V4L2_CID_SATURATION :
drivers/media/video/cx2341x.c +2 -0
@@ -500,6 +500,8 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params,int err;switch (qctrl->id) { +case V4L2_CID_MPEG_CLASS : +return v4l2_ctrl_query_fill (qctrl,0 ,0 ,0 ,0 );case V4L2_CID_MPEG_STREAM_TYPE : return v4l2_ctrl_query_fill(qctrl, V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
drivers/media/video/ivtv/ivtv-controls.c +2 -0
@@ -60,6 +60,8 @@ int ivtv_queryctrl(struct file *file, void *fh, struct v4l2_queryctrl *qctrl)switch (qctrl->id) {/* Standard V4L2 controls */ +case V4L2_CID_USER_CLASS : +return v4l2_ctrl_query_fill (qctrl,0 ,0 ,0 ,0 );case V4L2_CID_BRIGHTNESS :case V4L2_CID_HUE :case V4L2_CID_SATURATION :
drivers/media/video/pvrusb2/pvrusb2-hdw.c +32 -24
86 lines not on this page · raw message
drivers/media/video/saa7134/Makefile +1 -2
@@ -3,8 +3,7 @@ saa7134-objs := saa7134-cards.o saa7134-core.o saa7134-i2c.o \ saa7134-ts.o saa7134-tvaudio.o saa7134-vbi.o \ saa7134-video.o saa7134-input.o -obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ - saa6752hs.o +obj-$(CONFIG_VIDEO_SAA7134) += saa6752hs.o saa7134.o saa7134-empress.o obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o
drivers/net/bonding/bond_sysfs.c +1 -0
@@ -1538,6 +1538,7 @@ int bond_create_sysfs(void)printk (KERN_ERR "network device named %s already exists in sysfs" , class_attr_bonding_masters.attr.name); + ret =0 ; }return ret;
drivers/net/e1000e/netdev.c +1 -1
@@ -1996,7 +1996,7 @@ static int e1000_clean(struct napi_struct *napi, int budget) struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);struct e1000_hw *hw = &adapter->hw;struct net_device *poll_dev = adapter->netdev; -int tx_cleaned =0 , work_done =0 ; +int tx_cleaned =1 , work_done =0 ; adapter =netdev_priv (poll_dev);
drivers/net/mv643xx_eth.c +3 -4
@@ -1751,12 +1751,12 @@ static void mv643xx_eth_program_unicast_filter(struct net_device *dev)uc_addr_set (mp, dev->dev_addr); - port_config =rdlp (mp,PORT_CONFIG ); + port_config =rdlp (mp,PORT_CONFIG ) & ~UNICAST_PROMISCUOUS_MODE ; + nibbles =uc_addr_filter_mask (dev);if (!nibbles) { port_config |=UNICAST_PROMISCUOUS_MODE ; -wrlp (mp,PORT_CONFIG , port_config); -return ; + nibbles =0xffff ; }for (i =0 ; i <16 ; i +=4 ) {
@@ -1777,7 +1777,6 @@ static void mv643xx_eth_program_unicast_filter(struct net_device *dev)wrl (mp, off, v); } - port_config &= ~UNICAST_PROMISCUOUS_MODE ;wrlp (mp,PORT_CONFIG , port_config); }
drivers/net/sky2.c +16 -15
@@ -4365,6 +4365,22 @@ static int __devinit sky2_probe(struct pci_dev *pdev, goto err_out; } +/* Get configuration information +* Note: only regular PCI config access once to test for HW issues +* other PCI access through shared memory for speed and to +* avoid MMCONFIG problems. +*/ + err =pci_read_config_dword (pdev,PCI_DEV_REG2 , ®); +if (err) { +dev_err (&pdev->dev,"PCI read config failed\n" ); + goto err_out; + } + +if (~reg ==0 ) { +dev_err (&pdev->dev,"PCI configuration read error\n" ); + goto err_out; + } + err =pci_request_regions (pdev,DRV_NAME );if (err) {dev_err (&pdev->dev,"cannot obtain PCI resources\n" );
@@ -4390,21 +4406,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev, } } -/* Get configuration information -* Note: only regular PCI config access once to test for HW issues -* other PCI access through shared memory for speed and to -* avoid MMCONFIG problems. -*/ - err =pci_read_config_dword (pdev,PCI_DEV_REG2 , ®); -if (err) { -dev_err (&pdev->dev,"PCI read config failed\n" ); - goto err_out_free_regions; - } - -/* size of available VPD, only impact sysfs */ - err =pci_vpd_truncate (pdev,1ul << (((reg &PCI_VPD_ROM_SZ ) >>14 ) +8 )); -if (err) -dev_warn (&pdev->dev,"Can't set VPD size\n" );#ifdef __BIG_ENDIAN/* The sk98lin vendor driver uses hardware byte swapping but
drivers/net/tun.c +4 -3
@@ -1275,21 +1275,22 @@ static int tun_chr_open(struct inode *inode, struct file * file)static int tun_chr_close (struct inode *inode,struct file *file) {struct tun_file *tfile = file->private_data; -struct tun_struct *tun =__tun_get (tfile); +struct tun_struct *tun; +rtnl_lock (); + tun =__tun_get (tfile);if (tun) {DBG (KERN_INFO "%s: tun_chr_close\n" , tun->dev->name); -rtnl_lock ();__tun_detach (tun);/* If desireable, unregister the netdevice. */ if (!(tun->flags &TUN_PERSIST ))unregister_netdevice (tun->dev); -rtnl_unlock (); } +rtnl_unlock (); tun = tfile->tun;if (tun)
drivers/net/usb/pegasus.c +17 -12
@@ -297,7 +297,7 @@ static int update_eth_regs_async(pegasus_t * pegasus) pegasus->dr.bRequestType =PEGASUS_REQT_WRITE ; pegasus->dr.bRequest =PEGASUS_REQ_SET_REGS ; - pegasus->dr.wValue =0 ; + pegasus->dr.wValue =cpu_to_le16 (0 ); pegasus->dr.wIndex =cpu_to_le16 (EthCtrl0); pegasus->dr.wLength =cpu_to_le16 (3 ); pegasus->ctrl_urb->transfer_buffer_length =3 ;
@@ -446,11 +446,12 @@ static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data)int i;__u8 tmp, d[4 ] = {0x3f ,0 ,0 ,EPROM_WRITE };int ret; +__le16 le_data =cpu_to_le16 (data);set_registers (pegasus, EpromOffset,4 , d);enable_eprom_write (pegasus);set_register (pegasus, EpromOffset, index); -set_registers (pegasus, EpromData,2 , &data); +set_registers (pegasus, EpromData,2 , &le_data);set_register (pegasus, EpromCtrl,EPROM_WRITE );for (i =0 ; i <REG_TIMEOUT ; i++) {
@@ -923,29 +924,32 @@ static struct net_device_stats *pegasus_netdev_stats(struct net_device *dev)static inline void disable_net_traffic (pegasus_t * pegasus) { -int tmp =0 ; +__le16 tmp =cpu_to_le16 (0 ); -set_registers (pegasus, EthCtrl0,2 , &tmp); +set_registers (pegasus, EthCtrl0,sizeof (tmp), &tmp); }static inline void get_interrupt_interval (pegasus_t * pegasus) { -__u8 data[2 ]; +u16 data; +u8 interval; -read_eprom_word (pegasus,4 , (__u16 *) data); +read_eprom_word (pegasus,4 , &data); + interval = data >>8 ;if (pegasus->usb->speed !=USB_SPEED_HIGH ) { -if (data[1 ] <0x80 ) { +if (interval <0x80 ) {if (netif_msg_timer (pegasus))dev_info (&pegasus->intf->dev,"intr interval " "changed from %ums to %ums\n" , - data[1 ],0x80 ); - data[1 ] =0x80 ; + interval,0x80 ); + interval =0x80 ; + data = (data &0x00FF ) | ((u16 )interval <<8 );#ifdef PEGASUS_WRITE_EEPROM -write_eprom_word (pegasus,4 , *(__u16 *) data); +write_eprom_word (pegasus,4 , data);#endif } } - pegasus->intr_interval = data[1 ]; + pegasus->intr_interval = interval; }static void set_carrier (struct net_device *net)
@@ -1299,7 +1303,8 @@ static int pegasus_blacklisted(struct usb_device *udev)/* Special quirk to keep the driver from handling the Belkin Bluetooth * dongle which happens to have the same ID. */ -if ((udd->idVendor ==VENDOR_BELKIN && udd->idProduct ==0x0121 ) && +if ((udd->idVendor ==cpu_to_le16 (VENDOR_BELKIN )) && + (udd->idProduct ==cpu_to_le16 (0x0121 )) && (udd->bDeviceClass ==USB_CLASS_WIRELESS_CONTROLLER ) && (udd->bDeviceProtocol ==1 ))return 1 ;
drivers/net/via-velocity.c +1 -1
@@ -1845,7 +1845,7 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_*/ if (tdinfo->skb_dma) { - pktlen = (skb->len >ETH_ZLEN ? :ETH_ZLEN ); + pktlen = max_t(unsigned int, skb->len, ETH_ZLEN);for (i =0 ; i < tdinfo->nskb_dma; i++) {#ifdef VELOCITY_ZERO_COPY_SUPPORT pci_unmap_single (vptr->pdev, tdinfo->skb_dma[i],le16_to_cpu (td->tdesc1.len),PCI_DMA_TODEVICE );
drivers/net/wireless/ath5k/base.c +7 -0
@@ -685,6 +685,13 @@ ath5k_pci_resume(struct pci_dev *pdev)if (err)return err; +/* +* Suspend/Resume resets the PCI configuration space, so we have to +* re-disable the RETRY_TIMEOUT register (0x41) to keep +* PCI Tx retries from interfering with C3 CPU state +*/ +pci_write_config_byte (pdev,0x41 ,0 ); + err =request_irq (pdev->irq, ath5k_intr,IRQF_SHARED ,"ath" , sc);if (err) {ATH5K_ERR (sc,"request_irq failed\n" );
drivers/net/wireless/ath9k/calib.c +25 -42
123 lines not on this page · raw message
drivers/net/wireless/ath9k/main.c +18 -10
@@ -408,6 +408,18 @@ set_timer:mod_timer (&sc->ani.timer, jiffies +msecs_to_jiffies (cal_interval)); } +static void ath_start_ani (struct ath_softc *sc) +{ +unsigned long timestamp =jiffies_to_msecs (jiffies); + + sc->ani.longcal_timer = timestamp; + sc->ani.shortcal_timer = timestamp; + sc->ani.checkani_timer = timestamp; + +mod_timer (&sc->ani.timer, + jiffies +msecs_to_jiffies (ATH_ANI_POLLINTERVAL )); +} +/* * Update tx/rx chainmask. For legacy association, * hard code chainmask to 1x1, for 11n association, use
@@ -920,9 +932,7 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc, sc->nodestats.ns_avgtxrssi =ATH_RSSI_DUMMY_MARKER ; sc->nodestats.ns_avgtxrate =ATH_RATE_DUMMY_MARKER ; -/* Start ANI */ -mod_timer (&sc->ani.timer, - jiffies +msecs_to_jiffies (ATH_ANI_POLLINTERVAL )); +ath_start_ani (sc); }else {DPRINTF (sc,ATH_DBG_CONFIG ,"Bss Info DISSOC\n" ); sc->curaid =0 ;
@@ -1416,7 +1426,8 @@ static int ath_init(u16 devid, struct ath_softc *sc)for (i =0 ; i < sc->keymax; i++)ath9k_hw_keyreset (ah, (u16 ) i); -if (ath9k_regd_init (sc->sc_ah)) + error =ath9k_regd_init (sc->sc_ah); +if (error) goto bad;/* default to MONITOR mode */
@@ -2270,12 +2281,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,ath9k_hw_set_interrupts (sc->sc_ah, sc->imask); -if (conf->type ==NL80211_IFTYPE_AP ) { -/* TODO: is this a suitable place to start ANI for AP mode? */ -/* Start ANI */ -mod_timer (&sc->ani.timer, - jiffies +msecs_to_jiffies (ATH_ANI_POLLINTERVAL )); - } +if (conf->type ==NL80211_IFTYPE_AP ) +ath_start_ani (sc); out:mutex_unlock (&sc->mutex);
@@ -2771,6 +2778,7 @@ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)mutex_lock (&sc->mutex); aphy->state =ATH_WIPHY_ACTIVE ; sc->sc_flags &= ~SC_OP_SCANNING ; + sc->sc_flags |=SC_OP_FULL_RESET ;mutex_unlock (&sc->mutex); }
drivers/net/wireless/ath9k/pci.c +18 -0
@@ -87,6 +87,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)struct ath_softc *sc;struct ieee80211_hw *hw;u8 csz; +u32 val;int ret =0 ;struct ath_hw *ah;
@@ -133,6 +134,14 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)pci_set_master (pdev); +/* +* Disable the RETRY_TIMEOUT register (0x41) to keep +* PCI Tx retries from interfering with C3 CPU state. +*/ +pci_read_config_dword (pdev,0x40 , &val); +if ((val &0x0000ff00 ) !=0 ) +pci_write_config_dword (pdev,0x40 , val &0xffff00ff ); + ret =pci_request_region (pdev,0 ,"ath9k" );if (ret) {dev_err (&pdev->dev,"PCI memory region reserve error\n" );
@@ -244,12 +253,21 @@ static int ath_pci_resume(struct pci_dev *pdev)struct ieee80211_hw *hw =pci_get_drvdata (pdev);struct ath_wiphy *aphy = hw->priv;struct ath_softc *sc = aphy->sc; +u32 val;int err; err =pci_enable_device (pdev);if (err)return err;pci_restore_state (pdev); +/* +* Suspend/Resume resets the PCI configuration space, so we have to +* re-disable the RETRY_TIMEOUT register (0x41) to keep +* PCI Tx retries from interfering with C3 CPU state +*/ +pci_read_config_dword (pdev,0x40 , &val); +if ((val &0x0000ff00 ) !=0 ) +pci_write_config_dword (pdev,0x40 , val &0xffff00ff );/* Enable LED */ ath9k_hw_cfg_output(sc->sc_ah, ATH_LED_PIN,
drivers/net/wireless/ath9k/regd.c +1 -1
@@ -439,7 +439,7 @@ int ath9k_regd_init(struct ath_hw *ah)u16 regdmn;if (!ath9k_regd_is_eeprom_valid (ah)) { -DPRINTF (ah->ah_sc,ATH_DBG_REGULATORY , +DPRINTF (ah->ah_sc,ATH_DBG_FATAL ,"Invalid EEPROM contents\n" );return -EINVAL ; }
drivers/net/wireless/ath9k/xmit.c +3 -2
@@ -1573,8 +1573,9 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, skb->len, DMA_TO_DEVICE);if (unlikely (dma_mapping_error (sc->dev, bf->bf_dmacontext))) { bf->bf_mpdu =NULL ; -DPRINTF (sc,ATH_DBG_CONFIG , -"dma_mapping_error() on TX\n" ); +kfree (tx_info_priv); + tx_info->rate_driver_data[0 ] =NULL ; +DPRINTF (sc,ATH_DBG_FATAL ,"dma_mapping_error() on TX\n" );return -ENOMEM ; }
drivers/parport/parport_pc.c +28 -6
@@ -1413,11 +1413,13 @@ static void __devinit decode_smsc(int efer, int key, int devid, int devrev)static void __devinit winbond_check (int io,int key) { -int devid,devrev,oldid,x_devid,x_devrev,x_oldid; +int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid;if (!request_region (io,3 , __func__))return ; + origval =inb (io);/* Save original value */ +/* First probe without key */ outb (0x20 ,io); x_devid=inb (io+1 );
@@ -1437,6 +1439,8 @@ static void __devinit winbond_check(int io, int key) oldid=inb (io+1 );outb (0xaa ,io);/* Magic Seal */ +outb (origval, io);/* in case we poked some entirely different hardware */ +if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid)) goto out;/* protection against false positives */
@@ -1447,11 +1451,15 @@ out:static void __devinit winbond_check2 (int io,int key) { -int devid,devrev,oldid,x_devid,x_devrev,x_oldid; +int origval[3 ], devid, devrev, oldid, x_devid, x_devrev, x_oldid;if (!request_region (io,3 , __func__))return ; + origval[0 ] =inb (io);/* Save original values */ + origval[1 ] =inb (io +1 ); + origval[2 ] =inb (io +2 ); +/* First probe without the key */ outb (0x20 ,io+2 ); x_devid=inb (io+2 );
@@ -1470,6 +1478,10 @@ static void __devinit winbond_check2(int io,int key) oldid=inb (io+2 );outb (0xaa ,io);/* Magic Seal */ +outb (origval[0 ], io);/* in case we poked some entirely different hardware */ +outb (origval[1 ], io +1 ); +outb (origval[2 ], io +2 ); +if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid)) goto out;/* protection against false positives */
@@ -1480,11 +1492,13 @@ out:static void __devinit smsc_check (int io,int key) { -int id,rev,oldid,oldrev,x_id,x_rev,x_oldid,x_oldrev; +int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev;if (!request_region (io,3 , __func__))return ; + origval =inb (io);/* Save original value */ +/* First probe without the key */ outb (0x0d ,io); x_oldid=inb (io+1 );
@@ -1508,6 +1522,8 @@ static void __devinit smsc_check(int io, int key) rev=inb (io+1 );outb (0xaa ,io);/* Magic Seal */ +outb (origval, io);/* in case we poked some entirely different hardware */ +if ((x_id == id) && (x_oldrev == oldrev) && (x_oldid == oldid) && (x_rev == rev)) goto out;/* protection against false positives */
@@ -1544,11 +1560,12 @@ static void __devinit detect_and_report_smsc (void)static void __devinit detect_and_report_it87 (void ) {u16 dev; -u8 r; +u8 origval, r;if (verbose_probing)printk (KERN_DEBUG "IT8705 Super-IO detection, now testing port 2E ...\n" ); -if (!request_region (0x2e ,1 , __func__)) +if (!request_region (0x2e ,2 , __func__))return ; + origval =inb (0x2e );/* Save original value */ outb (0x87 ,0x2e );outb (0x01 ,0x2e );outb (0x55 ,0x2e );
@@ -1568,8 +1585,10 @@ static void __devinit detect_and_report_it87(void)outb (r |8 ,0x2F );outb (0x02 ,0x2E );/* Lock */ outb(0x02, 0x2F); + }else { +outb (origval,0x2e );/* Oops, sorry to disturb */ } -release_region (0x2e ,1 ); +release_region (0x2e ,2 ); }#endif /* CONFIG_PARPORT_PC_SUPERIO */
@@ -2193,6 +2212,9 @@ struct parport *parport_pc_probe_port(unsigned long int base,if (IS_ERR (pdev))return NULL ; dev = &pdev->dev; + + dev->coherent_dma_mask =DMA_BIT_MASK (24 ); + dev->dma_mask = &dev->coherent_dma_mask; } ops =kmalloc (sizeof (struct parport_operations ),GFP_KERNEL );
drivers/pci/pci.c +4 -3
@@ -480,6 +480,8 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state) pmcsr &= ~PCI_PM_CTRL_STATE_MASK ; pmcsr |= state;break ; +case PCI_D3hot: +case PCI_D3cold:case PCI_UNKNOWN :/* Boot-up */ if ((pmcsr &PCI_PM_CTRL_STATE_MASK ) == PCI_D3hot && !(pmcsr &PCI_PM_CTRL_NO_SOFT_RESET ))
@@ -1282,15 +1284,14 @@ pci_power_t pci_target_state(struct pci_dev *dev)default : target_state = state; } + }else if (!dev->pm_cap) { + target_state =PCI_D0 ; }else if (device_may_wakeup (&dev->dev)) {/* * Find the deepest state from which the device can generate * wake-up events, make it the target state and enable device * to generate PME#. */ -if (!dev->pm_cap) -return PCI_POWER_ERROR ; -if (dev->pme_support) {while (target_state && !(dev->pme_support & (1 << target_state)))
drivers/pci/pcie/aspm.c +4 -0
@@ -638,6 +638,10 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)if (pdev->pcie_type !=PCI_EXP_TYPE_ROOT_PORT && pdev->pcie_type !=PCI_EXP_TYPE_DOWNSTREAM )return ; +/* VIA has a strange chipset, root port is under a bridge */ +if (pdev->pcie_type ==PCI_EXP_TYPE_ROOT_PORT && + pdev->bus->self) +return ;down_read (&pci_bus_sem);if (list_empty (&pdev->subordinate->devices)) goto out;
drivers/scsi/qla2xxx/qla_dbg.c +1 -1
@@ -218,7 +218,7 @@ qla24xx_soft_reset(struct qla_hw_data *ha)static int qla2xxx_dump_ram (struct qla_hw_data *ha,uint32_t addr,uint16_t *ram, -uint16_t ram_words,void **nxt) +uint32_t ram_words,void **nxt) {int rval;uint32_t cnt, stat, timer, words, idx;
drivers/scsi/sym53c8xx_2/sym_hipd.c +3 -2
@@ -2312,8 +2312,9 @@ static void sym_int_par (struct sym_hcb *np, u_short sist)int phase = cmd &7 ;struct sym_ccb *cp =sym_ccb_from_dsa (np, dsa); -printf ("%s: SCSI parity error detected: SCR1=%d DBC=%x SBCL=%x\n" , -sym_name (np), hsts, dbc, sbcl); +if (printk_ratelimit ()) +printf ("%s: SCSI parity error detected: SCR1=%d DBC=%x SBCL=%x\n" , +sym_name (np), hsts, dbc, sbcl);/* * Check that the chip is connected to the SCSI BUS.
drivers/serial/bfin_5xx.c +5 -0
@@ -38,6 +38,10 @@#include <asm/cacheflush.h> #endif +#ifdef CONFIG_SERIAL_BFIN_MODULE +# undef CONFIG_EARLY_PRINTK +#endif +/* UART name and device definitions */ #define BFIN_SERIAL_NAME "ttyBF"#define BFIN_SERIAL_MAJOR 204
@@ -1058,6 +1062,7 @@ static void __init bfin_serial_init_ports(void)bfin_serial_hw_init ();for (i =0 ; i < nr_active_ports; i++) { +spin_lock_init (&bfin_serial_ports[i].port.lock); bfin_serial_ports[i].port.uartclk =get_sclk (); bfin_serial_ports[i].port.fifosize =BFIN_UART_TX_FIFO_SIZE ; bfin_serial_ports[i].port.ops = &bfin_serial_pops;
drivers/spi/spi_mpc83xx.c +3 -3
@@ -711,12 +711,12 @@ static int of_mpc83xx_spi_get_chipselects(struct device *dev)return 0 ; } - pinfo->gpios =kmalloc (ngpios *sizeof (pinfo->gpios),GFP_KERNEL ); + pinfo->gpios =kmalloc (ngpios *sizeof (*pinfo->gpios),GFP_KERNEL );if (!pinfo->gpios)return -ENOMEM ; -memset (pinfo->gpios,-1 , ngpios *sizeof (pinfo->gpios)); +memset (pinfo->gpios,-1 , ngpios *sizeof (*pinfo->gpios)); - pinfo->alow_flags =kzalloc (ngpios *sizeof (pinfo->alow_flags), + pinfo->alow_flags =kzalloc (ngpios *sizeof (*pinfo->alow_flags),GFP_KERNEL );if (!pinfo->alow_flags) { ret = -ENOMEM ;
drivers/staging/uc2322/aten2011.c +2 -2
@@ -2336,7 +2336,7 @@ static int ATEN2011_startup(struct usb_serial *serial)return 0 ; } -static void ATEN2011_shutdown (struct usb_serial *serial) +static void ATEN2011_release (struct usb_serial *serial) {int i;struct ATENINTL_port *ATEN2011_port;
@@ -2382,7 +2382,7 @@ static struct usb_serial_driver aten_serial_driver = { .tiocmget = ATEN2011_tiocmget, .tiocmset = ATEN2011_tiocmset, .attach = ATEN2011_startup, - .shutdown = ATEN2011_shutdown, + .release = ATEN2011_release, .read_bulk_callback = ATEN2011_bulk_in_callback, .read_int_callback = ATEN2011_interrupt_callback, };
drivers/usb/class/usbtmc.c +6 -0
@@ -927,21 +927,27 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)switch (cmd) {case USBTMC_IOCTL_CLEAR_OUT_HALT : retval =usbtmc_ioctl_clear_out_halt (data); +break ;case USBTMC_IOCTL_CLEAR_IN_HALT : retval =usbtmc_ioctl_clear_in_halt (data); +break ;case USBTMC_IOCTL_INDICATOR_PULSE : retval =usbtmc_ioctl_indicator_pulse (data); +break ;case USBTMC_IOCTL_CLEAR : retval =usbtmc_ioctl_clear (data); +break ;case USBTMC_IOCTL_ABORT_BULK_OUT : retval =usbtmc_ioctl_abort_bulk_out (data); +break ;case USBTMC_IOCTL_ABORT_BULK_IN : retval =usbtmc_ioctl_abort_bulk_in (data); +break ; }mutex_unlock (&data->io_mutex);
drivers/usb/serial/aircable.c +2 -3
@@ -364,7 +364,7 @@ static int aircable_attach(struct usb_serial *serial)return 0 ; } -static void aircable_shutdown (struct usb_serial *serial) +static void aircable_release (struct usb_serial *serial) {struct usb_serial_port *port = serial->port[0 ];
@@ -375,7 +375,6 @@ static void aircable_shutdown(struct usb_serial *serial)if (priv) {serial_buf_free (priv->tx_buf);serial_buf_free (priv->rx_buf); -usb_set_serial_port_data (port,NULL );kfree (priv); } }
@@ -601,7 +600,7 @@ static struct usb_serial_driver aircable_device = { .num_ports = 1, .attach = aircable_attach, .probe = aircable_probe, - .shutdown = aircable_shutdown, + .release = aircable_release, .write = aircable_write, .write_room = aircable_write_room, .write_bulk_callback = aircable_write_bulk_callback,
drivers/usb/serial/belkin_sa.c +3 -4
@@ -90,7 +90,7 @@ static int debug;/* function prototypes for a Belkin USB Serial Adapter F5U103 */ static int belkin_sa_startup (struct usb_serial *serial); -static void belkin_sa_shutdown (struct usb_serial *serial); +static void belkin_sa_release (struct usb_serial *serial);static int belkin_sa_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp); static void belkin_sa_close(struct tty_struct *tty,
@@ -143,7 +143,7 @@ static struct usb_serial_driver belkin_device = { .tiocmget = belkin_sa_tiocmget, .tiocmset = belkin_sa_tiocmset, .attach = belkin_sa_startup, - .shutdown = belkin_sa_shutdown, + .release = belkin_sa_release, };
@@ -198,14 +198,13 @@ static int belkin_sa_startup(struct usb_serial *serial) } -static void belkin_sa_shutdown (struct usb_serial *serial) +static void belkin_sa_release (struct usb_serial *serial) {struct belkin_sa_private *priv;int i;dbg ("%s" , __func__); -/* stop reads and writes on all ports */ for (i =0 ; i < serial->num_ports; ++i) {/* My special items, the standard routines free my urbs */ priv =usb_get_serial_port_data (serial->port[i]);
drivers/usb/serial/cp210x.c +3 -3
@@ -51,7 +51,7 @@ static int cp2101_tiocmset_port(struct usb_serial_port *port, struct file *, unsigned int, unsigned int);static void cp2101_break_ctl (struct tty_struct *,int );static int cp2101_startup (struct usb_serial *); -static void cp2101_shutdown (struct usb_serial *); +static void cp2101_disconnect (struct usb_serial *);static int debug;
@@ -131,7 +131,7 @@ static struct usb_serial_driver cp2101_device = { .tiocmget = cp2101_tiocmget, .tiocmset = cp2101_tiocmset, .attach = cp2101_startup, - .shutdown = cp2101_shutdown, + .disconnect = cp2101_disconnect, };/* Config request types */
@@ -773,7 +773,7 @@ static int cp2101_startup(struct usb_serial *serial)return 0 ; } -static void cp2101_shutdown (struct usb_serial *serial) +static void cp2101_disconnect (struct usb_serial *serial) {int i;
drivers/usb/serial/cyberjack.c +15 -5
@@ -58,7 +58,8 @@ static int debug;/* Function prototypes */ static int cyberjack_startup (struct usb_serial *serial); -static void cyberjack_shutdown (struct usb_serial *serial); +static void cyberjack_disconnect (struct usb_serial *serial); +static void cyberjack_release (struct usb_serial *serial);static int cyberjack_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp); static void cyberjack_close(struct tty_struct *tty,
@@ -95,7 +96,8 @@ static struct usb_serial_driver cyberjack_device = { .id_table = id_table, .num_ports = 1, .attach = cyberjack_startup, - .shutdown = cyberjack_shutdown, + .disconnect = cyberjack_disconnect, + .release = cyberjack_release, .open = cyberjack_open, .close = cyberjack_close, .write = cyberjack_write,
@@ -149,17 +151,25 @@ static int cyberjack_startup(struct usb_serial *serial)return 0 ; } -static void cyberjack_shutdown (struct usb_serial *serial) +static void cyberjack_disconnect (struct usb_serial *serial) {int i;dbg ("%s" , __func__); -for (i =0 ; i < serial->num_ports; ++i) { +for (i =0 ; i < serial->num_ports; ++i)usb_kill_urb (serial->port[i]->interrupt_in_urb); +} + +static void cyberjack_release (struct usb_serial *serial) +{ +int i; + +dbg ("%s" , __func__); + +for (i =0 ; i < serial->num_ports; ++i) {/* My special items, the standard routines free my urbs */ kfree (usb_get_serial_port_data (serial->port[i])); -usb_set_serial_port_data (serial->port[i],NULL ); } }
drivers/usb/serial/cypress_m8.c +5 -6
@@ -171,7 +171,7 @@ struct cypress_buf {static int cypress_earthmate_startup (struct usb_serial *serial);static int cypress_hidcom_startup (struct usb_serial *serial);static int cypress_ca42v2_startup (struct usb_serial *serial); -static void cypress_shutdown (struct usb_serial *serial); +static void cypress_release (struct usb_serial *serial);static int cypress_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp); static void cypress_close(struct tty_struct *tty,
@@ -215,7 +215,7 @@ static struct usb_serial_driver cypress_earthmate_device = { .id_table = id_table_earthmate, .num_ports = 1, .attach = cypress_earthmate_startup, - .shutdown = cypress_shutdown, + .release = cypress_release, .open = cypress_open, .close = cypress_close, .write = cypress_write,
@@ -241,7 +241,7 @@ static struct usb_serial_driver cypress_hidcom_device = { .id_table = id_table_cyphidcomrs232, .num_ports = 1, .attach = cypress_hidcom_startup, - .shutdown = cypress_shutdown, + .release = cypress_release, .open = cypress_open, .close = cypress_close, .write = cypress_write,
@@ -267,7 +267,7 @@ static struct usb_serial_driver cypress_ca42v2_device = { .id_table = id_table_nokiaca42v2, .num_ports = 1, .attach = cypress_ca42v2_startup, - .shutdown = cypress_shutdown, + .release = cypress_release, .open = cypress_open, .close = cypress_close, .write = cypress_write,
@@ -613,7 +613,7 @@ static int cypress_ca42v2_startup(struct usb_serial *serial) }/* cypress_ca42v2_startup */ -static void cypress_shutdown (struct usb_serial *serial) +static void cypress_release (struct usb_serial *serial) {struct cypress_private *priv;
@@ -626,7 +626,6 @@ static void cypress_shutdown(struct usb_serial *serial)if (priv) {cypress_buf_free (priv->buf);kfree (priv); -usb_set_serial_port_data (serial->port[0 ],NULL ); } }
drivers/usb/serial/digi_acceleport.c +15 -5
@@ -460,7 +460,8 @@ static void digi_close(struct tty_struct *tty, struct usb_serial_port *port, struct file *filp);static int digi_startup_device (struct usb_serial *serial);static int digi_startup (struct usb_serial *serial); -static void digi_shutdown (struct usb_serial *serial); +static void digi_disconnect (struct usb_serial *serial); +static void digi_release (struct usb_serial *serial);static void digi_read_bulk_callback (struct urb *urb);static int digi_read_inb_callback (struct urb *urb);static int digi_read_oob_callback (struct urb *urb);
@@ -522,7 +523,8 @@ static struct usb_serial_driver digi_acceleport_2_device = { .tiocmget = digi_tiocmget, .tiocmset = digi_tiocmset, .attach = digi_startup, - .shutdown = digi_shutdown, + .disconnect = digi_disconnect, + .release = digi_release, };static struct usb_serial_driver digi_acceleport_4_device = {
@@ -548,7 +550,8 @@ static struct usb_serial_driver digi_acceleport_4_device = { .tiocmget = digi_tiocmget, .tiocmset = digi_tiocmset, .attach = digi_startup, - .shutdown = digi_shutdown, + .disconnect = digi_disconnect, + .release = digi_release, };
@@ -1589,16 +1592,23 @@ static int digi_startup(struct usb_serial *serial) } -static void digi_shutdown (struct usb_serial *serial) +static void digi_disconnect (struct usb_serial *serial) {int i; -dbg ("digi_shutdown: TOP, in_interrupt()=%ld" ,in_interrupt ()); +dbg ("digi_disconnect: TOP, in_interrupt()=%ld" ,in_interrupt ());/* stop reads and writes on all ports */ for (i =0 ; i < serial->type->num_ports +1 ; i++) {usb_kill_urb (serial->port[i]->read_urb);usb_kill_urb (serial->port[i]->write_urb); } +} + + +static void digi_release (struct usb_serial *serial) +{ +int i; +dbg ("digi_release: TOP, in_interrupt()=%ld" ,in_interrupt ());/* free the private data structures for all ports */ /* number of regular ports + 1 for the out-of-band port */
drivers/usb/serial/empeg.c +0 -8
@@ -91,7 +91,6 @@ static int empeg_chars_in_buffer(struct tty_struct *tty);static void empeg_throttle (struct tty_struct *tty);static void empeg_unthrottle (struct tty_struct *tty);static int empeg_startup (struct usb_serial *serial); -static void empeg_shutdown (struct usb_serial *serial);static void empeg_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old_termios);static void empeg_write_bulk_callback (struct urb *urb);
@@ -125,7 +124,6 @@ static struct usb_serial_driver empeg_device = { .throttle = empeg_throttle, .unthrottle = empeg_unthrottle, .attach = empeg_startup, - .shutdown = empeg_shutdown, .set_termios = empeg_set_termios, .write = empeg_write, .write_room = empeg_write_room,
@@ -429,12 +427,6 @@ static int empeg_startup(struct usb_serial *serial) } -static void empeg_shutdown (struct usb_serial *serial) -{ -dbg ("%s" , __func__); -} - -static void empeg_set_termios (struct tty_struct *tty,struct usb_serial_port *port,struct ktermios *old_termios) {
drivers/usb/serial/ftdi_sio.c +0 -14
@@ -714,7 +714,6 @@ static const char *ftdi_chip_name[] = {/* function prototypes for a FTDI serial converter */ static int ftdi_sio_probe (struct usb_serial *serial,const struct usb_device_id *id); -static void ftdi_shutdown (struct usb_serial *serial);static int ftdi_sio_port_probe (struct usb_serial_port *port);static int ftdi_sio_port_remove (struct usb_serial_port *port); static int ftdi_open(struct tty_struct *tty,
@@ -770,7 +769,6 @@ static struct usb_serial_driver ftdi_sio_device = { .ioctl = ftdi_ioctl, .set_termios = ftdi_set_termios, .break_ctl = ftdi_break_ctl, - .shutdown = ftdi_shutdown, };
@@ -1460,18 +1458,6 @@ static int ftdi_mtxorb_hack_setup(struct usb_serial *serial)return 0 ; } -/* ftdi_shutdown is called from usbserial:usb_serial_disconnect -* it is called when the usb device is disconnected -* -* usbserial:usb_serial_disconnect -* calls __serial_close for each open of the port -* shutdown is called then (ie ftdi_shutdown) -*/ -static void ftdi_shutdown (struct usb_serial *serial) -{ -dbg ("%s" , __func__); -} -static void ftdi_sio_priv_release (struct kref *k) { struct ftdi_private *priv = container_of(k, struct ftdi_private, kref);
drivers/usb/serial/garmin_gps.c +13 -3
@@ -1528,7 +1528,7 @@ static int garmin_attach(struct usb_serial *serial) } -static void garmin_shutdown (struct usb_serial *serial) +static void garmin_disconnect (struct usb_serial *serial) {struct usb_serial_port *port = serial->port[0 ];struct garmin_data *garmin_data_p =usb_get_serial_port_data (port);
@@ -1537,8 +1537,17 @@ static void garmin_shutdown(struct usb_serial *serial)usb_kill_urb (port->interrupt_in_urb);del_timer_sync (&garmin_data_p->timer); +} + + +static void garmin_release (struct usb_serial *serial) +{ +struct usb_serial_port *port = serial->port[0 ]; +struct garmin_data *garmin_data_p =usb_get_serial_port_data (port); + +dbg ("%s" , __func__); +kfree (garmin_data_p); -usb_set_serial_port_data (port,NULL ); }
@@ -1557,7 +1566,8 @@ static struct usb_serial_driver garmin_device = { .throttle = garmin_throttle, .unthrottle = garmin_unthrottle, .attach = garmin_attach, - .shutdown = garmin_shutdown, + .disconnect = garmin_disconnect, + .release = garmin_release, .write = garmin_write, .write_room = garmin_write_room, .write_bulk_callback = garmin_write_bulk_callback,
drivers/usb/serial/generic.c +7 -2
@@ -63,7 +63,8 @@ struct usb_serial_driver usb_serial_generic_device = { .id_table = generic_device_ids, .usb_driver = &generic_driver, .num_ports = 1, - .shutdown = usb_serial_generic_shutdown, + .disconnect = usb_serial_generic_disconnect, + .release = usb_serial_generic_release, .throttle = usb_serial_generic_throttle, .unthrottle = usb_serial_generic_unthrottle, .resume = usb_serial_generic_resume,
@@ -413,7 +414,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty) } } -void usb_serial_generic_shutdown (struct usb_serial *serial) +void usb_serial_generic_disconnect (struct usb_serial *serial) {int i;
@@ -424,3 +425,7 @@ void usb_serial_generic_shutdown(struct usb_serial *serial)generic_cleanup (serial->port[i]); } +void usb_serial_generic_release (struct usb_serial *serial) +{ +dbg ("%s" , __func__); +}
drivers/usb/serial/io_edgeport.c +20 -9
@@ -225,7 +225,8 @@ static int edge_tiocmget(struct tty_struct *tty, struct file *file);static int edge_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static int edge_startup (struct usb_serial *serial); -static void edge_shutdown (struct usb_serial *serial); +static void edge_disconnect (struct usb_serial *serial); +static void edge_release (struct usb_serial *serial);#include "io_tables.h" /* all of the devices that this driver supports */
@@ -3195,21 +3196,16 @@ static int edge_startup(struct usb_serial *serial)/**************************************************************************** -* edge_shutdown +* edge_disconnect * This function is called whenever the device is removed from the usb bus. ****************************************************************************/ -static void edge_shutdown (struct usb_serial *serial) +static void edge_disconnect (struct usb_serial *serial) {struct edgeport_serial *edge_serial =usb_get_serial_data (serial); -int i;dbg ("%s" , __func__);/* stop reads and writes on all ports */ -for (i =0 ; i < serial->num_ports; ++i) { -kfree (usb_get_serial_port_data (serial->port[i])); -usb_set_serial_port_data (serial->port[i],NULL ); - }/* free up our endpoint stuff */ if (edge_serial->is_epic) {usb_kill_urb (edge_serial->interrupt_read_urb);
@@ -3220,9 +3216,24 @@ static void edge_shutdown(struct usb_serial *serial)usb_free_urb (edge_serial->read_urb);kfree (edge_serial->bulk_in_buffer); } +} + + +/**************************************************************************** +* edge_release +* This function is called when the device structure is deallocated. +****************************************************************************/ +static void edge_release (struct usb_serial *serial) +{ +struct edgeport_serial *edge_serial =usb_get_serial_data (serial); +int i; + +dbg ("%s" , __func__); + +for (i =0 ; i < serial->num_ports; ++i) +kfree (usb_get_serial_port_data (serial->port[i]));kfree (edge_serial); -usb_set_serial_data (serial,NULL ); }
drivers/usb/serial/io_tables.h +8 -4
@@ -117,7 +117,8 @@ static struct usb_serial_driver edgeport_2port_device = { .throttle = edge_throttle, .unthrottle = edge_unthrottle, .attach = edge_startup, - .shutdown = edge_shutdown, + .disconnect = edge_disconnect, + .release = edge_release, .ioctl = edge_ioctl, .set_termios = edge_set_termios, .tiocmget = edge_tiocmget,
@@ -145,7 +146,8 @@ static struct usb_serial_driver edgeport_4port_device = { .throttle = edge_throttle, .unthrottle = edge_unthrottle, .attach = edge_startup, - .shutdown = edge_shutdown, + .disconnect = edge_disconnect, + .release = edge_release, .ioctl = edge_ioctl, .set_termios = edge_set_termios, .tiocmget = edge_tiocmget,
@@ -173,7 +175,8 @@ static struct usb_serial_driver edgeport_8port_device = { .throttle = edge_throttle, .unthrottle = edge_unthrottle, .attach = edge_startup, - .shutdown = edge_shutdown, + .disconnect = edge_disconnect, + .release = edge_release, .ioctl = edge_ioctl, .set_termios = edge_set_termios, .tiocmget = edge_tiocmget,
@@ -200,7 +203,8 @@ static struct usb_serial_driver epic_device = { .throttle = edge_throttle, .unthrottle = edge_unthrottle, .attach = edge_startup, - .shutdown = edge_shutdown, + .disconnect = edge_disconnect, + .release = edge_release, .ioctl = edge_ioctl, .set_termios = edge_set_termios, .tiocmget = edge_tiocmget,
drivers/usb/serial/io_ti.c +17 -5
@@ -2664,7 +2664,7 @@ cleanup:return -ENOMEM ; } -static void edge_shutdown (struct usb_serial *serial) +static void edge_disconnect (struct usb_serial *serial) {int i;struct edgeport_port *edge_port;
@@ -2674,12 +2674,22 @@ static void edge_shutdown(struct usb_serial *serial)for (i =0 ; i < serial->num_ports; ++i) { edge_port =usb_get_serial_port_data (serial->port[i]);edge_remove_sysfs_attrs (edge_port->port); + } +} + +static void edge_release (struct usb_serial *serial) +{ +int i; +struct edgeport_port *edge_port; + +dbg ("%s" , __func__); + +for (i =0 ; i < serial->num_ports; ++i) { + edge_port =usb_get_serial_port_data (serial->port[i]);edge_buf_free (edge_port->ep_out_buf);kfree (edge_port); -usb_set_serial_port_data (serial->port[i],NULL ); }kfree (usb_get_serial_data (serial)); -usb_set_serial_data (serial,NULL ); }
@@ -2916,7 +2926,8 @@ static struct usb_serial_driver edgeport_1port_device = { .throttle = edge_throttle, .unthrottle = edge_unthrottle, .attach = edge_startup, - .shutdown = edge_shutdown, + .disconnect = edge_disconnect, + .release = edge_release, .port_probe = edge_create_sysfs_attrs, .ioctl = edge_ioctl, .set_termios = edge_set_termios,
@@ -2945,7 +2956,8 @@ static struct usb_serial_driver edgeport_2port_device = { .throttle = edge_throttle, .unthrottle = edge_unthrottle, .attach = edge_startup, - .shutdown = edge_shutdown, + .disconnect = edge_disconnect, + .release = edge_release, .port_probe = edge_create_sysfs_attrs, .ioctl = edge_ioctl, .set_termios = edge_set_termios,
drivers/usb/serial/ipaq.c +0 -7
@@ -80,7 +80,6 @@ static void ipaq_close(struct tty_struct *tty, struct usb_serial_port *port, struct file *filp);static int ipaq_calc_num_ports (struct usb_serial *serial);static int ipaq_startup (struct usb_serial *serial); -static void ipaq_shutdown (struct usb_serial *serial);static int ipaq_write (struct tty_struct *tty,struct usb_serial_port *port,const unsigned char *buf,int count); static int ipaq_write_bulk(struct usb_serial_port *port,
@@ -577,7 +576,6 @@ static struct usb_serial_driver ipaq_device = { .close = ipaq_close, .attach = ipaq_startup, .calc_num_ports = ipaq_calc_num_ports, - .shutdown = ipaq_shutdown, .write = ipaq_write, .write_room = ipaq_write_room, .chars_in_buffer = ipaq_chars_in_buffer,
@@ -992,11 +990,6 @@ static int ipaq_startup(struct usb_serial *serial)return usb_reset_configuration (serial->dev); } -static void ipaq_shutdown (struct usb_serial *serial) -{ -dbg ("%s" , __func__); -} -static int __init ipaq_init (void ) {int retval;
drivers/usb/serial/iuu_phoenix.c +3 -3
@@ -122,8 +122,8 @@ static int iuu_startup(struct usb_serial *serial)return 0 ; } -/* Shutdown function */ -static void iuu_shutdown (struct usb_serial *serial) +/* Release function */ +static void iuu_release (struct usb_serial *serial) {struct usb_serial_port *port = serial->port[0 ];struct iuu_private *priv =usb_get_serial_port_data (port);
@@ -1176,7 +1176,7 @@ static struct usb_serial_driver iuu_device = { .tiocmget = iuu_tiocmget, .tiocmset = iuu_tiocmset, .attach = iuu_startup, - .shutdown = iuu_shutdown, + .release = iuu_release, };static int __init iuu_init (void )
drivers/usb/serial/keyspan.c +12 -1
@@ -2682,7 +2682,7 @@ static int keyspan_startup(struct usb_serial *serial)return 0 ; } -static void keyspan_shutdown (struct usb_serial *serial) +static void keyspan_disconnect (struct usb_serial *serial) {int i, j;struct usb_serial_port *port;
@@ -2722,6 +2722,17 @@ static void keyspan_shutdown(struct usb_serial *serial)usb_free_urb (p_priv->out_urbs[j]); } } +} + +static void keyspan_release (struct usb_serial *serial) +{ +int i; +struct usb_serial_port *port; +struct keyspan_serial_private *s_priv; + +dbg ("%s" , __func__); + + s_priv =usb_get_serial_data (serial);/* dbg("Freeing serial->private."); */ kfree (s_priv);
drivers/usb/serial/keyspan.h +8 -4
@@ -42,7 +42,8 @@ static void keyspan_close (struct tty_struct *tty,struct usb_serial_port *port, struct file *filp);static int keyspan_startup (struct usb_serial *serial); -static void keyspan_shutdown (struct usb_serial *serial); +static void keyspan_disconnect (struct usb_serial *serial); +static void keyspan_release (struct usb_serial *serial);static int keyspan_write_room (struct tty_struct *tty); static int keyspan_write (struct tty_struct *tty,
@@ -569,7 +570,8 @@ static struct usb_serial_driver keyspan_1port_device = { .tiocmget = keyspan_tiocmget, .tiocmset = keyspan_tiocmset, .attach = keyspan_startup, - .shutdown = keyspan_shutdown, + .disconnect = keyspan_disconnect, + .release = keyspan_release, };static struct usb_serial_driver keyspan_2port_device = {
@@ -589,7 +591,8 @@ static struct usb_serial_driver keyspan_2port_device = { .tiocmget = keyspan_tiocmget, .tiocmset = keyspan_tiocmset, .attach = keyspan_startup, - .shutdown = keyspan_shutdown, + .disconnect = keyspan_disconnect, + .release = keyspan_release, };static struct usb_serial_driver keyspan_4port_device = {
@@ -609,7 +612,8 @@ static struct usb_serial_driver keyspan_4port_device = { .tiocmget = keyspan_tiocmget, .tiocmset = keyspan_tiocmset, .attach = keyspan_startup, - .shutdown = keyspan_shutdown, + .disconnect = keyspan_disconnect, + .release = keyspan_release, };#endif
drivers/usb/serial/keyspan_pda.c +2 -2
@@ -795,7 +795,7 @@ static int keyspan_pda_startup(struct usb_serial *serial)return 0 ; } -static void keyspan_pda_shutdown (struct usb_serial *serial) +static void keyspan_pda_release (struct usb_serial *serial) {dbg ("%s" , __func__);
@@ -853,7 +853,7 @@ static struct usb_serial_driver keyspan_pda_device = { .tiocmget = keyspan_pda_tiocmget, .tiocmset = keyspan_pda_tiocmset, .attach = keyspan_pda_startup, - .shutdown = keyspan_pda_shutdown, + .release = keyspan_pda_release, };
drivers/usb/serial/kl5kusb105.c +22 -17
@@ -73,7 +73,8 @@ static int debug;* Function prototypes */ static int klsi_105_startup (struct usb_serial *serial); -static void klsi_105_shutdown (struct usb_serial *serial); +static void klsi_105_disconnect (struct usb_serial *serial); +static void klsi_105_release (struct usb_serial *serial);static int klsi_105_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp); static void klsi_105_close(struct tty_struct *tty,
@@ -132,7 +133,8 @@ static struct usb_serial_driver kl5kusb105d_device = { .tiocmget = klsi_105_tiocmget, .tiocmset = klsi_105_tiocmset, .attach = klsi_105_startup, - .shutdown = klsi_105_shutdown, + .disconnect = klsi_105_disconnect, + .release = klsi_105_release, .throttle = klsi_105_throttle, .unthrottle = klsi_105_unthrottle, };
@@ -316,7 +318,7 @@ err_cleanup: }/* klsi_105_startup */ -static void klsi_105_shutdown (struct usb_serial *serial) +static void klsi_105_disconnect (struct usb_serial *serial) {int i;
@@ -326,33 +328,36 @@ static void klsi_105_shutdown(struct usb_serial *serial)for (i =0 ; i < serial->num_ports; ++i) {struct klsi_105_private *priv =usb_get_serial_port_data (serial->port[i]); -unsigned long flags;if (priv) {/* kill our write urb pool */ int j;struct urb **write_urbs = priv->write_urb_pool; -spin_lock_irqsave (&priv->lock, flags);for (j =0 ; j <NUM_URBS ; j++) {if (write_urbs[j]) { -/* FIXME - uncomment the following -* usb_kill_urb call when the host -* controllers get fixed to set -* urb->dev = NULL after the urb is -* finished. Otherwise this call -* oopses. */ -/* usb_kill_urb(write_urbs[j]); */ -kfree (write_urbs[j]->transfer_buffer); +usb_kill_urb (write_urbs[j]);usb_free_urb (write_urbs[j]); } } -spin_unlock_irqrestore (&priv->lock, flags); -kfree (priv); -usb_set_serial_port_data (serial->port[i],NULL ); } } -}/* klsi_105_shutdown */ +}/* klsi_105_disconnect */ + + +static void klsi_105_release (struct usb_serial *serial) +{ +int i; + +dbg ("%s" , __func__); + +for (i =0 ; i < serial->num_ports; ++i) { +struct klsi_105_private *priv = +usb_get_serial_port_data (serial->port[i]); + +kfree (priv); + } +}/* klsi_105_release */ static int klsi_105_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp)
drivers/usb/serial/kobil_sct.c +4 -8
@@ -69,7 +69,7 @@ static int debug;/* Function prototypes */ static int kobil_startup (struct usb_serial *serial); -static void kobil_shutdown (struct usb_serial *serial); +static void kobil_release (struct usb_serial *serial);static int kobil_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp); static void kobil_close(struct tty_struct *tty, struct usb_serial_port *port,
@@ -118,7 +118,7 @@ static struct usb_serial_driver kobil_device = { .id_table = id_table, .num_ports = 1, .attach = kobil_startup, - .shutdown = kobil_shutdown, + .release = kobil_release, .ioctl = kobil_ioctl, .set_termios = kobil_set_termios, .tiocmget = kobil_tiocmget,
@@ -202,17 +202,13 @@ static int kobil_startup(struct usb_serial *serial) } -static void kobil_shutdown (struct usb_serial *serial) +static void kobil_release (struct usb_serial *serial) {int i;dbg ("%s - port %d" , __func__, serial->port[0 ]->number); -for (i =0 ; i < serial->num_ports; ++i) { -while (serial->port[i]->port.count >0 ) -kobil_close (NULL , serial->port[i],NULL ); +for (i =0 ; i < serial->num_ports; ++i)kfree (usb_get_serial_port_data (serial->port[i])); -usb_set_serial_port_data (serial->port[i],NULL ); - } }
drivers/usb/serial/mct_u232.c +5 -8
@@ -92,7 +92,7 @@ static int debug;* Function prototypes */ static int mct_u232_startup (struct usb_serial *serial); -static void mct_u232_shutdown (struct usb_serial *serial); +static void mct_u232_release (struct usb_serial *serial);static int mct_u232_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp); static void mct_u232_close(struct tty_struct *tty,
@@ -148,7 +148,7 @@ static struct usb_serial_driver mct_u232_device = { .tiocmget = mct_u232_tiocmget, .tiocmset = mct_u232_tiocmset, .attach = mct_u232_startup, - .shutdown = mct_u232_shutdown, + .release = mct_u232_release, };
@@ -406,7 +406,7 @@ static int mct_u232_startup(struct usb_serial *serial) }/* mct_u232_startup */ -static void mct_u232_shutdown (struct usb_serial *serial) +static void mct_u232_release (struct usb_serial *serial) {struct mct_u232_private *priv;int i;
@@ -416,12 +416,9 @@ static void mct_u232_shutdown(struct usb_serial *serial)for (i =0 ; i < serial->num_ports; ++i) {/* My special items, the standard routines free my urbs */ priv =usb_get_serial_port_data (serial->port[i]); -if (priv) { -usb_set_serial_port_data (serial->port[i],NULL ); -kfree (priv); - } +kfree (priv); } -}/* mct_u232_shutdown */ +}/* mct_u232_release */ static int mct_u232_open (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp)
drivers/usb/serial/mos7720.c +3 -6
@@ -1522,19 +1522,16 @@ static int mos7720_startup(struct usb_serial *serial)return 0 ; } -static void mos7720_shutdown (struct usb_serial *serial) +static void mos7720_release (struct usb_serial *serial) {int i;/* free private structure allocated for serial port */ -for (i =0 ; i < serial->num_ports; ++i) { +for (i =0 ; i < serial->num_ports; ++i)kfree (usb_get_serial_port_data (serial->port[i])); -usb_set_serial_port_data (serial->port[i],NULL ); - }/* free private structure allocated for serial device */ kfree (usb_get_serial_data (serial)); -usb_set_serial_data (serial,NULL ); }static struct usb_driver usb_driver = {
@@ -1559,7 +1556,7 @@ static struct usb_serial_driver moschip7720_2port_driver = { .throttle = mos7720_throttle, .unthrottle = mos7720_unthrottle, .attach = mos7720_startup, - .shutdown = mos7720_shutdown, + .release = mos7720_release, .ioctl = mos7720_ioctl, .set_termios = mos7720_set_termios, .write = mos7720_write,
drivers/usb/serial/mos7840.c +37 -5
71 lines not on this page · raw message
drivers/usb/serial/omninet.c +15 -4
@@ -73,7 +73,8 @@ static void omninet_write_bulk_callback(struct urb *urb);static int omninet_write (struct tty_struct *tty,struct usb_serial_port *port,const unsigned char *buf,int count);static int omninet_write_room (struct tty_struct *tty); -static void omninet_shutdown (struct usb_serial *serial); +static void omninet_disconnect (struct usb_serial *serial); +static void omninet_release (struct usb_serial *serial);static int omninet_attach (struct usb_serial *serial);static struct usb_device_id id_table[] = {
@@ -109,7 +110,8 @@ static struct usb_serial_driver zyxel_omninet_device = { .write_room = omninet_write_room, .read_bulk_callback = omninet_read_bulk_callback, .write_bulk_callback = omninet_write_bulk_callback, - .shutdown = omninet_shutdown, + .disconnect = omninet_disconnect, + .release = omninet_release, };
@@ -347,13 +349,22 @@ static void omninet_write_bulk_callback(struct urb *urb) } -static void omninet_shutdown (struct usb_serial *serial) +static void omninet_disconnect (struct usb_serial *serial) {struct usb_serial_port *wport = serial->port[1 ]; -struct usb_serial_port *port = serial->port[0 ]; +dbg ("%s" , __func__);usb_kill_urb (wport->write_urb); +} + + +static void omninet_release (struct usb_serial *serial) +{ +struct usb_serial_port *port = serial->port[0 ]; + +dbg ("%s" , __func__); +kfree (usb_get_serial_port_data (port)); }
drivers/usb/serial/opticon.c +11 -3
@@ -464,7 +464,7 @@ error:return retval; } -static void opticon_shutdown (struct usb_serial *serial) +static void opticon_disconnect (struct usb_serial *serial) {struct opticon_private *priv =usb_get_serial_data (serial);
@@ -472,9 +472,16 @@ static void opticon_shutdown(struct usb_serial *serial)usb_kill_urb (priv->bulk_read_urb);usb_free_urb (priv->bulk_read_urb); +} + +static void opticon_release (struct usb_serial *serial) +{ +struct opticon_private *priv =usb_get_serial_data (serial); + +dbg ("%s" , __func__); +kfree (priv->bulk_in_buffer);kfree (priv); -usb_set_serial_data (serial,NULL ); }static int opticon_suspend (struct usb_interface *intf,pm_message_t message)
@@ -525,7 +532,8 @@ static struct usb_serial_driver opticon_device = { .close = opticon_close, .write = opticon_write, .write_room = opticon_write_room, - .shutdown = opticon_shutdown, + .disconnect = opticon_disconnect, + .release = opticon_release, .throttle = opticon_throttle, .unthrottle = opticon_unthrottle, .ioctl = opticon_ioctl,
drivers/usb/serial/option.c +12 -5
@@ -48,7 +48,8 @@ static int option_open(struct tty_struct *tty, struct usb_serial_port *port,static void option_close (struct tty_struct *tty,struct usb_serial_port *port,struct file *filp);static int option_startup (struct usb_serial *serial); -static void option_shutdown (struct usb_serial *serial); +static void option_disconnect (struct usb_serial *serial); +static void option_release (struct usb_serial *serial);static int option_write_room (struct tty_struct *tty);static void option_instat_callback (struct urb *urb);
@@ -558,7 +559,8 @@ static struct usb_serial_driver option_1port_device = { .tiocmget = option_tiocmget, .tiocmset = option_tiocmset, .attach = option_startup, - .shutdown = option_shutdown, + .disconnect = option_disconnect, + .release = option_release, .read_int_callback = option_instat_callback, .suspend = option_suspend, .resume = option_resume,
@@ -1129,7 +1131,14 @@ static void stop_read_write_urbs(struct usb_serial *serial) } } -static void option_shutdown (struct usb_serial *serial) +static void option_disconnect (struct usb_serial *serial) +{ +dbg ("%s" , __func__); + +stop_read_write_urbs (serial); +} + +static void option_release (struct usb_serial *serial) {int i, j;struct usb_serial_port *port;
@@ -1137,8 +1146,6 @@ static void option_shutdown(struct usb_serial *serial)dbg ("%s" , __func__); -stop_read_write_urbs (serial); -/* Now free them */ for (i =0 ; i < serial->num_ports; ++i) { port = serial->port[i];
drivers/usb/serial/oti6858.c +3 -4
@@ -160,7 +160,7 @@ static int oti6858_tiocmget(struct tty_struct *tty, struct file *file);static int oti6858_tiocmset (struct tty_struct *tty,struct file *file,unsigned int set,unsigned int clear);static int oti6858_startup (struct usb_serial *serial); -static void oti6858_shutdown (struct usb_serial *serial); +static void oti6858_release (struct usb_serial *serial);/* functions operating on buffers */ static struct oti6858_buf *oti6858_buf_alloc (unsigned int size);
@@ -195,7 +195,7 @@ static struct usb_serial_driver oti6858_device = { .write_room = oti6858_write_room, .chars_in_buffer = oti6858_chars_in_buffer, .attach = oti6858_startup, - .shutdown = oti6858_shutdown, + .release = oti6858_release, };struct oti6858_private {
@@ -829,7 +829,7 @@ static int oti6858_ioctl(struct tty_struct *tty, struct file *file, } -static void oti6858_shutdown (struct usb_serial *serial) +static void oti6858_release (struct usb_serial *serial) {struct oti6858_private *priv;int i;
@@ -841,7 +841,6 @@ static void oti6858_shutdown(struct usb_serial *serial)if (priv) {oti6858_buf_free (priv->buf);kfree (priv); -usb_set_serial_port_data (serial->port[i],NULL ); } } }
drivers/usb/serial/pl2303.c +2 -3
@@ -897,7 +897,7 @@ static void pl2303_break_ctl(struct tty_struct *tty, int break_state)dbg ("%s - error sending break = %d" , __func__, result); } -static void pl2303_shutdown (struct usb_serial *serial) +static void pl2303_release (struct usb_serial *serial) {int i;struct pl2303_private *priv;
@@ -909,7 +909,6 @@ static void pl2303_shutdown(struct usb_serial *serial)if (priv) {pl2303_buf_free (priv->buf);kfree (priv); -usb_set_serial_port_data (serial->port[i],NULL ); } } }
@@ -1137,7 +1136,7 @@ static struct usb_serial_driver pl2303_device = { .write_room = pl2303_write_room, .chars_in_buffer = pl2303_chars_in_buffer, .attach = pl2303_startup, - .shutdown = pl2303_shutdown, + .release = pl2303_release, };static int __init pl2303_init (void )
drivers/usb/serial/sierra.c +24 -4
@@ -699,7 +699,7 @@ static int sierra_startup(struct usb_serial *serial)return 0 ; } -static void sierra_shutdown (struct usb_serial *serial) +static void sierra_disconnect (struct usb_serial *serial) {int i, j;struct usb_serial_port *port;
@@ -718,10 +718,29 @@ static void sierra_shutdown(struct usb_serial *serial)for (j =0 ; j <N_IN_URB ; j++) {usb_kill_urb (portdata->in_urbs[j]);usb_free_urb (portdata->in_urbs[j]); -kfree (portdata->in_buffer[j]); } + } +} + +static void sierra_release (struct usb_serial *serial) +{ +int i, j; +struct usb_serial_port *port; +struct sierra_port_private *portdata; +
Lines of this file are not shown. View the raw message.
include/linux/serial.h +69 -47
116 lines not on this page · raw message
lib/dma-debug.c +39 -4
43 lines not on this page · raw message
mm/vmscan.c +48 -7
55 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.