Skip to contentSkip to conversation

Linux 3.4.8

DISCUSSION Greg KH 1 participant 2 messages Aug 9, 2012

lore
Share & tools
lore

Greg KH

author
#0 lore raw

I'm announcing the release of the 3.4.8 kernel.

All users of the 3.4 kernel series must upgrade.

The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/sound/alsa/HD-Audio-Models.txt    |    3 
 Documentation/stable_kernel_rules.txt           |   19 +-
 Makefile                                        |    2 
 arch/arm/mach-omap2/opp.c                       |    3 
 arch/m68k/include/asm/entry.h                   |    4 
 arch/m68k/kernel/sys_m68k.c                     |    8 -
 arch/mips/kernel/kspd.c                         |    2 
 arch/powerpc/boot/dts/p1022ds.dtsi              |   16 --
 arch/powerpc/include/asm/reg.h                  |    3 
 arch/powerpc/kernel/ftrace.c                    |   12 -
 arch/powerpc/platforms/85xx/p1022_ds.c          |  106 ++++++++++++--
 arch/powerpc/platforms/pseries/eeh_event.c      |    6 
 arch/s390/include/asm/mmu_context.h             |   14 +
 arch/s390/include/asm/processor.h               |    2 
 arch/s390/kernel/processor.c                    |    2 
 arch/s390/kernel/smp.c                          |    3 
 arch/s390/mm/fault.c                            |   13 -
 arch/s390/mm/mmap.c                             |   12 +
 arch/s390/mm/pgtable.c                          |    5 
 arch/x86/kernel/cpu/mcheck/mce.c                |    6 
 drivers/acpi/ac.c                               |    4 
 drivers/acpi/apei/apei-base.c                   |    5 
 drivers/base/power/main.c                       |   10 +
 drivers/char/tpm/tpm.c                          |   12 +
 drivers/gpu/drm/nouveau/nva3_copy.fuc           |    4 
 drivers/gpu/drm/nouveau/nva3_copy.fuc.h         |   94 ++++++++++++
 drivers/gpu/drm/nouveau/nvc0_copy.fuc.h         |   87 +++++++++++-
 drivers/gpu/drm/radeon/atombios_dp.c            |   10 -
 drivers/gpu/drm/radeon/atombios_encoders.c      |   12 +
 drivers/gpu/drm/radeon/radeon_connectors.c      |   35 +++-
 drivers/gpu/drm/radeon/radeon_cs.c              |    2 
 drivers/gpu/drm/radeon/radeon_cursor.c          |    8 -
 drivers/gpu/drm/radeon/radeon_object.c          |    3 
 drivers/iommu/amd_iommu.c                       |   17 +-
 drivers/iommu/amd_iommu_v2.c                    |    2 
 drivers/md/dm-thin.c                            |    7 
 drivers/mmc/host/sdhci-pci.c                    |    1 
 drivers/mmc/host/sdhci.c                        |    8 -
 drivers/net/caif/caif_serial.c                  |    3 
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c |    1 
 drivers/net/ethernet/broadcom/bnx2.c            |    6 
 drivers/net/ethernet/broadcom/tg3.c             |   10 -
 drivers/net/ethernet/freescale/gianfar.c        |    7 
 drivers/net/ethernet/realtek/r8169.c            |   27 ---
 drivers/net/tun.c                               |    9 -
 drivers/net/usb/kaweth.c                        |    2 
 drivers/net/wireless/iwlwifi/iwl-agn-sta.c      |    1 
 drivers/net/wireless/mwifiex/cfg80211.c         |    4 
 drivers/net/wireless/rt2x00/rt2800usb.c         |    3 
 drivers/net/wireless/rtlwifi/rtl8192de/phy.c    |    6 
 drivers/net/wireless/rtlwifi/usb.c              |   14 +
 drivers/net/wireless/rtlwifi/wifi.h             |    1 
 drivers/s390/net/qeth_l3_main.c                 |    4 
 drivers/scsi/hosts.c                            |    7 
 drivers/scsi/libsas/sas_expander.c              |   47 ++----
 drivers/scsi/scsi_error.c                       |   14 +
 drivers/scsi/scsi_lib.c                         |   43 ++---
 drivers/scsi/scsi_priv.h                        |    1 
 drivers/scsi/scsi_scan.c                        |    3 
 drivers/scsi/scsi_sysfs.c                       |   46 +++---
 drivers/spi/spi-pl022.c                         |    5 
 drivers/staging/zsmalloc/zsmalloc-main.c        |   33 ----
 drivers/target/iscsi/iscsi_target.c             |   22 ---
 drivers/target/iscsi/iscsi_target_core.h        |    2 
 drivers/target/iscsi/iscsi_target_login.c       |   60 --------
 drivers/target/target_core_transport.c          |   10 +
 drivers/usb/core/devio.c                        |   10 -
 drivers/usb/early/ehci-dbgp.c                   |    2 
 drivers/usb/gadget/u_ether.c                    |   12 -
 drivers/usb/serial/option.c                     |    2 
 drivers/usb/storage/uas.c                       |   90 ++----------
 fs/btrfs/async-thread.c                         |    9 +
 fs/cifs/connect.c                               |    9 -
 fs/exec.c                                       |    2 
 fs/ext4/balloc.c                                |    3 
 fs/ext4/bitmap.c                                |   12 -
 fs/ext4/ext4.h                                  |    6 
 fs/ext4/extents.c                               |   46 ++++--
 fs/ext4/ialloc.c                                |    3 
 fs/ext4/inode.c                                 |   41 ++++-
 fs/ext4/resize.c                                |    7 
 fs/ext4/super.c                                 |  174 +++++++++++++++++-------
 fs/locks.c                                      |    6 
 fs/nfs/file.c                                   |    7 
 fs/nfs/idmap.c                                  |   26 ++-
 fs/nfs/objlayout/objio_osd.c                    |   16 +-
 fs/nfsd/nfs4xdr.c                               |    2 
 fs/select.c                                     |   10 -
 fs/udf/super.c                                  |    2 
 include/linux/cpu.h                             |    5 
 include/linux/mm.h                              |    1 
 include/linux/net.h                             |    1 
 include/linux/posix_types.h                     |   18 --
 include/linux/time.h                            |    8 -
 include/target/target_core_base.h               |    1 
 kernel/exit.c                                   |    2 
 kernel/futex.c                                  |   17 +-
 kernel/power/hibernate.c                        |    6 
 kernel/power/suspend.c                          |    3 
 kernel/workqueue.c                              |   38 +++++
 mm/memory-failure.c                             |   14 +
 net/8021q/vlan.c                                |    3 
 net/caif/caif_dev.c                             |    2 
 net/compat.c                                    |    4 
 net/core/rtnetlink.c                            |    8 -
 net/ipv4/cipso_ipv4.c                           |    6 
 net/ipv4/tcp.c                                  |    5 
 net/ipv4/tcp_input.c                            |    4 
 net/mac80211/mlme.c                             |    4 
 net/sched/sch_netem.c                           |   42 ++---
 net/sched/sch_sfb.c                             |    2 
 net/sctp/input.c                                |    7 
 net/sctp/socket.c                               |   12 +
 net/socket.c                                    |    3 
 net/sunrpc/sched.c                              |    2 
 net/sunrpc/xprtrdma/transport.c                 |    3 
 net/sunrpc/xprtsock.c                           |   10 +
 net/wanrouter/wanmain.c                         |   51 +++----
 security/selinux/hooks.c                        |    2 
 sound/drivers/mpu401/mpu401_uart.c              |    1 
 sound/pci/hda/patch_hdmi.c                      |   12 -
 sound/pci/hda/patch_realtek.c                   |   29 ++++
 sound/pci/hda/patch_sigmatel.c                  |   23 ++-
 sound/pci/hda/patch_via.c                       |    7 
 sound/soc/codecs/wm8962.c                       |    6 
 sound/soc/codecs/wm8994.c                       |    2 
 sound/soc/soc-dapm.c                            |   10 +
 sound/usb/clock.c                               |    3 
 128 files changed, 1154 insertions(+), 673 deletions(-)

Aaron Lu (1):
mmc: sdhci: fix incorrect command used in tuning

Al Viro (1):
iscsi-target: Drop bogus struct file usage for iSCSI/SCTP

Alan Cox (3):
sch_sfb: Fix missing NULL check
caif: fix NULL pointer check
wanmain: comparing array with NULL

Alasdair G Kergon (1):
dm thin: reduce endio_hook pool size

Albert Pool (1):

      rt2800usb: 2001:3c17 is an RT3370 device

Amir Hanania (1):
net: Fix memory leak - vlan_info struct

Amitkumar Karwar (1):
mwifiex: correction in mcs index check

Andreas Schwab (1):
m68k: Make sys_atomic_cmpxchg_32 work on classic m68k

Ashish Sangwan (1):
ext4: fix hole punch failure when depth is greater than 0

Bart Van Assche (2):
SCSI: Fix device removal NULL pointer dereference
SCSI: Avoid dangling pointer in scsi_requeue_command()

Ben Hutchings (1):
staging: zsmalloc: Finish conversion to a separate module

Bjørn Mork (1):
USB: option: add ZTE MF821D

Boaz Harrosh (1):
pnfs-obj: Fix __r4w_get_page when offset is beyond i_size

Brian Foster (1):
ext4: don't let i_reserved_meta_blocks go negative

Chris Mason (1):
Btrfs: call the ordered free operation without any locks held

Christian König (1):
drm/radeon: fix fence related segfault in CS

Cloud Ren (1):
atl1c: fix issue of transmit queue 0 timed out

Colin Cross (1):
PM / Sleep: call early resume handlers when suspend_noirq fails

Colin Ian King (1):
USB: echi-dbgp: increase the controller wait time to come out of halt.

Dan Carpenter (1):
USB: kaweth.c: use GFP_ATOMIC under spin_lock

Dan Williams (4):
SCSI: libsas: continue revalidation
SCSI: libsas: fix sas_discover_devices return code handling
SCSI: fix eh wakeup (scsi_schedule_eh vs scsi_restart_operations)
SCSI: fix hot unplug vs async scan race

Daniel Drake (1):
mmc: sdhci-pci: CaFe has broken card detection

Daniel Mack (1):
ALSA: snd-usb: fix clock source validity index

Darren Hart (3):
futex: Test for pi_mutex on fault in futex_wait_requeue_pi()
futex: Fix bug in WARN_ON for NULL q.pi_state
futex: Forbid uaddr == uaddr2 in futex_wait_requeue_pi()

David Henningsson (2):
ALSA: hda - Add support for Realtek ALC282
ALSA: hda - add dock support for Thinkpad X230 Tablet

David Howells (1):
NFS: Fix a number of bugs in the idmapper

