Linux 3.7.2
Greg KH
maintainerI'm announcing the release of the 3.7.2 kernel.
All users of the 3.7 kernel series must upgrade.
The updated 3.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.7.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/kernel/swp_emulate.c | 2 arch/arm/mach-realview/include/mach/board-eb.h | 2 arch/arm/mm/cache-v7.S | 6 arch/arm/mm/mmu.c | 2 arch/arm64/include/asm/pgtable.h | 2 arch/arm64/include/asm/unistd32.h | 2 arch/arm64/kernel/signal.c | 37 +- arch/cris/include/asm/io.h | 39 ++ arch/sparc/crypto/aes_asm.S | 20 + arch/sparc/crypto/aes_glue.c | 31 ++ arch/sparc/crypto/camellia_glue.c | 3 arch/sparc/crypto/des_asm.S | 1 arch/sparc/crypto/des_glue.c | 6 arch/sparc/include/asm/hugetlb.h | 10 arch/x86/pci/common.c | 3 drivers/acpi/scan.c | 2 drivers/acpi/sleep.c | 348 ++++++++++++------------- drivers/ata/libata-acpi.c | 4 drivers/atm/solos-pci.c | 5 drivers/base/firmware_class.c | 30 +- drivers/bluetooth/btusb.c | 1 drivers/hid/hid-core.c | 1 drivers/input/joystick/walkera0701.c | 7 drivers/input/keyboard/gpio_keys.c | 13 drivers/input/keyboard/gpio_keys_polled.c | 13 drivers/input/mouse/sentelic.c | 2 drivers/input/serio/i8042-x86ia64io.h | 9 drivers/input/tablet/wacom_wac.c | 3 drivers/misc/sgi-xp/xpc_main.c | 34 ++ drivers/net/can/dev.c | 3 drivers/net/usb/cdc_ether.c | 15 + drivers/net/usb/qmi_wwan.c | 14 + drivers/net/wireless/b43/dma.c | 7 drivers/net/wireless/b43/main.c | 12 drivers/net/wireless/b43/pio.c | 4 drivers/net/wireless/b43legacy/b43legacy.h | 5 drivers/net/wireless/b43legacy/main.c | 37 ++ drivers/net/wireless/p54/p54usb.c | 4 drivers/net/wireless/rtlwifi/usb.c | 7 drivers/pci/pci-driver.c | 67 ++-- drivers/pci/pci.c | 2 drivers/pci/pcie/portdrv_pci.c | 20 + drivers/pci/quirks.c | 7 drivers/pnp/pnpacpi/core.c | 2 drivers/rtc/class.c | 1 drivers/rtc/rtc-vt8500.c | 11 drivers/staging/omapdrm/omap_crtc.c | 2 drivers/usb/chipidea/core.c | 3 drivers/usb/core/message.c | 54 ++- drivers/usb/gadget/f_ecm.c | 4 drivers/usb/gadget/f_eem.c | 5 drivers/usb/gadget/f_midi.c | 1 drivers/usb/gadget/f_ncm.c | 4 drivers/usb/gadget/f_phonet.c | 8 drivers/usb/gadget/f_rndis.c | 4 drivers/usb/gadget/f_subset.c | 4 drivers/usb/gadget/f_uvc.c | 39 +- drivers/usb/gadget/tcm_usb_gadget.c | 1 drivers/usb/host/ehci-pci.c | 3 drivers/usb/host/pci-quirks.c | 4 drivers/usb/host/xhci-mem.c | 9 drivers/usb/host/xhci-ring.c | 32 +- drivers/usb/host/xhci.c | 4 drivers/usb/musb/cppi_dma.c | 1 drivers/usb/musb/musb_dsps.c | 3 drivers/virtio/virtio_ring.c | 7 fs/binfmt_misc.c | 5 fs/binfmt_script.c | 4 fs/cifs/readdir.c | 59 ++-- fs/cifs/smb1ops.c | 7 fs/cifs/smb2pdu.c | 2 fs/cifs/transport.c | 6 fs/dcache.c | 2 fs/exec.c | 15 + fs/file_table.c | 2 fs/nfs/callback_proc.c | 2 fs/nfs/client.c | 3 fs/nfs/dir.c | 27 + fs/nfs/direct.c | 8 fs/nfs/nfs4proc.c | 46 ++- fs/nfs/pnfs.c | 2 fs/nfs/read.c | 10 fs/nfs/super.c | 2 fs/nfs/write.c | 13 fs/nfsd/nfs4proc.c | 8 fs/nfsd/nfs4state.c | 2 fs/nfsd/nfs4xdr.c | 11 fs/nfsd/nfssvc.c | 2 fs/nfsd/vfs.c | 10 fs/proc/array.c | 2 fs/splice.c | 4 fs/xfs/xfs_aops.c | 81 ++--- fs/xfs/xfs_log.c | 3 fs/xfs/xfs_qm.c | 15 - include/asm-generic/tlb.h | 9 include/linux/binfmts.h | 1 include/linux/cgroup.h | 1 include/linux/freezer.h | 50 +++ include/linux/hugetlb_cgroup.h | 5 include/linux/kernel.h | 6 include/linux/libata.h | 1 include/linux/page-flags.h | 8 include/linux/pci_ids.h | 1 include/net/gro_cells.h | 14 - include/net/inet_connection_sock.h | 1 include/net/ndisc.h | 7 kernel/cgroup.c | 76 ++--- kernel/cgroup_freezer.c | 13 kernel/fork.c | 9 kernel/irq/manage.c | 23 + kernel/printk.c | 5 kernel/signal.c | 1 lib/atomic64.c | 17 - mm/highmem.c | 1 mm/hugetlb.c | 11 mm/hugetlb_cgroup.c | 19 + mm/memory.c | 5 mm/mempolicy.c | 64 +--- mm/page-writeback.c | 25 + net/9p/trans_virtio.c | 3 net/batman-adv/bat_iv_ogm.c | 2 net/bluetooth/hci_core.c | 2 net/bluetooth/rfcomm/sock.c | 4 net/bluetooth/sco.c | 19 - net/dccp/ipv4.c | 4 net/dccp/ipv6.c | 3 net/ipv4/inet_connection_sock.c | 16 + net/ipv4/tcp_ipv4.c | 6 net/ipv6/ndisc.c | 17 + net/ipv6/tcp_ipv6.c | 3 net/mac802154/wpan.c | 2 net/sched/sch_htb.c | 2 net/sctp/probe.c | 3 sound/pci/hda/hda_intel.c | 19 + sound/pci/hda/patch_conexant.c | 1 sound/pci/hda/patch_hdmi.c | 18 - sound/pci/hda/patch_realtek.c | 34 ++ sound/pci/hda/patch_sigmatel.c | 2 sound/usb/midi.c | 91 ++++-- 140 files changed, 1279 insertions(+), 748 deletions(-)
Aaron Lu (1):
libata: restore acpi disable functionality
Afzal Mohammed (1):
Revert "usb: musb: dsps: remove explicit NOP device creation"
Akinobu Mita (1):
batman-adv: fix random jitter calculation
Al Viro (2):
arm64: compat for clock_adjtime(2) is miswired
ARM: missing ->mmap_sem around find_vma() in swp_emulate.c
Alan Cox (1):
pnpacpi: fix incorrect TEST_ALPHA() test
Alan Stern (1):
USB: fix endpoint-disabling for failed config changes
Alexander Aring (1):
mac802154: fix NOHZ local_softirq_pending 08 warning
Alexander Stein (1):
can: Do not call dev_put if restart timer is running upon close
Alexis R. Cortes (1):
usb: host: xhci: Stricter conditional for Z1 system models for Compliance Mode Patch
Andrew Morton (1):
revert "rtc: recycle id when unloading a rtc driver"
Andy Gross (1):
staging: drm/omap: Fix include error during make
Andy Lutomirski (1):
PCI: Reduce Ricoh 0xe822 SD card reader base clock frequency to 50MHz
Artem Bityutskiy (1):
proc: pid/status: show all supplementary groups
Ben Hutchings (1):
HID: Add Apple wireless keyboard 2011 ANSI to special driver list
Bryan Schumaker (1):
NFS: Add sequence_priviliged_ops for nfs4_proc_sequence()
Catalin Marinas (1):
arm64: Make !dirty ptes read-only
Christian Lamparter (1):
p54usb: add USBIDs for two more p54usb devices
Christoffer Dall (1):
mm: Fix PageHead when !CONFIG_PAGEFLAGS_EXTENDED
Christoph Paasch (1):
inet: Fix kmemleak in tcp_v4/6_syn_recv_sock and dccp_v4/6_request_recv_sock
Christophe TORDEUX (1):
Input: sentelic - only report position of first finger as ST coordinates
Chuansheng Liu (2):
firmware loader: Fix the race FW_STATUS_DONE is followed by class_timeout firmware loader: Fix the concurrent request_firmware() race for kref_get/put
Corey Minyard (1):
CRIS: fix I/O macros
Dan Williams (1):
qmi_wwan/cdc_ether: add Dell Wireless 5800 (Novatel E362) USB IDs
Daniel Borkmann (1):
sctp: jsctp_sf_eat_sack: fix jprobes function signature mismatch
Dave Chinner (2):
xfs: fix direct IO nested transaction deadlock.
xfs: fix stray dquot unlock when reclaiming dquots
Dave Kleikamp (1):
sparc: huge_ptep_set_* functions need to call set_huge_pte_at()
David Henningsson (1):
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
David S. Miller (6):
sparc64: Fix unrolled AES 256-bit key loops.
sparc64: Fix AES ctr mode block size.
sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in AES code.
sparc64: Fix ECB looping constructs in AES code.
sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in DES code.
sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in CAMELLIA code.
David Woodhouse (1):
solos-pci: fix double-free of TX skb in DMA mode
Diego Calleja (1):
Input: wacom - fix touch support for Bamboo Fun CTH-461
Dmitry Torokhov (1):
Input: gpio_keys - defer probing if GPIO probing is deferred
Duan Jiong (1):
ipv6: Change skb->data before using icmpv6_notify() to propagate redirect
Eric Dumazet (2):
net: fix a race in gro_cell_poll()
tcp: fix MSG_SENDPAGE_NOTLAST logic
Felix Fietkau (1):
b43: fix tx path skb leaks
Gabor Juhos (1):
Input: gpio_keys_polled - defer probing if GPIO probing is deferred
Gao feng (1):
cgroup_rm_file: don't delete the uncreated files
Greg Kroah-Hartman (1):
Linux 3.7.2
Guenter Roeck (1):
linux/kernel.h: fix DIV_ROUND_CLOSEST with unsigned divisors
Gustavo Padovan (3):
Bluetooth: Add missing lock nesting notation
Bluetooth: cancel power_on work when unregistering the device Revert "Bluetooth: Fix possible deadlock in SCO code"
Huang Ying (2):
PCI/PM: Keep runtime PM enabled for unbound PCI devices PCI/PM: Do not suspend port if any subordinate device needs PME polling
Hugh Dickins (1):
tmpfs mempolicy: fix /proc/mounts corrupting memory
J. Bruce Fields (2):
nfsd: fix v4 reply caching
nfsd4: fix oops on unusual readlike compound
Jan Kara (1):
fs: Fix imbalance in freeze protection in mark_files_ro()
Jeff Cook (1):
Bluetooth: Add support for BCM20702A0 [0b05, 17b5]
Jeff Layton (6):
nfs: don't extend writes to cover entire page if pagecache is invalid
nfs: don't zero out the rest of the page if we hit the EOF on a DIO READ
cifs: move check for NULL socket into smb_send_rqst
cifs: adjust sequence number downward after signing NT_CANCEL request
cifs: rename cifs_readdir_lookup to cifs_prime_dcache and make it void return
cifs: don't compare uniqueids in cifs_prime_dcache unless server inode numbers are in use
Jianguo Wu (1):
mm/hugetlb: create hugetlb cgroup file in hugetlb_init
Julius Werner (1):
xhci: fix null-pointer dereference when destroying half-built segment rings
Jussi Kivilinna (1):
rtlwifi: fix incorrect use of usb_alloc_coherent with usb_control_msg
Kees Cook (1):
exec: do not leave bprm->interp on stack
Larry Finger (1):
b43legacy: Fix firmware loading when driver is built into the kernel
Lothar Waßmann (1):
USB: chipidea: fix use after free bug
Michal Hocko (1):
mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT
Myron Stowe (1):
PCI: Work around Stratus ftServer broken PCIe hierarchy (fix DMI check)
Neil Brown (1):
nfsd: avoid permission checks on EXCLUSIVE_CREATE replay
NeilBrown (2):
NFS: avoid NULL dereference in nfs_destroy_server
vfs: d_obtain_alias() needs to use "/" as default name.
Nickolai Zeldovich (1):
nfs: avoid dereferencing null pointer in initiate_bulk_draining
Oleg Nesterov (1):
signals: sys_ssetmask() uses uninitialized newmask
Ondrej Zary (1):
x86, 8042: Enable A20 using KBC to fix S3 resume on some MSI laptops
Peter Popovec (1):
Input: walkera0701 - fix crash on startup
Rafael J. Wysocki (1):
ACPI / scan: Do not use dummy HID for system bus ACPI nodes
Robin Holt (1):
SGI-XP: handle non-fatal traps
Roland Dreier (1):
printk: fix incorrect length from print_time() when seconds > 99999
Russell Webb (1):
xhci: Add Lynx Point LP to list of Intel switchable hosts
Sarah Sharp (2):
xhci: Fix conditional check in bandwidth calculation.
xHCI: Fix TD Size calculation on 1.0 hosts.
Sebastian Andrzej Siewior (5):
usb: gadget: midi: free hs descriptors
usb: gadget: phonet: free requests in pn_bind()'s error path
usb: gadget: tcm_usb_gadget: NULL terminate the FS descriptor list
usb: gadget: uvc: fix error path in uvc_function_bind()
usb: gadget: network: fix bind() error path
Sergei Shtylyov (1):
usb: musb: cppi_dma: export cppi_interrupt()
Sonny Rao (1):
mm: fix calculation of dirtyable memory
Stefan Hasko (1):
net: sched: integer overflow fix
Stephen Boyd (1):
lib: atomic64: Initialize locks statically to fix early users
Steve French (1):
SMB3 mounts fail with access denied to some servers
Sven Wegener (1):
NFSv4: Check for buffer length in __nfs4_get_acl_uncached
Takashi Iwai (7):
ALSA: usb-audio: Avoid autopm calls after disconnection
ALSA: usb-audio: Fix missing autopm for MIDI input
ALSA: hda - Move runtime PM check to runtime_idle callback
ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522
ALSA: hda - Always turn on pins for HDMI/DP
ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup
ALSA: hda - Fix pin configuration of HP Pavilion dv7
Tejun Heo (3):
cgroup: cgroup_subsys->fork() should be called after the task is added to css_set
cgroup: remove incorrect dget/dput() pair in cgroup_create_dir()
freezer: add missing mb's to freezer_count() and freezer_should_skip()
Thomas Gleixner (1):
genirq: Always force thread affinity
Tomasz Guszkowski (1):
p54usb: add USB ID for T-Com Sinus 154 data II
Tony Prisk (2):
drivers/rtc/rtc-vt8500.c: correct handling of CR_24H bitfield drivers/rtc/rtc-vt8500.c: fix handling of data passed in struct rtc_time
Trond Myklebust (3):
NFS: Fix calls to drop_nlink()
NFS: Don't use SetPageError in the NFS writeback code
NFS: Ensure that we free the rpc_task after read and write cleanups are done
Weston Andros Adamson (1):
NFS: Fix access to suid/sgid executables
Will Deacon (7):
arm64: signal: push the unwinding prologue on the signal stack
mm: highmem: export kmap_to_page for modules
virtio: 9p: correctly pass physical address to userspace for high pages
virtio: force vring descriptors to be allocated from lowmem
ARM: mm: use pteval_t to represent page protection values
ARM: 7607/1: realview: fix private peripheral memory base for EB rev. B boards
ARM: 7606/1: cache: flush to LoUU instead of LoUIS on uniprocessor CPUs
Xi Wang (1):
nfs: fix null checking in nfs_get_option_str()
Yanchuan Nian (2):
nfs: fix wrong object type in lockowner_slab
pnfs: Increase the refcount when LAYOUTGET fails the first time
Zhang Rui (1):
ACPI: do acpisleep dmi check when CONFIG_ACPI_SLEEP is set
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 7 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Terrified Chipmunk
arch/arm/kernel/swp_emulate.c +2 -0
@@ -109,10 +109,12 @@ static void set_segfault(struct pt_regs *regs, unsigned long addr) {siginfo_t info; +down_read (¤t->mm->mmap_sem);if (find_vma (current->mm, addr) ==NULL ) info.si_code =SEGV_MAPERR ;else info.si_code =SEGV_ACCERR ; +up_read (¤t->mm->mmap_sem); info.si_signo =SIGSEGV ; info.si_errno =0 ;
arch/arm/mach-realview/include/mach/board-eb.h +1 -1
@@ -47,7 +47,7 @@#define REALVIEW_EB_USB_BASE 0x4F000000/* USB */ #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB -#define REALVIEW_EB11MP_PRIV_MEM_BASE 0x1F000000 +#define REALVIEW_EB11MP_PRIV_MEM_BASE 0x10100000#define REALVIEW_EB11MP_L220_BASE 0x10102000/* L220 registers */ #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8/* Register offset for MPCore sysctl */ #else
arch/arm/mm/cache-v7.S +4 -2
@@ -44,8 +44,10 @@ ENDPROC(v7_flush_icache_all) ENTRY(v7_flush_dcache_louis) dmb @ ensure ordering with previous memory accesses mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr - ands r3, r0, #0xe00000 @ extract LoUIS from clidr - mov r3, r3, lsr #20 @ r3 = LoUIS * 2 + ALT_SMP(ands r3, r0, #(7 << 21)) @ extract LoUIS from clidr + ALT_UP(ands r3, r0, #(7 << 27)) @ extract LoUU from clidr + ALT_SMP(mov r3, r3, lsr #20) @ r3 = LoUIS * 2 + ALT_UP(mov r3, r3, lsr #26) @ r3 = LoUU * 2 moveq pc, lr @ return if level == 0 mov r10, #0 @ r10 (starting level) = 0 b flush_levels @ start flushing cache levels
arch/arm/mm/mmu.c +1 -1
@@ -488,7 +488,7 @@ static void __init build_mem_type_table(void)#endif for (i =0 ; i <16 ; i++) { -unsigned long v =pgprot_val (protection_map[i]); +pteval_t v =pgprot_val (protection_map[i]); protection_map[i] =__pgprot (v | user_pgprot); }
arch/arm64/include/asm/pgtable.h +2 -0
@@ -159,6 +159,8 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, {if (pte_present_exec_user (pte))__sync_icache_dcache (pte, addr); +if (!pte_dirty (pte)) + pte =pte_wrprotect (pte);set_pte (ptep, pte); }
arch/arm64/include/asm/unistd32.h +1 -1
@@ -393,7 +393,7 @@ __SYSCALL(368, compat_sys_fanotify_mark_wrapper) __SYSCALL(369, sys_prlimit64) __SYSCALL(370, sys_name_to_handle_at) __SYSCALL(371, compat_sys_open_by_handle_at) -__SYSCALL(372, sys_clock_adjtime) +__SYSCALL(372, compat_sys_clock_adjtime) __SYSCALL(373, sys_syncfs)#define __NR_compat_syscalls 374
arch/arm64/kernel/signal.c +16 -21
@@ -41,6 +41,8 @@struct rt_sigframe {struct siginfo info;struct ucontext uc; +u64 fp; +u64 lr; };static int preserve_fpsimd_context (struct fpsimd_context __user *ctx)
@@ -175,6 +177,10 @@ static int setup_sigframe(struct rt_sigframe __user *sf,struct aux_context __user *aux = (struct aux_context __user *)sf->uc.uc_mcontext.__reserved; +/* set up the stack frame for unwinding */ +__put_user_error (regs->regs[29 ], &sf->fp, err); +__put_user_error (regs->regs[30 ], &sf->lr, err); +for (i =0 ; i <31 ; i++)__put_user_error (regs->regs[i], &sf->uc.uc_mcontext.regs[i], err);
@@ -210,9 +216,6 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,if ((ka->sa.sa_flags &SA_ONSTACK ) && !sas_ss_flags (sp)) sp = sp_top = current->sas_ss_sp + current->sas_ss_size; -/* room for stack frame (FP, LR) */ - sp -=16 ; - sp = (sp - framesize) & ~15 ; frame = (void __user *)sp;
@@ -225,20 +228,14 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,return frame; } -static int setup_return (struct pt_regs *regs,struct k_sigaction *ka, -void __user *frame,int usig) +static void setup_return (struct pt_regs *regs,struct k_sigaction *ka, +void __user *frame,int usig) { -int err =0 ;__sigrestore_t sigtramp; -unsigned long __user *sp = (unsigned long __user *)regs->sp; - -/* set up the stack frame */ -__put_user_error (regs->regs[29 ], sp -2 , err); -__put_user_error (regs->regs[30 ], sp -1 , err); regs->regs[0 ] = usig; - regs->regs[29 ] = regs->sp -16 ; regs->sp = (unsigned long )frame; + regs->regs[29 ] = regs->sp + offsetof(struct rt_sigframe , fp); regs->pc = (unsigned long )ka->sa.sa_handler;if (ka->sa.sa_flags &SA_RESTORER )
@@ -247,8 +244,6 @@ static int setup_return(struct pt_regs *regs, struct k_sigaction *ka, sigtramp =VDSO_SYMBOL (current->mm->context.vdso, sigtramp); regs->regs[30 ] = (unsigned long )sigtramp; - -return err; } static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
@@ -272,13 +267,13 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, err |=__copy_to_user (&frame->uc.uc_stack, &stack,sizeof (stack)); err |=setup_sigframe (frame, regs, set); -if (err ==0 ) - err =setup_return (regs, ka, frame, usig); - -if (err ==0 && ka->sa.sa_flags &SA_SIGINFO ) { - err |=copy_siginfo_to_user (&frame->info, info); - regs->regs[1 ] = (unsigned long )&frame->info; - regs->regs[2 ] = (unsigned long )&frame->uc; +if (err ==0 ) { +setup_return (regs, ka, frame, usig); +if (ka->sa.sa_flags &SA_SIGINFO ) { + err |=copy_siginfo_to_user (&frame->info, info); + regs->regs[1 ] = (unsigned long )&frame->info; + regs->regs[2 ] = (unsigned long )&frame->uc; + } }return err;
arch/cris/include/asm/io.h +33 -6
@@ -133,12 +133,39 @@ static inline void writel(unsigned int b, volatile void __iomem *addr)#define insb (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0)#define insw (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,2,count) : 0)#define insl (port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,4,count) : 0) -#define outb (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,1,1) -#define outw (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,2,1) -#define outl (data,port) if (cris_iops) cris_iops->write_io(port,(void*)(unsigned)data,4,1) -#define outsb (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,1,count) -#define outsw (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,2,count) -#define outsl (port,addr,count) if(cris_iops) cris_iops->write_io(port,(void*)addr,3,count) +static inline void outb (unsigned char data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,1 ,1 ); +} +static inline void outw (unsigned short data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,2 ,1 ); +} +static inline void outl (unsigned int data,unsigned int port) +{ +if (cris_iops) + cris_iops->write_io (port, (void *) &data,4 ,1 ); +} +static inline void outsb (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,1 , count); +} +static inline void outsw (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,2 , count); +} +static inline void outsl (unsigned int port,const void *addr, +unsigned long count) +{ +if (cris_iops) + cris_iops->write_io (port, (void *)addr,4 , count); +}/* * Convert a physical pointer to a virtual kernel pointer for /dev/mem
arch/sparc/crypto/aes_asm.S +14 -6
@@ -1024,7 +1024,11 @@ ENTRY(aes_sparc64_ecb_encrypt_256) add %o2, 0x20, %o2 brlz,pt %o3, 11f nop -10: ldx [%o1 + 0x00], %g3 +10: ldd [%o0 + 0xd0], %f56 + ldd [%o0 + 0xd8], %f58 + ldd [%o0 + 0xe0], %f60 + ldd [%o0 + 0xe8], %f62 + ldx [%o1 + 0x00], %g3 ldx [%o1 + 0x08], %g7 xor %g1, %g3, %g3 xor %g2, %g7, %g7
@@ -1128,9 +1132,9 @@ ENTRY(aes_sparc64_ecb_decrypt_256) /* %o0=&key[key_len], %o1=input, %o2=output, %o3=len */ ldx [%o0 - 0x10], %g1 subcc %o3, 0x10, %o3 + ldx [%o0 - 0x08], %g2 be 10f - ldx [%o0 - 0x08], %g2 - sub %o0, 0xf0, %o0 + sub %o0, 0xf0, %o0 1: ldx [%o1 + 0x00], %g3 ldx [%o1 + 0x08], %g7 ldx [%o1 + 0x10], %o4
@@ -1154,7 +1158,11 @@ ENTRY(aes_sparc64_ecb_decrypt_256) add %o2, 0x20, %o2 brlz,pt %o3, 11f nop -10: ldx [%o1 + 0x00], %g3 +10: ldd [%o0 + 0x18], %f56 + ldd [%o0 + 0x10], %f58 + ldd [%o0 + 0x08], %f60 + ldd [%o0 + 0x00], %f62 + ldx [%o1 + 0x00], %g3 ldx [%o1 + 0x08], %g7 xor %g1, %g3, %g3 xor %g2, %g7, %g7
@@ -1511,11 +1519,11 @@ ENTRY(aes_sparc64_ctr_crypt_256) add %o2, 0x20, %o2 brlz,pt %o3, 11f nop - ldd [%o0 + 0xd0], %f56 +10: ldd [%o0 + 0xd0], %f56 ldd [%o0 + 0xd8], %f58 ldd [%o0 + 0xe0], %f60 ldd [%o0 + 0xe8], %f62 -10: xor %g1, %g3, %o5 + xor %g1, %g3, %o5 MOVXTOD_O5_F0 xor %g2, %g7, %o5 MOVXTOD_O5_F2
arch/sparc/crypto/aes_glue.c +28 -3
@@ -222,6 +222,7 @@ static int ecb_encrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ; ctx->ops->load_encrypt_keys (&ctx->key[0 ]);while ((nbytes = walk.nbytes)) {
@@ -251,6 +252,7 @@ static int ecb_decrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ; ctx->ops->load_decrypt_keys (&ctx->key[0 ]); key_end = &ctx->key[ctx->expanded_key_length /sizeof (u64)];
@@ -280,6 +282,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ; ctx->ops->load_encrypt_keys (&ctx->key[0 ]);while ((nbytes = walk.nbytes)) {
@@ -309,6 +312,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ; ctx->ops->load_decrypt_keys (&ctx->key[0 ]); key_end = &ctx->key[ctx->expanded_key_length /sizeof (u64)];
@@ -329,6 +333,22 @@ static int cbc_decrypt(struct blkcipher_desc *desc,return err; } +static void ctr_crypt_final (struct crypto_sparc64_aes_ctx *ctx, +struct blkcipher_walk *walk) +{ +u8 *ctrblk = walk->iv; +u64 keystream[AES_BLOCK_SIZE /sizeof (u64)]; +u8 *src = walk->src.virt.addr; +u8 *dst = walk->dst.virt.addr; +unsigned int nbytes = walk->nbytes; + + ctx->ops->ecb_encrypt (&ctx->key[0 ], (const u64 *)ctrblk, + keystream,AES_BLOCK_SIZE ); +crypto_xor ((u8 *) keystream, src, nbytes); +memcpy (dst, keystream, nbytes); +crypto_inc (ctrblk,AES_BLOCK_SIZE ); +} +static int ctr_crypt (struct blkcipher_desc *desc,struct scatterlist *dst,struct scatterlist *src,unsigned int nbytes)
@@ -338,10 +358,11 @@ static int ctr_crypt(struct blkcipher_desc *desc,int err;blkcipher_walk_init (&walk, dst, src, nbytes); - err =blkcipher_walk_virt (desc, &walk); + err =blkcipher_walk_virt_block (desc, &walk,AES_BLOCK_SIZE ); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ; ctx->ops->load_encrypt_keys (&ctx->key[0 ]); -while ((nbytes = walk.nbytes)) { +while ((nbytes = walk.nbytes) >=AES_BLOCK_SIZE ) {unsigned int block_len = nbytes &AES_BLOCK_MASK ;if (likely (block_len)) {
@@ -353,6 +374,10 @@ static int ctr_crypt(struct blkcipher_desc *desc, nbytes &=AES_BLOCK_SIZE -1 ; err =blkcipher_walk_done (desc, &walk, nbytes); } +if (walk.nbytes) { +ctr_crypt_final (ctx, &walk); + err =blkcipher_walk_done (desc, &walk,0 ); + }fprs_write (0 );return err; }
@@ -418,7 +443,7 @@ static struct crypto_alg algs[] = { { .cra_driver_name = "ctr-aes-sparc64", .cra_priority = SPARC_CR_OPCODE_PRIORITY, .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, - .cra_blocksize = AES_BLOCK_SIZE, + .cra_blocksize = 1, .cra_ctxsize = sizeof(struct crypto_sparc64_aes_ctx), .cra_alignmask = 7, .cra_type = &crypto_blkcipher_type,
arch/sparc/crypto/camellia_glue.c +3 -0
@@ -98,6 +98,7 @@ static int __ecb_crypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;if (encrypt) key = &ctx->encrypt_key[0 ];
@@ -160,6 +161,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ; key = &ctx->encrypt_key[0 ];camellia_sparc64_load_keys (key, ctx->key_len);
@@ -198,6 +200,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ; key = &ctx->decrypt_key[0 ];camellia_sparc64_load_keys (key, ctx->key_len);
arch/sparc/crypto/des_asm.S +1 -0
@@ -376,6 +376,7 @@ ENTRY(des3_ede_sparc64_ecb_crypt) 1: ldd [%o1 + 0x00], %f60 DES3_LOOP_BODY(60) std %f60, [%o2 + 0x00] + add %o1, 0x08, %o1 subcc %o3, 0x08, %o3 bne,pt %icc, 1b add %o2, 0x08, %o2
arch/sparc/crypto/des_glue.c +6 -0
@@ -100,6 +100,7 @@ static int __ecb_crypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;if (encrypt)des_sparc64_load_keys (&ctx->encrypt_expkey[0 ]);
@@ -147,6 +148,7 @@ static int cbc_encrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;des_sparc64_load_keys (&ctx->encrypt_expkey[0 ]);while ((nbytes = walk.nbytes)) {
@@ -177,6 +179,7 @@ static int cbc_decrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;des_sparc64_load_keys (&ctx->decrypt_expkey[0 ]);while ((nbytes = walk.nbytes)) {
@@ -266,6 +269,7 @@ static int __ecb3_crypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;if (encrypt)K = &ctx->encrypt_expkey[0 ];
@@ -317,6 +321,7 @@ static int cbc3_encrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;K = &ctx->encrypt_expkey[0 ];des3_ede_sparc64_load_keys (K );
@@ -352,6 +357,7 @@ static int cbc3_decrypt(struct blkcipher_desc *desc,blkcipher_walk_init (&walk, dst, src, nbytes); err =blkcipher_walk_virt (desc, &walk); + desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP ;K = &ctx->decrypt_expkey[0 ];des3_ede_sparc64_load_keys (K );
arch/sparc/include/asm/hugetlb.h +8 -2
@@ -61,14 +61,20 @@ static inline pte_t huge_pte_wrprotect(pte_t pte)static inline void huge_ptep_set_wrprotect (struct mm_struct *mm,unsigned long addr,pte_t *ptep) { -ptep_set_wrprotect (mm, addr, ptep); +pte_t old_pte = *ptep; +set_huge_pte_at (mm, addr, ptep,pte_wrprotect (old_pte)); }static inline int huge_ptep_set_access_flags (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep,pte_t pte,int dirty) { -return ptep_set_access_flags (vma, addr, ptep, pte, dirty); +int changed = !pte_same (*ptep, pte); +if (changed) { +set_huge_pte_at (vma->vm_mm, addr, ptep, pte); +flush_tlb_page (vma, addr); + } +return changed; }static inline pte_t huge_ptep_get (pte_t *ptep)
arch/x86/pci/common.c +2 -1
@@ -433,7 +433,8 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { .callback = set_scan_all, .ident = "Stratus/NEC ftServer", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ftServer"), +DMI_MATCH (DMI_SYS_VENDOR ,"Stratus" ), + DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"), }, }, {}
drivers/acpi/scan.c +1 -1
@@ -1227,7 +1227,7 @@ static void acpi_device_set_id(struct acpi_device *device)acpi_add_id (device,ACPI_DOCK_HID ); else if (!acpi_ibm_smbus_match(device)) acpi_add_id(device, ACPI_SMBUS_IBM_HID); - else if (!acpi_device_hid(device) && + else if (list_empty(&device->pnp.ids) && ACPI_IS_ROOT_DEVICE(device->parent)) {acpi_add_id (device,ACPI_BUS_HID );/* \_SB, LNXSYBUS */ strcpy (device->pnp.device_name,ACPI_BUS_DEVICE_NAME );
drivers/acpi/sleep.c +177 -171
377 lines not on this page · raw message
drivers/ata/libata-acpi.c +4 -0
@@ -76,6 +76,9 @@ acpi_handle ata_dev_acpi_handle(struct ata_device *dev)acpi_integer adr;struct ata_port *ap = dev->link->ap; +if (dev->flags &ATA_DFLAG_ACPI_DISABLED ) +return NULL ; +if (ap->flags &ATA_FLAG_ACPI_SATA ) {if (!sata_pmp_attached (ap)) adr =SATA_ADR (ap->port_no,NO_PORT_MULT );
@@ -945,6 +948,7 @@ int ata_acpi_on_devcfg(struct ata_device *dev)return rc; } + dev->flags |=ATA_DFLAG_ACPI_DISABLED ;ata_dev_warn (dev,"ACPI: failed the second time, disabled\n" );/* We can safely continue if no _GTF command has been executed
drivers/atm/solos-pci.c +3 -2
@@ -967,10 +967,11 @@ static uint32_t fpga_tx(struct solos_card *card)for (port =0 ; tx_pending; tx_pending >>=1 , port++) {if (tx_pending &1 ) {struct sk_buff *oldskb = card->tx_skb[port]; -if (oldskb) +if (oldskb) {pci_unmap_single (card->dev,SKB_CB (oldskb)->dma_addr, oldskb->len,PCI_DMA_TODEVICE ); - + card->tx_skb[port] =NULL ; + }spin_lock (&card->tx_queue_lock); skb =skb_dequeue (&card->tx_queue[port]);if (!skb)
drivers/base/firmware_class.c +20 -10
@@ -143,7 +143,7 @@ struct fw_cache_entry { };struct firmware_priv { -struct timer_list timeout; +struct delayed_work timeout_work;bool nowait;struct device dev;struct firmware_buf *buf;
@@ -246,7 +246,6 @@ static void __fw_free_buf(struct kref *ref) __func__, buf->fw_id, buf, buf->data, (unsigned int)buf->size); -spin_lock (&fwc->lock);list_del (&buf->list);spin_unlock (&fwc->lock);
@@ -263,7 +262,10 @@ static void __fw_free_buf(struct kref *ref)static void fw_free_buf (struct firmware_buf *buf) { -kref_put (&buf->ref, __fw_free_buf); +struct firmware_cache *fwc = buf->fwc; +spin_lock (&fwc->lock); +if (!kref_put (&buf->ref, __fw_free_buf)) +spin_unlock (&fwc->lock); }/* direct firmware loading support */
@@ -667,11 +669,18 @@ static struct bin_attribute firmware_attr_data = { .write = firmware_data_write, }; -static void firmware_class_timeout (u_long data) +static void firmware_class_timeout_work (struct work_struct *work) { -struct firmware_priv *fw_priv = (struct firmware_priv *) data; +struct firmware_priv *fw_priv =container_of (work, + struct firmware_priv, timeout_work.work); +mutex_lock (&fw_lock); +if (test_bit (FW_STATUS_DONE , &(fw_priv->buf->status))) { +mutex_unlock (&fw_lock); +return ; + }fw_load_abort (fw_priv); +mutex_unlock (&fw_lock); } static struct firmware_priv *
@@ -690,8 +699,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name, fw_priv->nowait = nowait; fw_priv->fw = firmware; -setup_timer (&fw_priv->timeout, - firmware_class_timeout, (u_long ) fw_priv); +INIT_DELAYED_WORK (&fw_priv->timeout_work, + firmware_class_timeout_work); f_dev = &fw_priv->dev;
@@ -858,7 +867,9 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent,dev_dbg (f_dev->parent,"firmware: direct-loading" " firmware %s\n" , buf->fw_id); +mutex_lock (&fw_lock);set_bit (FW_STATUS_DONE , &buf->status); +mutex_unlock (&fw_lock);complete_all (&buf->completion); direct_load =1 ; goto handle_fw;
@@ -894,15 +905,14 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent,dev_set_uevent_suppress (f_dev, false);dev_dbg (f_dev,"firmware: requesting %s\n" , buf->fw_id);if (timeout !=MAX_SCHEDULE_TIMEOUT ) -mod_timer (&fw_priv->timeout, -round_jiffies_up (jiffies + timeout)); +schedule_delayed_work (&fw_priv->timeout_work, timeout);kobject_uevent (&fw_priv->dev.kobj,KOBJ_ADD ); }wait_for_completion (&buf->completion); -del_timer_sync (&fw_priv->timeout); +cancel_delayed_work_sync (&fw_priv->timeout_work); handle_fw:mutex_lock (&fw_lock);
drivers/bluetooth/btusb.c +1 -0
@@ -96,6 +96,7 @@ static struct usb_device_id btusb_table[] = { { USB_DEVICE(0x0c10, 0x0000) },/* Broadcom BCM20702A0 */ + { USB_DEVICE(0x0b05, 0x17b5) }, { USB_DEVICE(0x04ca, 0x2003) }, { USB_DEVICE(0x0489, 0xe042) }, { USB_DEVICE(0x413c, 0x8197) },
drivers/hid/hid-core.c +1 -0
@@ -1538,6 +1538,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
drivers/input/joystick/walkera0701.c +4 -3
@@ -196,6 +196,7 @@ static void walkera0701_close(struct input_dev *dev)struct walkera_dev *w =input_get_drvdata (dev);parport_disable_irq (w->parport); +hrtimer_cancel (&w->timer); }static int walkera0701_connect (struct walkera_dev *w,int parport)
@@ -224,6 +225,9 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)if (parport_claim (w->pardevice)) goto init_err1; +hrtimer_init (&w->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); + w->timer.function = timer_handler; + w->input_dev =input_allocate_device ();if (!w->input_dev) goto init_err2;
@@ -254,8 +258,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)if (err) goto init_err3; -hrtimer_init (&w->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); - w->timer.function = timer_handler;return 0 ; init_err3:
@@ -271,7 +273,6 @@ static int walkera0701_connect(struct walkera_dev *w, int parport)static void walkera0701_disconnect (struct walkera_dev *w) { -hrtimer_cancel (&w->timer);input_unregister_device (w->input_dev);parport_release (w->pardevice);parport_unregister_device (w->pardevice);
drivers/input/keyboard/gpio_keys.c +12 -1
@@ -587,6 +587,7 @@ gpio_keys_get_devtree_pdata(struct device *dev) i =0 ;for_each_child_of_node (node, pp) { +int gpio;enum of_gpio_flags flags;if (!of_find_property (pp,"gpios" ,NULL )) {
@@ -595,9 +596,19 @@ gpio_keys_get_devtree_pdata(struct device *dev)continue ; } + gpio =of_get_gpio_flags (pp,0 , &flags); +if (gpio <0 ) { + error = gpio; +if (error != -EPROBE_DEFER ) +dev_err (dev, +"Failed to get gpio flags, error: %d\n" , + error); + goto err_free_pdata; + } + button = &pdata->buttons[i++]; - button->gpio =of_get_gpio_flags (pp,0 , &flags); + button->gpio = gpio; button->active_low = flags &OF_GPIO_ACTIVE_LOW ;if (of_property_read_u32 (pp,"linux,code" , &button->code)) {
drivers/input/keyboard/gpio_keys_polled.c +12 -1
@@ -136,6 +136,7 @@ gpio_keys_polled_get_devtree_pdata(struct device *dev) i =0 ;for_each_child_of_node (node, pp) { +int gpio;enum of_gpio_flags flags;if (!of_find_property (pp,"gpios" ,NULL )) {
@@ -144,9 +145,19 @@ gpio_keys_polled_get_devtree_pdata(struct device *dev)continue ; } + gpio =of_get_gpio_flags (pp,0 , &flags); +if (gpio <0 ) { + error = gpio; +if (error != -EPROBE_DEFER ) +dev_err (dev, +"Failed to get gpio flags, error: %d\n" , + error); + goto err_free_pdata; + } + button = &pdata->buttons[i++]; - button->gpio =of_get_gpio_flags (pp,0 , &flags); + button->gpio = gpio; button->active_low = flags &OF_GPIO_ACTIVE_LOW ;if (of_property_read_u32 (pp,"linux,code" , &button->code)) {
drivers/input/mouse/sentelic.c +1 -1
@@ -791,7 +791,7 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)fsp_set_slot (dev,0 , fgrs >0 , abs_x, abs_y);fsp_set_slot (dev,1 , false,0 ,0 ); } -if (fgrs >0 ) { +if (fgrs ==1 || (fgrs ==2 && !(packet[0 ] &FSP_PB0_MFMC_FGR2 ))) {input_report_abs (dev,ABS_X , abs_x);input_report_abs (dev,ABS_Y , abs_y); }
drivers/input/serio/i8042-x86ia64io.h +9 -0
@@ -921,6 +921,7 @@ static int __init i8042_platform_init(void)int retval;#ifdef CONFIG_X86 +u8 a20_on =0xdf ;/* Just return if pre-detection shows no i8042 controller exist */ if (!x86_platform.i8042_detect ())return -ENODEV ;
@@ -960,6 +961,14 @@ static int __init i8042_platform_init(void)if (dmi_check_system (i8042_dmi_dritek_table)) i8042_dritek = true; + +/* +* A20 was already enabled during early kernel init. But some buggy +* BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to +* resume from S3. So we do it here and hope that nothing breaks. +*/ +i8042_command (&a20_on,0x10d1 ); +i8042_command (NULL ,0x00ff );/* Null command for SMM firmware */ #endif /* CONFIG_X86 */ return retval;
drivers/input/tablet/wacom_wac.c +2 -1
@@ -2034,7 +2034,8 @@ static const struct wacom_features wacom_features_0xD1 = .touch_max = 2 };static const struct wacom_features wacom_features_0xD2 = {"Wacom Bamboo Craft" ,WACOM_PKGLEN_BBFUN ,14720 ,9200 ,1023 , -31 ,BAMBOO_PT ,WACOM_INTUOS_RES ,WACOM_INTUOS_RES }; +31 ,BAMBOO_PT ,WACOM_INTUOS_RES ,WACOM_INTUOS_RES , + .touch_max =2 };static const struct wacom_features wacom_features_0xD3 = {"Wacom Bamboo 2FG 6x8" ,WACOM_PKGLEN_BBFUN ,21648 ,13700 ,1023 ,31 ,BAMBOO_PT ,WACOM_INTUOS_RES ,WACOM_INTUOS_RES ,
drivers/misc/sgi-xp/xpc_main.c +32 -2
@@ -53,6 +53,10 @@#include <linux/kthread.h> #include "xpc.h" +#ifdef CONFIG_X86_64 +#include <asm/traps.h> +#endif +/* define two XPC debug device structures to be used with dev_dbg() et al */ struct device_driver xpc_dbg_name = {
@@ -1079,6 +1083,9 @@ xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)return NOTIFY_DONE ; } +/* Used to only allow one cpu to complete disconnect */ +static unsigned int xpc_die_disconnecting; +/* * Notify other partitions to deactivate from us by first disengaging from all * references to our memory.
@@ -1092,6 +1099,9 @@ xpc_die_deactivate(void)long keep_waiting;long wait_to_print; +if (cmpxchg (&xpc_die_disconnecting,0 ,1 )) +return ; +/* keep xpc_hb_checker thread from doing anything (just in case) */ xpc_exiting =1 ;
@@ -1159,7 +1169,7 @@ xpc_die_deactivate(void)* about the lack of a heartbeat. */ static int -xpc_system_die (struct notifier_block *nb,unsigned long event,void *unused) +xpc_system_die (struct notifier_block *nb,unsigned long event,void *_die_args) {#ifdef CONFIG_IA64 /* !!! temporary kludge */ switch (event) {
@@ -1191,7 +1201,27 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused) break; }#else -xpc_die_deactivate (); +struct die_args *die_args = _die_args; + +switch (event) { +case DIE_TRAP : +if (die_args->trapnr ==X86_TRAP_DF ) +xpc_die_deactivate (); + +if (((die_args->trapnr ==X86_TRAP_MF ) || + (die_args->trapnr ==X86_TRAP_XF )) && + !user_mode_vm (die_args->regs)) +xpc_die_deactivate (); + +break ; +case DIE_INT3 : +case DIE_DEBUG : +break ; +case DIE_OOPS : +case DIE_GPF : +default : +xpc_die_deactivate (); + }#endif return NOTIFY_DONE ;
drivers/net/can/dev.c +1 -2
@@ -609,8 +609,7 @@ void close_candev(struct net_device *dev) {struct can_priv *priv =netdev_priv (dev); -if (del_timer_sync (&priv->restart_timer)) -dev_put (dev); +del_timer_sync (&priv->restart_timer);can_flush_echo_skb (dev); }EXPORT_SYMBOL_GPL (close_candev);
drivers/net/usb/cdc_ether.c +15 -0
@@ -487,6 +487,7 @@ static const struct driver_info wwan_info = {#define HUAWEI_VENDOR_ID 0x12D1#define NOVATEL_VENDOR_ID 0x1410#define ZTE_VENDOR_ID 0x19D2 +#define DELL_VENDOR_ID 0x413Cstatic const struct usb_device_id products [] = {/*
@@ -618,6 +619,20 @@ static const struct usb_device_id products [] = { .driver_info = 0, }, +/* Dell Wireless 5800 (Novatel E362) - handled by qmi_wwan */ +{ +USB_DEVICE_AND_INTERFACE_INFO (DELL_VENDOR_ID ,0x8195 ,USB_CLASS_COMM , + USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), + .driver_info =0 , +}, + +/* Dell Wireless 5800 (Novatel E362) - handled by qmi_wwan */ +{ +USB_DEVICE_AND_INTERFACE_INFO (DELL_VENDOR_ID ,0x8196 ,USB_CLASS_COMM , +USB_CDC_SUBCLASS_ETHERNET ,USB_CDC_PROTO_NONE ), + .driver_info = 0, +}, +/* * WHITELIST!!! *
drivers/net/usb/qmi_wwan.c +14 -0
@@ -383,6 +383,20 @@ static const struct usb_device_id products[] = { USB_CDC_PROTO_NONE), .driver_info = (unsigned long )&qmi_wwan_info, }, + { /* Dell Wireless 5800 (Novatel E362) */ +USB_DEVICE_AND_INTERFACE_INFO (0x413C ,0x8195 , +USB_CLASS_COMM , +USB_CDC_SUBCLASS_ETHERNET , +USB_CDC_PROTO_NONE ), + .driver_info = (unsigned long)&qmi_wwan_info, + }, + { /* Dell Wireless 5800 V2 (Novatel E362) */ +USB_DEVICE_AND_INTERFACE_INFO (0x413C ,0x8196 , +USB_CLASS_COMM , +USB_CDC_SUBCLASS_ETHERNET , +USB_CDC_PROTO_NONE ), + .driver_info = (unsigned long)&qmi_wwan_info, + }, /* 3. Combined interface devices matching on interface number */ {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */
drivers/net/wireless/b43/dma.c +5 -2
@@ -409,7 +409,10 @@ static inline struct b43_dmadesc_meta *meta) {if (meta->skb) { -dev_kfree_skb_any (meta->skb); +if (ring->tx) +ieee80211_free_txskb (ring->dev->wl->hw, meta->skb); +else +dev_kfree_skb_any (meta->skb); meta->skb =NULL ; } }
@@ -1454,7 +1457,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)if (unlikely (err == -ENOKEY )) {/* Drop this packet, as we don't have the encryption key * anymore and must not transmit it unencrypted. */ -dev_kfree_skb_any (skb); +ieee80211_free_txskb (dev->wl->hw, skb); err =0 ; goto out; }
drivers/net/wireless/b43/main.c +8 -4
@@ -3397,7 +3397,7 @@ static void b43_tx_work(struct work_struct *work)break ; }if (unlikely (err)) -dev_kfree_skb (skb);/* Drop it */ +ieee80211_free_txskb (wl->hw, skb); err =0 ; }
@@ -3419,7 +3419,7 @@ static void b43_op_tx(struct ieee80211_hw *hw,if (unlikely (skb->len <2 +2 +6 )) {/* Too short, this can't be a valid frame. */ -dev_kfree_skb_any (skb); +ieee80211_free_txskb (hw, skb);return ; }B43_WARN_ON (skb_shinfo (skb)->nr_frags);
@@ -4229,8 +4229,12 @@ redo:/* Drain all TX queues. */ for (queue_num =0 ; queue_num <B43_QOS_QUEUE_NUM ; queue_num++) { -while (skb_queue_len (&wl->tx_queue[queue_num])) -dev_kfree_skb (skb_dequeue (&wl->tx_queue[queue_num])); +while (skb_queue_len (&wl->tx_queue[queue_num])) { +struct sk_buff *skb; + + skb =skb_dequeue (&wl->tx_queue[queue_num]); +ieee80211_free_txskb (wl->hw, skb); + } }b43_mac_suspend (dev);
drivers/net/wireless/b43/pio.c +2 -2
@@ -196,7 +196,7 @@ static void b43_pio_cancel_tx_packets(struct b43_pio_txqueue *q)for (i =0 ; i <ARRAY_SIZE (q->packets); i++) { pack = &(q->packets[i]);if (pack->skb) { -dev_kfree_skb_any (pack->skb); +ieee80211_free_txskb (q->dev->wl->hw, pack->skb); pack->skb =NULL ; } }
@@ -552,7 +552,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)if (unlikely (err == -ENOKEY )) {/* Drop this packet, as we don't have the encryption key * anymore and must not transmit it unencrypted. */ -dev_kfree_skb_any (skb); +ieee80211_free_txskb (dev->wl->hw, skb); err =0 ; goto out; }
drivers/net/wireless/b43legacy/b43legacy.h +5 -0
@@ -13,6 +13,7 @@#include <linux/ssb/ssb.h> #include <linux/ssb/ssb_driver_chipcommon.h> +#include <linux/completion.h> #include <net/mac80211.h>
@@ -733,6 +734,10 @@ struct b43legacy_wldev {/* Firmware data */ struct b43legacy_firmware fw; +const struct firmware *fwp;/* needed to pass fw pointer */ + +/* completion struct for firmware loading */ +struct completion fw_load_complete;/* Devicelist in struct b43legacy_wl (all 802.11 cores) */ struct list_head list;
drivers/net/wireless/b43legacy/main.c +31 -6
@@ -1513,9 +1513,17 @@ static void b43legacy_print_fw_helptext(struct b43legacy_wl *wl) "and download the correct firmware (version 3).\n"); } +static void b43legacy_fw_cb (const struct firmware *firmware,void *context) +{ +struct b43legacy_wldev *dev = context; + + dev->fwp = firmware; +complete (&dev->fw_load_complete); +} +static int do_request_fw (struct b43legacy_wldev *dev,const char *name, -const struct firmware **fw) +const struct firmware **fw,bool async) {char path[sizeof (modparam_fwpostfix) +32 ];struct b43legacy_fw_header *hdr;
@@ -1528,7 +1536,24 @@ static int do_request_fw(struct b43legacy_wldev *dev,snprintf (path,ARRAY_SIZE (path),"b43legacy%s/%s.fw" , modparam_fwpostfix, name); - err =request_firmware (fw, path, dev->dev->dev); +b43legacyinfo (dev->wl,"Loading firmware %s\n" , path); +if (async) { +init_completion (&dev->fw_load_complete); + err =request_firmware_nowait (THIS_MODULE ,1 , path, + dev->dev->dev,GFP_KERNEL , + dev, b43legacy_fw_cb); +if (err) { +b43legacyerr (dev->wl,"Unable to load firmware\n" ); +return err; + } +/* stall here until fw ready */ +wait_for_completion (&dev->fw_load_complete); +if (!dev->fwp) + err = -EINVAL ; + *fw = dev->fwp; + }else { + err =request_firmware (fw, path, dev->dev->dev); + }if (err) {b43legacyerr (dev->wl,"Firmware file \"%s\" not found " "or load failed.\n" , path);
@@ -1580,7 +1605,7 @@ static void b43legacy_request_firmware(struct work_struct *work) filename ="ucode4" ; else filename ="ucode5" ; - err =do_request_fw (dev, filename, &fw->ucode); + err =do_request_fw (dev, filename, &fw->ucode, true);if (err) goto err_load; }
@@ -1589,7 +1614,7 @@ static void b43legacy_request_firmware(struct work_struct *work) filename ="pcm4" ; else filename ="pcm5" ; - err =do_request_fw (dev, filename, &fw->pcm); + err =do_request_fw (dev, filename, &fw->pcm, false);if (err) goto err_load; }
@@ -1607,7 +1632,7 @@ static void b43legacy_request_firmware(struct work_struct *work)default : goto err_no_initvals; } - err =do_request_fw (dev, filename, &fw->initvals); + err =do_request_fw (dev, filename, &fw->initvals, false);if (err) goto err_load; }
@@ -1627,7 +1652,7 @@ static void b43legacy_request_firmware(struct work_struct *work)default : goto err_no_initvals; } - err =do_request_fw (dev, filename, &fw->initvals_band); + err =do_request_fw (dev, filename, &fw->initvals_band, false);if (err) goto err_load; }
drivers/net/wireless/p54/p54usb.c +4 -0
@@ -47,6 +47,7 @@ static struct usb_device_id p54u_table[] = { {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */ {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */ {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */ + {USB_DEVICE(0x0675, 0x0530)}, /* DrayTek Vigor 530 */ {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */ {USB_DEVICE(0x0707, 0xee06)}, /* SMC 2862W-G */ {USB_DEVICE(0x07aa, 0x001c)}, /* Corega CG-WLUSB2GT */
@@ -82,6 +83,8 @@ static struct usb_device_id p54u_table[] = { {USB_DEVICE(0x06a9, 0x000e)}, /* Westell 802.11g USB (A90-211WG-01) */ {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */ {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */ + {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */ + {USB_DEVICE(0x083a, 0x4503)}, /* T-Com Sinus 154 data II */ {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */ {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */ {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */
@@ -101,6 +104,7 @@ static struct usb_device_id p54u_table[] = { {USB_DEVICE(0x13B1, 0x000C)}, /* Linksys WUSB54AG */ {USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */ {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */ +/* {USB_DEVICE(0x15a9, 0x0002)}, * Also SparkLAN WL-682 with 3887 */ {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */ {USB_DEVICE(0x1740, 0x1000)}, /* Senao NUB-350 */ {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
drivers/net/wireless/rtlwifi/usb.c +3 -4
@@ -210,17 +210,16 @@ static void _usb_writeN_sync(struct rtl_priv *rtlpriv, u32 addr, void *data,u16 index =REALTEK_USB_VENQT_CMD_IDX ;int pipe =usb_sndctrlpipe (udev,0 );/* write_out */ u8 *buffer; -dma_addr_t dma_addr; - wvalue = (u16)(addr&0x0000ffff ); - buffer =usb_alloc_coherent (udev, (size_t )len,GFP_ATOMIC , &dma_addr); + wvalue = (u16)(addr &0x0000ffff ); + buffer =kmalloc (len,GFP_ATOMIC );if (!buffer)return ;memcpy (buffer, data, len);usb_control_msg (udev, pipe, request, reqtype, wvalue, index, buffer, len,50 ); -usb_free_coherent (udev, (size_t )len, buffer, dma_addr); +kfree (buffer); } static void _rtl_usb_io_handler_init(struct device *dev,
drivers/pci/pci-driver.c +40 -27
118 lines not on this page · raw message
drivers/pci/pci.c +2 -0
@@ -1900,6 +1900,8 @@ void pci_pm_init(struct pci_dev *dev)u16 pmc;pm_runtime_forbid (&dev->dev); +pm_runtime_set_active (&dev->dev); +pm_runtime_enable (&dev->dev);device_enable_async_suspend (&dev->dev); dev->wakeup_prepared = false;
drivers/pci/pcie/portdrv_pci.c +19 -1
@@ -134,10 +134,28 @@ static int pcie_port_runtime_resume(struct device *dev) return 0; } +static int pci_dev_pme_poll (struct pci_dev *pdev,void *data) +{ +bool *pme_poll = data; + +if (pdev->pme_poll) + *pme_poll = true; +return 0 ; +} +static int pcie_port_runtime_idle (struct device *dev) { +struct pci_dev *pdev =to_pci_dev (dev); +bool pme_poll = false; + +/* +* If any subordinate device needs pme poll, we should keep +* the port in D0, because we need port in D0 to poll it. +*/ +pci_walk_bus (pdev->subordinate, pci_dev_pme_poll, &pme_poll);/* Delay for a short while to prevent too frequent suspend/resume */ -pm_schedule_suspend (dev,10 ); +if (!pme_poll) +pm_schedule_suspend (dev,10 );return -EBUSY ; }#else
drivers/pci/quirks.c +5 -2
@@ -2686,7 +2686,7 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)if (PCI_FUNC (dev->devfn))return ;/* -* RICOH 0xe823 SD/MMC card reader fails to recognize +* RICOH 0xe822 and 0xe823 SD/MMC card readers fail to recognize * certain types of SD/MMC cards. Lowering the SD base * clock frequency from 200Mhz to 50Mhz fixes this issue. *
@@ -2697,7 +2697,8 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)* 0xf9 - Key register for 0x150 * 0xfc - key register for 0xe1 */ -if (dev->device ==PCI_DEVICE_ID_RICOH_R5CE823 ) { +if (dev->device ==PCI_DEVICE_ID_RICOH_R5CE822 || + dev->device ==PCI_DEVICE_ID_RICOH_R5CE823 ) {pci_write_config_byte (dev,0xf9 ,0xfc );pci_write_config_byte (dev,0x150 ,0x10 );pci_write_config_byte (dev,0xf9 ,0x00 );
@@ -2724,6 +2725,8 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev) }DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5C832 , ricoh_mmc_fixup_r5c832);DECLARE_PCI_FIXUP_RESUME_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5C832 , ricoh_mmc_fixup_r5c832); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE822 , ricoh_mmc_fixup_r5c832); +DECLARE_PCI_FIXUP_RESUME_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE822 , ricoh_mmc_fixup_r5c832);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE823 , ricoh_mmc_fixup_r5c832);DECLARE_PCI_FIXUP_RESUME_EARLY (PCI_VENDOR_ID_RICOH ,PCI_DEVICE_ID_RICOH_R5CE823 , ricoh_mmc_fixup_r5c832);#endif /*CONFIG_MMC_RICOH_MMC*/
drivers/pnp/pnpacpi/core.c +1 -1
@@ -58,7 +58,7 @@ static inline int __init is_exclusive_device(struct acpi_device *dev)if (!(('0' <= (c ) && (c) <='9' ) || ('A' <= (c ) && (c) <='F' ))) \ return 0#define TEST_ALPHA (c) \ - if (!('@' <= (c) || (c) <= 'Z')) \ + if (!('A' <= (c) && (c) <= 'Z')) \ return 0static int __init ispnpidacpi (const char *id) {
drivers/rtc/class.c +0 -1
@@ -244,7 +244,6 @@ void rtc_device_unregister(struct rtc_device *rtc)rtc_proc_del_device (rtc);device_unregister (&rtc->dev); rtc->ops =NULL ; -ida_simple_remove (&rtc_ida, rtc->id);mutex_unlock (&rtc->ops_lock);put_device (&rtc->dev); }
drivers/rtc/rtc-vt8500.c +6 -5
@@ -70,7 +70,7 @@ | ALARM_SEC_BIT)#define VT8500_RTC_CR_ENABLE (1 << 0)/* Enable RTC */ -#define VT8500_RTC_CR_24H (1 << 1)/* 24h time format */ +#define VT8500_RTC_CR_12H (1 << 1)/* 12h time format */ #define VT8500_RTC_CR_SM_ENABLE (1 << 2)/* Enable periodic irqs */ #define VT8500_RTC_CR_SM_SEC (1 << 3)/* 0: 1Hz/60, 1: 1Hz */ #define VT8500_RTC_CR_CALIB (1 << 4)/* Enable calibration */
@@ -119,7 +119,7 @@ static int vt8500_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_min =bcd2bin ((time &TIME_MIN_MASK ) >>TIME_MIN_S ); tm->tm_hour =bcd2bin ((time &TIME_HOUR_MASK ) >>TIME_HOUR_S ); tm->tm_mday =bcd2bin (date &DATE_DAY_MASK ); - tm->tm_mon =bcd2bin ((date &DATE_MONTH_MASK ) >>DATE_MONTH_S ); + tm->tm_mon =bcd2bin ((date &DATE_MONTH_MASK ) >>DATE_MONTH_S ) -1 ; tm->tm_year =bcd2bin ((date &DATE_YEAR_MASK ) >>DATE_YEAR_S ) + ((date >>DATE_CENTURY_S ) &1 ?200 :100 ); tm->tm_wday = (time &TIME_DOW_MASK ) >>TIME_DOW_S ;
@@ -138,8 +138,9 @@ static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm) }writel ((bin2bcd (tm->tm_year -100 ) <<DATE_YEAR_S ) - | (bin2bcd (tm->tm_mon) <<DATE_MONTH_S ) - | (bin2bcd (tm->tm_mday)), + | (bin2bcd (tm->tm_mon +1 ) <<DATE_MONTH_S ) + | (bin2bcd (tm->tm_mday)) + | ((tm->tm_year >=200 ) <<DATE_CENTURY_S ), vt8500_rtc->regbase +VT8500_RTC_DS );writel ((bin2bcd (tm->tm_wday) <<TIME_DOW_S ) | (bin2bcd(tm->tm_hour) << TIME_HOUR_S)
@@ -249,7 +250,7 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev) }/* Enable RTC and set it to 24-hour mode */ -writel (VT8500_RTC_CR_ENABLE |VT8500_RTC_CR_24H , +writel (VT8500_RTC_CR_ENABLE , vt8500_rtc->regbase +VT8500_RTC_CR ); vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev,
drivers/staging/omapdrm/omap_crtc.c +1 -1
@@ -19,7 +19,7 @@#include "omap_drv.h" -#include "drm_mode.h" +#include <drm/drm_mode.h> #include "drm_crtc.h" #include "drm_crtc_helper.h"
drivers/usb/chipidea/core.c +2 -1
@@ -385,8 +385,9 @@ EXPORT_SYMBOL_GPL(ci13xxx_add_device);void ci13xxx_remove_device (struct platform_device *pdev) { +int id = pdev->id;platform_device_unregister (pdev); -ida_simple_remove (&ci_ida, pdev->id); +ida_simple_remove (&ci_ida, id); }EXPORT_SYMBOL_GPL (ci13xxx_remove_device);
drivers/usb/core/message.c +31 -23
66 lines not on this page · raw message
drivers/usb/gadget/f_ecm.c +2 -2
@@ -808,9 +808,9 @@ fail:/* we might as well release our claims on endpoints */ if (ecm->notify) ecm->notify->driver_data =NULL ; -if (ecm->port.out_ep->desc) +if (ecm->port.out_ep) ecm->port.out_ep->driver_data =NULL ; -if (ecm->port.in_ep->desc) +if (ecm->port.in_ep) ecm->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_eem.c +2 -3
@@ -319,10 +319,9 @@ fail:if (f->hs_descriptors)usb_free_descriptors (f->hs_descriptors); -/* we might as well release our claims on endpoints */ -if (eem->port.out_ep->desc) +if (eem->port.out_ep) eem->port.out_ep->driver_data =NULL ; -if (eem->port.in_ep->desc) +if (eem->port.in_ep) eem->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_midi.c +1 -0
@@ -415,6 +415,7 @@ static void f_midi_unbind(struct usb_configuration *c, struct usb_function *f) midi->id =NULL ;usb_free_descriptors (f->descriptors); +usb_free_descriptors (f->hs_descriptors);kfree (midi); }
drivers/usb/gadget/f_ncm.c +2 -2
@@ -1259,9 +1259,9 @@ fail:/* we might as well release our claims on endpoints */ if (ncm->notify) ncm->notify->driver_data =NULL ; -if (ncm->port.out_ep->desc) +if (ncm->port.out_ep) ncm->port.out_ep->driver_data =NULL ; -if (ncm->port.in_ep->desc) +if (ncm->port.in_ep) ncm->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_phonet.c +6 -2
@@ -531,7 +531,7 @@ int pn_bind(struct usb_configuration *c, struct usb_function *f) req =usb_ep_alloc_request (fp->out_ep,GFP_KERNEL );if (!req) - goto err; + goto err_req; req->complete = pn_rx_complete; fp->out_reqv[i] = req;
@@ -540,14 +540,18 @@ int pn_bind(struct usb_configuration *c, struct usb_function *f)/* Outgoing USB requests */ fp->in_req =usb_ep_alloc_request (fp->in_ep,GFP_KERNEL );if (!fp->in_req) - goto err; + goto err_req;INFO (cdev,"USB CDC Phonet function\n" );INFO (cdev,"using %s, OUT %s, IN %s\n" , cdev->gadget->name, fp->out_ep->name, fp->in_ep->name);return 0 ; +err_req: +for (i =0 ; i < phonet_rxq_size && fp->out_reqv[i]; i++) +usb_ep_free_request (fp->out_ep, fp->out_reqv[i]); err: +if (fp->out_ep) fp->out_ep->driver_data =NULL ;if (fp->in_ep)
drivers/usb/gadget/f_rndis.c +2 -2
@@ -803,9 +803,9 @@ fail:/* we might as well release our claims on endpoints */ if (rndis->notify) rndis->notify->driver_data =NULL ; -if (rndis->port.out_ep->desc) +if (rndis->port.out_ep) rndis->port.out_ep->driver_data =NULL ; -if (rndis->port.in_ep->desc) +if (rndis->port.in_ep) rndis->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_subset.c +2 -2
@@ -370,9 +370,9 @@ fail:usb_free_descriptors (f->hs_descriptors);/* we might as well release our claims on endpoints */ -if (geth->port.out_ep->desc) +if (geth->port.out_ep) geth->port.out_ep->driver_data =NULL ; -if (geth->port.in_ep->desc) +if (geth->port.in_ep) geth->port.in_ep->driver_data =NULL ;ERROR (cdev,"%s: can't bind, err %d\n" , f->name, status);
drivers/usb/gadget/f_uvc.c +21 -18
@@ -417,7 +417,6 @@ uvc_register_video(struct uvc_device *uvc)return -ENOMEM ; video->parent = &cdev->gadget->dev; - video->minor =-1 ; video->fops = &uvc_v4l2_fops; video->release = video_device_release;strncpy (video->name, cdev->gadget->name,sizeof (video->name));
@@ -577,23 +576,12 @@ uvc_function_unbind(struct usb_configuration *c, struct usb_function *f)INFO (cdev,"uvc_function_unbind\n" ); -if (uvc->vdev) { -if (uvc->vdev->minor ==-1 ) -video_device_release (uvc->vdev); -else -video_unregister_device (uvc->vdev); - uvc->vdev =NULL ; - } - -if (uvc->control_ep) - uvc->control_ep->driver_data =NULL ; -if (uvc->video.ep) - uvc->video.ep->driver_data =NULL ; +video_unregister_device (uvc->vdev); + uvc->control_ep->driver_data =NULL ; + uvc->video.ep->driver_data =NULL ; -if (uvc->control_req) { -usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); -kfree (uvc->control_buf); - } +usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); +kfree (uvc->control_buf);kfree (f->descriptors);kfree (f->hs_descriptors);
@@ -740,7 +728,22 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)return 0 ; error: -uvc_function_unbind (c, f); +if (uvc->vdev) +video_device_release (uvc->vdev); + +if (uvc->control_ep) + uvc->control_ep->driver_data =NULL ; +if (uvc->video.ep) + uvc->video.ep->driver_data =NULL ; + +if (uvc->control_req) { +usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); +kfree (uvc->control_buf); + } + +kfree (f->descriptors); +kfree (f->hs_descriptors); +kfree (f->ss_descriptors);return ret; }
drivers/usb/gadget/tcm_usb_gadget.c +1 -0
@@ -2139,6 +2139,7 @@ static struct usb_descriptor_header *uasp_fs_function_desc[] = { (struct usb_descriptor_header *) &uasp_status_pipe_desc, (struct usb_descriptor_header *) &uasp_fs_cmd_desc, (struct usb_descriptor_header *) &uasp_cmd_pipe_desc, + NULL, }; static struct usb_descriptor_header *uasp_hs_function_desc[] = {
drivers/usb/host/ehci-pci.c +2 -1
@@ -334,7 +334,8 @@ static bool usb_is_intel_switchable_ehci(struct pci_dev *pdev) pdev->vendor ==PCI_VENDOR_ID_INTEL && (pdev->device ==0x1E26 || pdev->device ==0x8C2D || - pdev->device ==0x8C26 ); + pdev->device ==0x8C26 || + pdev->device ==0x9C26 ); }static void ehci_enable_xhci_companion (void )
drivers/usb/host/pci-quirks.c +3 -1
@@ -723,6 +723,7 @@ static int handshake(void __iomem *ptr, u32 mask, u32 done, }#define PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI 0x8C31 +#define PCI_DEVICE_ID_INTEL_LYNX_POINT_LP_XHCI 0x9C31bool usb_is_intel_ppt_switchable_xhci (struct pci_dev *pdev) {
@@ -736,7 +737,8 @@ bool usb_is_intel_lpt_switchable_xhci(struct pci_dev *pdev) {return pdev->class ==PCI_CLASS_SERIAL_USB_XHCI && pdev->vendor ==PCI_VENDOR_ID_INTEL && - pdev->device ==PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI ; + (pdev->device ==PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI || + pdev->device ==PCI_DEVICE_ID_INTEL_LYNX_POINT_LP_XHCI ); }bool usb_is_intel_switchable_xhci (struct pci_dev *pdev)
drivers/usb/host/xhci-mem.c +7 -2
@@ -205,7 +205,12 @@ static int xhci_alloc_segments_for_ring(struct xhci_hcd *xhci, next =xhci_segment_alloc (xhci, cycle_state, flags);if (!next) { -xhci_free_segments_for_ring (xhci, *first); + prev = *first; +while (prev) { + next = prev->next; +xhci_segment_free (xhci, prev); + prev = next; + }return -ENOMEM ; }xhci_link_segments (xhci, prev, next, type);
@@ -258,7 +263,7 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,return ring; fail: -xhci_ring_free (xhci, ring); +kfree (ring);return NULL ; }
drivers/usb/host/xhci-ring.c +19 -13
@@ -3071,11 +3071,11 @@ static u32 xhci_td_remainder(unsigned int remainder) }/* -* For xHCI 1.0 host controllers, TD size is the number of packets remaining in -* the TD (*not* including this TRB). +* For xHCI 1.0 host controllers, TD size is the number of max packet sized +* packets remaining in the TD (*not* including this TRB). * * Total TD packet count = total_packet_count = -* roundup(TD size in bytes / wMaxPacketSize) +* DIV_ROUND_UP(TD size in bytes / wMaxPacketSize) * * Packets transferred up to and including this TRB = packets_transferred = * rounddown(total bytes transferred including this TRB / wMaxPacketSize)
@@ -3083,15 +3083,16 @@ static u32 xhci_td_remainder(unsigned int remainder)* TD size = total_packet_count - packets_transferred * * It must fit in bits 21:17, so it can't be bigger than 31. +* The last TRB in a TD must have the TD size set to zero. */ -static u32 xhci_v1_0_td_remainder (int running_total,int trb_buff_len, -unsigned int total_packet_count,struct urb *urb) +unsigned int total_packet_count,struct urb *urb, +unsigned int num_trbs_left) {int packets_transferred;/* One TRB with a zero-length data packet. */ -if (running_total ==0 && trb_buff_len ==0 ) +if (num_trbs_left ==0 || (running_total ==0 && trb_buff_len ==0 ))return 0 ;/* All the TRB queueing functions don't count the current TRB in
@@ -3100,7 +3101,9 @@ static u32 xhci_v1_0_td_remainder(int running_total, int trb_buff_len, packets_transferred = (running_total + trb_buff_len) /usb_endpoint_maxp (&urb->ep->desc); -return xhci_td_remainder (total_packet_count - packets_transferred); +if ((total_packet_count - packets_transferred) >31 ) +return 31 <<17 ; +return (total_packet_count - packets_transferred) <<17 ; } static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
@@ -3127,7 +3130,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags, num_trbs =count_sg_trbs_needed (xhci, urb); num_sgs = urb->num_mapped_sgs; - total_packet_count =roundup (urb->transfer_buffer_length, + total_packet_count =DIV_ROUND_UP (urb->transfer_buffer_length,usb_endpoint_maxp (&urb->ep->desc)); trb_buff_len = prepare_transfer(xhci, xhci->devs[slot_id],
@@ -3210,7 +3213,8 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags, running_total); }else { remainder =xhci_v1_0_td_remainder (running_total, - trb_buff_len, total_packet_count, urb); + trb_buff_len, total_packet_count, urb, + num_trbs -1 ); } length_field =TRB_LEN (trb_buff_len) | remainder |
@@ -3318,7 +3322,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, start_cycle = ep_ring->cycle_state; running_total =0 ; - total_packet_count =roundup (urb->transfer_buffer_length, + total_packet_count =DIV_ROUND_UP (urb->transfer_buffer_length,usb_endpoint_maxp (&urb->ep->desc));/* How much data is in the first TRB? */ addr = (u64 ) urb->transfer_dma;
@@ -3364,7 +3368,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, running_total); }else { remainder =xhci_v1_0_td_remainder (running_total, - trb_buff_len, total_packet_count, urb); + trb_buff_len, total_packet_count, urb, + num_trbs -1 ); } length_field =TRB_LEN (trb_buff_len) | remainder |
@@ -3627,7 +3632,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, addr = start_addr + urb->iso_frame_desc[i].offset; td_len = urb->iso_frame_desc[i].length; td_remain_len = td_len; - total_packet_count =roundup (td_len, + total_packet_count =DIV_ROUND_UP (td_len,usb_endpoint_maxp (&urb->ep->desc));/* A zero-length transfer still involves at least one packet. */ if (total_packet_count ==0 )
@@ -3706,7 +3711,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, }else { remainder =xhci_v1_0_td_remainder ( running_total, trb_buff_len, - total_packet_count, urb); + total_packet_count, urb, + (trbs_per_td - j -1 )); } length_field =TRB_LEN (trb_buff_len) | remainder |
drivers/usb/host/xhci.c +2 -2
@@ -480,7 +480,7 @@ static bool compliance_mode_recovery_timer_quirk_check(void)if (strstr (dmi_product_name,"Z420" ) ||strstr (dmi_product_name,"Z620" ) ||strstr (dmi_product_name,"Z820" ) || -strstr (dmi_product_name,"Z1" )) +strstr (dmi_product_name,"Z1 Workstation" ))return true;return false;
@@ -2254,7 +2254,7 @@ static bool xhci_is_async_ep(unsigned int ep_type)static bool xhci_is_sync_in_ep (unsigned int ep_type) { -return (ep_type ==ISOC_IN_EP || ep_type !=INT_IN_EP ); +return (ep_type ==ISOC_IN_EP || ep_type ==INT_IN_EP ); }static unsigned int xhci_get_ss_bw_consumed (struct xhci_bw_info *ep_bw)
drivers/usb/musb/cppi_dma.c +1 -0
@@ -1314,6 +1314,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)return IRQ_HANDLED ; } +EXPORT_SYMBOL_GPL (cppi_interrupt);/* Instantiate a software object representing a DMA controller. */ struct dma_controller *__devinit
drivers/usb/musb/musb_dsps.c +2 -1
@@ -377,7 +377,8 @@ static int dsps_musb_init(struct musb *musb)/* mentor core register starts at offset of 0x400 from musb base */ musb->mregs += wrp->musb_core_offset; -/* Get the NOP PHY */ +/* NOP driver needs change if supporting dual instance */ +usb_nop_xceiv_register (); musb->xceiv =usb_get_phy (USB_PHY_TYPE_USB2 );if (IS_ERR_OR_NULL (musb->xceiv))return -ENODEV ;
drivers/virtio/virtio_ring.c +7 -0
@@ -135,6 +135,13 @@ static int vring_add_indirect(struct vring_virtqueue *vq,unsigned head;int i; +/* +* We require lowmem mappings for the descriptors because +* otherwise virt_to_phys will give us bogus addresses in the +* virtqueue. +*/ + gfp &= ~(__GFP_HIGHMEM | __GFP_HIGH); + desc =kmalloc ((out + in) *sizeof (struct vring_desc ), gfp);if (!desc)return -ENOMEM ;
fs/binfmt_misc.c +4 -1
@@ -176,7 +176,10 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) goto _error; bprm->argc ++; - bprm->interp = iname;/* for binfmt_script */ +/* Update interp in case binfmt_script needs it. */ + retval =bprm_change_interp (iname, bprm); +if (retval <0 ) + goto _error; interp_file =open_exec (iname); retval =PTR_ERR (interp_file);
fs/binfmt_script.c +3 -1
@@ -82,7 +82,9 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) retval =copy_strings_kernel (1 , &i_name, bprm);if (retval)return retval; bprm->argc++; - bprm->interp = interp; + retval =bprm_change_interp (interp, bprm); +if (retval <0 ) +return retval;/* * OK, now restart the process with the interpreter's dentry.
fs/cifs/readdir.c +32 -27
107 lines not on this page · raw message
fs/cifs/smb1ops.c +7 -0
@@ -53,6 +53,13 @@ send_nt_cancel(struct TCP_Server_Info *server, void *buf,mutex_unlock (&server->srv_mutex);return rc; } + +/* +* The response to this call was already factored into the sequence +* number when the call went out, so we must adjust it back downward +* after signing here. +*/ + --server->sequence_number; rc =smb_send (server, in_buf,be32_to_cpu (in_buf->smb_buf_length));mutex_unlock (&server->srv_mutex);
fs/cifs/smb2pdu.c +1 -1
@@ -425,7 +425,7 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses) }cFYI (1 ,"sec_flags 0x%x" , sec_flags); -if (sec_flags &CIFSSEC_MUST_SIGN ) { +if ((sec_flags &CIFSSEC_MUST_SIGN ) ==CIFSSEC_MUST_SIGN ) {cFYI (1 ,"Signing required" );if (!(server->sec_mode & (SMB2_NEGOTIATE_SIGNING_REQUIRED |SMB2_NEGOTIATE_SIGNING_ENABLED ))) {
fs/cifs/transport.c +3 -3
@@ -144,9 +144,6 @@ smb_send_kvec(struct TCP_Server_Info *server, struct kvec *iov, size_t n_vec, *sent =0 ; -if (ssocket ==NULL ) -return -ENOTSOCK ;/* BB eventually add reconnect code here */ - smb_msg.msg_name = (struct sockaddr *) &server->dstaddr; smb_msg.msg_namelen =sizeof (struct sockaddr ); smb_msg.msg_control =NULL ;
@@ -291,6 +288,9 @@ smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)struct socket *ssocket = server->ssocket;int val =1 ; +if (ssocket ==NULL ) +return -ENOTSOCK ; +cFYI (1 ,"Sending smb: smb_len=%u" , smb_buf_length);dump_smb (iov[0 ].iov_base, iov[0 ].iov_len);
fs/dcache.c +1 -1
@@ -1583,7 +1583,7 @@ EXPORT_SYMBOL(d_find_any_alias);*/ struct dentry *d_obtain_alias (struct inode *inode) { -static const struct qstr anonstring = { .name ="" }; +static const struct qstr anonstring =QSTR_INIT ("/" ,1 );struct dentry *tmp;struct dentry *res;
fs/exec.c +15 -0
@@ -1175,9 +1175,24 @@ void free_bprm(struct linux_binprm *bprm)mutex_unlock (¤t->signal->cred_guard_mutex);abort_creds (bprm->cred); } +/* If a binfmt changed the interp, free it. */ +if (bprm->interp != bprm->filename) +kfree (bprm->interp);kfree (bprm); } +int bprm_change_interp (char *interp,struct linux_binprm *bprm) +{ +/* If a binfmt changed the interp, free it first. */ +if (bprm->interp != bprm->filename) +kfree (bprm->interp); + bprm->interp =kstrdup (interp,GFP_KERNEL ); +if (!bprm->interp) +return -ENOMEM ; +return 0 ; +} +EXPORT_SYMBOL (bprm_change_interp); +/* * install the new credentials for this executable */
fs/file_table.c +1 -1
@@ -458,8 +458,8 @@ void mark_files_ro(struct super_block *sb)spin_unlock (&f->f_lock);if (file_check_writeable (f) !=0 )continue ; +__mnt_drop_write (f->f_path.mnt);file_release_write (f); -mnt_drop_write_file (f); } while_file_list_for_each_entry;lg_global_unlock (&files_lglock); }
fs/nfs/callback_proc.c +1 -1
@@ -205,7 +205,7 @@ static u32 initiate_bulk_draining(struct nfs_client *clp,list_for_each_entry (lo, &server->layouts, plh_layouts) { ino =igrab (lo->plh_inode); -if (ino) +if (!ino)continue ;spin_lock (&ino->i_lock);/* Is this layout in the process of being freed? */
fs/nfs/client.c +1 -2
@@ -615,8 +615,7 @@ EXPORT_SYMBOL_GPL(nfs_create_rpc_client);*/ static void nfs_destroy_server (struct nfs_server *server) { -if (!(server->flags &NFS_MOUNT_LOCAL_FLOCK ) || - !(server->flags &NFS_MOUNT_LOCAL_FCNTL )) +if (server->nlm_host)nlmclnt_done (server->nlm_host); }
fs/nfs/dir.c +16 -11
@@ -1156,11 +1156,14 @@ static int nfs_dentry_delete(const struct dentry *dentry) } +/* Ensure that we revalidate inode->i_nlink */ static void nfs_drop_nlink (struct inode *inode) {spin_lock (&inode->i_lock); -if (inode->i_nlink >0 ) -drop_nlink (inode); +/* drop the inode if we're reasonably sure this is the last link */ +if (inode->i_nlink ==1 ) +clear_nlink (inode); +NFS_I (inode)->cache_validity |=NFS_INO_INVALID_ATTR ;spin_unlock (&inode->i_lock); }
@@ -1175,8 +1178,8 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)NFS_I (inode)->cache_validity |=NFS_INO_INVALID_DATA ;if (dentry->d_flags &DCACHE_NFSFS_RENAMED ) { -drop_nlink (inode);nfs_complete_unlink (dentry, inode); +nfs_drop_nlink (inode); }iput (inode); }
@@ -1647,10 +1650,8 @@ static int nfs_safe_remove(struct dentry *dentry)if (inode !=NULL ) {NFS_PROTO (inode)->return_delegation (inode); error =NFS_PROTO (dir)->remove (dir, &dentry->d_name); -/* The VFS may want to delete this inode */ if (error ==0 )nfs_drop_nlink (inode); -nfs_mark_for_revalidate (inode); }else error =NFS_PROTO (dir)->remove (dir, &dentry->d_name);if (error == -ENOENT )
@@ -2147,12 +2148,16 @@ static int nfs_open_permission_mask(int openflags) {int mask =0 ; -if ((openflags &O_ACCMODE ) !=O_WRONLY ) - mask |=MAY_READ ; -if ((openflags &O_ACCMODE ) !=O_RDONLY ) - mask |=MAY_WRITE ; -if (openflags & __FMODE_EXEC) - mask |=MAY_EXEC ; +if (openflags & __FMODE_EXEC) { +/* ONLY check exec rights */ + mask =MAY_EXEC ; + }else { +if ((openflags &O_ACCMODE ) !=O_WRONLY ) + mask |=MAY_READ ; +if ((openflags &O_ACCMODE ) !=O_RDONLY ) + mask |=MAY_WRITE ; + } +return mask; }
fs/nfs/direct.c +0 -8
@@ -266,14 +266,6 @@ static void nfs_direct_read_completion(struct nfs_pgio_header *hdr)struct nfs_page *req =nfs_list_entry (hdr->pages.next);struct page *page = req->wb_page; -if (test_bit (NFS_IOHDR_EOF , &hdr->flags)) { -if (bytes > hdr->good_bytes) -zero_user (page,0 ,PAGE_SIZE ); -else if (hdr->good_bytes - bytes <PAGE_SIZE ) -zero_user_segment (page, - hdr->good_bytes & ~PAGE_MASK , -PAGE_SIZE ); - }if (!PageCompound (page)) {if (test_bit (NFS_IOHDR_ERROR , &hdr->flags)) {if (bytes < hdr->good_bytes)
fs/nfs/nfs4proc.c +34 -12
101 lines not on this page · raw message
fs/nfs/pnfs.c +1 -1
@@ -254,7 +254,7 @@ static void pnfs_layout_set_fail_bit(struct pnfs_layout_hdr *lo, int fail_bit) { lo->plh_retry_timestamp = jiffies; -if (test_and_set_bit (fail_bit, &lo->plh_flags)) +if (!test_and_set_bit (fail_bit, &lo->plh_flags))atomic_inc (&lo->plh_refcount); }
fs/nfs/read.c +7 -3
@@ -91,12 +91,16 @@ void nfs_readdata_release(struct nfs_read_data *rdata)put_nfs_open_context (rdata->args.context);if (rdata->pages.pagevec != rdata->pages.page_array)kfree (rdata->pages.pagevec); -if (rdata != &read_header->rpc_data) -kfree (rdata); -else +if (rdata == &read_header->rpc_data) { rdata->header =NULL ; + rdata =NULL ; + }if (atomic_dec_and_test (&hdr->refcnt)) hdr->completion_ops->completion (hdr); +/* Note: we only free the rpc_task after callbacks are done. +* See the comment in rpc_free_task() for why +*/ +kfree (rdata); }EXPORT_SYMBOL_GPL (nfs_readdata_release);
fs/nfs/super.c +1 -1
@@ -1150,7 +1150,7 @@ static int nfs_get_option_str(substring_t args[], char **option) {kfree (*option); *option =match_strdup (args); -return !option; +return !*option; }static int nfs_get_option_ul (substring_t args[],unsigned long *option)
fs/nfs/write.c +8 -5
@@ -126,12 +126,16 @@ void nfs_writedata_release(struct nfs_write_data *wdata)put_nfs_open_context (wdata->args.context);if (wdata->pages.pagevec != wdata->pages.page_array)kfree (wdata->pages.pagevec); -if (wdata != &write_header->rpc_data) -kfree (wdata); -else +if (wdata == &write_header->rpc_data) { wdata->header =NULL ; + wdata =NULL ; + }if (atomic_dec_and_test (&hdr->refcnt)) hdr->completion_ops->completion (hdr); +/* Note: we only free the rpc_task after callbacks are done. +* See the comment in rpc_free_task() for why +*/ +kfree (wdata); }EXPORT_SYMBOL_GPL (nfs_writedata_release);
@@ -202,7 +206,6 @@ out:/* A writeback failed: mark the page as bad, and invalidate the page cache */ static void nfs_set_pageerror (struct page *page) { -SetPageError (page);nfs_zap_mapping (page_file_mapping (page)->host,page_file_mapping (page)); }
@@ -884,7 +887,7 @@ static bool nfs_write_pageuptodate(struct page *page, struct inode *inode) {if (nfs_have_delegated_attributes (inode)) goto out; -if (NFS_I (inode)->cache_validity &NFS_INO_REVAL_PAGECACHE ) +if (NFS_I (inode)->cache_validity & (NFS_INO_INVALID_DATA |NFS_INO_REVAL_PAGECACHE ))return false; out:return PageUptodate (page) !=0 ;
fs/nfsd/nfs4proc.c +5 -3
@@ -194,6 +194,7 @@ static __be32 do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open) { struct svc_fh *resfh; +int accmode;__be32 status; resfh =kmalloc (sizeof (struct svc_fh ),GFP_KERNEL );
@@ -253,9 +254,10 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o/* set reply cache */ fh_copy_shallow (&open->op_openowner->oo_owner.so_replay.rp_openfh, &resfh->fh_handle); -if (!open->op_created) - status =do_open_permission (rqstp, resfh, open, -NFSD_MAY_NOP ); + accmode =NFSD_MAY_NOP ; +if (open->op_created) + accmode |=NFSD_MAY_OWNER_OVERRIDE ; + status =do_open_permission (rqstp, resfh, open, accmode);set_change_info (&open->op_cinfo, current_fh);fh_dup2 (current_fh, resfh); out:
fs/nfsd/nfs4state.c +1 -1
@@ -2340,7 +2340,7 @@ nfsd4_init_slabs(void)if (openowner_slab ==NULL ) goto out_nomem; lockowner_slab =kmem_cache_create ("nfsd4_lockowners" , -sizeof (struct nfs4_openowner ),0 ,0 ,NULL ); +sizeof (struct nfs4_lockowner ),0 ,0 ,NULL );if (lockowner_slab ==NULL ) goto out_nomem; file_slab = kmem_cache_create("nfsd4_files",
fs/nfsd/nfs4xdr.c +10 -1
@@ -2946,11 +2946,16 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, len = maxcount; v =0 ;while (len >0 ) { - pn = resp->rqstp->rq_resused++; + pn = resp->rqstp->rq_resused; +if (!resp->rqstp->rq_respages[pn]) {/* ran out of pages */ + maxcount -= len; +break ; + } resp->rqstp->rq_vec[v].iov_base =page_address (resp->rqstp->rq_respages[pn]); resp->rqstp->rq_vec[v].iov_len = len <PAGE_SIZE ? len :PAGE_SIZE ; + resp->rqstp->rq_resused++; v++; len -=PAGE_SIZE ; }
@@ -2996,6 +3001,8 @@ nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsdreturn nfserr;if (resp->xbuf->page_len)return nfserr_resource; +if (!resp->rqstp->rq_respages[resp->rqstp->rq_resused]) +return nfserr_resource; page =page_address (resp->rqstp->rq_respages[resp->rqstp->rq_resused++]);
@@ -3045,6 +3052,8 @@ nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4return nfserr;if (resp->xbuf->page_len)return nfserr_resource; +if (!resp->rqstp->rq_respages[resp->rqstp->rq_resused]) +return nfserr_resource;RESERVE_SPACE (NFS4_VERIFIER_SIZE ); savep = p;
fs/nfsd/nfssvc.c +1 -1
@@ -640,7 +640,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) }/* Store reply in cache. */ -nfsd_cache_update (rqstp, proc->pc_cachetype, statp +1 ); +nfsd_cache_update (rqstp, rqstp->rq_cachetype, statp +1 );return 1 ; }
fs/nfsd/vfs.c +8 -2
@@ -1485,13 +1485,19 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,case NFS3_CREATE_EXCLUSIVE :if ( dchild->d_inode->i_mtime.tv_sec == v_mtime && dchild->d_inode->i_atime.tv_sec == v_atime - && dchild->d_inode->i_size ==0 ) + && dchild->d_inode->i_size ==0 ) { +if (created) + *created =1 ;break ; + }case NFS4_CREATE_EXCLUSIVE4_1 :if ( dchild->d_inode->i_mtime.tv_sec == v_mtime && dchild->d_inode->i_atime.tv_sec == v_atime - && dchild->d_inode->i_size ==0 ) + && dchild->d_inode->i_size ==0 ) { +if (created) + *created =1 ; goto set_attr; + }/* fallthru */ case NFS3_CREATE_GUARDED : err = nfserr_exist;
fs/proc/array.c +1 -1
@@ -212,7 +212,7 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns, group_info = cred->group_info;task_unlock (p); -for (g =0 ; g <min (group_info->ngroups,NGROUPS_SMALL ); g++) +for (g =0 ; g < group_info->ngroups; g++)seq_printf (m,"%d " ,from_kgid_munged (user_ns,GROUP_AT (group_info, g)));put_cred (cred);
fs/splice.c +3 -1
@@ -696,8 +696,10 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,return -EINVAL ; more = (sd->flags &SPLICE_F_MORE ) ?MSG_MORE :0 ; -if (sd->len < sd->total_len) + +if (sd->len < sd->total_len && pipe->nrbufs >1 ) more |=MSG_SENDPAGE_NOTLAST ; +return file->f_op->sendpage (file, buf->page, buf->offset, sd->len, &pos, more); }
fs/xfs/xfs_aops.c +29 -52
144 lines not on this page · raw message
fs/xfs/xfs_log.c +2 -1
@@ -458,7 +458,8 @@ xfs_log_reserve( tic->t_trans_type = t_type; *ticp = tic; -xlog_grant_push_ail (log, tic->t_unit_res * tic->t_cnt); +xlog_grant_push_ail (log, tic->t_cnt ? tic->t_unit_res * tic->t_cnt + : tic->t_unit_res);trace_xfs_log_reserve (log, tic);
fs/xfs/xfs_qm.c +7 -8
@@ -1453,7 +1453,7 @@ xfs_qm_dqreclaim_one(int error;if (!xfs_dqlock_nowait (dqp)) - goto out_busy; + goto out_move_tail;/* * This dquot has acquired a reference in the meantime remove it from
@@ -1476,7 +1476,7 @@ xfs_qm_dqreclaim_one(* getting flushed to disk, we don't want to reclaim it. */ if (!xfs_dqflock_nowait (dqp)) - goto out_busy; + goto out_unlock_move_tail;if (XFS_DQ_IS_DIRTY (dqp)) {struct xfs_buf *bp =NULL ;
@@ -1487,7 +1487,7 @@ xfs_qm_dqreclaim_one(if (error) {xfs_warn (mp,"%s: dquot %p flush failed" , __func__, dqp); - goto out_busy; + goto out_unlock_move_tail; }xfs_buf_delwri_queue (bp, buffer_list);
@@ -1496,7 +1496,7 @@ xfs_qm_dqreclaim_one(* Give the dquot another try on the freelist, as the * flushing will take some time. */ - goto out_busy; + goto out_unlock_move_tail; }xfs_dqfunlock (dqp);
@@ -1515,14 +1515,13 @@ xfs_qm_dqreclaim_one(XFS_STATS_INC (xs_qm_dqreclaims);return ; -out_busy: -xfs_dqunlock (dqp); -/* * Move the dquot to the tail of the list so that we don't spin on it. */ +out_unlock_move_tail: +xfs_dqunlock (dqp); +out_move_tail:list_move_tail (&dqp->q_lru, &qi->qi_lru_list); -trace_xfs_dqreclaim_busy (dqp);XFS_STATS_INC (xs_qm_dqreclaim_misses); }
include/asm-generic/tlb.h +9 -0
@@ -78,6 +78,14 @@ struct mmu_gather_batch {#define MAX_GATHER_BATCH \ ((PAGE_SIZE - sizeof(struct mmu_gather_batch)) / sizeof(void *)) +/* +* Limit the maximum number of mmu_gather batches to reduce a risk of soft +* lockups for non-preemptible kernels on huge machines when a lot of memory +* is zapped during unmapping. +* 10K pages freed at once should be safe even without a preemption point. +*/ +#define MAX_GATHER_BATCH_COUNT (10000UL/MAX_GATHER_BATCH) +/* struct mmu_gather is an opaque type used by the mm code for passing around * any data needed by arch specific code for tlb_remove_page. */
@@ -96,6 +104,7 @@ struct mmu_gather {struct mmu_gather_batch *active;struct mmu_gather_batch local;struct page *__pages[MMU_GATHER_BUNDLE ]; +unsigned int batch_count; };#define HAVE_GENERIC_MMU_GATHER
include/linux/binfmts.h +1 -0
@@ -114,6 +114,7 @@ extern int setup_arg_pages(struct linux_binprm * bprm,unsigned long stack_top, int executable_stack);extern int bprm_mm_init (struct linux_binprm *bprm); +extern int bprm_change_interp (char *interp,struct linux_binprm *bprm);extern int copy_strings_kernel (int argc,const char *const *argv,struct linux_binprm *bprm);extern int prepare_bprm_creds (struct linux_binprm *bprm);
include/linux/cgroup.h +0 -1
@@ -34,7 +34,6 @@ extern int cgroup_lock_is_held(void);extern bool cgroup_lock_live_group (struct cgroup *cgrp);extern void cgroup_unlock (void );extern void cgroup_fork (struct task_struct *p); -extern void cgroup_fork_callbacks (struct task_struct *p);extern void cgroup_post_fork (struct task_struct *p);extern void cgroup_exit (struct task_struct *p,int run_callbacks); extern int cgroupstats_build(struct cgroupstats *stats,
include/linux/freezer.h +42 -8
70 lines not on this page · raw message
include/linux/hugetlb_cgroup.h +2 -3
@@ -62,7 +62,7 @@ extern void hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, struct page *page);extern void hugetlb_cgroup_uncharge_cgroup (int idx,unsigned long nr_pages,struct hugetlb_cgroup *h_cg); -extern int hugetlb_cgroup_file_init (int idx)__init ; +extern void hugetlb_cgroup_file_init (void )__init ;extern void hugetlb_cgroup_migrate (struct page *oldhpage,struct page *newhpage);
@@ -111,9 +111,8 @@ hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages,return ; } -static inline int __init hugetlb_cgroup_file_init (int idx) +static inline void hugetlb_cgroup_file_init (void ) { -return 0 ; } static inline void hugetlb_cgroup_migrate(struct page *oldhpage,
include/linux/kernel.h +4 -2
@@ -77,13 +77,15 @@/* * Divide positive or negative dividend by positive divisor and round -* to closest integer. Result is undefined for negative divisors. +* to closest integer. Result is undefined for negative divisors and +* for negative dividends if the divisor variable type is unsigned. */ #define DIV_ROUND_CLOSEST (x, divisor)( \ { \ typeof(x) __x = x; \ typeof(divisor) __d = divisor; \ - (((typeof(x))-1) > 0 || (__x) > 0) ? \ + (((typeof(x))-1) > 0 || \ + ((typeof(divisor))-1) > 0 || (__x) > 0) ? \ (((__x) + ((__d) / 2)) / (__d)) : \ (((__x) - ((__d) / 2)) / (__d)); \ } \
include/linux/libata.h +1 -0
@@ -163,6 +163,7 @@ enum {ATA_DFLAG_DA = (1 <<26 ),/* device supports Device Attention */ ATA_DFLAG_DEVSLP = (1 <<27 ),/* device supports Device Sleep */ +ATA_DFLAG_ACPI_DISABLED = (1 <<28 ),/* ACPI for the device is disabled */ ATA_DEV_UNKNOWN =0 ,/* unknown device */ ATA_DEV_ATA = 1, /* ATA device */
include/linux/page-flags.h +7 -1
@@ -362,7 +362,7 @@ static inline void ClearPageCompound(struct page *page)* pages on the LRU and/or pagecache. */ TESTPAGEFLAG(Compound, compound) -__PAGEFLAG (Head, compound) +__SETPAGEFLAG(Head, compound) __CLEARPAGEFLAG(Head, compound)/* * PG_reclaim is used in combination with PG_compound to mark the
@@ -374,8 +374,14 @@ __PAGEFLAG(Head, compound)* PG_compound & PG_reclaim => Tail page * PG_compound & ~PG_reclaim => Head page */ +#define PG_head_mask ((1L << PG_compound))#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim)) +static inline int PageHead (struct page *page) +{ +return ((page->flags & PG_head_tail_mask) == PG_head_mask); +} +static inline int PageTail (struct page *page) {return ((page->flags & PG_head_tail_mask) == PG_head_tail_mask);
include/linux/pci_ids.h +1 -0
@@ -1568,6 +1568,7 @@#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478#define PCI_DEVICE_ID_RICOH_R5C822 0x0822 +#define PCI_DEVICE_ID_RICOH_R5CE822 0xe822#define PCI_DEVICE_ID_RICOH_R5CE823 0xe823#define PCI_DEVICE_ID_RICOH_R5C832 0x0832#define PCI_DEVICE_ID_RICOH_R5C843 0x0843
include/net/gro_cells.h +9 -5
@@ -17,7 +17,6 @@ struct gro_cells {static inline void gro_cells_receive (struct gro_cells *gcells,struct sk_buff *skb) { -unsigned long flags;struct gro_cell *cell = gcells->cells;struct net_device *dev = skb->dev;
@@ -35,32 +34,37 @@ static inline void gro_cells_receive(struct gro_cells *gcells, struct sk_buff *sreturn ; } -spin_lock_irqsave (&cell->napi_skbs.lock, flags); +/* We run in BH context */ +spin_lock (&cell->napi_skbs.lock);__skb_queue_tail (&cell->napi_skbs, skb);if (skb_queue_len (&cell->napi_skbs) ==1 )napi_schedule (&cell->napi); -spin_unlock_irqrestore (&cell->napi_skbs.lock, flags); +spin_unlock (&cell->napi_skbs.lock); } +/* called unser BH context */ static inline int gro_cell_poll (struct napi_struct *napi,int budget) {
Lines of this file are not shown. View the raw message.
kernel/cgroup.c +36 -40
76 lines not on this page · raw message
mm/mempolicy.c +26 -38
64 lines not on this page · raw message
sound/usb/midi.c +58 -33
91 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.