aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross2013-03-13 19:16:02 -0500
committerColin Cross2013-03-13 19:16:02 -0500
commit0b203ab4aacdb6e6dfb8c277aa290f0a02428e6f (patch)
tree9bab760a750d9cf4504d92603ee7fc82beeb2e38
parenta276def548828763cf5ac228adf8c1ca73f8d4d3 (diff)
parente28c3f2b514b5581e15614f7cf976131092cf4b6 (diff)
downloadkernel-common-0b203ab4aacdb6e6dfb8c277aa290f0a02428e6f.tar.gz
kernel-common-0b203ab4aacdb6e6dfb8c277aa290f0a02428e6f.tar.xz
kernel-common-0b203ab4aacdb6e6dfb8c277aa290f0a02428e6f.zip
Merge tag 'v3.0.68' into android-3.0
This is the 3.0.68 stable release Conflicts: kernel/cgroup.c Change-Id: I067982d25e18e3a12de93a5eb6429b8829d7ca11
-rw-r--r--Documentation/kernel-parameters.txt5
-rw-r--r--MAINTAINERS6
-rw-r--r--Makefile2
-rw-r--r--arch/arm/mach-pxa/include/mach/smemc.h1
-rw-r--r--arch/arm/mach-pxa/smemc.c15
-rw-r--r--arch/arm/mm/dma-mapping.c18
-rw-r--r--arch/parisc/include/asm/pgtable.h13
-rw-r--r--arch/parisc/kernel/cache.c18
-rw-r--r--arch/powerpc/kernel/head_64.S2
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c5
-rw-r--r--arch/powerpc/kernel/time.c5
-rw-r--r--arch/powerpc/kvm/44x_emulate.c2
-rw-r--r--arch/powerpc/platforms/embedded6xx/wii.c6
-rw-r--r--arch/s390/include/asm/timex.h28
-rw-r--r--arch/s390/kernel/time.c2
-rw-r--r--arch/s390/kvm/interrupt.c2
-rw-r--r--arch/s390/kvm/kvm-s390.c8
-rw-r--r--arch/sh/include/asm/elf.h4
-rw-r--r--arch/x86/ia32/ia32entry.S4
-rw-r--r--arch/x86/include/asm/mmzone_32.h6
-rw-r--r--arch/x86/include/asm/pgtable.h5
-rw-r--r--arch/x86/include/asm/traps.h26
-rw-r--r--arch/x86/kernel/amd_iommu_init.c10
-rw-r--r--arch/x86/kernel/apic/x2apic_phys.c17
-rw-r--r--arch/x86/kernel/cpu/amd.c14
-rw-r--r--arch/x86/kernel/entry_32.S1
-rw-r--r--arch/x86/kernel/head.c53
-rw-r--r--arch/x86/kernel/msr.c3
-rw-r--r--arch/x86/kernel/setup.c80
-rw-r--r--arch/x86/mm/fault.c9
-rw-r--r--arch/x86/mm/init_64.c3
-rw-r--r--arch/x86/platform/efi/efi_64.c22
-rw-r--r--arch/x86/power/hibernate_32.c2
-rw-r--r--arch/x86/xen/spinlock.c1
-rw-r--r--arch/x86/xen/xen-asm_32.S14
-rw-r--r--drivers/acpi/processor_idle.c3
-rw-r--r--drivers/acpi/scan.c7
-rw-r--r--drivers/ata/ahci.c6
-rw-r--r--drivers/ata/libata-core.c1
-rw-r--r--drivers/ata/libata-eh.c1
-rw-r--r--drivers/ata/libata-scsi.c6
-rw-r--r--drivers/ata/sata_promise.c15
-rw-r--r--drivers/atm/iphase.h146
-rw-r--r--drivers/base/bus.c4
-rw-r--r--drivers/block/aoe/aoe.h2
-rw-r--r--drivers/block/aoe/aoeblk.c5
-rw-r--r--drivers/block/drbd/drbd_req.c1
-rw-r--r--drivers/block/sunvdc.c2
-rw-r--r--drivers/block/xen-blkback/xenbus.c49
-rw-r--r--drivers/char/virtio_console.c3
-rw-r--r--drivers/dca/dca-core.c5
-rw-r--r--drivers/dma/ioat/dma_v3.c2
-rw-r--r--drivers/edac/edac_pci_sysfs.c2
-rw-r--r--drivers/firewire/core-device.c4
-rw-r--r--drivers/firewire/net.c13
-rw-r--r--drivers/firmware/dmi_scan.c78
-rw-r--r--drivers/gpu/drm/drm_usb.c2
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c21
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h5
-rw-r--r--drivers/gpu/drm/i915/intel_display.c18
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c8
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c8
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_legacy_encoders.c8
-rw-r--r--drivers/infiniband/core/netlink.c2
-rw-r--r--drivers/infiniband/hw/nes/nes.h1
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c9
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c9
-rw-r--r--drivers/isdn/gigaset/capi.c2
-rw-r--r--drivers/md/dm-ioctl.c8
-rw-r--r--drivers/media/rc/rc-main.c4
-rw-r--r--drivers/mfd/mfd-core.c15
-rw-r--r--drivers/misc/sgi-xp/xpc_main.c34
-rw-r--r--drivers/net/can/c_can/c_can.c4
-rw-r--r--drivers/net/can/pch_can.c2
-rw-r--r--drivers/net/can/ti_hecc.c4
-rw-r--r--drivers/net/igb/igb_main.c8
-rw-r--r--drivers/net/loopback.c5
-rw-r--r--drivers/net/r8169.c7
-rw-r--r--drivers/net/tg3.c58
-rw-r--r--drivers/net/wimax/i2400m/i2400m-usb.h3
-rw-r--r--drivers/net/wimax/i2400m/usb.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h172
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.h6
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_hst.c2
-rw-r--r--drivers/net/wireless/p54/p54usb.c2
-rw-r--r--drivers/net/wireless/rtlwifi/usb.c4
-rw-r--r--drivers/net/xen-netback/common.h3
-rw-r--r--drivers/net/xen-netback/interface.c26
-rw-r--r--drivers/net/xen-netback/netback.c123
-rw-r--r--drivers/pci/intel-iommu.c42
-rw-r--r--drivers/pci/pcie/aspm.c3
-rw-r--r--drivers/pci/remove.c2
-rw-r--r--drivers/pcmcia/vrc4171_card.c1
-rw-r--r--drivers/rtc/rtc-isl1208.c3
-rw-r--r--drivers/s390/cio/device_pgid.c10
-rw-r--r--drivers/s390/kvm/kvm_virtio.c38
-rw-r--r--drivers/scsi/mvsas/mv_94xx.h14
-rw-r--r--drivers/scsi/mvsas/mv_sas.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c4
-rw-r--r--drivers/scsi/sd.c13
-rw-r--r--drivers/staging/comedi/Kconfig1
-rw-r--r--drivers/staging/comedi/comedi_fops.c34
-rw-r--r--drivers/staging/comedi/comedidev.h1
-rw-r--r--drivers/staging/comedi/drivers.c34
-rw-r--r--drivers/staging/comedi/drivers/comedi_test.c2
-rw-r--r--drivers/staging/comedi/drivers/ni_labpc.c35
-rw-r--r--drivers/staging/comedi/internal.h1
-rw-r--r--drivers/staging/hv/hv_kvp.c10
-rw-r--r--drivers/staging/rtl8712/usb_intf.c2
-rw-r--r--drivers/staging/speakup/synth.c4
-rw-r--r--drivers/staging/usbip/usbip_common.c11
-rw-r--r--drivers/staging/usbip/usbip_common.h2
-rw-r--r--drivers/staging/usbip/vhci_rx.c3
-rw-r--r--drivers/staging/vt6656/bssdb.h1
-rw-r--r--drivers/staging/vt6656/dpc.c4
-rw-r--r--drivers/staging/vt6656/int.h1
-rw-r--r--drivers/staging/vt6656/iocmd.h33
-rw-r--r--drivers/staging/vt6656/iowpa.h8
-rw-r--r--drivers/staging/vt6656/key.c53
-rw-r--r--drivers/staging/vt6656/key.h8
-rw-r--r--drivers/staging/vt6656/mac.c6
-rw-r--r--drivers/staging/vt6656/rf.c3
-rw-r--r--drivers/staging/vt6656/rxtx.c18
-rw-r--r--drivers/staging/vt6656/ttype.h16
-rw-r--r--drivers/staging/vt6656/usbpipe.c28
-rw-r--r--drivers/staging/vt6656/wcmd.c20
-rw-r--r--drivers/staging/vt6656/wpa2.h4
-rw-r--r--drivers/target/target_core_fabric_configfs.c8
-rw-r--r--drivers/target/tcm_fc/tfc_sess.c14
-rw-r--r--drivers/tty/serial/8250.c2
-rw-r--r--drivers/tty/serial/ifx6x60.c1
-rw-r--r--drivers/tty/tty_ioctl.c4
-rw-r--r--drivers/tty/vt/vt.c134
-rw-r--r--drivers/usb/class/cdc-acm.c3
-rw-r--r--drivers/usb/core/hub.c12
-rw-r--r--drivers/usb/core/message.c53
-rw-r--r--drivers/usb/gadget/dummy_hcd.c9
-rw-r--r--drivers/usb/host/ehci-omap.c2
-rw-r--r--drivers/usb/host/ehci-sched.c2
-rw-r--r--drivers/usb/host/uhci-hcd.c15
-rw-r--r--drivers/usb/host/xhci-mem.c13
-rw-r--r--drivers/usb/host/xhci-ring.c6
-rw-r--r--drivers/usb/serial/ftdi_sio.c4
-rw-r--r--drivers/usb/serial/ftdi_sio_ids.h15
-rw-r--r--drivers/usb/serial/option.c56
-rw-r--r--drivers/usb/serial/qcserial.c1
-rw-r--r--drivers/usb/storage/initializers.c76
-rw-r--r--drivers/usb/storage/initializers.h4
-rw-r--r--drivers/usb/storage/unusual_cypress.h2
-rw-r--r--drivers/usb/storage/unusual_devs.h329
-rw-r--r--drivers/usb/storage/usb.c12
-rw-r--r--drivers/usb/storage/usual-tables.c15
-rw-r--r--drivers/vhost/vhost.c2
-rw-r--r--drivers/video/backlight/adp8860_bl.c2
-rw-r--r--drivers/video/backlight/adp8870_bl.c2
-rw-r--r--drivers/video/console/fbcon.c47
-rw-r--r--drivers/video/fbmem.c9
-rw-r--r--drivers/video/fbsysfs.c3
-rw-r--r--drivers/video/mxsfb.c3
-rw-r--r--fs/cifs/cifs_dfs_ref.c2
-rw-r--r--fs/eventpoll.c22
-rw-r--r--fs/ext4/acl.c6
-rw-r--r--fs/ext4/extents.c22
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--fs/ext4/mballoc.c6
-rw-r--r--fs/ext4/resize.c1
-rw-r--r--fs/ext4/super.c23
-rw-r--r--fs/fat/namei_vfat.c3
-rw-r--r--fs/gfs2/lops.c18
-rw-r--r--fs/gfs2/trans.c8
-rw-r--r--fs/jbd2/transaction.c3
-rw-r--r--fs/jffs2/nodemgmt.c6
-rw-r--r--fs/lockd/clntproc.c3
-rw-r--r--fs/nilfs2/ioctl.c5
-rw-r--r--fs/nls/nls_base.c43
-rw-r--r--fs/notify/inotify/inotify_user.c4
-rw-r--r--fs/ocfs2/dlmglue.c5
-rw-r--r--fs/ocfs2/suballoc.c7
-rw-r--r--fs/ocfs2/suballoc.h2
-rw-r--r--fs/splice.c4
-rw-r--r--fs/udf/inode.c11
-rw-r--r--include/linux/auto_fs.h25
-rw-r--r--include/linux/console.h2
-rw-r--r--include/linux/if_link.h1
-rw-r--r--include/linux/mmu_notifier.h1
-rw-r--r--include/linux/netlink.h6
-rw-r--r--include/linux/nls.h5
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/quota.h1
-rw-r--r--include/linux/rtnetlink.h3
-rw-r--r--include/linux/sched.h11
-rw-r--r--include/linux/syslog.h6
-rw-r--r--include/linux/usb/audio.h6
-rw-r--r--include/linux/vt_kern.h2
-rw-r--r--include/net/inet6_hashtables.h8
-rw-r--r--include/net/inet_sock.h1
-rw-r--r--include/net/ipv6.h12
-rw-r--r--include/net/rtnetlink.h7
-rw-r--r--kernel/cgroup.c8
-rw-r--r--kernel/cpuset.c12
-rw-r--r--kernel/hrtimer.c36
-rw-r--r--kernel/irq/spurious.c7
-rw-r--r--kernel/posix-cpu-timers.c23
-rw-r--r--kernel/posix-timers.c7
-rw-r--r--kernel/printk.c13
-rw-r--r--kernel/ptrace.c63
-rw-r--r--kernel/resource.c50
-rw-r--r--kernel/sched.c3
-rw-r--r--kernel/signal.c17
-rw-r--r--kernel/smp.c13
-rw-r--r--kernel/sysctl_binary.c3
-rw-r--r--kernel/timeconst.pl6
-rw-r--r--kernel/trace/ftrace.c48
-rw-r--r--kernel/trace/ring_buffer.c2
-rw-r--r--lib/idr.c9
-rw-r--r--mm/compaction.c6
-rw-r--r--mm/fadvise.c18
-rw-r--r--mm/huge_memory.c3
-rw-r--r--mm/memory.c18
-rw-r--r--mm/mmu_notifier.c147
-rw-r--r--mm/page_alloc.c17
-rw-r--r--mm/shmem.c10
-rwxr-xr-xnet/bluetooth/hci_event.c2
-rw-r--r--net/bluetooth/hidp/core.c2
-rw-r--r--net/bridge/br_netfilter.c3
-rw-r--r--net/bridge/br_netlink.c15
-rw-r--r--net/bridge/br_stp_bpdu.c2
-rw-r--r--net/core/fib_rules.c6
-rw-r--r--net/core/neighbour.c11
-rw-r--r--net/core/pktgen.c9
-rw-r--r--net/core/rtnetlink.c127
-rw-r--r--net/dcb/dcbnl.c4
-rw-r--r--net/decnet/dn_dev.c6
-rw-r--r--net/decnet/dn_fib.c4
-rw-r--r--net/decnet/dn_route.c5
-rw-r--r--net/ipv4/af_inet.c9
-rw-r--r--net/ipv4/devinet.c6
-rw-r--r--net/ipv4/fib_frontend.c6
-rw-r--r--net/ipv4/inet_diag.c2
-rw-r--r--net/ipv4/ip_sockglue.c2
-rw-r--r--net/ipv4/ipmr.c3
-rw-r--r--net/ipv4/ping.c4
-rw-r--r--net/ipv4/route.c2
-rw-r--r--net/ipv4/tcp_input.c5
-rw-r--r--net/ipv6/addrconf.c16
-rw-r--r--net/ipv6/addrlabel.c9
-rw-r--r--net/ipv6/ip6_fib.c3
-rw-r--r--net/ipv6/ip6mr.c3
-rw-r--r--net/ipv6/route.c9
-rw-r--r--net/mac80211/ieee80211_i.h6
-rw-r--r--net/mac80211/offchannel.c17
-rw-r--r--net/mac80211/scan.c6
-rw-r--r--net/mac80211/sta_info.c2
-rw-r--r--net/mac80211/work.c8
-rw-r--r--net/netfilter/ipset/ip_set_core.c2
-rw-r--r--net/netfilter/nf_conntrack_netlink.c4
-rw-r--r--net/netlink/af_netlink.c17
-rw-r--r--net/netlink/genetlink.c2
-rw-r--r--net/packet/af_packet.c10
-rw-r--r--net/phonet/pn_netlink.c13
-rw-r--r--net/sched/act_api.c7
-rw-r--r--net/sched/cls_api.c6
-rw-r--r--net/sched/sch_api.c12
-rw-r--r--net/sctp/endpointola.c5
-rw-r--r--net/sctp/outqueue.c12
-rw-r--r--net/sctp/socket.c2
-rw-r--r--net/sunrpc/sched.c27
-rw-r--r--net/sunrpc/svc_xprt.c15
-rw-r--r--net/xfrm/xfrm_user.c3
-rw-r--r--sound/arm/pxa2xx-ac97-lib.c8
-rw-r--r--sound/pci/ali5451/ali5451.c2
-rw-r--r--sound/pci/rme32.c2
-rw-r--r--sound/soc/codecs/wm2000.c4
-rw-r--r--sound/usb/mixer.c17
-rw-r--r--sound/usb/quirks-table.h2
278 files changed, 2564 insertions, 1464 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 397ee05132a..389923426ca 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -531,6 +531,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
531 UART at the specified I/O port or MMIO address, 531 UART at the specified I/O port or MMIO address,
532 switching to the matching ttyS device later. The 532 switching to the matching ttyS device later. The
533 options are the same as for ttyS, above. 533 options are the same as for ttyS, above.
534 hvc<n> Use the hypervisor console device <n>. This is for
535 both Xen and PowerPC hypervisors.
534 536
535 If the device connected to the port is not a TTY but a braille 537 If the device connected to the port is not a TTY but a braille
536 device, prepend "brl," before the device type, for instance 538 device, prepend "brl," before the device type, for instance
@@ -679,6 +681,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
679 681
680 earlyprintk= [X86,SH,BLACKFIN] 682 earlyprintk= [X86,SH,BLACKFIN]
681 earlyprintk=vga 683 earlyprintk=vga
684 earlyprintk=xen
682 earlyprintk=serial[,ttySn[,baudrate]] 685 earlyprintk=serial[,ttySn[,baudrate]]
683 earlyprintk=ttySn[,baudrate] 686 earlyprintk=ttySn[,baudrate]
684 earlyprintk=dbgp[debugController#] 687 earlyprintk=dbgp[debugController#]
@@ -696,6 +699,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
696 The VGA output is eventually overwritten by the real 699 The VGA output is eventually overwritten by the real
697 console. 700 console.
698 701
702 The xen output can only be used by Xen PV guests.
703
699 ekgdboc= [X86,KGDB] Allow early kernel console debugging 704 ekgdboc= [X86,KGDB] Allow early kernel console debugging
700 ekgdboc=kbd 705 ekgdboc=kbd
701 706
diff --git a/MAINTAINERS b/MAINTAINERS
index 74c8e4b73ae..105683a48f9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2491,7 +2491,7 @@ S: Maintained
2491F: drivers/net/eexpress.* 2491F: drivers/net/eexpress.*
2492 2492
2493ETHERNET BRIDGE 2493ETHERNET BRIDGE
2494M: Stephen Hemminger <shemminger@linux-foundation.org> 2494M: Stephen Hemminger <stephen@networkplumber.org>
2495L: bridge@lists.linux-foundation.org 2495L: bridge@lists.linux-foundation.org
2496L: netdev@vger.kernel.org 2496L: netdev@vger.kernel.org
2497W: http://www.linuxfoundation.org/en/Net:Bridge 2497W: http://www.linuxfoundation.org/en/Net:Bridge
@@ -4327,7 +4327,7 @@ S: Supported
4327F: drivers/infiniband/hw/nes/ 4327F: drivers/infiniband/hw/nes/
4328 4328
4329NETEM NETWORK EMULATOR 4329NETEM NETWORK EMULATOR
4330M: Stephen Hemminger <shemminger@linux-foundation.org> 4330M: Stephen Hemminger <stephen@networkplumber.org>
4331L: netem@lists.linux-foundation.org 4331L: netem@lists.linux-foundation.org
4332S: Maintained 4332S: Maintained
4333F: net/sched/sch_netem.c 4333F: net/sched/sch_netem.c
@@ -5779,7 +5779,7 @@ S: Maintained
5779F: drivers/usb/misc/sisusbvga/ 5779F: drivers/usb/misc/sisusbvga/
5780 5780
5781SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS 5781SKGE, SKY2 10/100/1000 GIGABIT ETHERNET DRIVERS
5782M: Stephen Hemminger <shemminger@linux-foundation.org> 5782M: Stephen Hemminger <stephen@networkplumber.org>
5783L: netdev@vger.kernel.org 5783L: netdev@vger.kernel.org
5784S: Maintained 5784S: Maintained
5785F: drivers/net/skge.* 5785F: drivers/net/skge.*
diff --git a/Makefile b/Makefile
index 9564edf86e3..8f3b7a815d9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
1VERSION = 3 1VERSION = 3
2PATCHLEVEL = 0 2PATCHLEVEL = 0
3SUBLEVEL = 58 3SUBLEVEL = 68
4EXTRAVERSION = 4EXTRAVERSION =
5NAME = Sneaky Weasel 5NAME = Sneaky Weasel
6 6
diff --git a/arch/arm/mach-pxa/include/mach/smemc.h b/arch/arm/mach-pxa/include/mach/smemc.h
index 654adc90c9a..301bf0eefe1 100644
--- a/arch/arm/mach-pxa/include/mach/smemc.h
+++ b/arch/arm/mach-pxa/include/mach/smemc.h
@@ -37,6 +37,7 @@
37#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */ 37#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */
38#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */ 38#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */
39#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */ 39#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */
40#define CSMSADRCFG (SMEMC_VIRT + 0xA0) /* Chip Select Configuration Register */
40 41
41/* 42/*
42 * More handy macros for PCMCIA 43 * More handy macros for PCMCIA
diff --git a/arch/arm/mach-pxa/smemc.c b/arch/arm/mach-pxa/smemc.c
index 79923058d10..f38aa890b2c 100644
--- a/arch/arm/mach-pxa/smemc.c
+++ b/arch/arm/mach-pxa/smemc.c
@@ -40,6 +40,8 @@ static void pxa3xx_smemc_resume(void)
40 __raw_writel(csadrcfg[1], CSADRCFG1); 40 __raw_writel(csadrcfg[1], CSADRCFG1);
41 __raw_writel(csadrcfg[2], CSADRCFG2); 41 __raw_writel(csadrcfg[2], CSADRCFG2);
42 __raw_writel(csadrcfg[3], CSADRCFG3); 42 __raw_writel(csadrcfg[3], CSADRCFG3);
43 /* CSMSADRCFG wakes up in its default state (0), so we need to set it */
44 __raw_writel(0x2, CSMSADRCFG);
43} 45}
44 46
45static struct syscore_ops smemc_syscore_ops = { 47static struct syscore_ops smemc_syscore_ops = {
@@ -49,8 +51,19 @@ static struct syscore_ops smemc_syscore_ops = {
49 51
50static int __init smemc_init(void) 52static int __init smemc_init(void)
51{ 53{
52 if (cpu_is_pxa3xx()) 54 if (cpu_is_pxa3xx()) {
55 /*
56 * The only documentation we have on the
57 * Chip Select Configuration Register (CSMSADRCFG) is that
58 * it must be programmed to 0x2.
59 * Moreover, in the bit definitions, the second bit
60 * (CSMSADRCFG[1]) is called "SETALWAYS".
61 * Other bits are reserved in this register.
62 */
63 __raw_writel(0x2, CSMSADRCFG);
64
53 register_syscore_ops(&smemc_syscore_ops); 65 register_syscore_ops(&smemc_syscore_ops);
66 }
54 67
55 return 0; 68 return 0;
56} 69}
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index f96d2c73002..56636504f7e 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -467,25 +467,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
467 size_t size, enum dma_data_direction dir, 467 size_t size, enum dma_data_direction dir,
468 void (*op)(const void *, size_t, int)) 468 void (*op)(const void *, size_t, int))
469{ 469{
470 unsigned long pfn;
471 size_t left = size;
472
473 pfn = page_to_pfn(page) + offset / PAGE_SIZE;
474 offset %= PAGE_SIZE;
475
470 /* 476 /*
471 * A single sg entry may refer to multiple physically contiguous 477 * A single sg entry may refer to multiple physically contiguous
472 * pages. But we still need to process highmem pages individually. 478 * pages. But we still need to process highmem pages individually.
473 * If highmem is not configured then the bulk of this loop gets 479 * If highmem is not configured then the bulk of this loop gets
474 * optimized out. 480 * optimized out.
475 */ 481 */
476 size_t left = size;
477 do { 482 do {
478 size_t len = left; 483 size_t len = left;
479 void *vaddr; 484 void *vaddr;
480 485
486 page = pfn_to_page(pfn);
487
481 if (PageHighMem(page)) { 488 if (PageHighMem(page)) {
482 if (len + offset > PAGE_SIZE) { 489 if (len + offset > PAGE_SIZE)
483 if (offset >= PAGE_SIZE) {
484 page += offset / PAGE_SIZE;
485 offset %= PAGE_SIZE;
486 }
487 len = PAGE_SIZE - offset; 490 len = PAGE_SIZE - offset;
488 }
489 vaddr = kmap_high_get(page); 491 vaddr = kmap_high_get(page);
490 if (vaddr) { 492 if (vaddr) {
491 vaddr += offset; 493 vaddr += offset;
@@ -502,7 +504,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
502 op(vaddr, len, dir); 504 op(vaddr, len, dir);
503 } 505 }
504 offset = 0; 506 offset = 0;
505 page++; 507 pfn++;
506 left -= len; 508 left -= len;
507 } while (left); 509 } while (left);
508} 510}
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h
index 22dadeb5869..9d35a3eac24 100644
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -12,11 +12,10 @@
12 12
13#include <linux/bitops.h> 13#include <linux/bitops.h>
14#include <linux/spinlock.h> 14#include <linux/spinlock.h>
15#include <linux/mm_types.h>
15#include <asm/processor.h> 16#include <asm/processor.h>
16#include <asm/cache.h> 17#include <asm/cache.h>
17 18
18struct vm_area_struct;
19
20/* 19/*
21 * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel 20 * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
22 * memory. For the return value to be meaningful, ADDR must be >= 21 * memory. For the return value to be meaningful, ADDR must be >=
@@ -40,7 +39,14 @@ struct vm_area_struct;
40 do{ \ 39 do{ \
41 *(pteptr) = (pteval); \ 40 *(pteptr) = (pteval); \
42 } while(0) 41 } while(0)
43#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 42
43extern void purge_tlb_entries(struct mm_struct *, unsigned long);
44
45#define set_pte_at(mm, addr, ptep, pteval) \
46 do { \
47 set_pte(ptep, pteval); \
48 purge_tlb_entries(mm, addr); \
49 } while (0)
44 50
45#endif /* !__ASSEMBLY__ */ 51#endif /* !__ASSEMBLY__ */
46 52
@@ -464,6 +470,7 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
464 old = pte_val(*ptep); 470 old = pte_val(*ptep);
465 new = pte_val(pte_wrprotect(__pte (old))); 471 new = pte_val(pte_wrprotect(__pte (old)));
466 } while (cmpxchg((unsigned long *) ptep, old, new) != old); 472 } while (cmpxchg((unsigned long *) ptep, old, new) != old);
473 purge_tlb_entries(mm, addr);
467#else 474#else
468 pte_t old_pte = *ptep; 475 pte_t old_pte = *ptep;
469 set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); 476 set_pte_at(mm, addr, ptep, pte_wrprotect(old_pte));
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 83335f3da5f..5241698ede6 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -421,6 +421,24 @@ void kunmap_parisc(void *addr)
421EXPORT_SYMBOL(kunmap_parisc); 421EXPORT_SYMBOL(kunmap_parisc);
422#endif 422#endif
423 423
424void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
425{
426 unsigned long flags;
427
428 /* Note: purge_tlb_entries can be called at startup with
429 no context. */
430
431 /* Disable preemption while we play with %sr1. */
432 preempt_disable();
433 mtsp(mm->context, 1);
434 purge_tlb_start(flags);
435 pdtlb(addr);
436 pitlb(addr);
437 purge_tlb_end(flags);
438 preempt_enable();
439}
440EXPORT_SYMBOL(purge_tlb_entries);
441
424void __flush_tlb_range(unsigned long sid, unsigned long start, 442void __flush_tlb_range(unsigned long sid, unsigned long start,
425 unsigned long end) 443 unsigned long end)
426{ 444{
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index ba504099844..e8befeffb67 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -425,7 +425,7 @@ _STATIC(__after_prom_start)
425 tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */ 425 tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */
426#endif 426#endif
427 427
428#ifdef CONFIG_CRASH_DUMP 428#ifdef CONFIG_RELOCATABLE
429/* 429/*
430 * Check if the kernel has to be running as relocatable kernel based on the 430 * Check if the kernel has to be running as relocatable kernel based on the
431 * variable __run_at_load, if it is set the kernel is treated as relocatable 431 * variable __run_at_load, if it is set the kernel is treated as relocatable
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 583af70c4b1..cac9d2c4d0e 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -163,6 +163,8 @@ static int kexec_all_irq_disabled = 0;
163static void kexec_smp_down(void *arg) 163static void kexec_smp_down(void *arg)
164{ 164{
165 local_irq_disable(); 165 local_irq_disable();
166 hard_irq_disable();
167
166 mb(); /* make sure our irqs are disabled before we say they are */ 168 mb(); /* make sure our irqs are disabled before we say they are */
167 get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF; 169 get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF;
168 while(kexec_all_irq_disabled == 0) 170 while(kexec_all_irq_disabled == 0)
@@ -245,6 +247,8 @@ static void kexec_prepare_cpus(void)
245 wake_offline_cpus(); 247 wake_offline_cpus();
246 smp_call_function(kexec_smp_down, NULL, /* wait */0); 248 smp_call_function(kexec_smp_down, NULL, /* wait */0);
247 local_irq_disable(); 249 local_irq_disable();
250 hard_irq_disable();
251
248 mb(); /* make sure IRQs are disabled before we say they are */ 252 mb(); /* make sure IRQs are disabled before we say they are */
249 get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF; 253 get_paca()->kexec_state = KEXEC_STATE_IRQS_OFF;
250 254
@@ -282,6 +286,7 @@ static void kexec_prepare_cpus(void)
282 if (ppc_md.kexec_cpu_down) 286 if (ppc_md.kexec_cpu_down)
283 ppc_md.kexec_cpu_down(0, 0); 287 ppc_md.kexec_cpu_down(0, 0);
284 local_irq_disable(); 288 local_irq_disable();
289 hard_irq_disable();
285} 290}
286 291
287#endif /* SMP */ 292#endif /* SMP */
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 1becd7b920d..818d809e22f 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -859,13 +859,8 @@ void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,
859 859
860void update_vsyscall_tz(void) 860void update_vsyscall_tz(void)
861{ 861{
862 /* Make userspace gettimeofday spin until we're done. */
863 ++vdso_data->tb_update_count;
864 smp_mb();
865 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; 862 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
866 vdso_data->tz_dsttime = sys_tz.tz_dsttime; 863 vdso_data->tz_dsttime = sys_tz.tz_dsttime;
867 smp_mb();
868 ++vdso_data->tb_update_count;
869} 864}
870 865
871static void __init clocksource_init(void) 866static void __init clocksource_init(void)
diff --git a/arch/powerpc/kvm/44x_emulate.c b/arch/powerpc/kvm/44x_emulate.c
index 549bb2c9a47..ded8a1a0426 100644
--- a/arch/powerpc/kvm/44x_emulate.c
+++ b/arch/powerpc/kvm/44x_emulate.c
@@ -79,6 +79,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
79 run->dcr.dcrn = dcrn; 79 run->dcr.dcrn = dcrn;
80 run->dcr.data = 0; 80 run->dcr.data = 0;
81 run->dcr.is_write = 0; 81 run->dcr.is_write = 0;
82 vcpu->arch.dcr_is_write = 0;
82 vcpu->arch.io_gpr = rt; 83 vcpu->arch.io_gpr = rt;
83 vcpu->arch.dcr_needed = 1; 84 vcpu->arch.dcr_needed = 1;
84 kvmppc_account_exit(vcpu, DCR_EXITS); 85 kvmppc_account_exit(vcpu, DCR_EXITS);
@@ -100,6 +101,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
100 run->dcr.dcrn = dcrn; 101 run->dcr.dcrn = dcrn;
101 run->dcr.data = kvmppc_get_gpr(vcpu, rs); 102 run->dcr.data = kvmppc_get_gpr(vcpu, rs);
102 run->dcr.is_write = 1; 103 run->dcr.is_write = 1;
104 vcpu->arch.dcr_is_write = 1;
103 vcpu->arch.dcr_needed = 1; 105 vcpu->arch.dcr_needed = 1;
104 kvmppc_account_exit(vcpu, DCR_EXITS); 106 kvmppc_account_exit(vcpu, DCR_EXITS);
105 emulated = EMULATE_DO_DCR; 107 emulated = EMULATE_DO_DCR;
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
index 1b5dc1a2e14..daf793b1e94 100644
--- a/arch/powerpc/platforms/embedded6xx/wii.c
+++ b/arch/powerpc/platforms/embedded6xx/wii.c
@@ -85,9 +85,11 @@ void __init wii_memory_fixups(void)
85 wii_hole_start = p[0].base + p[0].size; 85 wii_hole_start = p[0].base + p[0].size;
86 wii_hole_size = p[1].base - wii_hole_start; 86 wii_hole_size = p[1].base - wii_hole_start;
87 87
88 pr_info("MEM1: <%08llx %08llx>\n", p[0].base, p[0].size); 88 pr_info("MEM1: <%08llx %08llx>\n",
89 (unsigned long long) p[0].base, (unsigned long long) p[0].size);
89 pr_info("HOLE: <%08lx %08lx>\n", wii_hole_start, wii_hole_size); 90 pr_info("HOLE: <%08lx %08lx>\n", wii_hole_start, wii_hole_size);
90 pr_info("MEM2: <%08llx %08llx>\n", p[1].base, p[1].size); 91 pr_info("MEM2: <%08llx %08llx>\n",
92 (unsigned long long) p[1].base, (unsigned long long) p[1].size);
91 93
92 p[0].size += wii_hole_size + p[1].size; 94 p[0].size += wii_hole_size + p[1].size;
93 95
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h
index 88829a40af6..a4b8f6009c2 100644
--- a/arch/s390/include/asm/timex.h
+++ b/arch/s390/include/asm/timex.h
@@ -126,4 +126,32 @@ static inline unsigned long long get_clock_monotonic(void)
126 return get_clock_xt() - sched_clock_base_cc; 126 return get_clock_xt() - sched_clock_base_cc;
127} 127}
128 128
129/**
130 * tod_to_ns - convert a TOD format value to nanoseconds
131 * @todval: to be converted TOD format value
132 * Returns: number of nanoseconds that correspond to the TOD format value
133 *
134 * Converting a 64 Bit TOD format value to nanoseconds means that the value
135 * must be divided by 4.096. In order to achieve that we multiply with 125
136 * and divide by 512:
137 *
138 * ns = (todval * 125) >> 9;
139 *
140 * In order to avoid an overflow with the multiplication we can rewrite this.
141 * With a split todval == 2^32 * th + tl (th upper 32 bits, tl lower 32 bits)
142 * we end up with
143 *
144 * ns = ((2^32 * th + tl) * 125 ) >> 9;
145 * -> ns = (2^23 * th * 125) + ((tl * 125) >> 9);
146 *
147 */
148static inline unsigned long long tod_to_ns(unsigned long long todval)
149{
150 unsigned long long ns;
151
152 ns = ((todval >> 32) << 23) * 125;
153 ns += ((todval & 0xffffffff) * 125) >> 9;
154 return ns;
155}
156
129#endif 157#endif
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index dff933065ab..943ea0e4b71 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -63,7 +63,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators);
63 */ 63 */
64unsigned long long notrace __kprobes sched_clock(void) 64unsigned long long notrace __kprobes sched_clock(void)
65{ 65{
66 return (get_clock_monotonic() * 125) >> 9; 66 return tod_to_ns(get_clock_monotonic());
67} 67}
68 68
69/* 69/*
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 35c21bf910c..a3db4c80e00 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -358,7 +358,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
358 return 0; 358 return 0;
359 } 359 }
360 360
361 sltime = ((vcpu->arch.sie_block->ckc - now)*125)>>9; 361 sltime = tod_to_ns(vcpu->arch.sie_block->ckc - now);
362 362
363 hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL); 363 hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL);
364 VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime); 364 VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime);
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 2ada634fc7c..f9804b7aec1 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -584,6 +584,14 @@ int kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr)
584 } else 584 } else
585 prefix = 0; 585 prefix = 0;
586 586
587 /*
588 * The guest FPRS and ACRS are in the host FPRS/ACRS due to the lazy
589 * copying in vcpu load/put. Lets update our copies before we save
590 * it into the save area
591 */
592 save_fp_regs(&vcpu->arch.guest_fpregs);
593 save_access_regs(vcpu->arch.guest_acrs);
594
587 if (__guestcopy(vcpu, addr + offsetof(struct save_area, fp_regs), 595 if (__guestcopy(vcpu, addr + offsetof(struct save_area, fp_regs),
588 vcpu->arch.guest_fpregs.fprs, 128, prefix)) 596 vcpu->arch.guest_fpregs.fprs, 128, prefix))
589 return -EFAULT; 597 return -EFAULT;
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index f38112be67d..978b7fd6d47 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -202,9 +202,9 @@ extern void __kernel_vsyscall;
202 if (vdso_enabled) \ 202 if (vdso_enabled) \
203 NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ 203 NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \
204 else \ 204 else \
205 NEW_AUX_ENT(AT_IGNORE, 0); 205 NEW_AUX_ENT(AT_IGNORE, 0)
206#else 206#else
207#define VSYSCALL_AUX_ENT 207#define VSYSCALL_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0)
208#endif /* CONFIG_VSYSCALL */ 208#endif /* CONFIG_VSYSCALL */
209 209
210#ifdef CONFIG_SH_FPU 210#ifdef CONFIG_SH_FPU
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index c1870dddd32..26af1e31629 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -208,7 +208,7 @@ sysexit_from_sys_call:
208 testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10) 208 testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
209 jnz ia32_ret_from_sys_call 209 jnz ia32_ret_from_sys_call
210 TRACE_IRQS_ON 210 TRACE_IRQS_ON
211 sti 211 ENABLE_INTERRUPTS(CLBR_NONE)
212 movl %eax,%esi /* second arg, syscall return value */ 212 movl %eax,%esi /* second arg, syscall return value */
213 cmpl $0,%eax /* is it < 0? */ 213 cmpl $0,%eax /* is it < 0? */
214 setl %al /* 1 if so, 0 if not */ 214 setl %al /* 1 if so, 0 if not */
@@ -218,7 +218,7 @@ sysexit_from_sys_call:
218 GET_THREAD_INFO(%r10) 218 GET_THREAD_INFO(%r10)
219 movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */ 219 movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */
220 movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi 220 movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
221 cli 221 DISABLE_INTERRUPTS(CLBR_NONE)
222 TRACE_IRQS_OFF 222 TRACE_IRQS_OFF
223 testl %edi,TI_flags(%r10) 223 testl %edi,TI_flags(%r10)
224 jz \exit 224 jz \exit
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h
index ffa037f28d3..a6a64141a8e 100644
--- a/arch/x86/include/asm/mmzone_32.h
+++ b/arch/x86/include/asm/mmzone_32.h
@@ -14,12 +14,6 @@ extern struct pglist_data *node_data[];
14 14
15#include <asm/numaq.h> 15#include <asm/numaq.h>
16 16
17extern void resume_map_numa_kva(pgd_t *pgd);
18
19#else /* !CONFIG_NUMA */
20
21static inline void resume_map_numa_kva(pgd_t *pgd) {}
22
23#endif /* CONFIG_NUMA */ 17#endif /* CONFIG_NUMA */
24 18
25#ifdef CONFIG_DISCONTIGMEM 19#ifdef CONFIG_DISCONTIGMEM
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 884507e68ab..6be990922d4 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -142,6 +142,11 @@ static inline unsigned long pmd_pfn(pmd_t pmd)
142 return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT; 142 return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT;
143} 143}
144 144
145static inline unsigned long pud_pfn(pud_t pud)
146{
147 return (pud_val(pud) & PTE_PFN_MASK) >> PAGE_SHIFT;
148}
149
145#define pte_page(pte) pfn_to_page(pte_pfn(pte)) 150#define pte_page(pte) pfn_to_page(pte_pfn(pte))
146 151
147static inline int pmd_large(pmd_t pte) 152static inline int pmd_large(pmd_t pte)
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index 0310da67307..1d4490379b5 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_X86_TRAPS_H 1#ifndef _ASM_X86_TRAPS_H
2#define _ASM_X86_TRAPS_H 2#define _ASM_X86_TRAPS_H
3 3
4#include <linux/kprobes.h>
4#include <asm/debugreg.h> 5#include <asm/debugreg.h>
5#include <asm/siginfo.h> /* TRAP_TRACE, ... */ 6#include <asm/siginfo.h> /* TRAP_TRACE, ... */
6 7
@@ -87,4 +88,29 @@ asmlinkage void smp_thermal_interrupt(void);
87asmlinkage void mce_threshold_interrupt(void); 88asmlinkage void mce_threshold_interrupt(void);
88#endif 89#endif
89 90
91/* Interrupts/Exceptions */
92enum {
93 X86_TRAP_DE = 0, /* 0, Divide-by-zero */
94 X86_TRAP_DB, /* 1, Debug */
95 X86_TRAP_NMI, /* 2, Non-maskable Interrupt */
96 X86_TRAP_BP, /* 3, Breakpoint */
97 X86_TRAP_OF, /* 4, Overflow */
98 X86_TRAP_BR, /* 5, Bound Range Exceeded */
99 X86_TRAP_UD, /* 6, Invalid Opcode */
100 X86_TRAP_NM, /* 7, Device Not Available */
101 X86_TRAP_DF, /* 8, Double Fault */
102 X86_TRAP_OLD_MF, /* 9, Coprocessor Segment Overrun */
103 X86_TRAP_TS, /* 10, Invalid TSS */
104 X86_TRAP_NP, /* 11, Segment Not Present */
105 X86_TRAP_SS, /* 12, Stack Segment Fault */
106 X86_TRAP_GP, /* 13, General Protection Fault */
107 X86_TRAP_PF, /* 14, Page Fault */
108 X86_TRAP_SPURIOUS, /* 15, Spurious Interrupt */
109 X86_TRAP_MF, /* 16, x87 Floating-Point Exception */
110 X86_TRAP_AC, /* 17, Alignment Check */
111 X86_TRAP_MC, /* 18, Machine Check */
112 X86_TRAP_XF, /* 19, SIMD Floating-Point Exception */
113 X86_TRAP_IRET = 32, /* 32, IRET Exception */
114};
115
90#endif /* _ASM_X86_TRAPS_H */ 116#endif /* _ASM_X86_TRAPS_H */
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 33df6e82f65..d86aa3f1504 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -1363,6 +1363,7 @@ static struct syscore_ops amd_iommu_syscore_ops = {
1363 */ 1363 */
1364static int __init amd_iommu_init(void) 1364static int __init amd_iommu_init(void)
1365{ 1365{
1366 struct amd_iommu *iommu;
1366 int i, ret = 0; 1367 int i, ret = 0;
1367 1368
1368 /* 1369 /*
@@ -1411,9 +1412,6 @@ static int __init amd_iommu_init(void)
1411 if (amd_iommu_pd_alloc_bitmap == NULL) 1412 if (amd_iommu_pd_alloc_bitmap == NULL)
1412 goto free; 1413 goto free;
1413 1414
1414 /* init the device table */
1415 init_device_table();
1416
1417 /* 1415 /*
1418 * let all alias entries point to itself 1416 * let all alias entries point to itself
1419 */ 1417 */
@@ -1463,6 +1461,12 @@ static int __init amd_iommu_init(void)
1463 if (ret) 1461 if (ret)
1464 goto free_disable; 1462 goto free_disable;
1465 1463
1464 /* init the device table */
1465 init_device_table();
1466
1467 for_each_iommu(iommu)
1468 iommu_flush_all_caches(iommu);
1469
1466 amd_iommu_init_api(); 1470 amd_iommu_init_api();
1467 1471
1468 amd_iommu_init_notifier(); 1472 amd_iommu_init_notifier();
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
index f5373dfde21..db4f70492ea 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
@@ -20,12 +20,19 @@ static int set_x2apic_phys_mode(char *arg)
20} 20}
21early_param("x2apic_phys", set_x2apic_phys_mode); 21early_param("x2apic_phys", set_x2apic_phys_mode);
22 22
23static bool x2apic_fadt_phys(void)
24{
25 if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
26 (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL)) {
27 printk(KERN_DEBUG "System requires x2apic physical mode\n");
28 return true;
29 }
30 return false;
31}
32
23static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) 33static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
24{ 34{
25 if (x2apic_phys) 35 return x2apic_enabled() && (x2apic_phys || x2apic_fadt_phys());
26 return x2apic_enabled();
27 else
28 return 0;
29} 36}
30 37
31static void 38static void
@@ -108,7 +115,7 @@ static void init_x2apic_ldr(void)
108 115
109static int x2apic_phys_probe(void) 116static int x2apic_phys_probe(void)
110{ 117{
111 if (x2apic_mode && x2apic_phys) 118 if (x2apic_mode && (x2apic_phys || x2apic_fadt_phys()))
112 return 1; 119 return 1;
113 120
114 return apic == &apic_x2apic_phys; 121 return apic == &apic_x2apic_phys;
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 3f4b6dacf1c..a93741d8de7 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -568,6 +568,20 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
568 } 568 }
569 } 569 }
570 570
571 /*
572 * The way access filter has a performance penalty on some workloads.
573 * Disable it on the affected CPUs.
574 */
575 if ((c->x86 == 0x15) &&
576 (c->x86_model >= 0x02) && (c->x86_model < 0x20)) {
577 u64 val;
578
579 if (!rdmsrl_safe(0xc0011021, &val) && !(val & 0x1E)) {
580 val |= 0x1E;
581 checking_wrmsrl(0xc0011021, val);
582 }
583 }
584
571 cpu_detect_cache_sizes(c); 585 cpu_detect_cache_sizes(c);
572 586
573 /* Multi core CPU? */ 587 /* Multi core CPU? */
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 268b40d3bc7..2df12522aff 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1078,7 +1078,6 @@ ENTRY(xen_failsafe_callback)
1078 lea 16(%esp),%esp 1078 lea 16(%esp),%esp
1079 CFI_ADJUST_CFA_OFFSET -16 1079 CFI_ADJUST_CFA_OFFSET -16
1080 jz 5f 1080 jz 5f
1081 addl $16,%esp
1082 jmp iret_exc 1081 jmp iret_exc
10835: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ 10825: pushl_cfi $-1 /* orig_ax = -1 => not a system call */
1084 SAVE_ALL 1083 SAVE_ALL
diff --git a/arch/x86/kernel/head.c b/arch/x86/kernel/head.c
index af0699ba48c..f6c467484eb 100644
--- a/arch/x86/kernel/head.c
+++ b/arch/x86/kernel/head.c
@@ -5,8 +5,6 @@
5#include <asm/setup.h> 5#include <asm/setup.h>
6#include <asm/bios_ebda.h> 6#include <asm/bios_ebda.h>
7 7
8#define BIOS_LOWMEM_KILOBYTES 0x413
9
10/* 8/*
11 * The BIOS places the EBDA/XBDA at the top of conventional 9 * The BIOS places the EBDA/XBDA at the top of conventional
12 * memory, and usually decreases the reported amount of 10 * memory, and usually decreases the reported amount of
@@ -16,17 +14,30 @@
16 * chipset: reserve a page before VGA to prevent PCI prefetch 14 * chipset: reserve a page before VGA to prevent PCI prefetch
17 * into it (errata #56). Usually the page is reserved anyways, 15 * into it (errata #56). Usually the page is reserved anyways,
18 * unless you have no PS/2 mouse plugged in. 16 * unless you have no PS/2 mouse plugged in.
17 *
18 * This functions is deliberately very conservative. Losing
19 * memory in the bottom megabyte is rarely a problem, as long
20 * as we have enough memory to install the trampoline. Using
21 * memory that is in use by the BIOS or by some DMA device
22 * the BIOS didn't shut down *is* a big problem.
19 */ 23 */
24
25#define BIOS_LOWMEM_KILOBYTES 0x413
26#define LOWMEM_CAP 0x9f000U /* Absolute maximum */
27#define INSANE_CUTOFF 0x20000U /* Less than this = insane */
28
20void __init reserve_ebda_region(void) 29void __init reserve_ebda_region(void)
21{ 30{
22 unsigned int lowmem, ebda_addr; 31 unsigned int lowmem, ebda_addr;
23 32
24 /* To determine the position of the EBDA and the */ 33 /*
25 /* end of conventional memory, we need to look at */ 34 * To determine the position of the EBDA and the
26 /* the BIOS data area. In a paravirtual environment */ 35 * end of conventional memory, we need to look at
27 /* that area is absent. We'll just have to assume */ 36 * the BIOS data area. In a paravirtual environment
28 /* that the paravirt case can handle memory setup */ 37 * that area is absent. We'll just have to assume
29 /* correctly, without our help. */ 38 * that the paravirt case can handle memory setup
39 * correctly, without our help.
40 */
30 if (paravirt_enabled()) 41 if (paravirt_enabled())
31 return; 42 return;
32 43
@@ -37,19 +48,23 @@ void __init reserve_ebda_region(void)
37 /* start of EBDA area */ 48 /* start of EBDA area */
38 ebda_addr = get_bios_ebda(); 49 ebda_addr = get_bios_ebda();
39 50
40 /* Fixup: bios puts an EBDA in the top 64K segment */ 51 /*
41 /* of conventional memory, but does not adjust lowmem. */ 52 * Note: some old Dells seem to need 4k EBDA without
42 if ((lowmem - ebda_addr) <= 0x10000) 53 * reporting so, so just consider the memory above 0x9f000
43 lowmem = ebda_addr; 54 * to be off limits (bugzilla 2990).
55 */
56
57 /* If the EBDA address is below 128K, assume it is bogus */
58 if (ebda_addr < INSANE_CUTOFF)
59 ebda_addr = LOWMEM_CAP;
44 60
45 /* Fixup: bios does not report an EBDA at all. */ 61 /* If lowmem is less than 128K, assume it is bogus */
46 /* Some old Dells seem to need 4k anyhow (bugzilla 2990) */ 62 if (lowmem < INSANE_CUTOFF)
47 if ((ebda_addr == 0) && (lowmem >= 0x9f000)) 63 lowmem = LOWMEM_CAP;
48 lowmem = 0x9f000;
49 64
50 /* Paranoia: should never happen, but... */ 65 /* Use the lower of the lowmem and EBDA markers as the cutoff */
51 if ((lowmem == 0) || (lowmem >= 0x100000)) 66 lowmem = min(lowmem, ebda_addr);
52 lowmem = 0x9f000; 67 lowmem = min(lowmem, LOWMEM_CAP); /* Absolute cap */
53 68
54 /* reserve all memory between lowmem and the 1MB mark */ 69 /* reserve all memory between lowmem and the 1MB mark */
55 memblock_x86_reserve_range(lowmem, 0x100000, "* BIOS reserved"); 70 memblock_x86_reserve_range(lowmem, 0x100000, "* BIOS reserved");
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 12fcbe2c143..f7d1a649a5b 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -175,6 +175,9 @@ static int msr_open(struct inode *inode, struct file *file)
175 unsigned int cpu; 175 unsigned int cpu;
176 struct cpuinfo_x86 *c; 176 struct cpuinfo_x86 *c;
177 177
178 if (!capable(CAP_SYS_RAWIO))
179 return -EPERM;
180
178 cpu = iminor(file->f_path.dentry->d_inode); 181 cpu = iminor(file->f_path.dentry->d_inode);
179 if (cpu >= nr_cpu_ids || !cpu_online(cpu)) 182 if (cpu >= nr_cpu_ids || !cpu_online(cpu))
180 return -ENXIO; /* No such CPU */ 183 return -ENXIO; /* No such CPU */
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index af19a61443f..6c4e9ffc290 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -631,6 +631,83 @@ static __init void reserve_ibft_region(void)
631 631
632static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10; 632static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
633 633
634static bool __init snb_gfx_workaround_needed(void)
635{
636#ifdef CONFIG_PCI
637 int i;
638 u16 vendor, devid;
639 static const u16 snb_ids[] = {
640 0x0102,
641 0x0112,
642 0x0122,
643 0x0106,
644 0x0116,
645 0x0126,
646 0x010a,
647 };
648
649 /* Assume no if something weird is going on with PCI */
650 if (!early_pci_allowed())
651 return false;
652
653 vendor = read_pci_config_16(0, 2, 0, PCI_VENDOR_ID);
654 if (vendor != 0x8086)
655 return false;
656
657 devid = read_pci_config_16(0, 2, 0, PCI_DEVICE_ID);
658 for (i = 0; i < ARRAY_SIZE(snb_ids); i++)
659 if (devid == snb_ids[i])
660 return true;
661#endif
662
663 return false;
664}
665
666/*
667 * Sandy Bridge graphics has trouble with certain ranges, exclude
668 * them from allocation.
669 */
670static void __init trim_snb_memory(void)
671{
672 static const unsigned long bad_pages[] = {
673 0x20050000,
674 0x20110000,
675 0x20130000,
676 0x20138000,
677 0x40004000,
678 };
679 int i;
680
681 if (!snb_gfx_workaround_needed())
682 return;
683
684 printk(KERN_DEBUG "reserving inaccessible SNB gfx pages\n");
685
686 /*
687 * Reserve all memory below the 1 MB mark that has not
688 * already been reserved.
689 */
690 memblock_reserve(0, 1<<20);
691
692 for (i = 0; i < ARRAY_SIZE(bad_pages); i++) {
693 if (memblock_reserve(bad_pages[i], PAGE_SIZE))
694 printk(KERN_WARNING "failed to reserve 0x%08lx\n",
695 bad_pages[i]);
696 }
697}
698
699/*
700 * Here we put platform-specific memory range workarounds, i.e.
701 * memory known to be corrupt or otherwise in need to be reserved on
702 * specific platforms.
703 *
704 * If this gets used more widely it could use a real dispatch mechanism.
705 */
706static void __init trim_platform_memory_ranges(void)
707{
708 trim_snb_memory();
709}
710
634static void __init trim_bios_range(void) 711static void __init trim_bios_range(void)
635{ 712{
636 /* 713 /*
@@ -651,6 +728,7 @@ static void __init trim_bios_range(void)
651 * take them out. 728 * take them out.
652 */ 729 */
653 e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); 730 e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1);
731
654 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); 732 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
655} 733}
656 734
@@ -929,6 +1007,8 @@ void __init setup_arch(char **cmdline_p)
929 1007
930 setup_trampolines(); 1008 setup_trampolines();
931 1009
1010 trim_platform_memory_ranges();
1011
932 init_gbpages(); 1012 init_gbpages();
933 1013
934 /* max_pfn_mapped is updated here */ 1014 /* max_pfn_mapped is updated here */
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 2dbf6bf4c7e..3b2ad913d6c 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -720,12 +720,15 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
720 if (is_errata100(regs, address)) 720 if (is_errata100(regs, address))
721 return; 721 return;
722 722
723 if (unlikely(show_unhandled_signals)) 723 /* Kernel addresses are always protection faults: */
724 if (address >= TASK_SIZE)
725 error_code |= PF_PROT;
726
727 if (likely(show_unhandled_signals))
724 show_signal_msg(regs, error_code, address, tsk); 728 show_signal_msg(regs, error_code, address, tsk);
725 729
726 /* Kernel addresses are always protection faults: */
727 tsk->thread.cr2 = address; 730 tsk->thread.cr2 = address;
728 tsk->thread.error_code = error_code | (address >= TASK_SIZE); 731 tsk->thread.error_code = error_code;
729 tsk->thread.trap_no = 14; 732 tsk->thread.trap_no = 14;
730 733
731 force_sig_info_fault(SIGSEGV, si_code, address, tsk, 0); 734 force_sig_info_fault(SIGSEGV, si_code, address, tsk, 0);
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index bbaaa005bf0..44b93da1840 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -831,6 +831,9 @@ int kern_addr_valid(unsigned long addr)
831 if (pud_none(*pud)) 831 if (pud_none(*pud))
832 return 0; 832 return 0;
833 833
834 if (pud_large(*pud))
835 return pfn_valid(pud_pfn(*pud));
836
834 pmd = pmd_offset(pud, addr); 837 pmd = pmd_offset(pud, addr);
835 if (pmd_none(*pmd)) 838 if (pmd_none(*pmd))
836 return 0; 839 return 0;
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index ac3aa54e265..0fba86da589 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -38,7 +38,7 @@
38#include <asm/cacheflush.h> 38#include <asm/cacheflush.h>
39#include <asm/fixmap.h> 39#include <asm/fixmap.h>
40 40
41static pgd_t save_pgd __initdata; 41static pgd_t *save_pgd __initdata;
42static unsigned long efi_flags __initdata; 42static unsigned long efi_flags __initdata;
43 43
44static void __init early_code_mapping_set_exec(int executable) 44static void __init early_code_mapping_set_exec(int executable)
@@ -61,12 +61,20 @@ static void __init early_code_mapping_set_exec(int executable)
61void __init efi_call_phys_prelog(void) 61void __init efi_call_phys_prelog(void)
62{ 62{
63 unsigned long vaddress; 63 unsigned long vaddress;
64 int pgd;
65 int n_pgds;
64 66
65 early_code_mapping_set_exec(1); 67 early_code_mapping_set_exec(1);
66 local_irq_save(efi_flags); 68 local_irq_save(efi_flags);
67 vaddress = (unsigned long)__va(0x0UL); 69
68 save_pgd = *pgd_offset_k(0x0UL); 70 n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE);
69 set_pgd(pgd_offset_k(0x0UL), *pgd_offset_k(vaddress)); 71 save_pgd = kmalloc(n_pgds * sizeof(pgd_t), GFP_KERNEL);
72
73 for (pgd = 0; pgd < n_pgds; pgd++) {
74 save_pgd[pgd] = *pgd_offset_k(pgd * PGDIR_SIZE);
75 vaddress = (unsigned long)__va(pgd * PGDIR_SIZE);
76 set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), *pgd_offset_k(vaddress));
77 }
70 __flush_tlb_all(); 78 __flush_tlb_all();
71} 79}
72 80
@@ -75,7 +83,11 @@ void __init efi_call_phys_epilog(void)
75 /* 83 /*
76 * After the lock is released, the original page table is restored. 84 * After the lock is released, the original page table is restored.
77 */ 85 */
78 set_pgd(pgd_offset_k(0x0UL), save_pgd); 86 int pgd;
87 int n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE);
88 for (pgd = 0; pgd < n_pgds; pgd++)
89 set_pgd(pgd_offset_k(pgd * PGDIR_SIZE), save_pgd[pgd]);
90 kfree(save_pgd);
79 __flush_tlb_all(); 91 __flush_tlb_all();
80 local_irq_restore(efi_flags); 92 local_irq_restore(efi_flags);
81 early_code_mapping_set_exec(0); 93 early_code_mapping_set_exec(0);
diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c
index 3769079874d..a09ecb9582b 100644
--- a/arch/x86/power/hibernate_32.c
+++ b/arch/x86/power/hibernate_32.c
@@ -130,8 +130,6 @@ static int resume_physical_mapping_init(pgd_t *pgd_base)
130 } 130 }
131 } 131 }
132 132
133 resume_map_numa_kva(pgd_base);
134
135 return 0; 133 return 0;
136} 134}
137 135
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index cc9b1e182fc..d99537fb06a 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -313,7 +313,6 @@ static noinline void xen_spin_unlock_slow(struct xen_spinlock *xl)
313 if (per_cpu(lock_spinners, cpu) == xl) { 313 if (per_cpu(lock_spinners, cpu) == xl) {
314 ADD_STATS(released_slow_kicked, 1); 314 ADD_STATS(released_slow_kicked, 1);
315 xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR); 315 xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
316 break;
317 } 316 }
318 } 317 }
319} 318}
diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S
index b040b0e518c..7328f71651e 100644
--- a/arch/x86/xen/xen-asm_32.S
+++ b/arch/x86/xen/xen-asm_32.S
@@ -88,11 +88,11 @@ ENTRY(xen_iret)
88 */ 88 */
89#ifdef CONFIG_SMP 89#ifdef CONFIG_SMP
90 GET_THREAD_INFO(%eax) 90 GET_THREAD_INFO(%eax)
91 movl TI_cpu(%eax), %eax 91 movl %ss:TI_cpu(%eax), %eax
92 movl __per_cpu_offset(,%eax,4), %eax 92 movl %ss:__per_cpu_offset(,%eax,4), %eax
93 mov xen_vcpu(%eax), %eax 93 mov %ss:xen_vcpu(%eax), %eax
94#else 94#else
95 movl xen_vcpu, %eax 95 movl %ss:xen_vcpu, %eax
96#endif 96#endif
97 97
98 /* check IF state we're restoring */ 98 /* check IF state we're restoring */
@@ -105,11 +105,11 @@ ENTRY(xen_iret)
105 * resuming the code, so we don't have to be worried about 105 * resuming the code, so we don't have to be worried about
106 * being preempted to another CPU. 106 * being preempted to another CPU.
107 */ 107 */
108 setz XEN_vcpu_info_mask(%eax) 108 setz %ss:XEN_vcpu_info_mask(%eax)
109xen_iret_start_crit: 109xen_iret_start_crit:
110 110
111 /* check for unmasked and pending */ 111 /* check for unmasked and pending */
112 cmpw $0x0001, XEN_vcpu_info_pending(%eax) 112 cmpw $0x0001, %ss:XEN_vcpu_info_pending(%eax)
113 113
114 /* 114 /*
115 * If there's something pending, mask events again so we can 115 * If there's something pending, mask events again so we can
@@ -117,7 +117,7 @@ xen_iret_start_crit:
117 * touch XEN_vcpu_info_mask. 117 * touch XEN_vcpu_info_mask.
118 */ 118 */
119 jne 1f 119 jne 1f
120 movb $1, XEN_vcpu_info_mask(%eax) 120 movb $1, %ss:XEN_vcpu_info_mask(%eax)
121 121
1221: popl %eax 1221: popl %eax
123 123
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 431ab11c8c1..65976cb77d9 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -991,6 +991,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
991 return -EINVAL; 991 return -EINVAL;
992 } 992 }
993 993
994 if (!dev)
995 return -EINVAL;
996
994 dev->cpu = pr->id; 997 dev->cpu = pr->id;
995 for (i = 0; i < CPUIDLE_STATE_MAX; i++) { 998 for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
996 dev->states[i].name[0] = '\0'; 999 dev->states[i].name[0] = '\0';
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 8cb97421173..ea1fe0a2d37 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -789,8 +789,8 @@ acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,
789static void acpi_bus_set_run_wake_flags(struct acpi_device *device) 789static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
790{ 790{
791 struct acpi_device_id button_device_ids[] = { 791 struct acpi_device_id button_device_ids[] = {
792 {"PNP0C0D", 0},
793 {"PNP0C0C", 0}, 792 {"PNP0C0C", 0},
793 {"PNP0C0D", 0},
794 {"PNP0C0E", 0}, 794 {"PNP0C0E", 0},
795 {"", 0}, 795 {"", 0},
796 }; 796 };
@@ -802,6 +802,11 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
802 /* Power button, Lid switch always enable wakeup */ 802 /* Power button, Lid switch always enable wakeup */
803 if (!acpi_match_device_ids(device, button_device_ids)) { 803 if (!acpi_match_device_ids(device, button_device_ids)) {
804 device->wakeup.flags.run_wake = 1; 804 device->wakeup.flags.run_wake = 1;
805 if (!acpi_match_device_ids(device, &button_device_ids[1])) {
806 /* Do not use Lid/sleep button for S5 wakeup */
807 if (device->wakeup.sleep_state == ACPI_STATE_S5)
808 device->wakeup.sleep_state = ACPI_STATE_S4;
809 }
805 device_set_wakeup_capable(&device->dev, true); 810 device_set_wakeup_capable(&device->dev, true);
806 return; 811 return;
807 } 812 }
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 83002506027..75a8d0f2499 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -402,6 +402,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
402 /* Promise */ 402 /* Promise */
403 { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ 403 { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
404 404
405 /* Asmedia */
406 { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
407 { PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */
408 { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
409 { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
410
405 /* Generic, PCI class code for AHCI */ 411 /* Generic, PCI class code for AHCI */
406 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 412 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
407 PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, 413 PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 600ede0c072..5a72e36a314 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2543,6 +2543,7 @@ int ata_bus_probe(struct ata_port *ap)
2543 * bus as we may be talking too fast. 2543 * bus as we may be talking too fast.
2544 */ 2544 */
2545 dev->pio_mode = XFER_PIO_0; 2545 dev->pio_mode = XFER_PIO_0;
2546 dev->dma_mode = 0xff;
2546 2547
2547 /* If the controller has a pio mode setup function 2548 /* If the controller has a pio mode setup function
2548 * then use it to set the chipset to rights. Don't 2549 * then use it to set the chipset to rights. Don't
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 311c92d1db2..1cbb0043638 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2602,6 +2602,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
2602 * bus as we may be talking too fast. 2602 * bus as we may be talking too fast.
2603 */ 2603 */
2604 dev->pio_mode = XFER_PIO_0; 2604 dev->pio_mode = XFER_PIO_0;
2605 dev->dma_mode = 0xff;
2605 2606
2606 /* If the controller has a pio mode setup function 2607 /* If the controller has a pio mode setup function
2607 * then use it to set the chipset to rights. Don't 2608 * then use it to set the chipset to rights. Don't
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 927f968e99d..3b42a5d6efd 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -308,7 +308,8 @@ ata_scsi_activity_show(struct device *dev, struct device_attribute *attr,
308 struct ata_port *ap = ata_shost_to_port(sdev->host); 308 struct ata_port *ap = ata_shost_to_port(sdev->host);
309 struct ata_device *atadev = ata_scsi_find_dev(ap, sdev); 309 struct ata_device *atadev = ata_scsi_find_dev(ap, sdev);
310 310
311 if (ap->ops->sw_activity_show && (ap->flags & ATA_FLAG_SW_ACTIVITY)) 311 if (atadev && ap->ops->sw_activity_show &&
312 (ap->flags & ATA_FLAG_SW_ACTIVITY))
312 return ap->ops->sw_activity_show(atadev, buf); 313 return ap->ops->sw_activity_show(atadev, buf);
313 return -EINVAL; 314 return -EINVAL;
314} 315}
@@ -323,7 +324,8 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
323 enum sw_activity val; 324 enum sw_activity val;
324 int rc; 325 int rc;
325 326
326 if (ap->ops->sw_activity_store && (ap->flags & ATA_FLAG_SW_ACTIVITY)) { 327 if (atadev && ap->ops->sw_activity_store &&
328 (ap->flags & ATA_FLAG_SW_ACTIVITY)) {
327 val = simple_strtoul(buf, NULL, 0); 329 val = simple_strtoul(buf, NULL, 0);
328 switch (val) { 330 switch (val) {
329 case OFF: case BLINK_ON: case BLINK_OFF: 331 case OFF: case BLINK_ON: case BLINK_OFF:
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index a004b1e0ea6..ca4646aa0d6 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -147,6 +147,10 @@ struct pdc_port_priv {
147 dma_addr_t pkt_dma; 147 dma_addr_t pkt_dma;
148}; 148};
149 149
150struct pdc_host_priv {
151 spinlock_t hard_reset_lock;
152};
153
150static int pdc_sata_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); 154static int pdc_sata_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
151static int pdc_sata_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); 155static int pdc_sata_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
152static int pdc_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 156static int pdc_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -801,9 +805,10 @@ static void pdc_hard_reset_port(struct ata_port *ap)
801 void __iomem *host_mmio = ap->host->iomap[PDC_MMIO_BAR]; 805 void __iomem *host_mmio = ap->host->iomap[PDC_MMIO_BAR];
802 void __iomem *pcictl_b1_mmio = host_mmio + PDC_PCI_CTL + 1; 806 void __iomem *pcictl_b1_mmio = host_mmio + PDC_PCI_CTL + 1;
803 unsigned int ata_no = pdc_ata_port_to_ata_no(ap); 807 unsigned int ata_no = pdc_ata_port_to_ata_no(ap);
808 struct pdc_host_priv *hpriv = ap->host->private_data;
804 u8 tmp; 809 u8 tmp;
805 810
806 spin_lock(&ap->host->lock); 811 spin_lock(&hpriv->hard_reset_lock);
807 812
808 tmp = readb(pcictl_b1_mmio); 813 tmp = readb(pcictl_b1_mmio);
809 tmp &= ~(0x10 << ata_no); 814 tmp &= ~(0x10 << ata_no);
@@ -814,7 +819,7 @@ static void pdc_hard_reset_port(struct ata_port *ap)
814 writeb(tmp, pcictl_b1_mmio); 819 writeb(tmp, pcictl_b1_mmio);
815 readb(pcictl_b1_mmio); /* flush */ 820 readb(pcictl_b1_mmio); /* flush */
816 821
817 spin_unlock(&ap->host->lock); 822 spin_unlock(&hpriv->hard_reset_lock);
818} 823}
819 824
820static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class, 825static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class,
@@ -1183,6 +1188,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev,
1183 const struct ata_port_info *pi = &pdc_port_info[ent->driver_data]; 1188 const struct ata_port_info *pi = &pdc_port_info[ent->driver_data];
1184 const struct ata_port_info *ppi[PDC_MAX_PORTS]; 1189 const struct ata_port_info *ppi[PDC_MAX_PORTS];
1185 struct ata_host *host; 1190 struct ata_host *host;
1191 struct pdc_host_priv *hpriv;
1186 void __iomem *host_mmio; 1192 void __iomem *host_mmio;
1187 int n_ports, i, rc; 1193 int n_ports, i, rc;
1188 int is_sataii_tx4; 1194 int is_sataii_tx4;
@@ -1220,6 +1226,11 @@ static int pdc_ata_init_one(struct pci_dev *pdev,
1220 dev_printk(KERN_ERR, &pdev->dev, "failed to allocate host\n"); 1226 dev_printk(KERN_ERR, &pdev->dev, "failed to allocate host\n");
1221 return -ENOMEM; 1227 return -ENOMEM;
1222 } 1228 }
1229 hpriv = devm_kzalloc(&pdev->dev, sizeof *hpriv, GFP_KERNEL);
1230 if (!hpriv)
1231 return -ENOMEM;
1232 spin_lock_init(&hpriv->hard_reset_lock);
1233 host->private_data = hpriv;
1223 host->iomap = pcim_iomap_table(pdev); 1234 host->iomap = pcim_iomap_table(pdev);
1224 1235
1225 is_sataii_tx4 = pdc_is_sataii_tx4(pi->flags); 1236 is_sataii_tx4 = pdc_is_sataii_tx4(pi->flags);
diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h
index 077735e0e04..b2778e75e31 100644
--- a/drivers/atm/iphase.h
+++ b/drivers/atm/iphase.h
@@ -636,82 +636,82 @@ struct rx_buf_desc {
636#define SEG_BASE IPHASE5575_FRAG_CONTROL_REG_BASE 636#define SEG_BASE IPHASE5575_FRAG_CONTROL_REG_BASE
637#define REASS_BASE IPHASE5575_REASS_CONTROL_REG_BASE 637#define REASS_BASE IPHASE5575_REASS_CONTROL_REG_BASE
638 638
639typedef volatile u_int freg_t; 639typedef volatile u_int ffreg_t;
640typedef u_int rreg_t; 640typedef u_int rreg_t;
641 641
642typedef struct _ffredn_t { 642typedef struct _ffredn_t {
643 freg_t idlehead_high; /* Idle cell header (high) */ 643 ffreg_t idlehead_high; /* Idle cell header (high) */
644 freg_t idlehead_low; /* Idle cell header (low) */ 644 ffreg_t idlehead_low; /* Idle cell header (low) */
645 freg_t maxrate; /* Maximum rate */ 645 ffreg_t maxrate; /* Maximum rate */
646 freg_t stparms; /* Traffic Management Parameters */ 646 ffreg_t stparms; /* Traffic Management Parameters */
647 freg_t abrubr_abr; /* ABRUBR Priority Byte 1, TCR Byte 0 */ 647 ffreg_t abrubr_abr; /* ABRUBR Priority Byte 1, TCR Byte 0 */
648 freg_t rm_type; /* */ 648 ffreg_t rm_type; /* */
649 u_int filler5[0x17 - 0x06]; 649 u_int filler5[0x17 - 0x06];
650 freg_t cmd_reg; /* Command register */ 650 ffreg_t cmd_reg; /* Command register */
651 u_int filler18[0x20 - 0x18]; 651 u_int filler18[0x20 - 0x18];
652 freg_t cbr_base; /* CBR Pointer Base */ 652 ffreg_t cbr_base; /* CBR Pointer Base */
653 freg_t vbr_base; /* VBR Pointer Base */ 653 ffreg_t vbr_base; /* VBR Pointer Base */
654 freg_t abr_base; /* ABR Pointer Base */ 654 ffreg_t abr_base; /* ABR Pointer Base */
655 freg_t ubr_base; /* UBR Pointer Base */ 655 ffreg_t ubr_base; /* UBR Pointer Base */
656 u_int filler24; 656 u_int filler24;
657 freg_t vbrwq_base; /* VBR Wait Queue Base */ 657 ffreg_t vbrwq_base; /* VBR Wait Queue Base */
658 freg_t abrwq_base; /* ABR Wait Queue Base */ 658 ffreg_t abrwq_base; /* ABR Wait Queue Base */
659 freg_t ubrwq_base; /* UBR Wait Queue Base */ 659 ffreg_t ubrwq_base; /* UBR Wait Queue Base */
660 freg_t vct_base; /* Main VC Table Base */ 660 ffreg_t vct_base; /* Main VC Table Base */
661 freg_t vcte_base; /* Extended Main VC Table Base */ 661 ffreg_t vcte_base; /* Extended Main VC Table Base */
662 u_int filler2a[0x2C - 0x2A]; 662 u_int filler2a[0x2C - 0x2A];
663 freg_t cbr_tab_beg; /* CBR Table Begin */ 663 ffreg_t cbr_tab_beg; /* CBR Table Begin */
664 freg_t cbr_tab_end; /* CBR Table End */ 664 ffreg_t cbr_tab_end; /* CBR Table End */
665 freg_t cbr_pointer; /* CBR Pointer */ 665 ffreg_t cbr_pointer; /* CBR Pointer */
666 u_int filler2f[0x30 - 0x2F]; 666 u_int filler2f[0x30 - 0x2F];
667 freg_t prq_st_adr; /* Packet Ready Queue Start Address */ 667 ffreg_t prq_st_adr; /* Packet Ready Queue Start Address */
668 freg_t prq_ed_adr; /* Packet Ready Queue End Address */ 668 ffreg_t prq_ed_adr; /* Packet Ready Queue End Address */
669 freg_t prq_rd_ptr; /* Packet Ready Queue read pointer */ 669 ffreg_t prq_rd_ptr; /* Packet Ready Queue read pointer */
670 freg_t prq_wr_ptr; /* Packet Ready Queue write pointer */ 670 ffreg_t prq_wr_ptr; /* Packet Ready Queue write pointer */
671 freg_t tcq_st_adr; /* Transmit Complete Queue Start Address*/ 671 ffreg_t tcq_st_adr; /* Transmit Complete Queue Start Address*/
672 freg_t tcq_ed_adr; /* Transmit Complete Queue End Address */ 672 ffreg_t tcq_ed_adr; /* Transmit Complete Queue End Address */
673 freg_t tcq_rd_ptr; /* Transmit Complete Queue read pointer */ 673 ffreg_t tcq_rd_ptr; /* Transmit Complete Queue read pointer */
674 freg_t tcq_wr_ptr; /* Transmit Complete Queue write pointer*/ 674 ffreg_t tcq_wr_ptr; /* Transmit Complete Queue write pointer*/
675 u_int filler38[0x40 - 0x38]; 675 u_int filler38[0x40 - 0x38];
676 freg_t queue_base; /* Base address for PRQ and TCQ */ 676 ffreg_t queue_base; /* Base address for PRQ and TCQ */
677 freg_t desc_base; /* Base address of descriptor table */ 677 ffreg_t desc_base; /* Base address of descriptor table */
678 u_int filler42[0x45 - 0x42]; 678 u_int filler42[0x45 - 0x42];
679 freg_t mode_reg_0; /* Mode register 0 */ 679 ffreg_t mode_reg_0; /* Mode register 0 */
680 freg_t mode_reg_1; /* Mode register 1 */ 680 ffreg_t mode_reg_1; /* Mode register 1 */
681 freg_t intr_status_reg;/* Interrupt Status register */ 681 ffreg_t intr_status_reg;/* Interrupt Status register */
682 freg_t mask_reg; /* Mask Register */ 682 ffreg_t mask_reg; /* Mask Register */
683 freg_t cell_ctr_high1; /* Total cell transfer count (high) */ 683 ffreg_t cell_ctr_high1; /* Total cell transfer count (high) */
684 freg_t cell_ctr_lo1; /* Total cell transfer count (low) */ 684 ffreg_t cell_ctr_lo1; /* Total cell transfer count (low) */
685 freg_t state_reg; /* Status register */ 685 ffreg_t state_reg; /* Status register */
686 u_int filler4c[0x58 - 0x4c]; 686 u_int filler4c[0x58 - 0x4c];
687 freg_t curr_desc_num; /* Contains the current descriptor num */ 687 ffreg_t curr_desc_num; /* Contains the current descriptor num */
688 freg_t next_desc; /* Next descriptor */ 688 ffreg_t next_desc; /* Next descriptor */
689 freg_t next_vc; /* Next VC */ 689 ffreg_t next_vc; /* Next VC */
690 u_int filler5b[0x5d - 0x5b]; 690 u_int filler5b[0x5d - 0x5b];
691 freg_t present_slot_cnt;/* Present slot count */ 691 ffreg_t present_slot_cnt;/* Present slot count */
692 u_int filler5e[0x6a - 0x5e]; 692 u_int filler5e[0x6a - 0x5e];
693 freg_t new_desc_num; /* New descriptor number */ 693 ffreg_t new_desc_num; /* New descriptor number */
694 freg_t new_vc; /* New VC */ 694 ffreg_t new_vc; /* New VC */
695 freg_t sched_tbl_ptr; /* Schedule table pointer */ 695 ffreg_t sched_tbl_ptr; /* Schedule table pointer */
696 freg_t vbrwq_wptr; /* VBR wait queue write pointer */ 696 ffreg_t vbrwq_wptr; /* VBR wait queue write pointer */
697 freg_t vbrwq_rptr; /* VBR wait queue read pointer */ 697 ffreg_t vbrwq_rptr; /* VBR wait queue read pointer */
698 freg_t abrwq_wptr; /* ABR wait queue write pointer */ 698 ffreg_t abrwq_wptr; /* ABR wait queue write pointer */
699 freg_t abrwq_rptr; /* ABR wait queue read pointer */ 699 ffreg_t abrwq_rptr; /* ABR wait queue read pointer */
700 freg_t ubrwq_wptr; /* UBR wait queue write pointer */ 700 ffreg_t ubrwq_wptr; /* UBR wait queue write pointer */
701 freg_t ubrwq_rptr; /* UBR wait queue read pointer */ 701 ffreg_t ubrwq_rptr; /* UBR wait queue read pointer */
702 freg_t cbr_vc; /* CBR VC */ 702 ffreg_t cbr_vc; /* CBR VC */
703 freg_t vbr_sb_vc; /* VBR SB VC */ 703 ffreg_t vbr_sb_vc; /* VBR SB VC */
704 freg_t abr_sb_vc; /* ABR SB VC */ 704 ffreg_t abr_sb_vc; /* ABR SB VC */
705 freg_t ubr_sb_vc; /* UBR SB VC */ 705 ffreg_t ubr_sb_vc; /* UBR SB VC */
706 freg_t vbr_next_link; /* VBR next link */ 706 ffreg_t vbr_next_link; /* VBR next link */
707 freg_t abr_next_link; /* ABR next link */ 707 ffreg_t abr_next_link; /* ABR next link */
708 freg_t ubr_next_link; /* UBR next link */ 708 ffreg_t ubr_next_link; /* UBR next link */
709 u_int filler7a[0x7c-0x7a]; 709 u_int filler7a[0x7c-0x7a];
710 freg_t out_rate_head; /* Out of rate head */ 710 ffreg_t out_rate_head; /* Out of rate head */
711 u_int filler7d[0xca-0x7d]; /* pad out to full address space */ 711 u_int filler7d[0xca-0x7d]; /* pad out to full address space */
712 freg_t cell_ctr_high1_nc;/* Total cell transfer count (high) */ 712 ffreg_t cell_ctr_high1_nc;/* Total cell transfer count (high) */
713 freg_t cell_ctr_lo1_nc;/* Total cell transfer count (low) */ 713 ffreg_t cell_ctr_lo1_nc;/* Total cell transfer count (low) */
714 u_int fillercc[0x100-0xcc]; /* pad out to full address space */ 714 u_int fillercc[0x100-0xcc]; /* pad out to full address space */
715} ffredn_t; 715} ffredn_t;
716 716
717typedef struct _rfredn_t { 717typedef struct _rfredn_t {
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 000e7b2006f..8b8e8c06f29 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -289,7 +289,7 @@ int bus_for_each_dev(struct bus_type *bus, struct device *start,
289 struct device *dev; 289 struct device *dev;
290 int error = 0; 290 int error = 0;
291 291
292 if (!bus) 292 if (!bus || !bus->p)
293 return -EINVAL; 293 return -EINVAL;
294 294
295 klist_iter_init_node(&bus->p->klist_devices, &i, 295 klist_iter_init_node(&bus->p->klist_devices, &i,
@@ -323,7 +323,7 @@ struct device *bus_find_device(struct bus_type *bus,
323 struct klist_iter i; 323 struct klist_iter i;
324 struct device *dev; 324 struct device *dev;
325 325
326 if (!bus) 326 if (!bus || !bus->p)
327 return NULL; 327 return NULL;
328 328
329 klist_iter_init_node(&bus->p->klist_devices, &i, 329 klist_iter_init_node(&bus->p->klist_devices, &i,
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index db195abad69..e49ddd0aea1 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -1,5 +1,5 @@
1/* Copyright (c) 2007 Coraid, Inc. See COPYING for GPL terms. */ 1/* Copyright (c) 2007 Coraid, Inc. See COPYING for GPL terms. */
2#define VERSION "47" 2#define VERSION "47q"
3#define AOE_MAJOR 152 3#define AOE_MAJOR 152
4#define DEVICE_NAME "aoe" 4#define DEVICE_NAME "aoe"
5 5
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 528f6318ded..2a0fdaeefcd 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -277,8 +277,6 @@ aoeblk_gdalloc(void *vp)
277 goto err_mempool; 277 goto err_mempool;
278 blk_queue_make_request(d->blkq, aoeblk_make_request); 278 blk_queue_make_request(d->blkq, aoeblk_make_request);
279 d->blkq->backing_dev_info.name = "aoe"; 279 d->blkq->backing_dev_info.name = "aoe";
280 if (bdi_init(&d->blkq->backing_dev_info))
281 goto err_blkq;
282 spin_lock_irqsave(&d->lock, flags); 280 spin_lock_irqsave(&d->lock, flags);
283 gd->major = AOE_MAJOR; 281 gd->major = AOE_MAJOR;
284 gd->first_minor = d->sysminor * AOE_PARTITIONS; 282 gd->first_minor = d->sysminor * AOE_PARTITIONS;
@@ -299,9 +297,6 @@ aoeblk_gdalloc(void *vp)
299 aoedisk_add_sysfs(d); 297 aoedisk_add_sysfs(d);
300 return; 298 return;
301 299
302err_blkq:
303 blk_cleanup_queue(d->blkq);
304 d->blkq = NULL;
305err_mempool: 300err_mempool:
306 mempool_destroy(d->bufpool); 301 mempool_destroy(d->bufpool);
307err_disk: 302err_disk:
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 3424d675b76..e59f53679d6 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -37,6 +37,7 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
37 const int rw = bio_data_dir(bio); 37 const int rw = bio_data_dir(bio);
38 int cpu; 38 int cpu;
39 cpu = part_stat_lock(); 39 cpu = part_stat_lock();
40 part_round_stats(cpu, &mdev->vdisk->part0);
40 part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]); 41 part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
41 part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio)); 42 part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio));
42 part_inc_in_flight(&mdev->vdisk->part0, rw); 43 part_inc_in_flight(&mdev->vdisk->part0, rw);
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 48e8fee9f2d..94f6ae2bd0c 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -461,7 +461,7 @@ static int generic_request(struct vdc_port *port, u8 op, void *buf, int len)
461 int op_len, err; 461 int op_len, err;
462 void *req_buf; 462 void *req_buf;
463 463
464 if (!(((u64)1 << ((u64)op - 1)) & port->operations)) 464 if (!(((u64)1 << (u64)op) & port->operations))
465 return -EOPNOTSUPP; 465 return -EOPNOTSUPP;
466 466
467 switch (op) { 467 switch (op) {
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index 6cc0db1bf52..97ded2552d9 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -400,6 +400,7 @@ static int xen_blkbk_remove(struct xenbus_device *dev)
400 be->blkif = NULL; 400 be->blkif = NULL;
401 } 401 }
402 402
403 kfree(be->mode);
403 kfree(be); 404 kfree(be);
404 dev_set_drvdata(&dev->dev, NULL); 405 dev_set_drvdata(&dev->dev, NULL);
405 return 0; 406 return 0;
@@ -482,6 +483,7 @@ static void backend_changed(struct xenbus_watch *watch,
482 = container_of(watch, struct backend_info, backend_watch); 483 = container_of(watch, struct backend_info, backend_watch);
483 struct xenbus_device *dev = be->dev; 484 struct xenbus_device *dev = be->dev;
484 int cdrom = 0; 485 int cdrom = 0;
486 unsigned long handle;
485 char *device_type; 487 char *device_type;
486 488
487 DPRINTK(""); 489 DPRINTK("");
@@ -501,10 +503,10 @@ static void backend_changed(struct xenbus_watch *watch,
501 return; 503 return;
502 } 504 }
503 505
504 if ((be->major || be->minor) && 506 if (be->major | be->minor) {
505 ((be->major != major) || (be->minor != minor))) { 507 if (be->major != major || be->minor != minor)
506 pr_warn(DRV_PFX "changing physical device (from %x:%x to %x:%x) not supported.\n", 508 pr_warn(DRV_PFX "changing physical device (from %x:%x to %x:%x) not supported.\n",
507 be->major, be->minor, major, minor); 509 be->major, be->minor, major, minor);
508 return; 510 return;
509 } 511 }
510 512
@@ -522,36 +524,33 @@ static void backend_changed(struct xenbus_watch *watch,
522 kfree(device_type); 524 kfree(device_type);
523 } 525 }
524 526
525 if (be->major == 0 && be->minor == 0) { 527 /* Front end dir is a number, which is used as the handle. */
526 /* Front end dir is a number, which is used as the handle. */ 528 err = strict_strtoul(strrchr(dev->otherend, '/') + 1, 0, &handle);
527 529 if (err)
528 char *p = strrchr(dev->otherend, '/') + 1; 530 return;
529 long handle;
530 err = strict_strtoul(p, 0, &handle);
531 if (err)
532 return;
533 531
534 be->major = major; 532 be->major = major;
535 be->minor = minor; 533 be->minor = minor;
536 534
537 err = xen_vbd_create(be->blkif, handle, major, minor, 535 err = xen_vbd_create(be->blkif, handle, major, minor,
538 (NULL == strchr(be->mode, 'w')), cdrom); 536 !strchr(be->mode, 'w'), cdrom);
539 if (err) {
540 be->major = 0;
541 be->minor = 0;
542 xenbus_dev_fatal(dev, err, "creating vbd structure");
543 return;
544 }
545 537
538 if (err)
539 xenbus_dev_fatal(dev, err, "creating vbd structure");
540 else {
546 err = xenvbd_sysfs_addif(dev); 541 err = xenvbd_sysfs_addif(dev);
547 if (err) { 542 if (err) {
548 xen_vbd_free(&be->blkif->vbd); 543 xen_vbd_free(&be->blkif->vbd);
549 be->major = 0;
550 be->minor = 0;
551 xenbus_dev_fatal(dev, err, "creating sysfs entries"); 544 xenbus_dev_fatal(dev, err, "creating sysfs entries");
552 return;
553 } 545 }
546 }
554 547
548 if (err) {
549 kfree(be->mode);
550 be->mode = NULL;
551 be->major = 0;
552 be->minor = 0;
553 } else {
555 /* We're potentially connected now */ 554 /* We're potentially connected now */
556 xen_update_blkif_status(be->blkif); 555 xen_update_blkif_status(be->blkif);
557 } 556 }
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index fb68b129537..a95256a3a49 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1750,7 +1750,8 @@ static void virtcons_remove(struct virtio_device *vdev)
1750 /* Disable interrupts for vqs */ 1750 /* Disable interrupts for vqs */
1751 vdev->config->reset(vdev); 1751 vdev->config->reset(vdev);
1752 /* Finish up work that's lined up */ 1752 /* Finish up work that's lined up */
1753 cancel_work_sync(&portdev->control_work); 1753 if (use_multiport(portdev))
1754 cancel_work_sync(&portdev->control_work);
1754 1755
1755 list_for_each_entry_safe(port, port2, &portdev->ports, list) 1756 list_for_each_entry_safe(port, port2, &portdev->ports, list)
1756 unplug_port(port); 1757 unplug_port(port);
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c
index 4abd089a094..605fd20b1e5 100644
--- a/drivers/dca/dca-core.c
+++ b/drivers/dca/dca-core.c
@@ -409,6 +409,11 @@ void unregister_dca_provider(struct dca_provider *dca, struct device *dev)
409 409
410 spin_lock_irqsave(&dca_lock, flags); 410 spin_lock_irqsave(&dca_lock, flags);
411 411
412 if (list_empty(&dca_domains)) {
413 spin_unlock_irqrestore(&dca_lock, flags);
414 return;
415 }
416
412 list_del(&dca->node); 417 list_del(&dca->node);
413 418
414 pci_rc = dca_pci_rc_from_dev(dev); 419 pci_rc = dca_pci_rc_from_dev(dev);
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index d845dc4b710..6e339269111 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -949,7 +949,7 @@ static int __devinit ioat_xor_val_self_test(struct ioatdma_device *device)
949 goto free_resources; 949 goto free_resources;
950 } 950 }
951 } 951 }
952 dma_sync_single_for_device(dev, dest_dma, PAGE_SIZE, DMA_TO_DEVICE); 952 dma_sync_single_for_device(dev, dest_dma, PAGE_SIZE, DMA_FROM_DEVICE);
953 953
954 /* skip validate if the capability is not present */ 954 /* skip validate if the capability is not present */
955 if (!dma_has_cap(DMA_XOR_VAL, dma_chan->device->cap_mask)) 955 if (!dma_has_cap(DMA_XOR_VAL, dma_chan->device->cap_mask))
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index 495198ad059..8cc8676fa21 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -257,7 +257,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,
257 struct edac_pci_dev_attribute *edac_pci_dev; 257 struct edac_pci_dev_attribute *edac_pci_dev;
258 edac_pci_dev = (struct edac_pci_dev_attribute *)attr; 258 edac_pci_dev = (struct edac_pci_dev_attribute *)attr;
259 259
260 if (edac_pci_dev->show) 260 if (edac_pci_dev->store)
261 return edac_pci_dev->store(edac_pci_dev->value, buffer, count); 261 return edac_pci_dev->store(edac_pci_dev->value, buffer, count);
262 return -EIO; 262 return -EIO;
263} 263}
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index 9f661e06931..812cea37a5b 100644
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -995,6 +995,10 @@ static void fw_device_init(struct work_struct *work)
995 ret = idr_pre_get(&fw_device_idr, GFP_KERNEL) ? 995 ret = idr_pre_get(&fw_device_idr, GFP_KERNEL) ?
996 idr_get_new(&fw_device_idr, device, &minor) : 996 idr_get_new(&fw_device_idr, device, &minor) :
997 -ENOMEM; 997 -ENOMEM;
998 if (minor >= 1 << MINORBITS) {
999 idr_remove(&fw_device_idr, minor);
1000 minor = -ENOSPC;
1001 }
998 up_write(&fw_device_rwsem); 1002 up_write(&fw_device_rwsem);
999 1003
1000 if (ret < 0) 1004 if (ret < 0)
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index b9762d07198..e74750bc0b7 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -863,8 +863,8 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context,
863 if (specifier_id == IANA_SPECIFIER_ID && ver == RFC2734_SW_VERSION) { 863 if (specifier_id == IANA_SPECIFIER_ID && ver == RFC2734_SW_VERSION) {
864 buf_ptr += 2; 864 buf_ptr += 2;
865 length -= IEEE1394_GASP_HDR_SIZE; 865 length -= IEEE1394_GASP_HDR_SIZE;
866 fwnet_incoming_packet(dev, buf_ptr, length, 866 fwnet_incoming_packet(dev, buf_ptr, length, source_node_id,
867 source_node_id, -1, true); 867 context->card->generation, true);
868 } 868 }
869 869
870 packet.payload_length = dev->rcv_buffer_size; 870 packet.payload_length = dev->rcv_buffer_size;
@@ -959,7 +959,12 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
959 break; 959 break;
960 } 960 }
961 961
962 skb_pull(skb, ptask->max_payload); 962 if (ptask->dest_node == IEEE1394_ALL_NODES) {
963 skb_pull(skb,
964 ptask->max_payload + IEEE1394_GASP_HDR_SIZE);
965 } else {
966 skb_pull(skb, ptask->max_payload);
967 }
963 if (ptask->outstanding_pkts > 1) { 968 if (ptask->outstanding_pkts > 1) {
964 fwnet_make_sf_hdr(&ptask->hdr, RFC2374_HDR_INTFRAG, 969 fwnet_make_sf_hdr(&ptask->hdr, RFC2374_HDR_INTFRAG,
965 dg_size, fg_off, datagram_label); 970 dg_size, fg_off, datagram_label);
@@ -1062,7 +1067,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)
1062 smp_rmb(); 1067 smp_rmb();
1063 node_id = dev->card->node_id; 1068 node_id = dev->card->node_id;
1064 1069
1065 p = skb_push(ptask->skb, 8); 1070 p = skb_push(ptask->skb, IEEE1394_GASP_HDR_SIZE);
1066 put_unaligned_be32(node_id << 16 | IANA_SPECIFIER_ID >> 8, p); 1071 put_unaligned_be32(node_id << 16 | IANA_SPECIFIER_ID >> 8, p);
1067 put_unaligned_be32((IANA_SPECIFIER_ID & 0xff) << 24 1072 put_unaligned_be32((IANA_SPECIFIER_ID & 0xff) << 24
1068 | RFC2734_SW_VERSION, &p[4]); 1073 | RFC2734_SW_VERSION, &p[4]);
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 02a52d13a46..66b631568cf 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -16,6 +16,7 @@
16 */ 16 */
17static char dmi_empty_string[] = " "; 17static char dmi_empty_string[] = " ";
18 18
19static u16 __initdata dmi_ver;
19/* 20/*
20 * Catch too early calls to dmi_check_system(): 21 * Catch too early calls to dmi_check_system():
21 */ 22 */
@@ -118,12 +119,12 @@ static int __init dmi_walk_early(void (*decode)(const struct dmi_header *,
118 return 0; 119 return 0;
119} 120}
120 121
121static int __init dmi_checksum(const u8 *buf) 122static int __init dmi_checksum(const u8 *buf, u8 len)
122{ 123{
123 u8 sum = 0; 124 u8 sum = 0;
124 int a; 125 int a;
125 126
126 for (a = 0; a < 15; a++) 127 for (a = 0; a < len; a++)
127 sum += buf[a]; 128 sum += buf[a];
128 129
129 return sum == 0; 130 return sum == 0;
@@ -161,8 +162,10 @@ static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, int inde
161 return; 162 return;
162 163
163 for (i = 0; i < 16 && (is_ff || is_00); i++) { 164 for (i = 0; i < 16 && (is_ff || is_00); i++) {
164 if(d[i] != 0x00) is_ff = 0; 165 if (d[i] != 0x00)
165 if(d[i] != 0xFF) is_00 = 0; 166 is_00 = 0;
167 if (d[i] != 0xFF)
168 is_ff = 0;
166 } 169 }
167 170
168 if (is_ff || is_00) 171 if (is_ff || is_00)
@@ -172,7 +175,15 @@ static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, int inde
172 if (!s) 175 if (!s)
173 return; 176 return;
174 177
175 sprintf(s, "%pUB", d); 178 /*
179 * As of version 2.6 of the SMBIOS specification, the first 3 fields of
180 * the UUID are supposed to be little-endian encoded. The specification
181 * says that this is the defacto standard.
182 */
183 if (dmi_ver >= 0x0206)
184 sprintf(s, "%pUL", d);
185 else
186 sprintf(s, "%pUB", d);
176 187
177 dmi_ident[slot] = s; 188 dmi_ident[slot] = s;
178} 189}
@@ -404,29 +415,57 @@ static int __init dmi_present(const char __iomem *p)
404 u8 buf[15]; 415 u8 buf[15];
405 416
406 memcpy_fromio(buf, p, 15); 417 memcpy_fromio(buf, p, 15);
407 if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) { 418 if (dmi_checksum(buf, 15)) {
408 dmi_num = (buf[13] << 8) | buf[12]; 419 dmi_num = (buf[13] << 8) | buf[12];
409 dmi_len = (buf[7] << 8) | buf[6]; 420 dmi_len = (buf[7] << 8) | buf[6];
410 dmi_base = (buf[11] << 24) | (buf[10] << 16) | 421 dmi_base = (buf[11] << 24) | (buf[10] << 16) |
411 (buf[9] << 8) | buf[8]; 422 (buf[9] << 8) | buf[8];
412 423
413 /*
414 * DMI version 0.0 means that the real version is taken from
415 * the SMBIOS version, which we don't know at this point.
416 */
417 if (buf[14] != 0)
418 printk(KERN_INFO "DMI %d.%d present.\n",
419 buf[14] >> 4, buf[14] & 0xF);
420 else
421 printk(KERN_INFO "DMI present.\n");
422 if (dmi_walk_early(dmi_decode) == 0) { 424 if (dmi_walk_early(dmi_decode) == 0) {
425 if (dmi_ver)
426 pr_info("SMBIOS %d.%d present.\n",
427 dmi_ver >> 8, dmi_ver & 0xFF);
428 else {
429 dmi_ver = (buf[14] & 0xF0) << 4 |
430 (buf[14] & 0x0F);
431 pr_info("Legacy DMI %d.%d present.\n",
432 dmi_ver >> 8, dmi_ver & 0xFF);
433 }
423 dmi_dump_ids(); 434 dmi_dump_ids();
424 return 0; 435 return 0;
425 } 436 }
426 } 437 }
438 dmi_ver = 0;
427 return 1; 439 return 1;
428} 440}
429 441
442static int __init smbios_present(const char __iomem *p)
443{
444 u8 buf[32];
445 int offset = 0;
446
447 memcpy_fromio(buf, p, 32);
448 if ((buf[5] < 32) && dmi_checksum(buf, buf[5])) {
449 dmi_ver = (buf[6] << 8) + buf[7];
450
451 /* Some BIOS report weird SMBIOS version, fix that up */
452 switch (dmi_ver) {
453 case 0x021F:
454 case 0x0221:
455 pr_debug("SMBIOS version fixup(2.%d->2.%d)\n",
456 dmi_ver & 0xFF, 3);
457 dmi_ver = 0x0203;
458 break;
459 case 0x0233:
460 pr_debug("SMBIOS version fixup(2.%d->2.%d)\n", 51, 6);
461 dmi_ver = 0x0206;
462 break;
463 }
464 offset = 16;
465 }
466 return dmi_present(buf + offset);
467}
468
430void __init dmi_scan_machine(void) 469void __init dmi_scan_machine(void)
431{ 470{
432 char __iomem *p, *q; 471 char __iomem *p, *q;
@@ -444,7 +483,7 @@ void __init dmi_scan_machine(void)
444 if (p == NULL) 483 if (p == NULL)
445 goto error; 484 goto error;
446 485
447 rc = dmi_present(p + 0x10); /* offset of _DMI_ string */ 486 rc = smbios_present(p);
448 dmi_iounmap(p, 32); 487 dmi_iounmap(p, 32);
449 if (!rc) { 488 if (!rc) {
450 dmi_available = 1; 489 dmi_available = 1;
@@ -462,7 +501,12 @@ void __init dmi_scan_machine(void)
462 goto error; 501 goto error;
463 502
464 for (q = p; q < p + 0x10000; q += 16) { 503 for (q = p; q < p + 0x10000; q += 16) {
465 rc = dmi_present(q); 504 if (memcmp(q, "_SM_", 4) == 0 && q - p <= 0xFFE0)
505 rc = smbios_present(q);
506 else if (memcmp(q, "_DMI_", 5) == 0)
507 rc = dmi_present(q);
508 else
509 continue;
466 if (!rc) { 510 if (!rc) {
467 dmi_available = 1; 511 dmi_available = 1;
468 dmi_iounmap(p, 0x10000); 512 dmi_iounmap(p, 0x10000);
diff --git a/drivers/gpu/drm/drm_usb.c b/drivers/gpu/drm/drm_usb.c
index 206d2300d87..0c853f5c9c8 100644
--- a/drivers/gpu/drm/drm_usb.c
+++ b/drivers/gpu/drm/drm_usb.c
@@ -18,7 +18,7 @@ int drm_get_usb_dev(struct usb_interface *interface,
18 18
19 usbdev = interface_to_usbdev(interface); 19 usbdev = interface_to_usbdev(interface);
20 dev->usbdev = usbdev; 20 dev->usbdev = usbdev;
21 dev->dev = &usbdev->dev; 21 dev->dev = &interface->dev;
22 22
23 mutex_lock(&drm_global_mutex); 23 mutex_lock(&drm_global_mutex);
24 24
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index bc927ae3164..490ab6b17cf 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -655,6 +655,8 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
655 total = 0; 655 total = 0;
656 for (i = 0; i < count; i++) { 656 for (i = 0; i < count; i++) {
657 struct drm_i915_gem_relocation_entry __user *user_relocs; 657 struct drm_i915_gem_relocation_entry __user *user_relocs;
658 u64 invalid_offset = (u64)-1;
659 int j;
658 660
659 user_relocs = (void __user *)(uintptr_t)exec[i].relocs_ptr; 661 user_relocs = (void __user *)(uintptr_t)exec[i].relocs_ptr;
660 662
@@ -665,6 +667,25 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
665 goto err; 667 goto err;
666 } 668 }
667 669
670 /* As we do not update the known relocation offsets after
671 * relocating (due to the complexities in lock handling),
672 * we need to mark them as invalid now so that we force the
673 * relocation processing next time. Just in case the target
674 * object is evicted and then rebound into its old
675 * presumed_offset before the next execbuffer - if that
676 * happened we would make the mistake of assuming that the
677 * relocations were valid.
678 */
679 for (j = 0; j < exec[i].relocation_count; j++) {
680 if (copy_to_user(&user_relocs[j].presumed_offset,
681 &invalid_offset,
682 sizeof(invalid_offset))) {
683 ret = -EFAULT;
684 mutex_lock(&dev->struct_mutex);
685 goto err;
686 }
687 }
688
668 reloc_offset[i] = total; 689 reloc_offset[i] = total;
669 total += exec[i].relocation_count; 690 total += exec[i].relocation_count;
670 } 691 }
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 557e007a0bc..5dc3b6d3932 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -27,6 +27,8 @@
27 27
28#define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a))) 28#define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a)))
29 29
30#define _MASKED_BIT_ENABLE(a) (((a) << 16) | (a))
31
30/* 32/*
31 * The Bridge device's PCI config space has information about the 33 * The Bridge device's PCI config space has information about the
32 * fb aperture size and the amount of pre-reserved memory. 34 * fb aperture size and the amount of pre-reserved memory.
@@ -354,6 +356,7 @@
354 * the enables for writing to the corresponding low bit. 356 * the enables for writing to the corresponding low bit.
355 */ 357 */
356#define _3D_CHICKEN 0x02084 358#define _3D_CHICKEN 0x02084
359#define _3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB (1 << 10)
357#define _3D_CHICKEN2 0x0208c 360#define _3D_CHICKEN2 0x0208c
358/* Disables pipelining of read flushes past the SF-WIZ interface. 361/* Disables pipelining of read flushes past the SF-WIZ interface.
359 * Required on all Ironlake steppings according to the B-Spec, but the 362 * Required on all Ironlake steppings according to the B-Spec, but the
@@ -2754,6 +2757,8 @@
2754#define _PFA_CTL_1 0x68080 2757#define _PFA_CTL_1 0x68080
2755#define _PFB_CTL_1 0x68880 2758#define _PFB_CTL_1 0x68880
2756#define PF_ENABLE (1<<31) 2759#define PF_ENABLE (1<<31)
2760#define PF_PIPE_SEL_MASK_IVB (3<<29)
2761#define PF_PIPE_SEL_IVB(pipe) ((pipe)<<29)
2757#define PF_FILTER_MASK (3<<23) 2762#define PF_FILTER_MASK (3<<23)
2758#define PF_FILTER_PROGRAMMED (0<<23) 2763#define PF_FILTER_PROGRAMMED (0<<23)
2759#define PF_FILTER_MED_3x3 (1<<23) 2764#define PF_FILTER_MED_3x3 (1<<23)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 36d76989fd7..11ecb0ca16a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2696,7 +2696,11 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
2696 * as some pre-programmed values are broken, 2696 * as some pre-programmed values are broken,
2697 * e.g. x201. 2697 * e.g. x201.
2698 */ 2698 */
2699 I915_WRITE(PF_CTL(pipe), PF_ENABLE | PF_FILTER_MED_3x3); 2699 if (IS_IVYBRIDGE(dev))
2700 I915_WRITE(PF_CTL(pipe), PF_ENABLE | PF_FILTER_MED_3x3 |
2701 PF_PIPE_SEL_IVB(pipe));
2702 else
2703 I915_WRITE(PF_CTL(pipe), PF_ENABLE | PF_FILTER_MED_3x3);
2700 I915_WRITE(PF_WIN_POS(pipe), dev_priv->pch_pf_pos); 2704 I915_WRITE(PF_WIN_POS(pipe), dev_priv->pch_pf_pos);
2701 I915_WRITE(PF_WIN_SZ(pipe), dev_priv->pch_pf_size); 2705 I915_WRITE(PF_WIN_SZ(pipe), dev_priv->pch_pf_size);
2702 } 2706 }
@@ -2894,6 +2898,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
2894 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 2898 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
2895 int pipe = intel_crtc->pipe; 2899 int pipe = intel_crtc->pipe;
2896 int plane = intel_crtc->plane; 2900 int plane = intel_crtc->plane;
2901 u32 pctl;
2897 2902
2898 if (!intel_crtc->active) 2903 if (!intel_crtc->active)
2899 return; 2904 return;
@@ -2910,6 +2915,13 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
2910 2915
2911 intel_disable_plane(dev_priv, plane, pipe); 2916 intel_disable_plane(dev_priv, plane, pipe);
2912 intel_disable_pipe(dev_priv, pipe); 2917 intel_disable_pipe(dev_priv, pipe);
2918
2919 /* Disable pannel fitter if it is on this pipe. */
2920 pctl = I915_READ(PFIT_CONTROL);
2921 if ((pctl & PFIT_ENABLE) &&
2922 ((pctl & PFIT_PIPE_MASK) >> PFIT_PIPE_SHIFT) == pipe)
2923 I915_WRITE(PFIT_CONTROL, 0);
2924
2913 intel_disable_pll(dev_priv, pipe); 2925 intel_disable_pll(dev_priv, pipe);
2914 2926
2915 intel_crtc->active = false; 2927 intel_crtc->active = false;
@@ -7408,6 +7420,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
7408 I915_READ(ILK_DISPLAY_CHICKEN2) | 7420 I915_READ(ILK_DISPLAY_CHICKEN2) |
7409 ILK_ELPIN_409_SELECT); 7421 ILK_ELPIN_409_SELECT);
7410 7422
7423 /* WaDisableHiZPlanesWhenMSAAEnabled */
7424 I915_WRITE(_3D_CHICKEN,
7425 _MASKED_BIT_ENABLE(_3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB));
7426
7411 I915_WRITE(WM3_LP_ILK, 0); 7427 I915_WRITE(WM3_LP_ILK, 0);
7412 I915_WRITE(WM2_LP_ILK, 0); 7428 I915_WRITE(WM2_LP_ILK, 0);
7413 I915_WRITE(WM1_LP_ILK, 0); 7429 I915_WRITE(WM1_LP_ILK, 0);
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 645f8aa3a64..eebf0028619 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -753,14 +753,6 @@ static const struct dmi_system_id intel_no_lvds[] = {
753 }, 753 },
754 { 754 {
755 .callback = intel_no_lvds_dmi_callback, 755 .callback = intel_no_lvds_dmi_callback,
756 .ident = "ZOTAC ZBOXSD-ID12/ID13",
757 .matches = {
758 DMI_MATCH(DMI_BOARD_VENDOR, "ZOTAC"),
759 DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"),
760 },
761 },
762 {
763 .callback = intel_no_lvds_dmi_callback,
764 .ident = "Gigabyte GA-D525TUD", 756 .ident = "Gigabyte GA-D525TUD",
765 .matches = { 757 .matches = {
766 DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."), 758 DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."),
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 314e2172a88..a75d290b4f9 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -1065,6 +1065,8 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav
1065 WREG32(EVERGREEN_D5VGA_CONTROL, 0); 1065 WREG32(EVERGREEN_D5VGA_CONTROL, 0);
1066 WREG32(EVERGREEN_D6VGA_CONTROL, 0); 1066 WREG32(EVERGREEN_D6VGA_CONTROL, 0);
1067 } 1067 }
1068 /* wait for the MC to settle */
1069 udelay(100);
1068} 1070}
1069 1071
1070void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save) 1072void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save)
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 859df6b5bca..2157e770d35 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -2338,6 +2338,14 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
2338 1), 2338 1),
2339 ATOM_DEVICE_CRT1_SUPPORT); 2339 ATOM_DEVICE_CRT1_SUPPORT);
2340 } 2340 }
2341 /* RV100 board with external TDMS bit mis-set.
2342 * Actually uses internal TMDS, clear the bit.
2343 */
2344 if (dev->pdev->device == 0x5159 &&
2345 dev->pdev->subsystem_vendor == 0x1014 &&
2346 dev->pdev->subsystem_device == 0x029A) {
2347 tmp &= ~(1 << 4);
2348 }
2341 if ((tmp >> 4) & 0x1) { 2349 if ((tmp >> 4) & 0x1) {
2342 devices |= ATOM_DEVICE_DFP2_SUPPORT; 2350 devices |= ATOM_DEVICE_DFP2_SUPPORT;
2343 radeon_add_legacy_encoder(dev, 2351 radeon_add_legacy_encoder(dev,
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index ed085ce90e9..0896faed9fd 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1158,8 +1158,10 @@ radeon_user_framebuffer_create(struct drm_device *dev,
1158 } 1158 }
1159 1159
1160 radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL); 1160 radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL);
1161 if (radeon_fb == NULL) 1161 if (radeon_fb == NULL) {
1162 drm_gem_object_unreference_unlocked(obj);
1162 return ERR_PTR(-ENOMEM); 1163 return ERR_PTR(-ENOMEM);
1164 }
1163 1165
1164 radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj); 1166 radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
1165 1167
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 81659539601..a9068031ef5 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -617,6 +617,14 @@ static enum drm_connector_status radeon_legacy_primary_dac_detect(struct drm_enc
617 enum drm_connector_status found = connector_status_disconnected; 617 enum drm_connector_status found = connector_status_disconnected;
618 bool color = true; 618 bool color = true;
619 619
620 /* just don't bother on RN50 those chip are often connected to remoting
621 * console hw and often we get failure to load detect those. So to make
622 * everyone happy report the encoder as always connected.
623 */
624 if (ASIC_IS_RN50(rdev)) {
625 return connector_status_connected;
626 }
627
620 /* save the regs we need */ 628 /* save the regs we need */
621 vclk_ecp_cntl = RREG32_PLL(RADEON_VCLK_ECP_CNTL); 629 vclk_ecp_cntl = RREG32_PLL(RADEON_VCLK_ECP_CNTL);
622 crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL); 630 crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL);
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 4a5abaf0a25..9227f4acd79 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -148,7 +148,7 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
148 return -EINVAL; 148 return -EINVAL;
149 return netlink_dump_start(nls, skb, nlh, 149 return netlink_dump_start(nls, skb, nlh,
150 client->cb_table[op].dump, 150 client->cb_table[op].dump,
151 NULL); 151 NULL, 0);
152 } 152 }
153 } 153 }
154 154
diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h
index 6fe79876009..6e3027387e2 100644
--- a/drivers/infiniband/hw/nes/nes.h
+++ b/drivers/infiniband/hw/nes/nes.h
@@ -511,6 +511,7 @@ void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *);
511int nes_destroy_cqp(struct nes_device *); 511int nes_destroy_cqp(struct nes_device *);
512int nes_nic_cm_xmit(struct sk_buff *, struct net_device *); 512int nes_nic_cm_xmit(struct sk_buff *, struct net_device *);
513void nes_recheck_link_status(struct work_struct *work); 513void nes_recheck_link_status(struct work_struct *work);
514void nes_terminate_timeout(unsigned long context);
514 515
515/* nes_nic.c */ 516/* nes_nic.c */
516struct net_device *nes_netdev_init(struct nes_device *, void __iomem *); 517struct net_device *nes_netdev_init(struct nes_device *, void __iomem *);
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 96fa9a4cafd..ba4814a21ab 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -75,7 +75,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
75static void process_critical_error(struct nes_device *nesdev); 75static void process_critical_error(struct nes_device *nesdev);
76static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number); 76static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number);
77static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode); 77static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode);
78static void nes_terminate_timeout(unsigned long context);
79static void nes_terminate_start_timer(struct nes_qp *nesqp); 78static void nes_terminate_start_timer(struct nes_qp *nesqp);
80 79
81#ifdef CONFIG_INFINIBAND_NES_DEBUG 80#ifdef CONFIG_INFINIBAND_NES_DEBUG
@@ -3496,7 +3495,7 @@ static void nes_terminate_received(struct nes_device *nesdev,
3496} 3495}
3497 3496
3498/* Timeout routine in case terminate fails to complete */ 3497/* Timeout routine in case terminate fails to complete */
3499static void nes_terminate_timeout(unsigned long context) 3498void nes_terminate_timeout(unsigned long context)
3500{ 3499{
3501 struct nes_qp *nesqp = (struct nes_qp *)(unsigned long)context; 3500 struct nes_qp *nesqp = (struct nes_qp *)(unsigned long)context;
3502 3501
@@ -3506,11 +3505,7 @@ static void nes_terminate_timeout(unsigned long context)
3506/* Set a timer in case hw cannot complete the terminate sequence */ 3505/* Set a timer in case hw cannot complete the terminate sequence */
3507static void nes_terminate_start_timer(struct nes_qp *nesqp) 3506static void nes_terminate_start_timer(struct nes_qp *nesqp)
3508{ 3507{
3509 init_timer(&nesqp->terminate_timer); 3508 mod_timer(&nesqp->terminate_timer, (jiffies + HZ));
3510 nesqp->terminate_timer.function = nes_terminate_timeout;
3511 nesqp->terminate_timer.expires = jiffies + HZ;
3512 nesqp->terminate_timer.data = (unsigned long)nesqp;
3513 add_timer(&nesqp->terminate_timer);
3514} 3509}
3515 3510
3516/** 3511/**
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 95ca93ceeda..59db49fbec8 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -1414,6 +1414,9 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1414 } 1414 }
1415 1415
1416 nesqp->sig_all = (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR); 1416 nesqp->sig_all = (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR);
1417 init_timer(&nesqp->terminate_timer);
1418 nesqp->terminate_timer.function = nes_terminate_timeout;
1419 nesqp->terminate_timer.data = (unsigned long)nesqp;
1417 1420
1418 /* update the QP table */ 1421 /* update the QP table */
1419 nesdev->nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = nesqp; 1422 nesdev->nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = nesqp;
@@ -1423,7 +1426,6 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1423 return &nesqp->ibqp; 1426 return &nesqp->ibqp;
1424} 1427}
1425 1428
1426
1427/** 1429/**
1428 * nes_clean_cq 1430 * nes_clean_cq
1429 */ 1431 */
@@ -2568,6 +2570,11 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
2568 return ibmr; 2570 return ibmr;
2569 case IWNES_MEMREG_TYPE_QP: 2571 case IWNES_MEMREG_TYPE_QP:
2570 case IWNES_MEMREG_TYPE_CQ: 2572 case IWNES_MEMREG_TYPE_CQ:
2573 if (!region->length) {
2574 nes_debug(NES_DBG_MR, "Unable to register zero length region for CQ\n");
2575 ib_umem_release(region);
2576 return ERR_PTR(-EINVAL);
2577 }
2571 nespbl = kzalloc(sizeof(*nespbl), GFP_KERNEL); 2578 nespbl = kzalloc(sizeof(*nespbl), GFP_KERNEL);
2572 if (!nespbl) { 2579 if (!nespbl) {
2573 nes_debug(NES_DBG_MR, "Unable to allocate PBL\n"); 2580 nes_debug(NES_DBG_MR, "Unable to allocate PBL\n");
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index d1dde6577fa..483ac00ae35 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -263,6 +263,8 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag,
263 CAPIMSG_APPID(data), CAPIMSG_MSGID(data), l, 263 CAPIMSG_APPID(data), CAPIMSG_MSGID(data), l,
264 CAPIMSG_CONTROL(data)); 264 CAPIMSG_CONTROL(data));
265 l -= 12; 265 l -= 12;
266 if (l <= 0)
267 return;
266 dbgline = kmalloc(3*l, GFP_ATOMIC); 268 dbgline = kmalloc(3*l, GFP_ATOMIC);
267 if (!dbgline) 269 if (!dbgline)
268 return; 270 return;
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 4cacdad2270..bd3b294eead 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1524,6 +1524,14 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl **param)
1524 if (copy_from_user(dmi, user, tmp.data_size)) 1524 if (copy_from_user(dmi, user, tmp.data_size))
1525 goto bad; 1525 goto bad;
1526 1526
1527 /*
1528 * Abort if something changed the ioctl data while it was being copied.
1529 */
1530 if (dmi->data_size != tmp.data_size) {
1531 DMERR("rejecting ioctl: data size modified while processing parameters");
1532 goto bad;
1533 }
1534
1527 /* Wipe the user buffer so we do not return it to userspace */ 1535 /* Wipe the user buffer so we do not return it to userspace */
1528 if (secure_data && clear_user(user, tmp.data_size)) 1536 if (secure_data && clear_user(user, tmp.data_size))
1529 goto bad; 1537 goto bad;
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 9cfb56d8cd8..62910ac90f6 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -775,8 +775,10 @@ static ssize_t show_protocols(struct device *device,
775 } else if (dev->raw) { 775 } else if (dev->raw) {
776 enabled = dev->raw->enabled_protocols; 776 enabled = dev->raw->enabled_protocols;
777 allowed = ir_raw_get_allowed_protocols(); 777 allowed = ir_raw_get_allowed_protocols();
778 } else 778 } else {
779 mutex_unlock(&dev->lock);
779 return -ENODEV; 780 return -ENODEV;
781 }
780 782
781 IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", 783 IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",
782 (long long)allowed, 784 (long long)allowed,
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index acf9dad686a..b36aadb6e70 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -18,6 +18,10 @@
18#include <linux/pm_runtime.h> 18#include <linux/pm_runtime.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20 20
21static struct device_type mfd_dev_type = {
22 .name = "mfd_device",
23};
24
21int mfd_cell_enable(struct platform_device *pdev) 25int mfd_cell_enable(struct platform_device *pdev)
22{ 26{
23 const struct mfd_cell *cell = mfd_get_cell(pdev); 27 const struct mfd_cell *cell = mfd_get_cell(pdev);
@@ -87,6 +91,7 @@ static int mfd_add_device(struct device *parent, int id,
87 goto fail_device; 91 goto fail_device;
88 92
89 pdev->dev.parent = parent; 93 pdev->dev.parent = parent;
94 pdev->dev.type = &mfd_dev_type;
90 95
91 if (cell->pdata_size) { 96 if (cell->pdata_size) {
92 ret = platform_device_add_data(pdev, 97 ret = platform_device_add_data(pdev,
@@ -182,10 +187,16 @@ EXPORT_SYMBOL(mfd_add_devices);
182 187
183static int mfd_remove_devices_fn(struct device *dev, void *c) 188static int mfd_remove_devices_fn(struct device *dev, void *c)
184{ 189{
185 struct platform_device *pdev = to_platform_device(dev); 190 struct platform_device *pdev;
186 const struct mfd_cell *cell = mfd_get_cell(pdev); 191 const struct mfd_cell *cell;
187 atomic_t **usage_count = c; 192 atomic_t **usage_count = c;
188 193
194 if (dev->type != &mfd_dev_type)
195 return 0;
196
197 pdev = to_platform_device(dev);
198 cell = mfd_get_cell(pdev);
199
189 /* find the base address of usage_count pointers (for freeing) */ 200 /* find the base address of usage_count pointers (for freeing) */
190 if (!*usage_count || (cell->usage_count < *usage_count)) 201 if (!*usage_count || (cell->usage_count < *usage_count))
191 *usage_count = cell->usage_count; 202 *usage_count = cell->usage_count;
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c
index 8d082b46426..d971817182f 100644
--- a/drivers/misc/sgi-xp/xpc_main.c
+++ b/drivers/misc/sgi-xp/xpc_main.c
@@ -53,6 +53,10 @@
53#include <linux/kthread.h> 53#include <linux/kthread.h>
54#include "xpc.h" 54#include "xpc.h"
55 55
56#ifdef CONFIG_X86_64
57#include <asm/traps.h>
58#endif
59
56/* define two XPC debug device structures to be used with dev_dbg() et al */ 60/* define two XPC debug device structures to be used with dev_dbg() et al */
57 61
58struct device_driver xpc_dbg_name = { 62struct device_driver xpc_dbg_name = {
@@ -1079,6 +1083,9 @@ xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
1079 return NOTIFY_DONE; 1083 return NOTIFY_DONE;
1080} 1084}
1081 1085
1086/* Used to only allow one cpu to complete disconnect */
1087static unsigned int xpc_die_disconnecting;
1088
1082/* 1089/*
1083 * Notify other partitions to deactivate from us by first disengaging from all 1090 * Notify other partitions to deactivate from us by first disengaging from all
1084 * references to our memory. 1091 * references to our memory.
@@ -1092,6 +1099,9 @@ xpc_die_deactivate(void)
1092 long keep_waiting; 1099 long keep_waiting;
1093 long wait_to_print; 1100 long wait_to_print;
1094 1101
1102 if (cmpxchg(&xpc_die_disconnecting, 0, 1))
1103 return;
1104
1095 /* keep xpc_hb_checker thread from doing anything (just in case) */ 1105 /* keep xpc_hb_checker thread from doing anything (just in case) */
1096 xpc_exiting = 1; 1106 xpc_exiting = 1;
1097 1107
@@ -1159,7 +1169,7 @@ xpc_die_deactivate(void)
1159 * about the lack of a heartbeat. 1169 * about the lack of a heartbeat.
1160 */ 1170 */
1161static int 1171static int
1162xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused) 1172xpc_system_die(struct notifier_block *nb, unsigned long event, void *_die_args)
1163{ 1173{
1164#ifdef CONFIG_IA64 /* !!! temporary kludge */ 1174#ifdef CONFIG_IA64 /* !!! temporary kludge */
1165 switch (event) { 1175 switch (event) {
@@ -1191,7 +1201,27 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
1191 break; 1201 break;
1192 } 1202 }
1193#else 1203#else
1194 xpc_die_deactivate(); 1204 struct die_args *die_args = _die_args;
1205
1206 switch (event) {
1207 case DIE_TRAP:
1208 if (die_args->trapnr == X86_TRAP_DF)
1209 xpc_die_deactivate();
1210
1211 if (((die_args->trapnr == X86_TRAP_MF) ||
1212 (die_args->trapnr == X86_TRAP_XF)) &&
1213 !user_mode_vm(die_args->regs))
1214 xpc_die_deactivate();
1215
1216 break;
1217 case DIE_INT3:
1218 case DIE_DEBUG:
1219 break;
1220 case DIE_OOPS:
1221 case DIE_GPF:
1222 default:
1223 xpc_die_deactivate();
1224 }
1195#endif 1225#endif
1196 1226
1197 return NOTIFY_DONE; 1227 return NOTIFY_DONE;
diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 1bf80328cc6..61958684ab1 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -916,7 +916,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
916 break; 916 break;
917 case LEC_ACK_ERROR: 917 case LEC_ACK_ERROR:
918 netdev_dbg(dev, "ack error\n"); 918 netdev_dbg(dev, "ack error\n");
919 cf->data[2] |= (CAN_ERR_PROT_LOC_ACK | 919 cf->data[3] |= (CAN_ERR_PROT_LOC_ACK |
920 CAN_ERR_PROT_LOC_ACK_DEL); 920 CAN_ERR_PROT_LOC_ACK_DEL);
921 break; 921 break;
922 case LEC_BIT1_ERROR: 922 case LEC_BIT1_ERROR:
@@ -929,7 +929,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
929 break; 929 break;
930 case LEC_CRC_ERROR: 930 case LEC_CRC_ERROR:
931 netdev_dbg(dev, "CRC error\n"); 931 netdev_dbg(dev, "CRC error\n");
932 cf->data[2] |= (CAN_ERR_PROT_LOC_CRC_SEQ | 932 cf->data[3] |= (CAN_ERR_PROT_LOC_CRC_SEQ |
933 CAN_ERR_PROT_LOC_CRC_DEL); 933 CAN_ERR_PROT_LOC_CRC_DEL);
934 break; 934 break;
935 default: 935 default:
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index d11fbb2b95f..b508a6380f8 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -559,7 +559,7 @@ static void pch_can_error(struct net_device *ndev, u32 status)
559 stats->rx_errors++; 559 stats->rx_errors++;
560 break; 560 break;
561 case PCH_CRC_ERR: 561 case PCH_CRC_ERR:
562 cf->data[2] |= CAN_ERR_PROT_LOC_CRC_SEQ | 562 cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ |
563 CAN_ERR_PROT_LOC_CRC_DEL; 563 CAN_ERR_PROT_LOC_CRC_DEL;
564 priv->can.can_stats.bus_error++; 564 priv->can.can_stats.bus_error++;
565 stats->rx_errors++; 565 stats->rx_errors++;
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 6ea2c0909c7..10b23947d8f 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -734,12 +734,12 @@ static int ti_hecc_error(struct net_device *ndev, int int_status,
734 } 734 }
735 if (err_status & HECC_CANES_CRCE) { 735 if (err_status & HECC_CANES_CRCE) {
736 hecc_set_bit(priv, HECC_CANES, HECC_CANES_CRCE); 736 hecc_set_bit(priv, HECC_CANES, HECC_CANES_CRCE);
737 cf->data[2] |= CAN_ERR_PROT_LOC_CRC_SEQ | 737 cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ |
738 CAN_ERR_PROT_LOC_CRC_DEL; 738 CAN_ERR_PROT_LOC_CRC_DEL;
739 } 739 }
740 if (err_status & HECC_CANES_ACKE) { 740 if (err_status & HECC_CANES_ACKE) {
741 hecc_set_bit(priv, HECC_CANES, HECC_CANES_ACKE); 741 hecc_set_bit(priv, HECC_CANES, HECC_CANES_ACKE);
742 cf->data[2] |= CAN_ERR_PROT_LOC_ACK | 742 cf->data[3] |= CAN_ERR_PROT_LOC_ACK |
743 CAN_ERR_PROT_LOC_ACK_DEL; 743 CAN_ERR_PROT_LOC_ACK_DEL;
744 } 744 }
745 } 745 }
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 97f46ac4f21..a5d98a348a8 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -4521,11 +4521,13 @@ void igb_update_stats(struct igb_adapter *adapter,
4521 bytes = 0; 4521 bytes = 0;
4522 packets = 0; 4522 packets = 0;
4523 for (i = 0; i < adapter->num_rx_queues; i++) { 4523 for (i = 0; i < adapter->num_rx_queues; i++) {
4524 u32 rqdpc_tmp = rd32(E1000_RQDPC(i)) & 0x0FFF; 4524 u32 rqdpc = rd32(E1000_RQDPC(i));
4525 struct igb_ring *ring = adapter->rx_ring[i]; 4525 struct igb_ring *ring = adapter->rx_ring[i];
4526 4526
4527 ring->rx_stats.drops += rqdpc_tmp; 4527 if (rqdpc) {
4528 net_stats->rx_fifo_errors += rqdpc_tmp; 4528 ring->rx_stats.drops += rqdpc;
4529 net_stats->rx_fifo_errors += rqdpc;
4530 }
4529 4531
4530 do { 4532 do {
4531 start = u64_stats_fetch_begin_bh(&ring->rx_syncp); 4533 start = u64_stats_fetch_begin_bh(&ring->rx_syncp);
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 4ce9e5f2c06..d0893e4c933 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -78,6 +78,11 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb,
78 78
79 skb_orphan(skb); 79 skb_orphan(skb);
80 80
81 /* Before queueing this packet to netif_rx(),
82 * make sure dst is refcounted.
83 */
84 skb_dst_force(skb);
85
81 skb->protocol = eth_type_trans(skb, dev); 86 skb->protocol = eth_type_trans(skb, dev);
82 87
83 /* it's OK to use per_cpu_ptr() because BHs are off */ 88 /* it's OK to use per_cpu_ptr() because BHs are off */
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 8f612371a38..80b230e6f20 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -5203,13 +5203,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
5203 dev->stats.rx_bytes += pkt_size; 5203 dev->stats.rx_bytes += pkt_size;
5204 dev->stats.rx_packets++; 5204 dev->stats.rx_packets++;
5205 } 5205 }
5206
5207 /* Work around for AMD plateform. */
5208 if ((desc->opts2 & cpu_to_le32(0xfffe000)) &&
5209 (tp->mac_version == RTL_GIGA_MAC_VER_05)) {
5210 desc->opts2 = 0;
5211 cur_rx++;
5212 }
5213 } 5206 }
5214 5207
5215 count = cur_rx - tp->cur_rx; 5208 count = cur_rx - tp->cur_rx;
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 10a99e4434d..eaa24fa8c19 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -996,14 +996,26 @@ static int tg3_phy_auxctl_write(struct tg3 *tp, int reg, u32 set)
996 return tg3_writephy(tp, MII_TG3_AUX_CTRL, set | reg); 996 return tg3_writephy(tp, MII_TG3_AUX_CTRL, set | reg);
997} 997}
998 998
999#define TG3_PHY_AUXCTL_SMDSP_ENABLE(tp) \ 999static int tg3_phy_toggle_auxctl_smdsp(struct tg3 *tp, bool enable)
1000 tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL, \ 1000{
1001 MII_TG3_AUXCTL_ACTL_SMDSP_ENA | \ 1001 u32 val;
1002 MII_TG3_AUXCTL_ACTL_TX_6DB) 1002 int err;
1003 1003
1004#define TG3_PHY_AUXCTL_SMDSP_DISABLE(tp) \ 1004 err = tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, &val);
1005 tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL, \ 1005
1006 MII_TG3_AUXCTL_ACTL_TX_6DB); 1006 if (err)
1007 return err;
1008 if (enable)
1009
1010 val |= MII_TG3_AUXCTL_ACTL_SMDSP_ENA;
1011 else
1012 val &= ~MII_TG3_AUXCTL_ACTL_SMDSP_ENA;
1013
1014 err = tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL,
1015 val | MII_TG3_AUXCTL_ACTL_TX_6DB);
1016
1017 return err;
1018}
1007 1019
1008static int tg3_bmcr_reset(struct tg3 *tp) 1020static int tg3_bmcr_reset(struct tg3 *tp)
1009{ 1021{
@@ -1775,7 +1787,7 @@ static void tg3_phy_apply_otp(struct tg3 *tp)
1775 1787
1776 otp = tp->phy_otp; 1788 otp = tp->phy_otp;
1777 1789
1778 if (TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) 1790 if (tg3_phy_toggle_auxctl_smdsp(tp, true))
1779 return; 1791 return;
1780 1792
1781 phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT); 1793 phy = ((otp & TG3_OTP_AGCTGT_MASK) >> TG3_OTP_AGCTGT_SHIFT);
@@ -1800,7 +1812,7 @@ static void tg3_phy_apply_otp(struct tg3 *tp)
1800 ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT); 1812 ((otp & TG3_OTP_RCOFF_MASK) >> TG3_OTP_RCOFF_SHIFT);
1801 tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy); 1813 tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy);
1802 1814
1803 TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); 1815 tg3_phy_toggle_auxctl_smdsp(tp, false);
1804} 1816}
1805 1817
1806static void tg3_phy_eee_adjust(struct tg3 *tp, u32 current_link_up) 1818static void tg3_phy_eee_adjust(struct tg3 *tp, u32 current_link_up)
@@ -1848,9 +1860,9 @@ static void tg3_phy_eee_enable(struct tg3 *tp)
1848 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 || 1860 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 ||
1849 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 || 1861 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
1850 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) && 1862 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57765) &&
1851 !TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { 1863 !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
1852 tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0003); 1864 tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0003);
1853 TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); 1865 tg3_phy_toggle_auxctl_smdsp(tp, false);
1854 } 1866 }
1855 1867
1856 val = tr32(TG3_CPMU_EEE_MODE); 1868 val = tr32(TG3_CPMU_EEE_MODE);
@@ -1995,7 +2007,7 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp)
1995 (MII_TG3_CTRL_AS_MASTER | 2007 (MII_TG3_CTRL_AS_MASTER |
1996 MII_TG3_CTRL_ENABLE_AS_MASTER)); 2008 MII_TG3_CTRL_ENABLE_AS_MASTER));
1997 2009
1998 err = TG3_PHY_AUXCTL_SMDSP_ENABLE(tp); 2010 err = tg3_phy_toggle_auxctl_smdsp(tp, true);
1999 if (err) 2011 if (err)
2000 return err; 2012 return err;
2001 2013
@@ -2016,7 +2028,7 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp)
2016 tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200); 2028 tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200);
2017 tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0000); 2029 tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0000);
2018 2030
2019 TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); 2031 tg3_phy_toggle_auxctl_smdsp(tp, false);
2020 2032
2021 tg3_writephy(tp, MII_TG3_CTRL, phy9_orig); 2033 tg3_writephy(tp, MII_TG3_CTRL, phy9_orig);
2022 2034
@@ -2105,10 +2117,10 @@ static int tg3_phy_reset(struct tg3 *tp)
2105 2117
2106out: 2118out:
2107 if ((tp->phy_flags & TG3_PHYFLG_ADC_BUG) && 2119 if ((tp->phy_flags & TG3_PHYFLG_ADC_BUG) &&
2108 !TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { 2120 !tg3_phy_toggle_auxctl_smdsp(tp, true)) {
2109 tg3_phydsp_write(tp, 0x201f, 0x2aaa); 2121 tg3_phydsp_write(tp, 0x201f, 0x2aaa);
2110 tg3_phydsp_write(tp, 0x000a, 0x0323); 2122 tg3_phydsp_write(tp, 0x000a, 0x0323);
2111 TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); 2123 tg3_phy_toggle_auxctl_smdsp(tp, false);
2112 } 2124 }
2113 2125
2114 if (tp->phy_flags & TG3_PHYFLG_5704_A0_BUG) { 2126 if (tp->phy_flags & TG3_PHYFLG_5704_A0_BUG) {
@@ -2117,14 +2129,14 @@ out:
2117 } 2129 }
2118 2130
2119 if (tp->phy_flags & TG3_PHYFLG_BER_BUG) { 2131 if (tp->phy_flags & TG3_PHYFLG_BER_BUG) {
2120 if (!TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { 2132 if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) {
2121 tg3_phydsp_write(tp, 0x000a, 0x310b); 2133 tg3_phydsp_write(tp, 0x000a, 0x310b);
2122 tg3_phydsp_write(tp, 0x201f, 0x9506); 2134 tg3_phydsp_write(tp, 0x201f, 0x9506);
2123 tg3_phydsp_write(tp, 0x401f, 0x14e2); 2135 tg3_phydsp_write(tp, 0x401f, 0x14e2);
2124 TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); 2136 tg3_phy_toggle_auxctl_smdsp(tp, false);
2125 } 2137 }
2126 } else if (tp->phy_flags & TG3_PHYFLG_JITTER_BUG) { 2138 } else if (tp->phy_flags & TG3_PHYFLG_JITTER_BUG) {
2127 if (!TG3_PHY_AUXCTL_SMDSP_ENABLE(tp)) { 2139 if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) {
2128 tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a); 2140 tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a);
2129 if (tp->phy_flags & TG3_PHYFLG_ADJUST_TRIM) { 2141 if (tp->phy_flags & TG3_PHYFLG_ADJUST_TRIM) {
2130 tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x110b); 2142 tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x110b);
@@ -2133,7 +2145,7 @@ out:
2133 } else 2145 } else
2134 tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b); 2146 tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b);
2135 2147
2136 TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); 2148 tg3_phy_toggle_auxctl_smdsp(tp, false);
2137 } 2149 }
2138 } 2150 }
2139 2151
@@ -2981,7 +2993,7 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
2981 tw32(TG3_CPMU_EEE_MODE, 2993 tw32(TG3_CPMU_EEE_MODE,
2982 tr32(TG3_CPMU_EEE_MODE) & ~TG3_CPMU_EEEMD_LPI_ENABLE); 2994 tr32(TG3_CPMU_EEE_MODE) & ~TG3_CPMU_EEEMD_LPI_ENABLE);
2983 2995
2984 err = TG3_PHY_AUXCTL_SMDSP_ENABLE(tp); 2996 err = tg3_phy_toggle_auxctl_smdsp(tp, true);
2985 if (!err) { 2997 if (!err) {
2986 u32 err2; 2998 u32 err2;
2987 2999
@@ -3008,7 +3020,7 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
3008 val |= MDIO_AN_EEE_ADV_1000T; 3020 val |= MDIO_AN_EEE_ADV_1000T;
3009 err = tg3_phy_cl45_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, val); 3021 err = tg3_phy_cl45_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, val);
3010 3022
3011 err2 = TG3_PHY_AUXCTL_SMDSP_DISABLE(tp); 3023 err2 = tg3_phy_toggle_auxctl_smdsp(tp, false);
3012 if (!err) 3024 if (!err)
3013 err = err2; 3025 err = err2;
3014 } 3026 }
@@ -5662,6 +5674,9 @@ static void tg3_poll_controller(struct net_device *dev)
5662 int i; 5674 int i;
5663 struct tg3 *tp = netdev_priv(dev); 5675 struct tg3 *tp = netdev_priv(dev);
5664 5676
5677 if (tg3_irq_sync(tp))
5678 return;
5679
5665 for (i = 0; i < tp->irq_cnt; i++) 5680 for (i = 0; i < tp->irq_cnt; i++)
5666 tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]); 5681 tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]);
5667} 5682}
@@ -14981,6 +14996,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
14981 tp->pm_cap = pm_cap; 14996 tp->pm_cap = pm_cap;
14982 tp->rx_mode = TG3_DEF_RX_MODE; 14997 tp->rx_mode = TG3_DEF_RX_MODE;
14983 tp->tx_mode = TG3_DEF_TX_MODE; 14998 tp->tx_mode = TG3_DEF_TX_MODE;
14999 tp->irq_sync = 1;
14984 15000
14985 if (tg3_debug > 0) 15001 if (tg3_debug > 0)
14986 tp->msg_enable = tg3_debug; 15002 tp->msg_enable = tg3_debug;
diff --git a/drivers/net/wimax/i2400m/i2400m-usb.h b/drivers/net/wimax/i2400m/i2400m-usb.h
index 6650fde99e1..9f1e947f355 100644
--- a/drivers/net/wimax/i2400m/i2400m-usb.h
+++ b/drivers/net/wimax/i2400m/i2400m-usb.h
@@ -152,6 +152,9 @@ enum {
152 /* Device IDs */ 152 /* Device IDs */
153 USB_DEVICE_ID_I6050 = 0x0186, 153 USB_DEVICE_ID_I6050 = 0x0186,
154 USB_DEVICE_ID_I6050_2 = 0x0188, 154 USB_DEVICE_ID_I6050_2 = 0x0188,
155 USB_DEVICE_ID_I6150 = 0x07d6,
156 USB_DEVICE_ID_I6150_2 = 0x07d7,
157 USB_DEVICE_ID_I6150_3 = 0x07d9,
155 USB_DEVICE_ID_I6250 = 0x0187, 158 USB_DEVICE_ID_I6250 = 0x0187,
156}; 159};
157 160
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c
index 298f2b0b631..0ddc8db2a45 100644
--- a/drivers/net/wimax/i2400m/usb.c
+++ b/drivers/net/wimax/i2400m/usb.c
@@ -491,6 +491,9 @@ int i2400mu_probe(struct usb_interface *iface,
491 switch (id->idProduct) { 491 switch (id->idProduct) {
492 case USB_DEVICE_ID_I6050: 492 case USB_DEVICE_ID_I6050:
493 case USB_DEVICE_ID_I6050_2: 493 case USB_DEVICE_ID_I6050_2:
494 case USB_DEVICE_ID_I6150:
495 case USB_DEVICE_ID_I6150_2:
496 case USB_DEVICE_ID_I6150_3:
494 case USB_DEVICE_ID_I6250: 497 case USB_DEVICE_ID_I6250:
495 i2400mu->i6050 = 1; 498 i2400mu->i6050 = 1;
496 break; 499 break;
@@ -740,6 +743,9 @@ static
740struct usb_device_id i2400mu_id_table[] = { 743struct usb_device_id i2400mu_id_table[] = {
741 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050) }, 744 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050) },
742 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050_2) }, 745 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6050_2) },
746 { USB_DEVICE(0x8087, USB_DEVICE_ID_I6150) },
747 { USB_DEVICE(0x8087, USB_DEVICE_ID_I6150_2) },
748 { USB_DEVICE(0x8087, USB_DEVICE_ID_I6150_3) },
743 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6250) }, 749 { USB_DEVICE(0x8086, USB_DEVICE_ID_I6250) },
744 { USB_DEVICE(0x8086, 0x0181) }, 750 { USB_DEVICE(0x8086, 0x0181) },
745 { USB_DEVICE(0x8086, 0x1403) }, 751 { USB_DEVICE(0x8086, 0x1403) },
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
index 029773c333c..c84c493a9e1 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
@@ -34,98 +34,98 @@ static const u32 ar9300_2p2_radio_postamble[][5] = {
34 34
35static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p2[][5] = { 35static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p2[][5] = {
36 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 36 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
37 {0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, 37 {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
38 {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, 38 {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
39 {0x0000a2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800}, 39 {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
40 {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, 40 {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
41 {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, 41 {0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9},
42 {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 42 {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
43 {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002}, 43 {0x0000a504, 0x04002222, 0x04002222, 0x04000002, 0x04000002},
44 {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004}, 44 {0x0000a508, 0x09002421, 0x09002421, 0x08000004, 0x08000004},
45 {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200}, 45 {0x0000a50c, 0x0d002621, 0x0d002621, 0x0b000200, 0x0b000200},
46 {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202}, 46 {0x0000a510, 0x13004620, 0x13004620, 0x0f000202, 0x0f000202},
47 {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400}, 47 {0x0000a514, 0x19004a20, 0x19004a20, 0x11000400, 0x11000400},
48 {0x0000a518, 0x21002220, 0x21002220, 0x16000402, 0x16000402}, 48 {0x0000a518, 0x1d004e20, 0x1d004e20, 0x15000402, 0x15000402},
49 {0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404}, 49 {0x0000a51c, 0x21005420, 0x21005420, 0x19000404, 0x19000404},
50 {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603}, 50 {0x0000a520, 0x26005e20, 0x26005e20, 0x1b000603, 0x1b000603},
51 {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02}, 51 {0x0000a524, 0x2b005e40, 0x2b005e40, 0x1f000a02, 0x1f000a02},
52 {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04}, 52 {0x0000a528, 0x2f005e42, 0x2f005e42, 0x23000a04, 0x23000a04},
53 {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20}, 53 {0x0000a52c, 0x33005e44, 0x33005e44, 0x26000a20, 0x26000a20},
54 {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20}, 54 {0x0000a530, 0x38005e65, 0x38005e65, 0x2a000e20, 0x2a000e20},
55 {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22}, 55 {0x0000a534, 0x3c005e69, 0x3c005e69, 0x2e000e22, 0x2e000e22},
56 {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24}, 56 {0x0000a538, 0x40005e6b, 0x40005e6b, 0x31000e24, 0x31000e24},
57 {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640}, 57 {0x0000a53c, 0x44005e6d, 0x44005e6d, 0x34001640, 0x34001640},
58 {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660}, 58 {0x0000a540, 0x49005e72, 0x49005e72, 0x38001660, 0x38001660},
59 {0x0000a544, 0x52022470, 0x52022470, 0x3f001861, 0x3f001861}, 59 {0x0000a544, 0x4e005eb2, 0x4e005eb2, 0x3b001861, 0x3b001861},
60 {0x0000a548, 0x55022490, 0x55022490, 0x43001a81, 0x43001a81}, 60 {0x0000a548, 0x53005f12, 0x53005f12, 0x3e001a81, 0x3e001a81},
61 {0x0000a54c, 0x59022492, 0x59022492, 0x47001a83, 0x47001a83}, 61 {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
62 {0x0000a550, 0x5d022692, 0x5d022692, 0x4a001c84, 0x4a001c84}, 62 {0x0000a550, 0x5e025f12, 0x5e025f12, 0x44001c84, 0x44001c84},
63 {0x0000a554, 0x61022892, 0x61022892, 0x4e001ce3, 0x4e001ce3}, 63 {0x0000a554, 0x61027f12, 0x61027f12, 0x48001ce3, 0x48001ce3},
64 {0x0000a558, 0x65024890, 0x65024890, 0x52001ce5, 0x52001ce5}, 64 {0x0000a558, 0x6702bf12, 0x6702bf12, 0x4c001ce5, 0x4c001ce5},
65 {0x0000a55c, 0x69024892, 0x69024892, 0x56001ce9, 0x56001ce9}, 65 {0x0000a55c, 0x6b02bf14, 0x6b02bf14, 0x50001ce9, 0x50001ce9},
66 {0x0000a560, 0x6e024c92, 0x6e024c92, 0x5a001ceb, 0x5a001ceb}, 66 {0x0000a560, 0x6f02bf16, 0x6f02bf16, 0x54001ceb, 0x54001ceb},
67 {0x0000a564, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 67 {0x0000a564, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
68 {0x0000a568, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 68 {0x0000a568, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
69 {0x0000a56c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 69 {0x0000a56c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
70 {0x0000a570, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 70 {0x0000a570, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
71 {0x0000a574, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 71 {0x0000a574, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
72 {0x0000a578, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 72 {0x0000a578, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
73 {0x0000a57c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec}, 73 {0x0000a57c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
74 {0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000}, 74 {0x0000a580, 0x00802220, 0x00802220, 0x00800000, 0x00800000},
75 {0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002}, 75 {0x0000a584, 0x04802222, 0x04802222, 0x04800002, 0x04800002},
76 {0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004}, 76 {0x0000a588, 0x09802421, 0x09802421, 0x08800004, 0x08800004},
77 {0x0000a58c, 0x10800023, 0x10800023, 0x0b800200, 0x0b800200}, 77 {0x0000a58c, 0x0d802621, 0x0d802621, 0x0b800200, 0x0b800200},
78 {0x0000a590, 0x16800220, 0x16800220, 0x0f800202, 0x0f800202}, 78 {0x0000a590, 0x13804620, 0x13804620, 0x0f800202, 0x0f800202},
79 {0x0000a594, 0x1c800223, 0x1c800223, 0x12800400, 0x12800400}, 79 {0x0000a594, 0x19804a20, 0x19804a20, 0x11800400, 0x11800400},
80 {0x0000a598, 0x21802220, 0x21802220, 0x16800402, 0x16800402}, 80 {0x0000a598, 0x1d804e20, 0x1d804e20, 0x15800402, 0x15800402},
81 {0x0000a59c, 0x27802223, 0x27802223, 0x19800404, 0x19800404}, 81 {0x0000a59c, 0x21805420, 0x21805420, 0x19800404, 0x19800404},
82 {0x0000a5a0, 0x2b822220, 0x2b822220, 0x1c800603, 0x1c800603}, 82 {0x0000a5a0, 0x26805e20, 0x26805e20, 0x1b800603, 0x1b800603},
83 {0x0000a5a4, 0x2f822222, 0x2f822222, 0x21800a02, 0x21800a02}, 83 {0x0000a5a4, 0x2b805e40, 0x2b805e40, 0x1f800a02, 0x1f800a02},
84 {0x0000a5a8, 0x34822225, 0x34822225, 0x25800a04, 0x25800a04}, 84 {0x0000a5a8, 0x2f805e42, 0x2f805e42, 0x23800a04, 0x23800a04},
85 {0x0000a5ac, 0x3a82222a, 0x3a82222a, 0x28800a20, 0x28800a20}, 85 {0x0000a5ac, 0x33805e44, 0x33805e44, 0x26800a20, 0x26800a20},
86 {0x0000a5b0, 0x3e82222c, 0x3e82222c, 0x2c800e20, 0x2c800e20}, 86 {0x0000a5b0, 0x38805e65, 0x38805e65, 0x2a800e20, 0x2a800e20},
87 {0x0000a5b4, 0x4282242a, 0x4282242a, 0x30800e22, 0x30800e22}, 87 {0x0000a5b4, 0x3c805e69, 0x3c805e69, 0x2e800e22, 0x2e800e22},
88 {0x0000a5b8, 0x4782244a, 0x4782244a, 0x34800e24, 0x34800e24}, 88 {0x0000a5b8, 0x40805e6b, 0x40805e6b, 0x31800e24, 0x31800e24},
89 {0x0000a5bc, 0x4b82244c, 0x4b82244c, 0x38801640, 0x38801640}, 89 {0x0000a5bc, 0x44805e6d, 0x44805e6d, 0x34801640, 0x34801640},
90 {0x0000a5c0, 0x4e82246c, 0x4e82246c, 0x3c801660, 0x3c801660}, 90 {0x0000a5c0, 0x49805e72, 0x49805e72, 0x38801660, 0x38801660},
91 {0x0000a5c4, 0x52822470, 0x52822470, 0x3f801861, 0x3f801861}, 91 {0x0000a5c4, 0x4e805eb2, 0x4e805eb2, 0x3b801861, 0x3b801861},
92 {0x0000a5c8, 0x55822490, 0x55822490, 0x43801a81, 0x43801a81}, 92 {0x0000a5c8, 0x53805f12, 0x53805f12, 0x3e801a81, 0x3e801a81},
93 {0x0000a5cc, 0x59822492, 0x59822492, 0x47801a83, 0x47801a83}, 93 {0x0000a5cc, 0x59825eb2, 0x59825eb2, 0x42801a83, 0x42801a83},
94 {0x0000a5d0, 0x5d822692, 0x5d822692, 0x4a801c84, 0x4a801c84}, 94 {0x0000a5d0, 0x5e825f12, 0x5e825f12, 0x44801c84, 0x44801c84},
95 {0x0000a5d4, 0x61822892, 0x61822892, 0x4e801ce3, 0x4e801ce3}, 95 {0x0000a5d4, 0x61827f12, 0x61827f12, 0x48801ce3, 0x48801ce3},
96 {0x0000a5d8, 0x65824890, 0x65824890, 0x52801ce5, 0x52801ce5}, 96 {0x0000a5d8, 0x6782bf12, 0x6782bf12, 0x4c801ce5, 0x4c801ce5},
97 {0x0000a5dc, 0x69824892, 0x69824892, 0x56801ce9, 0x56801ce9}, 97 {0x0000a5dc, 0x6b82bf14, 0x6b82bf14, 0x50801ce9, 0x50801ce9},
98 {0x0000a5e0, 0x6e824c92, 0x6e824c92, 0x5a801ceb, 0x5a801ceb}, 98 {0x0000a5e0, 0x6f82bf16, 0x6f82bf16, 0x54801ceb, 0x54801ceb},
99 {0x0000a5e4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 99 {0x0000a5e4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
100 {0x0000a5e8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 100 {0x0000a5e8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
101 {0x0000a5ec, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 101 {0x0000a5ec, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
102 {0x0000a5f0, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 102 {0x0000a5f0, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
103 {0x0000a5f4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 103 {0x0000a5f4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
104 {0x0000a5f8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 104 {0x0000a5f8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
105 {0x0000a5fc, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec}, 105 {0x0000a5fc, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
106 {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 106 {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
107 {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 107 {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
108 {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 108 {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
109 {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 109 {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
110 {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 110 {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
111 {0x0000a614, 0x02004000, 0x02004000, 0x01404000, 0x01404000}, 111 {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
112 {0x0000a618, 0x02004801, 0x02004801, 0x01404501, 0x01404501}, 112 {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
113 {0x0000a61c, 0x02808a02, 0x02808a02, 0x02008501, 0x02008501}, 113 {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
114 {0x0000a620, 0x0380ce03, 0x0380ce03, 0x0280ca03, 0x0280ca03}, 114 {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
115 {0x0000a624, 0x04411104, 0x04411104, 0x03010c04, 0x03010c04}, 115 {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
116 {0x0000a628, 0x04411104, 0x04411104, 0x04014c04, 0x04014c04}, 116 {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
117 {0x0000a62c, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 117 {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
118 {0x0000a630, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 118 {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
119 {0x0000a634, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 119 {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
120 {0x0000a638, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 120 {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
121 {0x0000a63c, 0x04411104, 0x04411104, 0x04015005, 0x04015005}, 121 {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
122 {0x0000b2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, 122 {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
123 {0x0000b2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, 123 {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
124 {0x0000b2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800}, 124 {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
125 {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, 125 {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
126 {0x0000c2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, 126 {0x0000c2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
127 {0x0000c2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, 127 {0x0000c2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
128 {0x0000c2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800}, 128 {0x0000c2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
129 {0x0000c2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, 129 {0x0000c2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
130 {0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4}, 130 {0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
131 {0x00016048, 0x62480001, 0x62480001, 0x62480001, 0x62480001}, 131 {0x00016048, 0x62480001, 0x62480001, 0x62480001, 0x62480001},
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
index ab21a491598..7f7bc947e00 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
@@ -69,13 +69,13 @@
69#define AR9300_BASE_ADDR 0x3ff 69#define AR9300_BASE_ADDR 0x3ff
70#define AR9300_BASE_ADDR_512 0x1ff 70#define AR9300_BASE_ADDR_512 0x1ff
71 71
72#define AR9300_OTP_BASE 0x14000 72#define AR9300_OTP_BASE (AR_SREV_9340(ah) ? 0x30000 : 0x14000)
73#define AR9300_OTP_STATUS 0x15f18 73#define AR9300_OTP_STATUS (AR_SREV_9340(ah) ? 0x30018 : 0x15f18)
74#define AR9300_OTP_STATUS_TYPE 0x7 74#define AR9300_OTP_STATUS_TYPE 0x7
75#define AR9300_OTP_STATUS_VALID 0x4 75#define AR9300_OTP_STATUS_VALID 0x4
76#define AR9300_OTP_STATUS_ACCESS_BUSY 0x2 76#define AR9300_OTP_STATUS_ACCESS_BUSY 0x2
77#define AR9300_OTP_STATUS_SM_BUSY 0x1 77#define AR9300_OTP_STATUS_SM_BUSY 0x1
78#define AR9300_OTP_READ_DATA 0x15f1c 78#define AR9300_OTP_READ_DATA (AR_SREV_9340(ah) ? 0x3001c : 0x15f1c)
79 79
80enum targetPowerHTRates { 80enum targetPowerHTRates {
81 HT_TARGET_RATE_0_8_16, 81 HT_TARGET_RATE_0_8_16,
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index d4d8ceced89..b109c470858 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -159,6 +159,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
159 skb->len, DMA_TO_DEVICE); 159 skb->len, DMA_TO_DEVICE);
160 dev_kfree_skb_any(skb); 160 dev_kfree_skb_any(skb);
161 bf->bf_buf_addr = 0; 161 bf->bf_buf_addr = 0;
162 bf->bf_mpdu = NULL;
162 } 163 }
163 164
164 /* Get a new beacon from mac80211 */ 165 /* Get a new beacon from mac80211 */
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 1b90ed8795c..4f7843ae680 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -342,6 +342,8 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle,
342 endpoint->ep_callbacks.tx(endpoint->ep_callbacks.priv, 342 endpoint->ep_callbacks.tx(endpoint->ep_callbacks.priv,
343 skb, htc_hdr->endpoint_id, 343 skb, htc_hdr->endpoint_id,
344 txok); 344 txok);
345 } else {
346 kfree_skb(skb);
345 } 347 }
346 } 348 }
347 349
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index f1fa7636baa..99e7e7f2e4d 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -83,8 +83,8 @@ static struct usb_device_id p54u_table[] = {
83 {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */ 83 {USB_DEVICE(0x06b9, 0x0121)}, /* Thomson SpeedTouch 121g */
84 {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */ 84 {USB_DEVICE(0x0707, 0xee13)}, /* SMC 2862W-G version 2 */
85 {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */ 85 {USB_DEVICE(0x0803, 0x4310)}, /* Zoom 4410a */
86 {USB_DEVICE(0x083a, 0x4503)}, /* T-Com Sinus 154 data II */
87 {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */ 86 {USB_DEVICE(0x083a, 0x4521)}, /* Siemens Gigaset USB Adapter 54 version 2 */
87 {USB_DEVICE(0x083a, 0x4531)}, /* T-Com Sinus 154 data II */
88 {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */ 88 {USB_DEVICE(0x083a, 0xc501)}, /* Zoom Wireless-G 4410 */
89 {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */ 89 {USB_DEVICE(0x083a, 0xf503)}, /* Accton FD7050E ver 1010ec */
90 {USB_DEVICE(0x0846, 0x4240)}, /* Netgear WG111 (v2) */ 90 {USB_DEVICE(0x0846, 0x4240)}, /* Netgear WG111 (v2) */
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index e4272b97829..dbcf5a9cff9 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -542,8 +542,8 @@ static void _rtl_rx_pre_process(struct ieee80211_hw *hw, struct sk_buff *skb)
542 WARN_ON(skb_queue_empty(&rx_queue)); 542 WARN_ON(skb_queue_empty(&rx_queue));
543 while (!skb_queue_empty(&rx_queue)) { 543 while (!skb_queue_empty(&rx_queue)) {
544 _skb = skb_dequeue(&rx_queue); 544 _skb = skb_dequeue(&rx_queue);
545 _rtl_usb_rx_process_agg(hw, skb); 545 _rtl_usb_rx_process_agg(hw, _skb);
546 ieee80211_rx_irqsafe(hw, skb); 546 ieee80211_rx_irqsafe(hw, _skb);
547 } 547 }
548} 548}
549 549
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index 161f207786a..810a47290ab 100644
--- a/drivers/net/xen-netback/common.h
+++ b/drivers/net/xen-netback/common.h
@@ -152,6 +152,9 @@ void xen_netbk_queue_tx_skb(struct xenvif *vif, struct sk_buff *skb);
152/* Notify xenvif that ring now has space to send an skb to the frontend */ 152/* Notify xenvif that ring now has space to send an skb to the frontend */
153void xenvif_notify_tx_completion(struct xenvif *vif); 153void xenvif_notify_tx_completion(struct xenvif *vif);
154 154
155/* Prevent the device from generating any further traffic. */
156void xenvif_carrier_off(struct xenvif *vif);
157
155/* Returns number of ring slots required to send an skb to the frontend */ 158/* Returns number of ring slots required to send an skb to the frontend */
156unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb); 159unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb);
157 160
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 182562952c7..8eaf0e2aaf2 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -132,6 +132,7 @@ static void xenvif_up(struct xenvif *vif)
132static void xenvif_down(struct xenvif *vif) 132static void xenvif_down(struct xenvif *vif)
133{ 133{
134 disable_irq(vif->irq); 134 disable_irq(vif->irq);
135 del_timer_sync(&vif->credit_timeout);
135 xen_netbk_deschedule_xenvif(vif); 136 xen_netbk_deschedule_xenvif(vif);
136 xen_netbk_remove_xenvif(vif); 137 xen_netbk_remove_xenvif(vif);
137} 138}
@@ -342,23 +343,26 @@ err:
342 return err; 343 return err;
343} 344}
344 345
345void xenvif_disconnect(struct xenvif *vif) 346void xenvif_carrier_off(struct xenvif *vif)
346{ 347{
347 struct net_device *dev = vif->dev; 348 struct net_device *dev = vif->dev;
348 if (netif_carrier_ok(dev)) { 349
349 rtnl_lock(); 350 rtnl_lock();
350 netif_carrier_off(dev); /* discard queued packets */ 351 netif_carrier_off(dev); /* discard queued packets */
351 if (netif_running(dev)) 352 if (netif_running(dev))
352 xenvif_down(vif); 353 xenvif_down(vif);
353 rtnl_unlock(); 354 rtnl_unlock();
354 xenvif_put(vif); 355 xenvif_put(vif);
355 } 356}
357
358void xenvif_disconnect(struct xenvif *vif)
359{
360 if (netif_carrier_ok(vif->dev))
361 xenvif_carrier_off(vif);
356 362
357 atomic_dec(&vif->refcnt); 363 atomic_dec(&vif->refcnt);
358 wait_event(vif->waiting_to_free, atomic_read(&vif->refcnt) == 0); 364 wait_event(vif->waiting_to_free, atomic_read(&vif->refcnt) == 0);
359 365
360 del_timer_sync(&vif->credit_timeout);
361
362 if (vif->irq) 366 if (vif->irq)
363 unbind_from_irqhandler(vif->irq, vif); 367 unbind_from_irqhandler(vif->irq, vif);
364 368
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 0e4851b8a77..1260bf0d7e0 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -143,7 +143,8 @@ void xen_netbk_remove_xenvif(struct xenvif *vif)
143 atomic_dec(&netbk->netfront_count); 143 atomic_dec(&netbk->netfront_count);
144} 144}
145 145
146static void xen_netbk_idx_release(struct xen_netbk *netbk, u16 pending_idx); 146static void xen_netbk_idx_release(struct xen_netbk *netbk, u16 pending_idx,
147 u8 status);
147static void make_tx_response(struct xenvif *vif, 148static void make_tx_response(struct xenvif *vif,
148 struct xen_netif_tx_request *txp, 149 struct xen_netif_tx_request *txp,
149 s8 st); 150 s8 st);
@@ -838,7 +839,7 @@ static void netbk_tx_err(struct xenvif *vif,
838 839
839 do { 840 do {
840 make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR); 841 make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR);
841 if (cons >= end) 842 if (cons == end)
842 break; 843 break;
843 txp = RING_GET_REQUEST(&vif->tx, cons++); 844 txp = RING_GET_REQUEST(&vif->tx, cons++);
844 } while (1); 845 } while (1);
@@ -847,6 +848,13 @@ static void netbk_tx_err(struct xenvif *vif,
847 xenvif_put(vif); 848 xenvif_put(vif);
848} 849}
849 850
851static void netbk_fatal_tx_err(struct xenvif *vif)
852{
853 netdev_err(vif->dev, "fatal error; disabling device\n");