Dylan Reid (1):
ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.

Eliad Peller (1):
mac80211: fail authentication when AP denied authentication

Eric Dumazet (2):
netem: add limitation to reordered packets
gianfar: fix potential sk_wmem_alloc imbalance

Forest Bond (1):
rtlwifi: rtl8192de: Fix phy-based version calculation

Francois Romieu (1):
r8169: revert "add byte queue limit support".

Frank Blaschka (1):
qeth: repair crash in qeth_l3_vlan_rx_kill_vid()

Gerd Hoffmann (1):
Revert "usb/uas: make sure data urb is gone if we receive status before that"

Greg KH (1):
tg3: add device id of Apple Thunderbolt Ethernet device

Greg Kroah-Hartman (1):

      Linux 3.4.8

Hangbin Liu (1):
tcp: Add TCP_USER_TIMEOUT negative value check

Hans de Goede (1):
usbdevfs: Correct amount of data copied to user in processcompl_compat

Heiko Carstens (2):
s390/idle: fix sequence handling vs cpu hotplug s390/mm: fix fault handling for page table walk case

J. Bruce Fields (2):
locks: fix checking of fcntl_setlease argument
nfsd4: our filesystems are normally case sensitive

Jan Kara (1):
udf: Improve table length check to avoid possible overflow

Jean Delvare (1):
ACPI, APEI: Fixup common access width firmware bug

Jeff Layton (2):
cifs: reinstate sec=ntlmv2 mount option
nfs: skip commit in releasepage if we're freeing memory for fs-related reasons

Jerome Glisse (5):
drm/radeon: fix bo creation retry path
drm/radeon: fix non revealent error message drm/radeon: fix hotplug of DP to DVI|HDMI passive adapters (v2) drm/radeon: on hotplug force link training to happen (v2) drm/radeon: fix dpms on/off on trinity/aruba v2

Jesper Juhl (1):
net: Fix references to out-of-scope variables in put_cmsg_compat()

Jiri Benc (1):
net: fix rtnetlink IFF_PROMISC and IFF_ALLMULTI handling

Jiri Kosina (1):
tcp: perform DMA to userspace only if there is a task waiting for it

Joe Thornber (1):
dm thin: fix memory leak in process_prepared_mapping error paths

Joerg Roedel (2):
iommu/amd: Add missing spin_lock initialization iommu/amd: Fix hotplug with iommu=pt

Josh Boyer (1):
posix_types.h: Cleanup stale __NFDBITS and related definitions

Kevin Cernekee (1):
usb: gadget: Fix g_ether interface link status

Kleber Sacilotto de Souza (1):
powerpc/eeh: Check handle_eeh_events() return value

Lan Tianyu (1):
ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check

Larry Finger (1):
rtlwifi: rtl8192cu: Change buffer allocation for synchronous reads

Maarten Lankhorst (1):
nouveau: Fix alignment requirements on src and dst addresses

Mark Brown (4):
ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements
ASoC: wm8962: Redo early init of the part on resume
ASoC: wm8962: Allow VMID time to fully ramp
ASoC: wm8994: Ensure there are enough BCLKs for four channels

Martin Schwidefsky (1):
s390/mm: downgrade page table after fork of a 31 bit process

Mathias Krause (1):
net/tun: fix ioctl() based info leaks

Meenakshi Venkataraman (1):
iwlwifi: fix debug print in iwl_sta_calc_ht_flags

Michael Chan (3):
tg3: Fix Read DMA workaround for 5719 A0.
tg3: Fix race condition in tg3_get_stats64()
bnx2: Fix bug in bnx2_free_tx_skbs().

Michel Dänzer (1):
drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.

Mikael Pettersson (1):
m68k: Correct the Atari ALLOWINT definition

Mikulas Patocka (1):
tun: fix a crash bug and a memory leak

Neil Horman (1):
sctp: Fix list corruption resulting from freeing an association on a list

Nishanth Menon (1):
ARM: OMAP2+: OPP: Fix to ensure check of right oppdef after bad one

Paul Gortmaker (1):
stable: update references to older 2.6 versions for 3.x

Paul Moore (1):
cipso: don't follow a NULL pointer when setsockopt() is called

Rajiv Andrade (1):
TPM: chip disabled state erronously being reported as error

Roland Dreier (1):
target: Add generation of LOGICAL BLOCK ADDRESS OUT OF RANGE

Sjur Brændeland (1):
caif: Fix access to freed pernet memory

Srivatsa S. Bhat (1):
ftrace: Disable function tracing during suspend/resume and hibernation, again

Takashi Iwai (6):
ALSA: mpu401: Fix missing initialization of irq field
ALSA: hda - Fix invalid D3 of headphone DAC on VT202x codecs
ALSA: hda - Fix mute-LED GPIO setup for HP Mini 210
ALSA: hda - Fix polarity of mute LED on HP Mini 210
ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs
ALSA: hda - Support dock on Lenovo Thinkpad T530 with ALC269VC

Tejun Heo (1):
workqueue: perform cpu down operations from low priority cpu_notifier()

Theodore Ts'o (3):
ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr
ext4: fix overhead calculation used by ext4_statfs()
ext4: undo ext4_calc_metadata_amount if we fail to claim space

Tiejun Chen (1):
powerpc: Add "memory" attribute for mfmsr()

Timur Tabi (1):
powerpc/85xx: use the BRx registers to enable indirect mode on the P1022DS

Tony Luck (1):

      x86/mce: Fix siginfo_t->si_addr value for non-recoverable memory faults

Virupax Sadashivpetimath (1):
spi/pl022: disable port when unused

roger blofeld (1):
powerpc/ftrace: Fix assembly trampoline register usage

author
#1 lore raw
Documentation/sound/alsa/HD-Audio-Models.txt +2 -1
index 03f7897..286ec04 100644
@@ -21,10 +21,11 @@ ALC267/268
 ==========
   N/A
 
-ALC269
+ALC269/270/275/276/280/282
 ======
   laptop-amic	Laptops with analog-mic input
   laptop-dmic	Laptops with digital-mic input
+  lenovo-dock   Enables docking station I/O for some Lenovos
 
 ALC662/663/272
 ==============
Documentation/stable_kernel_rules.txt +14 -5
index 4a7b54b..b0714d8 100644
@@ -1,4 +1,4 @@
-Everything you ever wanted to know about Linux 2.6 -stable releases.
+Everything you ever wanted to know about Linux -stable releases.
 
 Rules on what kind of patches are accepted, and which ones are not, into the
 "-stable" tree:
@@ -42,10 +42,10 @@ Procedure for submitting patches to the -stable tree:
    cherry-picked than this can be specified in the following format in
    the sign-off area:
 
-     Cc: <[email protected]> # .32.x: a1f84a3: sched: Check for idle
-     Cc: <[email protected]> # .32.x: 1b9508f: sched: Rate-limit newidle
-     Cc: <[email protected]> # .32.x: fd21073: sched: Fix affinity logic
-     Cc: <[email protected]> # .32.x
+     Cc: <[email protected]> # 3.3.x: a1f84a3: sched: Check for idle
+     Cc: <[email protected]> # 3.3.x: 1b9508f: sched: Rate-limit newidle
+     Cc: <[email protected]> # 3.3.x: fd21073: sched: Fix affinity logic
+     Cc: <[email protected]> # 3.3.x
     Signed-off-by: Ingo Molnar <[email protected]>
 
    The tag sequence has the meaning of:
@@ -79,6 +79,15 @@ Review cycle:
    security kernel team, and not go through the normal review cycle.
    Contact the kernel security team for more details on this procedure.
 
+Trees:
+
+ - The queues of patches, for both completed versions and in progress
+   versions can be found at:
+	http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
+ - The finalized and tagged releases of all stable kernels can be found
+   in separate branches per version at:
+	http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git
+
 
 Review committee:
 
Makefile +1 -1
index e17a98c..a3c0c43 100644
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 4
-SUBLEVEL = 7
+SUBLEVEL = 8
 EXTRAVERSION =
 NAME = Saber-toothed Squirrel
 
arch/arm/mach-omap2/opp.c +1 -2
index de6d464..d8f6dbf 100644
@@ -53,7 +53,7 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
 	omap_table_init = 1;
 
 	/* Lets now register with OPP library */
-	for (i = 0; i < opp_def_size; i++) {
+	for (i = 0; i < opp_def_size; i++, opp_def++) {
 		struct omap_hwmod *oh;
 		struct device *dev;
 
@@ -86,7 +86,6 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
 					__func__, opp_def->freq,
 					opp_def->hwmod_name, i, r);
 		}
-		opp_def++;
 	}
 
 	return 0;
arch/m68k/include/asm/entry.h +2 -2
index 622138d..34c2520 100644
@@ -33,8 +33,8 @@
 
 /* the following macro is used when enabling interrupts */
 #if defined(MACH_ATARI_ONLY)
-	/* block out HSYNC on the atari */
-#define ALLOWINT	(~0x400)
+	/* block out HSYNC = ipl 2 on the atari */
+#define ALLOWINT	(~0x500)
 #define	MAX_NOINT_IPL	3
 #else
 	/* portable version */
arch/m68k/kernel/sys_m68k.c +6 -2
index 8623f8d..9a5932e 100644
@@ -479,9 +479,13 @@ sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5,
 			goto bad_access;
 		}
 
-		mem_value = *mem;
+		/*
+		 * No need to check for EFAULT; we know that the page is
+		 * present and writable.
+		 */
+		__get_user(mem_value, mem);
 		if (mem_value == oldval)
-			*mem = newval;
+			__put_user(newval, mem);
 
 		pte_unmap_unlock(pte, ptl);
 		up_read(&mm->mmap_sem);
arch/mips/kernel/kspd.c +1 -1
index 84d0639..b77f56b 100644
@@ -323,7 +323,7 @@ static void sp_cleanup(void)
 	fdt = files_fdtable(files);
 	for (;;) {
 		unsigned long set;
-		i = j * __NFDBITS;
+		i = j * BITS_PER_LONG;
 		if (i >= fdt->max_fds)
 			break;
 		set = fdt->open_fds[j++];
arch/powerpc/boot/dts/p1022ds.dtsi +0 -16
index 7cdb505..1b0673e 100644
@@ -33,22 +33,6 @@
  */
 
 &board_lbc {
-	/*
-	 * This node is used to access the pixis via "indirect" mode,
-	 * which is done by writing the pixis register index to chip
-	 * select 0 and the value to/from chip select 1.  Indirect
-	 * mode is the only way to access the pixis when DIU video
-	 * is enabled.  Note that this assumes that the first column
-	 * of the 'ranges' property above is the chip select number.
-	 */
-	board-control@0,0 {
-		compatible = "fsl,p1022ds-indirect-pixis";
-		reg = <0x0 0x0 1	/* CS0 */
-		       0x1 0x0 1>;	/* CS1 */
-		interrupt-parent = <&mpic>;
-		interrupts = <8 0 0 0>;
-	};
-
 	nor@0,0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
arch/powerpc/include/asm/reg.h +2 -1
index 9d7f0fb..cae0ed7 100644
@@ -1022,7 +1022,8 @@
 /* Macros for setting and retrieving special purpose registers */
 #ifndef __ASSEMBLY__
 #define mfmsr()		({unsigned long rval; \
-			asm volatile("mfmsr %0" : "=r" (rval)); rval;})
+			asm volatile("mfmsr %0" : "=r" (rval) : \
+						: "memory"); rval;})
 #ifdef CONFIG_PPC_BOOK3S_64
 #define __mtmsrd(v, l)	asm volatile("mtmsrd %0," __stringify(l) \
 				     : : "r" (v) : "memory")
arch/powerpc/kernel/ftrace.c +6 -6
index bf99cfa..6324008 100644
@@ -245,9 +245,9 @@ __ftrace_make_nop(struct module *mod,
 
 	/*
 	 * On PPC32 the trampoline looks like:
-	 *  0x3d, 0x60, 0x00, 0x00  lis r11,sym@ha
-	 *  0x39, 0x6b, 0x00, 0x00  addi r11,r11,sym@l
-	 *  0x7d, 0x69, 0x03, 0xa6  mtctr r11
+	 *  0x3d, 0x80, 0x00, 0x00  lis r12,sym@ha
+	 *  0x39, 0x8c, 0x00, 0x00  addi r12,r12,sym@l
+	 *  0x7d, 0x89, 0x03, 0xa6  mtctr r12
 	 *  0x4e, 0x80, 0x04, 0x20  bctr
 	 */
 
@@ -262,9 +262,9 @@ __ftrace_make_nop(struct module *mod,
 	pr_devel(" %08x %08x ", jmp[0], jmp[1]);
 
 	/* verify that this is what we expect it to be */
-	if (((jmp[0] & 0xffff0000) != 0x3d600000) ||
-	    ((jmp[1] & 0xffff0000) != 0x396b0000) ||
-	    (jmp[2] != 0x7d6903a6) ||
+	if (((jmp[0] & 0xffff0000) != 0x3d800000) ||
+	    ((jmp[1] & 0xffff0000) != 0x398c0000) ||
+	    (jmp[2] != 0x7d8903a6) ||
 	    (jmp[3] != 0x4e800420)) {
 		printk(KERN_ERR "Not a trampoline\n");
 		return -EINVAL;
arch/powerpc/platforms/85xx/p1022_ds.c +93 -13

151 lines not on this page · raw message

arch/powerpc/platforms/pseries/eeh_event.c +4 -2
index 4cb375c..fb50631 100644
@@ -85,8 +85,10 @@ static int eeh_event_handler(void * dummy)
 	set_current_state(TASK_INTERRUPTIBLE);	/* Don't add to load average */
 	edev = handle_eeh_events(event);
 
-	eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
-	pci_dev_put(edev->pdev);
+	if (edev) {
+		eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
+		pci_dev_put(edev->pdev);
+	}
 
 	kfree(event);
 	mutex_unlock(&eeh_event_mutex);
arch/s390/include/asm/mmu_context.h +13 -1
index 5d09e40..5d211f7 100644
@@ -13,7 +13,6 @@
 #include <asm/uaccess.h>
 #include <asm/tlbflush.h>
 #include <asm/ctl_reg.h>
-#include <asm-generic/mm_hooks.h>
 
 static inline int init_new_context(struct task_struct *tsk,
 				   struct mm_struct *mm)
@@ -93,4 +92,17 @@ static inline void activate_mm(struct mm_struct *prev,
         switch_mm(prev, next, current);
 }
 
+static inline void arch_dup_mmap(struct mm_struct *oldmm,
+				 struct mm_struct *mm)
+{
+#ifdef CONFIG_64BIT
+	if (oldmm->context.asce_limit < mm->context.asce_limit)
+		crst_table_downgrade(mm, oldmm->context.asce_limit);
+#endif
+}
+
+static inline void arch_exit_mmap(struct mm_struct *mm)
+{
+}
+
 #endif /* __S390_MMU_CONTEXT_H */
arch/s390/include/asm/processor.h +2 -0
index d499b30..8b6f62e 100644
@@ -129,7 +129,9 @@ struct stack_frame {
 	regs->psw.mask	= psw_user_bits | PSW_MASK_BA;			\
 	regs->psw.addr	= new_psw | PSW_ADDR_AMODE;			\
 	regs->gprs[15]	= new_stackp;					\
+	__tlb_flush_mm(current->mm);					\
 	crst_table_downgrade(current->mm, 1UL << 31);			\
+	update_mm(current->mm, current);				\
 } while (0)
 
 /* Forward declaration, a strange C thing */
arch/s390/kernel/processor.c +2 -0
index 6e0073e..07c7bf4 100644
@@ -26,12 +26,14 @@ static DEFINE_PER_CPU(struct cpuid, cpu_id);
 void __cpuinit cpu_init(void)
 {
 	struct cpuid *id = &per_cpu(cpu_id, smp_processor_id());
+	struct s390_idle_data *idle = &__get_cpu_var(s390_idle);
 
 	get_cpu_id(id);
 	atomic_inc(&init_mm.mm_count);
 	current->active_mm = &init_mm;
 	BUG_ON(current->mm);
 	enter_lazy_tlb(&init_mm, current);
+	memset(idle, 0, sizeof(*idle));
 }
 
 /*
arch/s390/kernel/smp.c +0 -3
index 1f77227..c7b8822 100644
@@ -1034,14 +1034,11 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
 	unsigned int cpu = (unsigned int)(long)hcpu;
 	struct cpu *c = &pcpu_devices[cpu].cpu;
 	struct device *s = &c->dev;
-	struct s390_idle_data *idle;
 	int err = 0;
 
 	switch (action) {
 	case CPU_ONLINE:
 	case CPU_ONLINE_FROZEN:
-		idle = &per_cpu(s390_idle, cpu);
-		memset(idle, 0, sizeof(struct s390_idle_data));
 		err = sysfs_create_group(&s->kobj, &cpu_online_attr_group);
 		break;
 	case CPU_DEAD:
arch/s390/mm/fault.c +7 -6
index 4e66860..f2b11ee 100644
@@ -443,6 +443,7 @@ int __handle_fault(unsigned long uaddr, unsigned long pgm_int_code, int write)
 	struct pt_regs regs;
 	int access, fault;
 
+	/* Emulate a uaccess fault from kernel mode. */
 	regs.psw.mask = psw_kernel_bits | PSW_MASK_DAT | PSW_MASK_MCHECK;
 	if (!irqs_disabled())
 		regs.psw.mask |= PSW_MASK_IO | PSW_MASK_EXT;
@@ -452,12 +453,12 @@ int __handle_fault(unsigned long uaddr, unsigned long pgm_int_code, int write)
 	regs.int_parm_long = (uaddr & PAGE_MASK) | 2;
 	access = write ? VM_WRITE : VM_READ;
 	fault = do_exception(&regs, access);
-	if (unlikely(fault)) {
-		if (fault & VM_FAULT_OOM)
-			return -EFAULT;
-		else if (fault & VM_FAULT_SIGBUS)
-			do_sigbus(&regs);
-	}
+	/*
+	 * Since the fault happened in kernel mode while performing a uaccess
+	 * all we need to do now is emulating a fixup in case "fault" is not
+	 * zero.
+	 * For the calling uaccess functions this results always in -EFAULT.
+	 */
 	return fault ? -EFAULT : 0;
 }
 
arch/s390/mm/mmap.c +10 -2
index 2857c48..a64fe53 100644
@@ -105,9 +105,15 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
 
 int s390_mmap_check(unsigned long addr, unsigned long len)
 {
+	int rc;
+
 	if (!is_compat_task() &&
-	    len >= TASK_SIZE && TASK_SIZE < (1UL << 53))
-		return crst_table_upgrade(current->mm, 1UL << 53);
+	    len >= TASK_SIZE && TASK_SIZE < (1UL << 53)) {
+		rc = crst_table_upgrade(current->mm, 1UL << 53);
+		if (rc)
+			return rc;
+		update_mm(current->mm, current);
+	}
 	return 0;
 }
 
@@ -127,6 +133,7 @@ s390_get_unmapped_area(struct file *filp, unsigned long addr,
 		rc = crst_table_upgrade(mm, 1UL << 53);
 		if (rc)
 			return (unsigned long) rc;
+		update_mm(mm, current);
 		area = arch_get_unmapped_area(filp, addr, len, pgoff, flags);
 	}
 	return area;
@@ -149,6 +156,7 @@ s390_get_unmapped_area_topdown(struct file *filp, const unsigned long addr,
 		rc = crst_table_upgrade(mm, 1UL << 53);
 		if (rc)
 			return (unsigned long) rc;
+		update_mm(mm, current);
 		area = arch_get_unmapped_area_topdown(filp, addr, len,
 						      pgoff, flags);
 	}
arch/s390/mm/pgtable.c +0 -5
index 6e765bf..87f0efd 100644
@@ -85,7 +85,6 @@ repeat:
 		crst_table_free(mm, table);
 	if (mm->context.asce_limit < limit)
 		goto repeat;
-	update_mm(mm, current);
 	return 0;
 }
 
@@ -93,9 +92,6 @@ void crst_table_downgrade(struct mm_struct *mm, unsigned long limit)
 {
 	pgd_t *pgd;
 
-	if (mm->context.asce_limit <= limit)
-		return;
-	__tlb_flush_mm(mm);
 	while (mm->context.asce_limit > limit) {
 		pgd = mm->pgd;
 		switch (pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) {
@@ -118,7 +114,6 @@ void crst_table_downgrade(struct mm_struct *mm, unsigned long limit)
 		mm->task_size = mm->context.asce_limit;
 		crst_table_free(mm, (unsigned long *) pgd);
 	}
-	update_mm(mm, current);
 }
 #endif
 
arch/x86/kernel/cpu/mcheck/mce.c +4 -2
index 61604ae..0d2db0e 100644
@@ -1180,6 +1180,7 @@ void mce_notify_process(void)
 {
 	unsigned long pfn;
 	struct mce_info *mi = mce_find_info();
+	int flags = MF_ACTION_REQUIRED;
 
 	if (!mi)
 		mce_panic("Lost physical address for unconsumed uncorrectable error", NULL, NULL);
@@ -1194,8 +1195,9 @@ void mce_notify_process(void)
 	 * doomed. We still need to mark the page as poisoned and alert any
 	 * other users of the page.
 	 */
-	if (memory_failure(pfn, MCE_VECTOR, MF_ACTION_REQUIRED) < 0 ||
-			   mi->restartable == 0) {
+	if (!mi->restartable)
+		flags |= MF_MUST_KILL;
+	if (memory_failure(pfn, MCE_VECTOR, flags) < 0) {
 		pr_err("Memory error not recovered");
 		force_sig(SIGBUS, current);
 	}
drivers/acpi/ac.c +3 -1
index 6512b20..d1fcbc0 100644
@@ -292,7 +292,9 @@ static int acpi_ac_add(struct acpi_device *device)
 	ac->charger.properties = ac_props;
 	ac->charger.num_properties = ARRAY_SIZE(ac_props);
 	ac->charger.get_property = get_ac_property;
-	power_supply_register(&ac->device->dev, &ac->charger);
+	result = power_supply_register(&ac->device->dev, &ac->charger);
+	if (result)
+		goto end;
 
 	printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
 	       acpi_device_name(device), acpi_device_bid(device),
drivers/acpi/apei/apei-base.c +5 -0
index 6686b1e..00a7836 100644
@@ -586,6 +586,11 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
 	}
 	*access_bit_width = 1UL << (access_size_code + 2);
 
+	/* Fixup common BIOS bug */
+	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
+	    *access_bit_width < 32)
+		*access_bit_width = 32;
+
 	if ((bit_width + bit_offset) > *access_bit_width) {
 		pr_warning(FW_BUG APEI_PFX
 			   "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n",
drivers/base/power/main.c +9 -1
index 3085f9b..f7eff25 100644
@@ -979,8 +979,16 @@ static int dpm_suspend_late(pm_message_t state)
 int dpm_suspend_end(pm_message_t state)
 {
 	int error = dpm_suspend_late(state);
+	if (error)
+		return error;
 
-	return error ? : dpm_suspend_noirq(state);
+	error = dpm_suspend_noirq(state);
+	if (error) {
+		dpm_resume_early(state);
+		return error;
+	}
+
+	return 0;
 }
 EXPORT_SYMBOL_GPL(dpm_suspend_end);
 
drivers/char/tpm/tpm.c +10 -2
index ad7c732..08427ab 100644
@@ -827,10 +827,10 @@ EXPORT_SYMBOL_GPL(tpm_pcr_extend);
 int tpm_do_selftest(struct tpm_chip *chip)
 {
 	int rc;
-	u8 digest[TPM_DIGEST_SIZE];
 	unsigned int loops;
 	unsigned int delay_msec = 1000;
 	unsigned long duration;
+	struct tpm_cmd_t cmd;
 
 	duration = tpm_calc_ordinal_duration(chip,
 	                                     TPM_ORD_CONTINUE_SELFTEST);
@@ -845,7 +845,15 @@ int tpm_do_selftest(struct tpm_chip *chip)
 		return rc;
 
 	do {
-		rc = __tpm_pcr_read(chip, 0, digest);
+		/* Attempt to read a PCR value */
+		cmd.header.in = pcrread_header;
+		cmd.params.pcrread_in.pcr_idx = cpu_to_be32(0);
+		rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE);
+
+		if (rc < TPM_HEADER_SIZE)
+			return -EFAULT;
+
+		rc = be32_to_cpu(cmd.header.out.return_code);
 		if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) {
 			dev_info(chip->dev,
 				 "TPM is disabled/deactivated (0x%X)\n", rc);
drivers/gpu/drm/nouveau/nva3_copy.fuc +2 -2
index abc3662..219850d 100644
@@ -119,9 +119,9 @@ dispatch_dma:
 // mthd 0x030c-0x0340, various stuff
 .b16 0xc3 14
 .b32 #ctx_src_address_high           ~0x000000ff
-.b32 #ctx_src_address_low            ~0xfffffff0
+.b32 #ctx_src_address_low            ~0xffffffff
 .b32 #ctx_dst_address_high           ~0x000000ff
-.b32 #ctx_dst_address_low            ~0xfffffff0
+.b32 #ctx_dst_address_low            ~0xffffffff
 .b32 #ctx_src_pitch                  ~0x0007ffff
 .b32 #ctx_dst_pitch                  ~0x0007ffff
 .b32 #ctx_xcnt                       ~0x0000ffff
drivers/gpu/drm/nouveau/nva3_copy.fuc.h +90 -4

343 lines not on this page · raw message

drivers/gpu/drm/nouveau/nvc0_copy.fuc.h +83 -4

313 lines not on this page · raw message

drivers/gpu/drm/radeon/atombios_dp.c +7 -3
index c57d856..886b41f 100644
@@ -22,6 +22,7 @@
  *
  * Authors: Dave Airlie
  *          Alex Deucher
+ *          Jerome Glisse
  */
 #include "drmP.h"
 #include "radeon_drm.h"
@@ -637,7 +638,6 @@ static bool radeon_dp_get_link_status(struct radeon_connector *radeon_connector,
 	ret = radeon_dp_aux_native_read(radeon_connector, DP_LANE0_1_STATUS,
 					link_status, DP_LINK_STATUS_SIZE, 100);
 	if (ret <= 0) {
-		DRM_ERROR("displayport link status failed\n");
 		return false;
 	}
 
@@ -816,8 +816,10 @@ static int radeon_dp_link_train_cr(struct radeon_dp_link_train_info *dp_info)
 		else
 			mdelay(dp_info->rd_interval * 4);
 
-		if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status))
+		if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status)) {
+			DRM_ERROR("displayport link status failed\n");
 			break;
+		}
 
 		if (dp_clock_recovery_ok(dp_info->link_status, dp_info->dp_lane_count)) {
 			clock_recovery = true;
@@ -879,8 +881,10 @@ static int radeon_dp_link_train_ce(struct radeon_dp_link_train_info *dp_info)
 		else
 			mdelay(dp_info->rd_interval * 4);
 
-		if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status))
+		if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status)) {
+			DRM_ERROR("displayport link status failed\n");
 			break;
+		}
 
 		if (dp_channel_eq_ok(dp_info->link_status, dp_info->dp_lane_count)) {
 			channel_eq = true;
drivers/gpu/drm/radeon/atombios_encoders.c +10 -2
index 2d39f99..a3ae788 100644
@@ -1392,10 +1392,18 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
 	case DRM_MODE_DPMS_ON:
 		/* some early dce3.2 boards have a bug in their transmitter control table */
 		if ((rdev->family == CHIP_RV710) || (rdev->family == CHIP_RV730) ||
-		    ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev))
+		    ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
+			if (ASIC_IS_DCE6(rdev)) {
+				/* It seems we need to call ATOM_ENCODER_CMD_SETUP again
+				 * before reenabling encoder on DPMS ON, otherwise we never
+				 * get picture
+				 */
+				atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
+			}
 			atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
-		else
+		} else {
 			atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
+		}
 		if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
 			if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
 				atombios_set_edp_panel_power(connector,
drivers/gpu/drm/radeon/radeon_connectors.c +27 -8
index 3c2e7a0..3fb7ca9 100644
@@ -64,14 +64,33 @@ void radeon_connector_hotplug(struct drm_connector *connector)
 
 	/* just deal with DP (not eDP) here. */
 	if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
-		int saved_dpms = connector->dpms;
-
-		/* Only turn off the display it it's physically disconnected */
-		if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
-			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
-		else if (radeon_dp_needs_link_train(radeon_connector))
-			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
-		connector->dpms = saved_dpms;
+		struct radeon_connector_atom_dig *dig_connector =
+			radeon_connector->con_priv;
+
+		/* if existing sink type was not DP no need to retrain */
+		if (dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_DISPLAYPORT)
+			return;
+
+		/* first get sink type as it may be reset after (un)plug */
+		dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector);
+		/* don't do anything if sink is not display port, i.e.,
+		 * passive dp->(dvi|hdmi) adaptor
+		 */
+		if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
+			int saved_dpms = connector->dpms;
+			/* Only turn off the display if it's physically disconnected */
+			if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
+				drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
+			} else if (radeon_dp_needs_link_train(radeon_connector)) {
+				/* set it to OFF so that drm_helper_connector_dpms()
+				 * won't return immediately since the current state
+				 * is ON at this point.
+				 */
+				connector->dpms = DRM_MODE_DPMS_OFF;
+				drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
+			}
+			connector->dpms = saved_dpms;
+		}
 	}
 }
 
drivers/gpu/drm/radeon/radeon_cs.c +1 -1
index 2418cf6..cf723c4 100644
@@ -377,7 +377,7 @@ static int radeon_cs_ib_chunk(struct radeon_device *rdev,
 	if (r) {
 		DRM_ERROR("Failed to schedule IB !\n");
 	}
-	return 0;
+	return r;
 }
 
 static int radeon_bo_vm_update_pte(struct radeon_cs_parser *parser,
drivers/gpu/drm/radeon/radeon_cursor.c +7 -1
index 42acc64..711e95a 100644
@@ -262,8 +262,14 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
 				if (!(cursor_end & 0x7f))
 					w--;
 			}
-			if (w <= 0)
+			if (w <= 0) {
 				w = 1;
+				cursor_end = x - xorigin + w;
+				if (!(cursor_end & 0x7f)) {
+					x--;
+					WARN_ON_ONCE(x < 0);
+				}
+			}
 		}
 	}
 
drivers/gpu/drm/radeon/radeon_object.c +2 -1
index df6a4db..80c6e8b 100644
@@ -136,7 +136,6 @@ int radeon_bo_create(struct radeon_device *rdev,
 	acc_size = ttm_bo_dma_acc_size(&rdev->mman.bdev, size,
 				       sizeof(struct radeon_bo));
 
-retry:
 	bo = kzalloc(sizeof(struct radeon_bo), GFP_KERNEL);
 	if (bo == NULL)
 		return -ENOMEM;
@@ -150,6 +149,8 @@ retry:
 	bo->surface_reg = -1;
 	INIT_LIST_HEAD(&bo->list);
 	INIT_LIST_HEAD(&bo->va);
+
+retry:
 	radeon_ttm_placement_from_domain(bo, domain);
 	/* Kernel allocation are uninterruptible */
 	mutex_lock(&rdev->vram_mutex);
drivers/iommu/amd_iommu.c +13 -4
index dfe7d37..57ed244 100644
@@ -2254,6 +2254,18 @@ static int device_change_notifier(struct notifier_block *nb,
 
 		iommu_init_device(dev);
 
+		/*
+		 * dev_data is still NULL and
+		 * got initialized in iommu_init_device
+		 */
+		dev_data = get_dev_data(dev);
+
+		if (iommu_pass_through || dev_data->iommu_v2) {
+			dev_data->passthrough = true;
+			attach_device(dev, pt_domain);
+			break;
+		}
+
 		domain = domain_for_device(dev);
 
 		/* allocate a protection domain if a device is added */
@@ -2271,10 +2283,7 @@ static int device_change_notifier(struct notifier_block *nb,
 
 		dev_data = get_dev_data(dev);
 
-		if (!dev_data->passthrough)
-			dev->archdata.dma_ops = &amd_iommu_dma_ops;
-		else
-			dev->archdata.dma_ops = &nommu_dma_ops;
+		dev->archdata.dma_ops = &amd_iommu_dma_ops;
 
 		break;
 	case BUS_NOTIFY_DEL_DEVICE:
drivers/iommu/amd_iommu_v2.c +2 -0
index 036fe9b..a1f1bc8 100644
@@ -681,6 +681,8 @@ int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid,
 
 	atomic_set(&pasid_state->count, 1);
 	init_waitqueue_head(&pasid_state->wq);
+	spin_lock_init(&pasid_state->lock);
+
 	pasid_state->task         = task;
 	pasid_state->mm           = get_task_mm(task);
 	pasid_state->device_state = dev_state;
drivers/md/dm-thin.c +4 -3
index e0a0ebe..1555f0b 100644
@@ -19,7 +19,7 @@
 /*
  * Tunable constants
  */
-#define ENDIO_HOOK_POOL_SIZE 10240
+#define ENDIO_HOOK_POOL_SIZE 1024
 #define DEFERRED_SET_SIZE 64
 #define MAPPING_POOL_SIZE 1024
 #define PRISON_CELLS 1024
@@ -855,7 +855,7 @@ static void process_prepared_mapping(struct new_mapping *m)
 
 	if (m->err) {
 		cell_error(m->cell);
-		return;
+		goto out;
 	}
 
 	/*
@@ -867,7 +867,7 @@ static void process_prepared_mapping(struct new_mapping *m)
 	if (r) {
 		DMERR("dm_thin_insert_block() failed");
 		cell_error(m->cell);
-		return;
+		goto out;
 	}
 
 	/*
@@ -882,6 +882,7 @@ static void process_prepared_mapping(struct new_mapping *m)
 	} else
 		cell_defer(tc, m->cell, m->data_block);
 
+out:
 	list_del(&m->list);
 	mempool_free(m, tc->pool->mapping_pool);
 }
drivers/mmc/host/sdhci-pci.c +1 -0
index 69ef0be..504da71 100644
@@ -157,6 +157,7 @@ static const struct sdhci_pci_fixes sdhci_ene_714 = {
 static const struct sdhci_pci_fixes sdhci_cafe = {
 	.quirks		= SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
 			  SDHCI_QUIRK_NO_BUSY_IRQ |
+			  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
 			  SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
 };
 
drivers/mmc/host/sdhci.c +7 -1
index ccefdeb..3c403aa 100644
@@ -27,6 +27,7 @@
 
 #include <linux/mmc/mmc.h>
 #include <linux/mmc/host.h>
+#include <linux/mmc/card.h>
 
 #include "sdhci.h"
 
@@ -1245,6 +1246,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 	struct sdhci_host *host;
 	bool present;
 	unsigned long flags;
+	u32 tuning_opcode;
 
 	host = mmc_priv(mmc);
 
@@ -1292,8 +1294,12 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 		 */
 		if ((host->flags & SDHCI_NEEDS_RETUNING) &&
 		    !(present_state & (SDHCI_DOING_WRITE | SDHCI_DOING_READ))) {
+			/* eMMC uses cmd21 while sd and sdio use cmd19 */
+			tuning_opcode = mmc->card->type == MMC_TYPE_MMC ?
+				MMC_SEND_TUNING_BLOCK_HS200 :
+				MMC_SEND_TUNING_BLOCK;
 			spin_unlock_irqrestore(&host->lock, flags);
-			sdhci_execute_tuning(mmc, mrq->cmd->opcode);
+			sdhci_execute_tuning(mmc, tuning_opcode);
 			spin_lock_irqsave(&host->lock, flags);
 
 			/* Restore original mmc_request structure */
drivers/net/caif/caif_serial.c +3 -0
index 8a3054b..5de74e7 100644
@@ -325,6 +325,9 @@ static int ldisc_open(struct tty_struct *tty)
 
 	sprintf(name, "cf%s", tty->name);
 	dev = alloc_netdev(sizeof(*ser), name, caifdev_setup);
+	if (!dev)
+		return -ENOMEM;
+
 	ser = netdev_priv(dev);
 	ser->tty = tty_kref_get(tty);
 	ser->dev = dev;
drivers/net/ethernet/atheros/atl1c/atl1c_main.c +0 -1
index 1ef0c92..65fe632 100644
@@ -267,7 +267,6 @@ static void atl1c_check_link_status(struct atl1c_adapter *adapter)
 				dev_warn(&pdev->dev, "stop mac failed\n");
 		atl1c_set_aspm(hw, false);
 		netif_carrier_off(netdev);
-		netif_stop_queue(netdev);
 		atl1c_phy_reset(hw);
 		atl1c_phy_init(&adapter->hw);
 	} else {
drivers/net/ethernet/broadcom/bnx2.c +3 -3
index 8297e28..b8ade57 100644
@@ -5372,7 +5372,7 @@ bnx2_free_tx_skbs(struct bnx2 *bp)
 			int k, last;
 
 			if (skb == NULL) {
-				j++;
+				j = NEXT_TX_BD(j);
 				continue;
 			}
 
@@ -5384,8 +5384,8 @@ bnx2_free_tx_skbs(struct bnx2 *bp)
 			tx_buf->skb = NULL;
 
 			last = tx_buf->nr_frags;
-			j++;
-			for (k = 0; k < last; k++, j++) {
+			j = NEXT_TX_BD(j);
+			for (k = 0; k < last; k++, j = NEXT_TX_BD(j)) {
 				tx_buf = &txr->tx_buf_ring[TX_RING_IDX(j)];
 				dma_unmap_page(&bp->pdev->dev,
 					dma_unmap_addr(tx_buf, mapping),
drivers/net/ethernet/broadcom/tg3.c +6 -4
index 1a1b29f..689d2a1 100644
@@ -298,6 +298,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57795)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5719)},
 	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
+	{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX)},
 	{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1000)},
@@ -8948,8 +8949,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
 	    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_57780 ||
 	    tg3_flag(tp, 57765_PLUS)) {
 		val = tr32(TG3_RDMA_RSRVCTRL_REG);
-		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
-		    GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720) {
+		if (tp->pci_chip_rev_id == CHIPREV_ID_5719_A0) {
 			val &= ~(TG3_RDMA_RSRVCTRL_TXMRGN_MASK |
 				 TG3_RDMA_RSRVCTRL_FIFO_LWM_MASK |
 				 TG3_RDMA_RSRVCTRL_FIFO_HWM_MASK);
@@ -12255,10 +12255,12 @@ static struct rtnl_link_stats64 *tg3_get_stats64(struct net_device *dev,
 {
 	struct tg3 *tp = netdev_priv(dev);
 
-	if (!tp->hw_stats)
+	spin_lock_bh(&tp->lock);
+	if (!tp->hw_stats) {
+		spin_unlock_bh(&tp->lock);
 		return &tp->net_stats_prev;
+	}
 
-	spin_lock_bh(&tp->lock);
 	tg3_get_nstats(tp, stats);
 	spin_unlock_bh(&tp->lock);
 
drivers/net/ethernet/freescale/gianfar.c +3 -4
index e7bed53..24381e1 100644
@@ -2065,10 +2065,9 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
 			return NETDEV_TX_OK;
 		}
 
-		/* Steal sock reference for processing TX time stamps */
-		swap(skb_new->sk, skb->sk);
-		swap(skb_new->destructor, skb->destructor);
-		kfree_skb(skb);
+		if (skb->sk)
+			skb_set_owner_w(skb_new, skb->sk);
+		consume_skb(skb);
 		skb = skb_new;
 	}
 
drivers/net/ethernet/realtek/r8169.c +5 -22
index 161e045..a73bbe7 100644
@@ -5000,7 +5000,6 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
 {
 	rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC);
 	tp->cur_tx = tp->dirty_tx = 0;
-	netdev_reset_queue(tp->dev);
 }
 
 static void rtl_reset_work(struct rtl8169_private *tp)
@@ -5155,8 +5154,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
 
 	txd->opts2 = cpu_to_le32(opts[1]);
 
-	netdev_sent_queue(dev, skb->len);
-
 	skb_tx_timestamp(skb);
 
 	wmb();
@@ -5253,16 +5250,9 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
 	rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
 }
 
-struct rtl_txc {
-	int packets;
-	int bytes;
-};
-
 static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
 {
-	struct rtl8169_stats *tx_stats = &tp->tx_stats;
 	unsigned int dirty_tx, tx_left;
-	struct rtl_txc txc = { 0, 0 };
 
 	dirty_tx = tp->dirty_tx;
 	smp_rmb();
@@ -5281,24 +5271,17 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
 		rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb,
 				     tp->TxDescArray + entry);
 		if (status & LastFrag) {
-			struct sk_buff *skb = tx_skb->skb;
-
-			txc.packets++;
-			txc.bytes += skb->len;
-			dev_kfree_skb(skb);
+			u64_stats_update_begin(&tp->tx_stats.syncp);
+			tp->tx_stats.packets++;
+			tp->tx_stats.bytes += tx_skb->skb->len;
+			u64_stats_update_end(&tp->tx_stats.syncp);
+			dev_kfree_skb(tx_skb->skb);
 			tx_skb->skb = NULL;
 		}
 		dirty_tx++;
 		tx_left--;
 	}
 
-	u64_stats_update_begin(&tx_stats->syncp);
-	tx_stats->packets += txc.packets;
-	tx_stats->bytes += txc.bytes;
-	u64_stats_update_end(&tx_stats->syncp);
-
-	netdev_completed_queue(dev, txc.packets, txc.bytes);
-
 	if (tp->dirty_tx != dirty_tx) {
 		tp->dirty_tx = dirty_tx;
 		/* Sync with rtl8169_start_xmit:
drivers/net/tun.c +7 -2
index bb8c72c..8f13420 100644
@@ -358,6 +358,8 @@ static void tun_free_netdev(struct net_device *dev)
 {
 	struct tun_struct *tun = netdev_priv(dev);
 
+	BUG_ON(!test_bit(SOCK_EXTERNALLY_ALLOCATED, &tun->socket.flags));
+
 	sk_release_kernel(tun->socket.sk);
 }
 
@@ -1115,6 +1117,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
 		tun->flags = flags;
 		tun->txflt.count = 0;
 		tun->vnet_hdr_sz = sizeof(struct virtio_net_hdr);
+		set_bit(SOCK_EXTERNALLY_ALLOCATED, &tun->socket.flags);
 
 		err = -ENOMEM;
 		sk = sk_alloc(&init_net, AF_UNSPEC, GFP_KERNEL, &tun_proto);
@@ -1252,10 +1255,12 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
 	int vnet_hdr_sz;
 	int ret;
 
-	if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89)
+	if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89) {
 		if (copy_from_user(&ifr, argp, ifreq_len))
 			return -EFAULT;
-
+	} else {
+		memset(&ifr, 0, sizeof(ifr));
+	}
 	if (cmd == TUNGETFEATURES) {
 		/* Currently this just means: "what IFF flags are valid?".
 		 * This is needed because we never checked for invalid flags on
drivers/net/usb/kaweth.c +1 -1
index df2a2cf..7a6ccd6 100644
@@ -1302,7 +1302,7 @@ static int kaweth_internal_control_msg(struct usb_device *usb_dev,
         int retv;
         int length = 0; /* shut up GCC */
 
-        urb = usb_alloc_urb(0, GFP_NOIO);
+	urb = usb_alloc_urb(0, GFP_ATOMIC);
         if (!urb)
                 return -ENOMEM;
 
drivers/net/wireless/iwlwifi/iwl-agn-sta.c +1 -0
index bef3f24..8be535f 100644
@@ -191,6 +191,7 @@ static void iwl_sta_calc_ht_flags(struct iwl_priv *priv,
 	mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2;
 
 	IWL_DEBUG_INFO(priv, "STA %pM SM PS mode: %s\n",
+			sta->addr,
 			(mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ?
 			"static" :
 			(mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ?
drivers/net/wireless/mwifiex/cfg80211.c +2 -2
index baf6919..03560a8 100644
@@ -544,9 +544,9 @@ mwifiex_dump_station_info(struct mwifiex_private *priv,
 
 	/*
 	 * Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid
-	 * MCS index values for us are 0 to 7.
+	 * MCS index values for us are 0 to 15.
 	 */
-	if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 8)) {
+	if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 16)) {
 		sinfo->txrate.mcs = priv->tx_rate;
 		sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
 		/* 40MHz rate */
drivers/net/wireless/rt2x00/rt2800usb.c +2 -1
index 5601302..f388b65 100644
@@ -1137,6 +1137,8 @@ static struct usb_device_id rt2800usb_device_table[] = {
 #ifdef CONFIG_RT2800USB_RT33XX
 	/* Belkin */
 	{ USB_DEVICE(0x050d, 0x945b) },
+	/* D-Link */
+	{ USB_DEVICE(0x2001, 0x3c17) },
 	/* Panasonic */
 	{ USB_DEVICE(0x083a, 0xb511) },
 	/* Philips */
@@ -1237,7 +1239,6 @@ static struct usb_device_id rt2800usb_device_table[] = {
 	/* D-Link */
 	{ USB_DEVICE(0x07d1, 0x3c0b) },
 	{ USB_DEVICE(0x07d1, 0x3c17) },
-	{ USB_DEVICE(0x2001, 0x3c17) },
 	/* Encore */
 	{ USB_DEVICE(0x203d, 0x14a1) },
 	/* Gemtek */
drivers/net/wireless/rtlwifi/rtl8192de/phy.c +3 -3
index 28fc5fb..46f7917 100644
@@ -3344,21 +3344,21 @@ void rtl92d_phy_config_macphymode_info(struct ieee80211_hw *hw)
 	switch (rtlhal->macphymode) {
 	case DUALMAC_SINGLEPHY:
 		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		rtlhal->version |= RF_TYPE_2T2R;
 		rtlhal->bandset = BAND_ON_BOTH;
 		rtlhal->current_bandtype = BAND_ON_2_4G;
 		break;
 
 	case SINGLEMAC_SINGLEPHY:
 		rtlphy->rf_type = RF_2T2R;
-		rtlhal->version |= CHIP_92D_SINGLEPHY;
+		rtlhal->version |= RF_TYPE_2T2R;
 		rtlhal->bandset = BAND_ON_BOTH;
 		rtlhal->current_bandtype = BAND_ON_2_4G;
 		break;
 
 	case DUALMAC_DUALPHY:
 		rtlphy->rf_type = RF_1T1R;
-		rtlhal->version &= (~CHIP_92D_SINGLEPHY);
+		rtlhal->version &= RF_TYPE_1T1R;
 		/* Now we let MAC0 run on 5G band. */
 		if (rtlhal->interfaceindex == 0) {
 			rtlhal->bandset = BAND_ON_5G;
drivers/net/wireless/rtlwifi/usb.c +11 -3
index a6049d7..aa970fc 100644
@@ -131,15 +131,19 @@ static u32 _usb_read_sync(struct rtl_priv *rtlpriv, u32 addr, u16 len)
 	u8 request;
 	u16 wvalue;
 	u16 index;
-	__le32 *data = &rtlpriv->usb_data[rtlpriv->usb_data_index];
+	__le32 *data;
+	unsigned long flags;
 
+	spin_lock_irqsave(&rtlpriv->locks.usb_lock, flags);
+	if (++rtlpriv->usb_data_index >= RTL_USB_MAX_RX_COUNT)
+		rtlpriv->usb_data_index = 0;
+	data = &rtlpriv->usb_data[rtlpriv->usb_data_index];
+	spin_unlock_irqrestore(&rtlpriv->locks.usb_lock, flags);
 	request = REALTEK_USB_VENQT_CMD_REQ;
 	index = REALTEK_USB_VENQT_CMD_IDX; /* n/a */
 
 	wvalue = (u16)addr;
 	_usbctrl_vendorreq_sync_read(udev, request, wvalue, index, data, len);
-	if (++rtlpriv->usb_data_index >= RTL_USB_MAX_RX_COUNT)
-		rtlpriv->usb_data_index = 0;
 	return le32_to_cpu(*data);
 }
 
@@ -951,6 +955,10 @@ int __devinit rtl_usb_probe(struct usb_interface *intf,
 				    GFP_KERNEL);
 	if (!rtlpriv->usb_data)
 		return -ENOMEM;
+
+	/* this spin lock must be initialized early */
+	spin_lock_init(&rtlpriv->locks.usb_lock);
+
 	rtlpriv->usb_data_index = 0;
 	init_completion(&rtlpriv->firmware_loading_complete);
 	SET_IEEE80211_DEV(hw, &intf->dev);
drivers/net/wireless/rtlwifi/wifi.h +1 -0
index 28ebc69..717d3ba 100644
@@ -1555,6 +1555,7 @@ struct rtl_locks {
 	spinlock_t rf_ps_lock;
 	spinlock_t rf_lock;
 	spinlock_t waitq_lock;
+	spinlock_t usb_lock;
 
 	/*Dual mac*/
 	spinlock_t cck_and_rw_pagea_lock;
drivers/s390/net/qeth_l3_main.c +4 -0
index f859216..951b6cf 100644
@@ -1818,6 +1818,8 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card,
 	QETH_CARD_TEXT(card, 4, "frvaddr4");
 
 	netdev = __vlan_find_dev_deep(card->dev, vid);
+	if (!netdev)
+		return;
 	in_dev = in_dev_get(netdev);
 	if (!in_dev)
 		return;
@@ -1846,6 +1848,8 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card,
 	QETH_CARD_TEXT(card, 4, "frvaddr6");
 
 	netdev = __vlan_find_dev_deep(card->dev, vid);
+	if (!netdev)
+		return;
 	in6_dev = in6_dev_get(netdev);
 	if (!in6_dev)
 		return;
drivers/scsi/hosts.c +4 -3
index a3a056a..b48c24f 100644
@@ -290,6 +290,7 @@ static void scsi_host_dev_release(struct device *dev)
 	struct Scsi_Host *shost = dev_to_shost(dev);
 	struct device *parent = dev->parent;
 	struct request_queue *q;
+	void *queuedata;
 
 	scsi_proc_hostdir_rm(shost->hostt);
 
@@ -299,9 +300,9 @@ static void scsi_host_dev_release(struct device *dev)
 		destroy_workqueue(shost->work_q);
 	q = shost->uspace_req_q;
 	if (q) {
-		kfree(q->queuedata);
-		q->queuedata = NULL;
-		scsi_free_queue(q);
+		queuedata = q->queuedata;
+		blk_cleanup_queue(q);
+		kfree(queuedata);
 	}
 
 	scsi_destroy_command_freelist(shost);
drivers/scsi/libsas/sas_expander.c +16 -31

106 lines not on this page · raw message

drivers/scsi/scsi_error.c +14 -0
index 386f0c5..cc8dc8c 100644
@@ -1687,6 +1687,20 @@ static void scsi_restart_operations(struct Scsi_Host *shost)
 	 * requests are started.
 	 */
 	scsi_run_host_queues(shost);
+
+	/*
+	 * if eh is active and host_eh_scheduled is pending we need to re-run
+	 * recovery.  we do this check after scsi_run_host_queues() to allow
+	 * everything pent up since the last eh run a chance to make forward
+	 * progress before we sync again.  Either we'll immediately re-run
+	 * recovery or scsi_device_unbusy() will wake us again when these
+	 * pending commands complete.
+	 */
+	spin_lock_irqsave(shost->host_lock, flags);
+	if (shost->host_eh_scheduled)
+		if (scsi_host_set_state(shost, SHOST_RECOVERY))
+			WARN_ON(scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY));
+	spin_unlock_irqrestore(shost->host_lock, flags);
 }
 
 /**
drivers/scsi/scsi_lib.c +15 -28

88 lines not on this page · raw message

drivers/scsi/scsi_priv.h +0 -1
index be4fa6d..fd9f57f 100644
@@ -84,7 +84,6 @@ extern void scsi_next_command(struct scsi_cmnd *cmd);
 extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
 extern void scsi_run_host_queues(struct Scsi_Host *shost);
 extern struct request_queue *scsi_alloc_queue(struct scsi_device *sdev);
-extern void scsi_free_queue(struct request_queue *q);
 extern int scsi_init_queue(void);
 extern void scsi_exit_queue(void);
 struct request_queue;
drivers/scsi/scsi_scan.c +3 -0
index 01b0374..8906557 100644
@@ -1714,6 +1714,9 @@ static void scsi_sysfs_add_devices(struct Scsi_Host *shost)
 {
 	struct scsi_device *sdev;
 	shost_for_each_device(sdev, shost) {
+		/* target removed before the device could be added */
+		if (sdev->sdev_state == SDEV_DEL)
+			continue;
 		if (!scsi_host_scan_allowed(shost) ||
 		    scsi_sysfs_add_sdev(sdev) != 0)
 			__scsi_remove_device(sdev);
drivers/scsi/scsi_sysfs.c +27 -19

73 lines not on this page · raw message

drivers/spi/spi-pl022.c +5 -0
index 400ae21..469eb28 100644
@@ -489,6 +489,11 @@ static void giveback(struct pl022 *pl022)
 	pl022->cur_transfer = NULL;
 	pl022->cur_chip = NULL;
 	spi_finalize_current_message(pl022->master);
+
+	/* disable the SPI/SSP operation */
+	writew((readw(SSP_CR1(pl022->virtbase)) &
+		(~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));
+
 }
 
 /**
drivers/staging/zsmalloc/zsmalloc-main.c +7 -26
index 917461c..175b3c9 100644
@@ -426,12 +426,6 @@ static struct page *find_get_zspage(struct size_class *class)
 }
 
 
-/*
- * If this becomes a separate module, register zs_init() with
- * module_init(), zs_exit with module_exit(), and remove zs_initialized
-*/
-static int zs_initialized;
-
 static int zs_cpu_notifier(struct notifier_block *nb, unsigned long action,
 				void *pcpu)
 {
@@ -490,7 +484,7 @@ fail:
 
 struct zs_pool *zs_create_pool(const char *name, gfp_t flags)
 {
-	int i, error, ovhd_size;
+	int i, ovhd_size;
 	struct zs_pool *pool;
 
 	if (!name)
@@ -517,28 +511,9 @@ struct zs_pool *zs_create_pool(const char *name, gfp_t flags)
 
 	}
 
-	/*
-	 * If this becomes a separate module, register zs_init with
-	 * module_init, and remove this block
-	*/
-	if (!zs_initialized) {
-		error = zs_init();
-		if (error)
-			goto cleanup;
-		zs_initialized = 1;
-	}
-
 	pool->flags = flags;
 	pool->name = name;
 
-	error = 0; /* Success */
-
-cleanup:
-	if (error) {
-		zs_destroy_pool(pool);
-		pool = NULL;
-	}
-
 	return pool;
 }
 EXPORT_SYMBOL_GPL(zs_create_pool);
@@ -749,3 +724,9 @@ u64 zs_get_total_size_bytes(struct zs_pool *pool)
 	return npages << PAGE_SHIFT;
 }
 EXPORT_SYMBOL_GPL(zs_get_total_size_bytes);
+
+module_init(zs_init);
+module_exit(zs_exit);
+
+MODULE_LICENSE("Dual BSD/GPL");
+MODULE_AUTHOR("Nitin Gupta <[email protected]>");
drivers/target/iscsi/iscsi_target.c +3 -19
index 8b1d5e6..e326d17 100644
@@ -427,19 +427,8 @@ int iscsit_reset_np_thread(
 
 int iscsit_del_np_comm(struct iscsi_np *np)
 {
-	if (!np->np_socket)
-		return 0;
-
-	/*
-	 * Some network transports allocate their own struct sock->file,
-	 * see  if we need to free any additional allocated resources.
-	 */
-	if (np->np_flags & NPF_SCTP_STRUCT_FILE) {
-		kfree(np->np_socket->file);
-		np->np_socket->file = NULL;
-	}
-
-	sock_release(np->np_socket);
+	if (np->np_socket)
+		sock_release(np->np_socket);
 	return 0;
 }
 
@@ -4094,13 +4083,8 @@ int iscsit_close_connection(
 	kfree(conn->conn_ops);
 	conn->conn_ops = NULL;
 
-	if (conn->sock) {
-		if (conn->conn_flags & CONNFLAG_SCTP_STRUCT_FILE) {
-			kfree(conn->sock->file);
-			conn->sock->file = NULL;
-		}
+	if (conn->sock)
 		sock_release(conn->sock);
-	}
 	conn->thread_set = NULL;
 
 	pr_debug("Moving to TARG_CONN_STATE_FREE.\n");
drivers/target/iscsi/iscsi_target_core.h +0 -2
index 2aaee7e..d1c4bc2 100644
@@ -224,7 +224,6 @@ enum iscsi_timer_flags_table {
 /* Used for struct iscsi_np->np_flags */
 enum np_flags_table {
 	NPF_IP_NETWORK		= 0x00,
-	NPF_SCTP_STRUCT_FILE	= 0x01 /* Bugfix */
 };
 
 /* Used for struct iscsi_np->np_thread_state */
@@ -511,7 +510,6 @@ struct iscsi_conn {
 	u16			local_port;
 	int			net_size;
 	u32			auth_id;
-#define CONNFLAG_SCTP_STRUCT_FILE			0x01
 	u32			conn_flags;
 	/* Used for iscsi_tx_login_rsp() */
 	u32			login_itt;
drivers/target/iscsi/iscsi_target_login.c +3 -57

110 lines not on this page · raw message

drivers/target/target_core_transport.c +10 -0
index 443704f..0686d61 100644
@@ -1976,6 +1976,7 @@ void transport_generic_request_failure(struct se_cmd *cmd)
 	case TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE:
 	case TCM_UNKNOWN_MODE_PAGE:
 	case TCM_WRITE_PROTECTED:
+	case TCM_ADDRESS_OUT_OF_RANGE:
 	case TCM_CHECK_CONDITION_ABORT_CMD:
 	case TCM_CHECK_CONDITION_UNIT_ATTENTION:
 	case TCM_CHECK_CONDITION_NOT_READY:
@@ -4656,6 +4657,15 @@ int transport_send_check_condition_and_sense(
 		/* WRITE PROTECTED */
 		buffer[offset+SPC_ASC_KEY_OFFSET] = 0x27;
 		break;
+	case TCM_ADDRESS_OUT_OF_RANGE:
+		/* CURRENT ERROR */
+		buffer[offset] = 0x70;
+		buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+		/* ILLEGAL REQUEST */
+		buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
+		/* LOGICAL BLOCK ADDRESS OUT OF RANGE */
+		buffer[offset+SPC_ASC_KEY_OFFSET] = 0x21;
+		break;
 	case TCM_CHECK_CONDITION_UNIT_ATTENTION:
 		/* CURRENT ERROR */
 		buffer[offset] = 0x70;
drivers/usb/core/devio.c +7 -3
index 4e57772..404413b 100644
@@ -1615,10 +1615,14 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
 	void __user *addr = as->userurb;
 	unsigned int i;
 
-	if (as->userbuffer && urb->actual_length)
-		if (copy_to_user(as->userbuffer, urb->transfer_buffer,
-				 urb->actual_length))
+	if (as->userbuffer && urb->actual_length) {
+		if (urb->number_of_packets > 0)		/* Isochronous */
+			i = urb->transfer_buffer_length;
+		else					/* Non-Isoc */
+			i = urb->actual_length;
+		if (copy_to_user(as->userbuffer, urb->transfer_buffer, i))
 			return -EFAULT;
+	}
 	if (put_user(as->status, &userurb->status))
 		return -EFAULT;
 	if (put_user(urb->actual_length, &userurb->actual_length))
drivers/usb/early/ehci-dbgp.c +1 -1
index 1fc8f12..347bb05 100644
@@ -450,7 +450,7 @@ static int dbgp_ehci_startup(void)
 	writel(FLAG_CF, &ehci_regs->configured_flag);
 
 	/* Wait until the controller is no longer halted */
-	loop = 10;
+	loop = 1000;
 	do {
 		status = readl(&ehci_regs->status);
 		if (!(status & STS_HALT))
drivers/usb/gadget/u_ether.c +6 -6
index 29c854b..4e1f0aa 100644
@@ -796,12 +796,6 @@ int gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN])
 
 	SET_ETHTOOL_OPS(net, &ops);
 
-	/* two kinds of host-initiated state changes:
-	 *  - iff DATA transfer is active, carrier is "on"
-	 *  - tx queueing enabled if open *and* carrier is "on"
-	 */
-	netif_carrier_off(net);
-
 	dev->gadget = g;
 	SET_NETDEV_DEV(net, &g->dev);
 	SET_NETDEV_DEVTYPE(net, &gadget_type);
@@ -815,6 +809,12 @@ int gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN])
 		INFO(dev, "HOST MAC %pM\n", dev->host_mac);
 
 		the_dev = dev;
+
+		/* two kinds of host-initiated state changes:
+		 *  - iff DATA transfer is active, carrier is "on"
+		 *  - tx queueing enabled if open *and* carrier is "on"
+		 */
+		netif_carrier_off(net);
 	}
 
 	return status;
drivers/usb/serial/option.c +2 -0
index 49484b3..ae1a4b8 100644
@@ -936,6 +936,8 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff),
 	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff),
+	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff),
 	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff),
drivers/usb/storage/uas.c +15 -75

168 lines not on this page · raw message

fs/btrfs/async-thread.c +8 -1
index 4270414..58b7d14 100644
@@ -206,10 +206,17 @@ static noinline void run_ordered_completions(struct btrfs_workers *workers,
 
 		work->ordered_func(work);
 
-		/* now take the lock again and call the freeing code */
+		/* now take the lock again and drop our item from the list */
 		spin_lock(&workers->order_lock);
 		list_del(&work->order_list);
+		spin_unlock(&workers->order_lock);
+
+		/*
+		 * we don't want to call the ordered free functions
+		 * with the lock held though
+		 */
 		work->ordered_free(work);
+		spin_lock(&workers->order_lock);
 	}
 
 	spin_unlock(&workers->order_lock);
fs/cifs/connect.c +5 -4
index 87ce8af..65a78e9 100644
@@ -238,8 +238,8 @@ static const match_table_t cifs_mount_option_tokens = {
 enum {
 	Opt_sec_krb5, Opt_sec_krb5i, Opt_sec_krb5p,
 	Opt_sec_ntlmsspi, Opt_sec_ntlmssp,
-	Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2i,
-	Opt_sec_nontlm, Opt_sec_lanman,
+	Opt_ntlm, Opt_sec_ntlmi, Opt_sec_ntlmv2,
+	Opt_sec_ntlmv2i, Opt_sec_lanman,
 	Opt_sec_none,
 
 	Opt_sec_err
@@ -253,8 +253,9 @@ static const match_table_t cifs_secflavor_tokens = {
 	{ Opt_sec_ntlmssp, "ntlmssp" },
 	{ Opt_ntlm, "ntlm" },
 	{ Opt_sec_ntlmi, "ntlmi" },
+	{ Opt_sec_ntlmv2, "nontlm" },
+	{ Opt_sec_ntlmv2, "ntlmv2" },
 	{ Opt_sec_ntlmv2i, "ntlmv2i" },
-	{ Opt_sec_nontlm, "nontlm" },
 	{ Opt_sec_lanman, "lanman" },
 	{ Opt_sec_none, "none" },
 
@@ -1163,7 +1164,7 @@ static int cifs_parse_security_flavors(char *value,
 	case Opt_sec_ntlmi:
 		vol->secFlg |= CIFSSEC_MAY_NTLM | CIFSSEC_MUST_SIGN;
 		break;
-	case Opt_sec_nontlm:
+	case Opt_sec_ntlmv2:
 		vol->secFlg |= CIFSSEC_MAY_NTLMV2;
 		break;
 	case Opt_sec_ntlmv2i:
fs/exec.c +1 -1
index 29e5f84..126e01c 100644
@@ -1024,7 +1024,7 @@ static void flush_old_files(struct files_struct * files)
 		unsigned long set, i;
 
 		j++;
-		i = j * __NFDBITS;
+		i = j * BITS_PER_LONG;
 		fdt = files_fdtable(files);
 		if (i >= fdt->max_fds)
 			break;
fs/ext4/balloc.c +2 -1
index 8da837b..df76291 100644
@@ -584,7 +584,8 @@ ext4_fsblk_t ext4_count_free_clusters(struct super_block *sb)
 		if (bitmap_bh == NULL)
 			continue;
 
-		x = ext4_count_free(bitmap_bh, sb->s_blocksize);
+		x = ext4_count_free(bitmap_bh->b_data,
+				    EXT4_BLOCKS_PER_GROUP(sb) / 8);
 		printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n",
 			i, ext4_free_group_clusters(sb, gdp), x);
 		bitmap_count += x;
fs/ext4/bitmap.c +3 -9
index fa3af81..bbde5d5 100644
@@ -11,21 +11,15 @@
 #include <linux/jbd2.h>
 #include "ext4.h"
 
-#ifdef EXT4FS_DEBUG
-
 static const int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
 
-unsigned int ext4_count_free(struct buffer_head *map, unsigned int numchars)
+unsigned int ext4_count_free(char *bitmap, unsigned int numchars)
 {
 	unsigned int i, sum = 0;
 
-	if (!map)
-		return 0;
 	for (i = 0; i < numchars; i++)
-		sum += nibblemap[map->b_data[i] & 0xf] +
-			nibblemap[(map->b_data[i] >> 4) & 0xf];
+		sum += nibblemap[bitmap[i] & 0xf] +
+			nibblemap[(bitmap[i] >> 4) & 0xf];
 	return sum;
 }
 
-#endif  /*  EXT4FS_DEBUG  */
-
fs/ext4/ext4.h +3 -3
index 0e01e90..47d1c8c 100644
@@ -1140,8 +1140,7 @@ struct ext4_sb_info {
 	unsigned long s_desc_per_block;	/* Number of group descriptors per block */
 	ext4_group_t s_groups_count;	/* Number of groups in the fs */
 	ext4_group_t s_blockfile_groups;/* Groups acceptable for non-extent files */
-	unsigned long s_overhead_last;  /* Last calculated overhead */
-	unsigned long s_blocks_last;    /* Last seen block count */
+	unsigned long s_overhead;  /* # of fs overhead clusters */
 	unsigned int s_cluster_ratio;	/* Number of blocks per cluster */
 	unsigned int s_cluster_bits;	/* log2 of s_cluster_ratio */
 	loff_t s_bitmap_maxbytes;	/* max bytes for bitmap files */
@@ -1783,7 +1782,7 @@ struct mmpd_data {
 # define NORET_AND	noreturn,
 
 /* bitmap.c */
-extern unsigned int ext4_count_free(struct buffer_head *, unsigned);
+extern unsigned int ext4_count_free(char *bitmap, unsigned numchars);
 
 /* balloc.c */
 extern unsigned int ext4_block_group(struct super_block *sb,
@@ -1950,6 +1949,7 @@ extern int ext4_group_extend(struct super_block *sb,
 extern int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count);
 
 /* super.c */
+extern int ext4_calculate_overhead(struct super_block *sb);
 extern void *ext4_kvmalloc(size_t size, gfp_t flags);
 extern void *ext4_kvzalloc(size_t size, gfp_t flags);
 extern void ext4_kvfree(void *ptr);
fs/ext4/extents.c +29 -17

82 lines not on this page · raw message

fs/ext4/ialloc.c +2 -1
index 8900f8b..0ee374d 100644
@@ -1013,7 +1013,8 @@ unsigned long ext4_count_free_inodes(struct super_block *sb)
 		if (!bitmap_bh)
 			continue;
 
-		x = ext4_count_free(bitmap_bh, EXT4_INODES_PER_GROUP(sb) / 8);
+		x = ext4_count_free(bitmap_bh->b_data,
+				    EXT4_INODES_PER_GROUP(sb) / 8);
 		printk(KERN_DEBUG "group %lu: stored = %d, counted = %lu\n",
 			(unsigned long) i, ext4_free_inodes_count(sb, gdp), x);
 		bitmap_count += x;
fs/ext4/inode.c +30 -11

74 lines not on this page · raw message

fs/ext4/resize.c +6 -1
index 53589ff..3407a62 100644
@@ -1141,7 +1141,7 @@ static void ext4_update_super(struct super_block *sb,
 	struct ext4_new_group_data *group_data = flex_gd->groups;
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	struct ext4_super_block *es = sbi->s_es;
-	int i;
+	int i, ret;
 
 	BUG_ON(flex_gd->count == 0 || group_data == NULL);
 	/*
@@ -1216,6 +1216,11 @@ static void ext4_update_super(struct super_block *sb,
 			   &sbi->s_flex_groups[flex_group].free_inodes);
 	}
 
+	/*
+	 * Update the fs overhead information
+	 */
+	ext4_calculate_overhead(sb);
+
 	if (test_opt(sb, DEBUG))
 		printk(KERN_DEBUG "EXT4-fs: added group %u:"
 		       "%llu blocks(%llu free %llu reserved)\n", flex_gd->count,
fs/ext4/super.c +124 -50

177 lines not on this page · raw message

fs/locks.c +3 -3
index 6a64f15..fcc50ab 100644

Lines of this file are not shown. View the raw message.

fs/nfs/file.c +5 -2
index aa9b709..f0f439d 100644

Lines of this file are not shown. View the raw message.

fs/nfs/idmap.c +20 -6
index 93aa3a4..929ba01 100644

Lines of this file are not shown. View the raw message.

fs/nfs/objlayout/objio_osd.c +13 -3
index 42ac1bf..1afe74c 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4xdr.c +1 -1
index 74c00bc..283d15e 100644

Lines of this file are not shown. View the raw message.

fs/select.c +5 -5
index 17d33d0..0baa0a3 100644

Lines of this file are not shown. View the raw message.

fs/udf/super.c +1 -1
index 8d86a87..e660ffd 100644

Lines of this file are not shown. View the raw message.

include/linux/cpu.h +3 -2
index ee28844..78ed62f 100644

Lines of this file are not shown. View the raw message.

include/linux/mm.h +1 -0
index 74aa71b..441a564 100644

Lines of this file are not shown. View the raw message.

include/linux/net.h +1 -0
index be60c7f..95fea14 100644

Lines of this file are not shown. View the raw message.

include/linux/posix_types.h +3 -15
index f04c98c..988f76e 100644

Lines of this file are not shown. View the raw message.

include/linux/time.h +0 -8
index 33a92ea..8da5129 100644

Lines of this file are not shown. View the raw message.

include/target/target_core_base.h +1 -0
index aaccc5f..3ad5b33 100644

Lines of this file are not shown. View the raw message.

kernel/exit.c +1 -1
index 9d81012..bfbd856 100644

Lines of this file are not shown. View the raw message.

kernel/futex.c +10 -7
index e2b0fb9..3717e7b 100644

Lines of this file are not shown. View the raw message.

kernel/power/hibernate.c +6 -0
index e09dfbf..52a1817 100644

Lines of this file are not shown. View the raw message.

kernel/power/suspend.c +3 -0
index 396d262..c8b7446 100644

Lines of this file are not shown. View the raw message.

kernel/workqueue.c +37 -1
index 7da267c..bfe3f8a 100644

Lines of this file are not shown. View the raw message.

mm/memory-failure.c +8 -6
index 97cc273..0de20d7 100644

Lines of this file are not shown. View the raw message.

net/8021q/vlan.c +3 -0
index efea35b..cf4a49c 100644

Lines of this file are not shown. View the raw message.

net/caif/caif_dev.c +1 -1
index aa6f716..7bf4c21 100644

Lines of this file are not shown. View the raw message.

net/compat.c +2 -2
index e055708..ae6d67a 100644

Lines of this file are not shown. View the raw message.

net/core/rtnetlink.c +7 -1
index 90430b7..b8052ba 100644

Lines of this file are not shown. View the raw message.

net/ipv4/cipso_ipv4.c +4 -2
index c48adc5..667c1d4 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp.c +4 -1
index 6589e11..d6feb1e 100644

Lines of this file are not shown. View the raw message.

net/ipv4/tcp_input.c +3 -1
index 257b617..56a9c8d 100644

Lines of this file are not shown. View the raw message.

net/mac80211/mlme.c +2 -2
index d132b98..25be683 100644

Lines of this file are not shown. View the raw message.

net/sched/sch_netem.c +15 -27

42 lines not on this page · raw message

net/sched/sch_sfb.c +2 -0
index d7eea99..c6a5867 100644

Lines of this file are not shown. View the raw message.

net/sctp/input.c +2 -5
index 80f71af..be772c0 100644

Lines of this file are not shown. View the raw message.

net/sctp/socket.c +10 -2
index 92ba71d..dba20d6 100644

Lines of this file are not shown. View the raw message.

net/socket.c +3 -0
index 851edcd..573b261 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/sched.c +2 -0
index 994cfea..eda32ae 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprtrdma/transport.c +2 -1
index b446e10..06cdbff 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprtsock.c +10 -0
index 890b03f..b88c6bf 100644

Lines of this file are not shown. View the raw message.

net/wanrouter/wanmain.c +23 -28

51 lines not on this page · raw message

security/selinux/hooks.c +1 -1
index d85b793..5626222 100644

Lines of this file are not shown. View the raw message.

sound/drivers/mpu401/mpu401_uart.c +1 -0
index 1cff331..4608c2c 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_hdmi.c +6 -6
index 83f345f..d1b805a 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +29 -0
index c43264f..62e1627 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_sigmatel.c +21 -2
index 7494fbc..fd53312 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_via.c +5 -2
index 06214fd..3998d09b 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/wm8962.c +6 -0
index 15d467f..96f6f9f 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/wm8994.c +1 -1
index f351b93..4c471a5 100644

Lines of this file are not shown. View the raw message.

sound/soc/soc-dapm.c +9 -1
index 1bb6d4a..c41efe0 100644

Lines of this file are not shown. View the raw message.

sound/usb/clock.c +2 -1
index 379baad..5e634a2 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.