]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jul 2014 00:39:20 +0000 (17:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jul 2014 00:39:20 +0000 (17:39 -0700)
added patches:
hwmon-adt7470-fix-writes-to-temperature-limit-registers.patch
hwmon-da9052-don-t-use-dash-in-the-name-attribute.patch
hwmon-da9055-don-t-use-dash-in-the-name-attribute.patch
igb-do-a-reset-on-sr-iov-re-init-if-device-is-down.patch
igb-workaround-for-i210-errata-25-slow-system-clock.patch
iio-core-handle-error-when-mask-type-is-not-separate.patch
iwlwifi-dvm-don-t-enable-cts-to-self.patch
iwlwifi-update-the-7265-series-hw-ids.patch
quota-missing-lock-in-dqcache_shrink_scan.patch
tracing-add-ftrace_trace_stack-into-__trace_puts-__trace_bputs.patch
tracing-add-trace_iter_printk-flag-check-in-__trace_puts-__trace_bputs.patch
tracing-fix-graph-tracer-with-stack-tracer-on-other-archs.patch
tracing-instance_rmdir-leaks-ftrace_event_file-filter.patch
xen-balloon-set-ballooned-out-pages-as-invalid-in-p2m.patch
xen-manage-fix-potential-deadlock-when-resuming-the-console.patch

16 files changed:
queue-3.15/hwmon-adt7470-fix-writes-to-temperature-limit-registers.patch [new file with mode: 0644]
queue-3.15/hwmon-da9052-don-t-use-dash-in-the-name-attribute.patch [new file with mode: 0644]
queue-3.15/hwmon-da9055-don-t-use-dash-in-the-name-attribute.patch [new file with mode: 0644]
queue-3.15/igb-do-a-reset-on-sr-iov-re-init-if-device-is-down.patch [new file with mode: 0644]
queue-3.15/igb-workaround-for-i210-errata-25-slow-system-clock.patch [new file with mode: 0644]
queue-3.15/iio-core-handle-error-when-mask-type-is-not-separate.patch [new file with mode: 0644]
queue-3.15/iwlwifi-dvm-don-t-enable-cts-to-self.patch [new file with mode: 0644]
queue-3.15/iwlwifi-update-the-7265-series-hw-ids.patch [new file with mode: 0644]
queue-3.15/quota-missing-lock-in-dqcache_shrink_scan.patch [new file with mode: 0644]
queue-3.15/series
queue-3.15/tracing-add-ftrace_trace_stack-into-__trace_puts-__trace_bputs.patch [new file with mode: 0644]
queue-3.15/tracing-add-trace_iter_printk-flag-check-in-__trace_puts-__trace_bputs.patch [new file with mode: 0644]
queue-3.15/tracing-fix-graph-tracer-with-stack-tracer-on-other-archs.patch [new file with mode: 0644]
queue-3.15/tracing-instance_rmdir-leaks-ftrace_event_file-filter.patch [new file with mode: 0644]
queue-3.15/xen-balloon-set-ballooned-out-pages-as-invalid-in-p2m.patch [new file with mode: 0644]
queue-3.15/xen-manage-fix-potential-deadlock-when-resuming-the-console.patch [new file with mode: 0644]

diff --git a/queue-3.15/hwmon-adt7470-fix-writes-to-temperature-limit-registers.patch b/queue-3.15/hwmon-adt7470-fix-writes-to-temperature-limit-registers.patch
new file mode 100644 (file)
index 0000000..2dd83eb
--- /dev/null
@@ -0,0 +1,53 @@
+From de12d6f4b10b21854441f5242dcb29ea96181e58 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Wed, 16 Jul 2014 17:40:31 -0700
+Subject: hwmon: (adt7470) Fix writes to temperature limit registers
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit de12d6f4b10b21854441f5242dcb29ea96181e58 upstream.
+
+Temperature limit registers are signed. Limits therefore need
+to be clamped to (-128, 127) degrees C and not to (0, 255)
+degrees C.
+
+Without this fix, writing a limit of 128 degrees C sets the
+actual limit to -128 degrees C.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Reviewed-by: Axel Lin <axel.lin@ingics.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/adt7470.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/hwmon/adt7470.c
++++ b/drivers/hwmon/adt7470.c
+@@ -515,7 +515,7 @@ static ssize_t set_temp_min(struct devic
+               return -EINVAL;
+       temp = DIV_ROUND_CLOSEST(temp, 1000);
+-      temp = clamp_val(temp, 0, 255);
++      temp = clamp_val(temp, -128, 127);
+       mutex_lock(&data->lock);
+       data->temp_min[attr->index] = temp;
+@@ -549,7 +549,7 @@ static ssize_t set_temp_max(struct devic
+               return -EINVAL;
+       temp = DIV_ROUND_CLOSEST(temp, 1000);
+-      temp = clamp_val(temp, 0, 255);
++      temp = clamp_val(temp, -128, 127);
+       mutex_lock(&data->lock);
+       data->temp_max[attr->index] = temp;
+@@ -826,7 +826,7 @@ static ssize_t set_pwm_tmin(struct devic
+               return -EINVAL;
+       temp = DIV_ROUND_CLOSEST(temp, 1000);
+-      temp = clamp_val(temp, 0, 255);
++      temp = clamp_val(temp, -128, 127);
+       mutex_lock(&data->lock);
+       data->pwm_tmin[attr->index] = temp;
diff --git a/queue-3.15/hwmon-da9052-don-t-use-dash-in-the-name-attribute.patch b/queue-3.15/hwmon-da9052-don-t-use-dash-in-the-name-attribute.patch
new file mode 100644 (file)
index 0000000..d5bd434
--- /dev/null
@@ -0,0 +1,31 @@
+From ee14b644daaa58afe1e91bb9ebd9cf1b18d1f5fa Mon Sep 17 00:00:00 2001
+From: Axel Lin <axel.lin@ingics.com>
+Date: Wed, 9 Jul 2014 09:18:59 +0800
+Subject: hwmon: (da9052) Don't use dash in the name attribute
+
+From: Axel Lin <axel.lin@ingics.com>
+
+commit ee14b644daaa58afe1e91bb9ebd9cf1b18d1f5fa upstream.
+
+Dashes are not allowed in hwmon name attributes.
+Use "da9052" instead of "da9052-hwmon".
+
+Signed-off-by: Axel Lin <axel.lin@ingics.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/da9052-hwmon.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/da9052-hwmon.c
++++ b/drivers/hwmon/da9052-hwmon.c
+@@ -194,7 +194,7 @@ static ssize_t da9052_hwmon_show_name(st
+                                     struct device_attribute *devattr,
+                                     char *buf)
+ {
+-      return sprintf(buf, "da9052-hwmon\n");
++      return sprintf(buf, "da9052\n");
+ }
+ static ssize_t show_label(struct device *dev,
diff --git a/queue-3.15/hwmon-da9055-don-t-use-dash-in-the-name-attribute.patch b/queue-3.15/hwmon-da9055-don-t-use-dash-in-the-name-attribute.patch
new file mode 100644 (file)
index 0000000..22f1c3c
--- /dev/null
@@ -0,0 +1,31 @@
+From 6b00f440dd678d786389a7100a2e03fe44478431 Mon Sep 17 00:00:00 2001
+From: Axel Lin <axel.lin@ingics.com>
+Date: Wed, 9 Jul 2014 09:22:54 +0800
+Subject: hwmon: (da9055) Don't use dash in the name attribute
+
+From: Axel Lin <axel.lin@ingics.com>
+
+commit 6b00f440dd678d786389a7100a2e03fe44478431 upstream.
+
+Dashes are not allowed in hwmon name attributes.
+Use "da9055" instead of "da9055-hwmon".
+
+Signed-off-by: Axel Lin <axel.lin@ingics.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/da9055-hwmon.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/da9055-hwmon.c
++++ b/drivers/hwmon/da9055-hwmon.c
+@@ -204,7 +204,7 @@ static ssize_t da9055_hwmon_show_name(st
+                                     struct device_attribute *devattr,
+                                     char *buf)
+ {
+-      return sprintf(buf, "da9055-hwmon\n");
++      return sprintf(buf, "da9055\n");
+ }
+ static ssize_t show_label(struct device *dev,
diff --git a/queue-3.15/igb-do-a-reset-on-sr-iov-re-init-if-device-is-down.patch b/queue-3.15/igb-do-a-reset-on-sr-iov-re-init-if-device-is-down.patch
new file mode 100644 (file)
index 0000000..40a0783
--- /dev/null
@@ -0,0 +1,33 @@
+From 76252723e88681628a3dbb9c09c963e095476f73 Mon Sep 17 00:00:00 2001
+From: Stefan Assmann <sassmann@kpanic.de>
+Date: Thu, 10 Jul 2014 03:29:39 -0700
+Subject: igb: do a reset on SR-IOV re-init if device is down
+
+From: Stefan Assmann <sassmann@kpanic.de>
+
+commit 76252723e88681628a3dbb9c09c963e095476f73 upstream.
+
+To properly re-initialize SR-IOV it is necessary to reset the device
+even if it is already down. Not doing this may result in Tx unit hangs.
+
+Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/intel/igb/igb_main.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -7581,6 +7581,8 @@ static int igb_sriov_reinit(struct pci_d
+       if (netif_running(netdev))
+               igb_close(netdev);
++      else
++              igb_reset(adapter);
+       igb_clear_interrupt_scheme(adapter);
diff --git a/queue-3.15/igb-workaround-for-i210-errata-25-slow-system-clock.patch b/queue-3.15/igb-workaround-for-i210-errata-25-slow-system-clock.patch
new file mode 100644 (file)
index 0000000..03734b5
--- /dev/null
@@ -0,0 +1,221 @@
+From 948264879b6894dc389a44b99fae4f0b72932619 Mon Sep 17 00:00:00 2001
+From: Todd Fujinaka <todd.fujinaka@intel.com>
+Date: Thu, 10 Jul 2014 01:47:15 -0700
+Subject: igb: Workaround for i210 Errata 25: Slow System Clock
+
+From: Todd Fujinaka <todd.fujinaka@intel.com>
+
+commit 948264879b6894dc389a44b99fae4f0b72932619 upstream.
+
+On some devices, the internal PLL circuit occasionally provides the
+wrong clock frequency after power up. The probability of failure is less
+than one failure per 1000 power cycles. When the failure occurs, the
+internal clock frequency is around 1/20 of the correct frequency.
+
+Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/intel/igb/e1000_82575.c   |    7 ++
+ drivers/net/ethernet/intel/igb/e1000_defines.h |   18 +++---
+ drivers/net/ethernet/intel/igb/e1000_hw.h      |    3 +
+ drivers/net/ethernet/intel/igb/e1000_i210.c    |   66 +++++++++++++++++++++++++
+ drivers/net/ethernet/intel/igb/e1000_i210.h    |   12 ++++
+ drivers/net/ethernet/intel/igb/e1000_regs.h    |    1 
+ drivers/net/ethernet/intel/igb/igb_main.c      |   14 +++++
+ 7 files changed, 113 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
++++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
+@@ -1489,6 +1489,13 @@ static s32 igb_init_hw_82575(struct e100
+       s32 ret_val;
+       u16 i, rar_count = mac->rar_entry_count;
++      if ((hw->mac.type >= e1000_i210) &&
++          !(igb_get_flash_presence_i210(hw))) {
++              ret_val = igb_pll_workaround_i210(hw);
++              if (ret_val)
++                      return ret_val;
++      }
++
+       /* Initialize identification LED */
+       ret_val = igb_id_led_init(hw);
+       if (ret_val) {
+--- a/drivers/net/ethernet/intel/igb/e1000_defines.h
++++ b/drivers/net/ethernet/intel/igb/e1000_defines.h
+@@ -49,14 +49,15 @@
+ #define E1000_CTRL_EXT_SDP3_DIR  0x00000800 /* SDP3 Data direction */
+ /* Physical Func Reset Done Indication */
+-#define E1000_CTRL_EXT_PFRSTD    0x00004000
+-#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
+-#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES  0x00C00000
+-#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX  0x00400000
+-#define E1000_CTRL_EXT_LINK_MODE_SGMII   0x00800000
+-#define E1000_CTRL_EXT_LINK_MODE_GMII   0x00000000
+-#define E1000_CTRL_EXT_EIAME          0x01000000
+-#define E1000_CTRL_EXT_IRCA           0x00000001
++#define E1000_CTRL_EXT_PFRSTD 0x00004000
++#define E1000_CTRL_EXT_SDLPE  0X00040000  /* SerDes Low Power Enable */
++#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000
++#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES  0x00C00000
++#define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX  0x00400000
++#define E1000_CTRL_EXT_LINK_MODE_SGMII        0x00800000
++#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000
++#define E1000_CTRL_EXT_EIAME  0x01000000
++#define E1000_CTRL_EXT_IRCA           0x00000001
+ /* Interrupt delay cancellation */
+ /* Driver loaded bit for FW */
+ #define E1000_CTRL_EXT_DRV_LOAD       0x10000000
+@@ -65,6 +66,7 @@
+ /* packet buffer parity error detection enabled */
+ /* descriptor FIFO parity error detection enable */
+ #define E1000_CTRL_EXT_PBA_CLR                0x80000000 /* PBA Clear */
++#define E1000_CTRL_EXT_PHYPDEN                0x00100000
+ #define E1000_I2CCMD_REG_ADDR_SHIFT   16
+ #define E1000_I2CCMD_PHY_ADDR_SHIFT   24
+ #define E1000_I2CCMD_OPCODE_READ      0x08000000
+--- a/drivers/net/ethernet/intel/igb/e1000_hw.h
++++ b/drivers/net/ethernet/intel/igb/e1000_hw.h
+@@ -571,4 +571,7 @@ struct net_device *igb_get_hw_dev(struct
+ /* These functions must be implemented by drivers */
+ s32 igb_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
+ s32 igb_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
++
++void igb_read_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value);
++void igb_write_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value);
+ #endif /* _E1000_HW_H_ */
+--- a/drivers/net/ethernet/intel/igb/e1000_i210.c
++++ b/drivers/net/ethernet/intel/igb/e1000_i210.c
+@@ -836,3 +836,69 @@ s32 igb_init_nvm_params_i210(struct e100
+       }
+       return ret_val;
+ }
++
++/**
++ * igb_pll_workaround_i210
++ * @hw: pointer to the HW structure
++ *
++ * Works around an errata in the PLL circuit where it occasionally
++ * provides the wrong clock frequency after power up.
++ **/
++s32 igb_pll_workaround_i210(struct e1000_hw *hw)
++{
++      s32 ret_val;
++      u32 wuc, mdicnfg, ctrl, ctrl_ext, reg_val;
++      u16 nvm_word, phy_word, pci_word, tmp_nvm;
++      int i;
++
++      /* Get and set needed register values */
++      wuc = rd32(E1000_WUC);
++      mdicnfg = rd32(E1000_MDICNFG);
++      reg_val = mdicnfg & ~E1000_MDICNFG_EXT_MDIO;
++      wr32(E1000_MDICNFG, reg_val);
++
++      /* Get data from NVM, or set default */
++      ret_val = igb_read_invm_word_i210(hw, E1000_INVM_AUTOLOAD,
++                                        &nvm_word);
++      if (ret_val)
++              nvm_word = E1000_INVM_DEFAULT_AL;
++      tmp_nvm = nvm_word | E1000_INVM_PLL_WO_VAL;
++      for (i = 0; i < E1000_MAX_PLL_TRIES; i++) {
++              /* check current state directly from internal PHY */
++              igb_read_phy_reg_gs40g(hw, (E1000_PHY_PLL_FREQ_PAGE |
++                                       E1000_PHY_PLL_FREQ_REG), &phy_word);
++              if ((phy_word & E1000_PHY_PLL_UNCONF)
++                  != E1000_PHY_PLL_UNCONF) {
++                      ret_val = 0;
++                      break;
++              } else {
++                      ret_val = -E1000_ERR_PHY;
++              }
++              /* directly reset the internal PHY */
++              ctrl = rd32(E1000_CTRL);
++              wr32(E1000_CTRL, ctrl|E1000_CTRL_PHY_RST);
++
++              ctrl_ext = rd32(E1000_CTRL_EXT);
++              ctrl_ext |= (E1000_CTRL_EXT_PHYPDEN | E1000_CTRL_EXT_SDLPE);
++              wr32(E1000_CTRL_EXT, ctrl_ext);
++
++              wr32(E1000_WUC, 0);
++              reg_val = (E1000_INVM_AUTOLOAD << 4) | (tmp_nvm << 16);
++              wr32(E1000_EEARBC_I210, reg_val);
++
++              igb_read_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
++              pci_word |= E1000_PCI_PMCSR_D3;
++              igb_write_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
++              usleep_range(1000, 2000);
++              pci_word &= ~E1000_PCI_PMCSR_D3;
++              igb_write_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
++              reg_val = (E1000_INVM_AUTOLOAD << 4) | (nvm_word << 16);
++              wr32(E1000_EEARBC_I210, reg_val);
++
++              /* restore WUC register */
++              wr32(E1000_WUC, wuc);
++      }
++      /* restore MDICNFG setting */
++      wr32(E1000_MDICNFG, mdicnfg);
++      return ret_val;
++}
+--- a/drivers/net/ethernet/intel/igb/e1000_i210.h
++++ b/drivers/net/ethernet/intel/igb/e1000_i210.h
+@@ -36,6 +36,7 @@ s32 igb_read_xmdio_reg(struct e1000_hw *
+ s32 igb_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data);
+ s32 igb_init_nvm_params_i210(struct e1000_hw *hw);
+ bool igb_get_flash_presence_i210(struct e1000_hw *hw);
++s32 igb_pll_workaround_i210(struct e1000_hw *hw);
+ #define E1000_STM_OPCODE              0xDB00
+ #define E1000_EEPROM_FLASH_SIZE_WORD  0x11
+@@ -81,4 +82,15 @@ enum E1000_INVM_STRUCTURE_TYPE {
+ #define NVM_LED_1_CFG_DEFAULT_I211    0x0184
+ #define NVM_LED_0_2_CFG_DEFAULT_I211  0x200C
++/* PLL Defines */
++#define E1000_PCI_PMCSR                       0x44
++#define E1000_PCI_PMCSR_D3            0x03
++#define E1000_MAX_PLL_TRIES           5
++#define E1000_PHY_PLL_UNCONF          0xFF
++#define E1000_PHY_PLL_FREQ_PAGE               0xFC0000
++#define E1000_PHY_PLL_FREQ_REG                0x000E
++#define E1000_INVM_DEFAULT_AL         0x202F
++#define E1000_INVM_AUTOLOAD           0x0A
++#define E1000_INVM_PLL_WO_VAL         0x0010
++
+ #endif
+--- a/drivers/net/ethernet/intel/igb/e1000_regs.h
++++ b/drivers/net/ethernet/intel/igb/e1000_regs.h
+@@ -69,6 +69,7 @@
+ #define E1000_PBA      0x01000  /* Packet Buffer Allocation - RW */
+ #define E1000_PBS      0x01008  /* Packet Buffer Size */
+ #define E1000_EEMNGCTL 0x01010  /* MNG EEprom Control */
++#define E1000_EEARBC_I210 0x12024  /* EEPROM Auto Read Bus Control */
+ #define E1000_EEWR     0x0102C  /* EEPROM Write Register - RW */
+ #define E1000_I2CCMD   0x01028  /* SFPI2C Command Register - RW */
+ #define E1000_FRTIMER  0x01048  /* Free Running Timer - RW */
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -7204,6 +7204,20 @@ static int igb_ioctl(struct net_device *
+       }
+ }
++void igb_read_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value)
++{
++      struct igb_adapter *adapter = hw->back;
++
++      pci_read_config_word(adapter->pdev, reg, value);
++}
++
++void igb_write_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value)
++{
++      struct igb_adapter *adapter = hw->back;
++
++      pci_write_config_word(adapter->pdev, reg, *value);
++}
++
+ s32 igb_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value)
+ {
+       struct igb_adapter *adapter = hw->back;
diff --git a/queue-3.15/iio-core-handle-error-when-mask-type-is-not-separate.patch b/queue-3.15/iio-core-handle-error-when-mask-type-is-not-separate.patch
new file mode 100644 (file)
index 0000000..41956af
--- /dev/null
@@ -0,0 +1,51 @@
+From 78b3321610bf920d7fceb1a0236faa881be0bcf3 Mon Sep 17 00:00:00 2001
+From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+Date: Thu, 7 Aug 2014 22:03:00 +0100
+Subject: iio:core: Handle error when mask type is not separate
+
+From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+
+commit 78b3321610bf920d7fceb1a0236faa881be0bcf3 upstream.
+
+When event spec is shared by multiple channels, which has definition
+for mask_shared_by_type, iio_device_register_eventset fails.
+
+For example:
+static const struct iio_event_spec iio_dummy_events[] = {
+       {
+               .type = IIO_EV_TYPE_THRESH,
+               .dir = IIO_EV_DIR_RISING,
+               .mask_separate = BIT(IIO_EV_INFO_ENABLE),
+               .mask_shared_by_type = BIT(IIO_EV_INFO_VALUE),
+       }, {
+               .type = IIO_EV_TYPE_THRESH,
+               .dir = IIO_EV_DIR_FALLING,
+               .mask_separate = BIT(IIO_EV_INFO_ENABLE),a
+               .mask_shared_by_type = BIT(IIO_EV_INFO_VALUE),
+       }
+};
+
+If two channels use this event spec, this will result in error.
+
+This change handles EBUSY error similar to iio_device_add_info_mask_type().
+
+Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/industrialio-event.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/iio/industrialio-event.c
++++ b/drivers/iio/industrialio-event.c
+@@ -341,6 +341,9 @@ static int iio_device_add_event(struct i
+                       &indio_dev->event_interface->dev_attr_list);
+               kfree(postfix);
++              if ((ret == -EBUSY) && (shared_by != IIO_SEPARATE))
++                      continue;
++
+               if (ret)
+                       return ret;
diff --git a/queue-3.15/iwlwifi-dvm-don-t-enable-cts-to-self.patch b/queue-3.15/iwlwifi-dvm-don-t-enable-cts-to-self.patch
new file mode 100644 (file)
index 0000000..6e650f0
--- /dev/null
@@ -0,0 +1,49 @@
+From 43d826ca5979927131685cc2092c7ce862cb91cd Mon Sep 17 00:00:00 2001
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Date: Wed, 25 Jun 2014 09:12:30 +0300
+Subject: iwlwifi: dvm: don't enable CTS to self
+
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+
+commit 43d826ca5979927131685cc2092c7ce862cb91cd upstream.
+
+We should always prefer to use full RTS protection. Using
+CTS to self gives a meaningless improvement, but this flow
+is much harder for the firmware which is likely to have
+issues with it.
+
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/dvm/rxon.c |   12 ------------
+ 1 file changed, 12 deletions(-)
+
+--- a/drivers/net/wireless/iwlwifi/dvm/rxon.c
++++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c
+@@ -1068,13 +1068,6 @@ int iwlagn_commit_rxon(struct iwl_priv *
+       /* recalculate basic rates */
+       iwl_calc_basic_rates(priv, ctx);
+-      /*
+-       * force CTS-to-self frames protection if RTS-CTS is not preferred
+-       * one aggregation protection method
+-       */
+-      if (!priv->hw_params.use_rts_for_aggregation)
+-              ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
+-
+       if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) ||
+           !(ctx->staging.flags & RXON_FLG_BAND_24G_MSK))
+               ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK;
+@@ -1480,11 +1473,6 @@ void iwlagn_bss_info_changed(struct ieee
+       else
+               ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
+-      if (bss_conf->use_cts_prot)
+-              ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;
+-      else
+-              ctx->staging.flags &= ~RXON_FLG_SELF_CTS_EN;
+-
+       memcpy(ctx->staging.bssid_addr, bss_conf->bssid, ETH_ALEN);
+       if (vif->type == NL80211_IFTYPE_AP ||
diff --git a/queue-3.15/iwlwifi-update-the-7265-series-hw-ids.patch b/queue-3.15/iwlwifi-update-the-7265-series-hw-ids.patch
new file mode 100644 (file)
index 0000000..c8dbc12
--- /dev/null
@@ -0,0 +1,39 @@
+From b3c063ae7279981f7161e63b44f214c62f122b32 Mon Sep 17 00:00:00 2001
+From: Oren Givon <oren.givon@intel.com>
+Date: Sun, 25 May 2014 16:31:58 +0300
+Subject: iwlwifi: update the 7265 series HW IDs
+
+From: Oren Givon <oren.givon@intel.com>
+
+commit b3c063ae7279981f7161e63b44f214c62f122b32 upstream.
+
+Add one more 7265 series HW ID.
+Edit one existing 7265 series HW ID.
+
+Signed-off-by: Oren Givon <oren.givon@intel.com>
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/pcie/drv.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
++++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
+@@ -367,6 +367,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_ca
+       {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x5412, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)},
++      {IWL_PCI_DEVICE(0x095A, 0x5510, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x5400, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)},
+@@ -380,7 +381,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_ca
+       {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x9112, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)},
+-      {IWL_PCI_DEVICE(0x095A, 0x9200, iwl7265_2ac_cfg)},
++      {IWL_PCI_DEVICE(0x095B, 0x9200, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)},
+       {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)},
diff --git a/queue-3.15/quota-missing-lock-in-dqcache_shrink_scan.patch b/queue-3.15/quota-missing-lock-in-dqcache_shrink_scan.patch
new file mode 100644 (file)
index 0000000..676960a
--- /dev/null
@@ -0,0 +1,41 @@
+From d68aab6b8f572406aa93b45ef6483934dd3b54a6 Mon Sep 17 00:00:00 2001
+From: Niu Yawei <yawei.niu@gmail.com>
+Date: Wed, 4 Jun 2014 12:22:13 +0800
+Subject: quota: missing lock in dqcache_shrink_scan()
+
+From: Niu Yawei <yawei.niu@gmail.com>
+
+commit d68aab6b8f572406aa93b45ef6483934dd3b54a6 upstream.
+
+Commit 1ab6c4997e04 (fs: convert fs shrinkers to new scan/count API)
+accidentally removed locking from quota shrinker. Fix it -
+dqcache_shrink_scan() should use dq_list_lock to protect the
+scan on free_dquots list.
+
+Fixes: 1ab6c4997e04a00c50c6d786c2f046adc0d1f5de
+Signed-off-by: Niu Yawei <yawei.niu@intel.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/quota/dquot.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/quota/dquot.c
++++ b/fs/quota/dquot.c
+@@ -702,6 +702,7 @@ dqcache_shrink_scan(struct shrinker *shr
+       struct dquot *dquot;
+       unsigned long freed = 0;
++      spin_lock(&dq_list_lock);
+       head = free_dquots.prev;
+       while (head != &free_dquots && sc->nr_to_scan) {
+               dquot = list_entry(head, struct dquot, dq_free);
+@@ -713,6 +714,7 @@ dqcache_shrink_scan(struct shrinker *shr
+               freed++;
+               head = free_dquots.prev;
+       }
++      spin_unlock(&dq_list_lock);
+       return freed;
+ }
index d209423d9900d8118f85eb98ea47af5c896af42e..fcac0b13cca561188e5a0bc69f5a0153c29cac73 100644 (file)
@@ -11,3 +11,18 @@ fuse-timeout-comparison-fix.patch
 fuse-avoid-scheduling-while-atomic.patch
 fuse-handle-large-user-and-group-id.patch
 fuse-ignore-entry-timeout-on-lookup_reval.patch
+iio-core-handle-error-when-mask-type-is-not-separate.patch
+tracing-instance_rmdir-leaks-ftrace_event_file-filter.patch
+tracing-fix-graph-tracer-with-stack-tracer-on-other-archs.patch
+tracing-add-ftrace_trace_stack-into-__trace_puts-__trace_bputs.patch
+tracing-add-trace_iter_printk-flag-check-in-__trace_puts-__trace_bputs.patch
+xen-balloon-set-ballooned-out-pages-as-invalid-in-p2m.patch
+xen-manage-fix-potential-deadlock-when-resuming-the-console.patch
+hwmon-da9055-don-t-use-dash-in-the-name-attribute.patch
+hwmon-da9052-don-t-use-dash-in-the-name-attribute.patch
+hwmon-adt7470-fix-writes-to-temperature-limit-registers.patch
+igb-workaround-for-i210-errata-25-slow-system-clock.patch
+igb-do-a-reset-on-sr-iov-re-init-if-device-is-down.patch
+quota-missing-lock-in-dqcache_shrink_scan.patch
+iwlwifi-update-the-7265-series-hw-ids.patch
+iwlwifi-dvm-don-t-enable-cts-to-self.patch
diff --git a/queue-3.15/tracing-add-ftrace_trace_stack-into-__trace_puts-__trace_bputs.patch b/queue-3.15/tracing-add-ftrace_trace_stack-into-__trace_puts-__trace_bputs.patch
new file mode 100644 (file)
index 0000000..1fef31b
--- /dev/null
@@ -0,0 +1,84 @@
+From 8abfb8727f4a724d31f9ccfd8013fbd16d539445 Mon Sep 17 00:00:00 2001
+From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
+Date: Thu, 18 Jul 2013 16:31:05 +0800
+Subject: tracing: Add ftrace_trace_stack into __trace_puts/__trace_bputs
+
+From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
+
+commit 8abfb8727f4a724d31f9ccfd8013fbd16d539445 upstream.
+
+Currently trace option stacktrace is not applicable for
+trace_printk with constant string argument, the reason is
+in __trace_puts/__trace_bputs ftrace_trace_stack is missing.
+
+In contrast, when using trace_printk with non constant string
+argument(will call into __trace_printk/__trace_bprintk), then
+trace option stacktrace is workable, this inconstant result
+will confuses users a lot.
+
+Link: http://lkml.kernel.org/p/51E7A7C9.9040401@huawei.com
+
+Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/trace.c |   12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -466,6 +466,9 @@ int __trace_puts(unsigned long ip, const
+       struct print_entry *entry;
+       unsigned long irq_flags;
+       int alloc;
++      int pc;
++
++      pc = preempt_count();
+       if (unlikely(tracing_selftest_running || tracing_disabled))
+               return 0;
+@@ -475,7 +478,7 @@ int __trace_puts(unsigned long ip, const
+       local_save_flags(irq_flags);
+       buffer = global_trace.trace_buffer.buffer;
+       event = trace_buffer_lock_reserve(buffer, TRACE_PRINT, alloc, 
+-                                        irq_flags, preempt_count());
++                                        irq_flags, pc);
+       if (!event)
+               return 0;
+@@ -492,6 +495,7 @@ int __trace_puts(unsigned long ip, const
+               entry->buf[size] = '\0';
+       __buffer_unlock_commit(buffer, event);
++      ftrace_trace_stack(buffer, irq_flags, 4, pc);
+       return size;
+ }
+@@ -509,6 +513,9 @@ int __trace_bputs(unsigned long ip, cons
+       struct bputs_entry *entry;
+       unsigned long irq_flags;
+       int size = sizeof(struct bputs_entry);
++      int pc;
++
++      pc = preempt_count();
+       if (unlikely(tracing_selftest_running || tracing_disabled))
+               return 0;
+@@ -516,7 +523,7 @@ int __trace_bputs(unsigned long ip, cons
+       local_save_flags(irq_flags);
+       buffer = global_trace.trace_buffer.buffer;
+       event = trace_buffer_lock_reserve(buffer, TRACE_BPUTS, size,
+-                                        irq_flags, preempt_count());
++                                        irq_flags, pc);
+       if (!event)
+               return 0;
+@@ -525,6 +532,7 @@ int __trace_bputs(unsigned long ip, cons
+       entry->str                      = str;
+       __buffer_unlock_commit(buffer, event);
++      ftrace_trace_stack(buffer, irq_flags, 4, pc);
+       return 1;
+ }
diff --git a/queue-3.15/tracing-add-trace_iter_printk-flag-check-in-__trace_puts-__trace_bputs.patch b/queue-3.15/tracing-add-trace_iter_printk-flag-check-in-__trace_puts-__trace_bputs.patch
new file mode 100644 (file)
index 0000000..f13b5a3
--- /dev/null
@@ -0,0 +1,45 @@
+From f0160a5a2912267c02cfe692eac955c360de5fdf Mon Sep 17 00:00:00 2001
+From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
+Date: Thu, 18 Jul 2013 16:31:18 +0800
+Subject: tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs
+
+From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
+
+commit f0160a5a2912267c02cfe692eac955c360de5fdf upstream.
+
+The TRACE_ITER_PRINTK check in __trace_puts/__trace_bputs is missing,
+so add it, to be consistent with __trace_printk/__trace_bprintk.
+Those functions are all called by the same function: trace_printk().
+
+Link: http://lkml.kernel.org/p/51E7A7D6.8090900@huawei.com
+
+Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/trace.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -468,6 +468,9 @@ int __trace_puts(unsigned long ip, const
+       int alloc;
+       int pc;
++      if (!(trace_flags & TRACE_ITER_PRINTK))
++              return 0;
++
+       pc = preempt_count();
+       if (unlikely(tracing_selftest_running || tracing_disabled))
+@@ -515,6 +518,9 @@ int __trace_bputs(unsigned long ip, cons
+       int size = sizeof(struct bputs_entry);
+       int pc;
++      if (!(trace_flags & TRACE_ITER_PRINTK))
++              return 0;
++
+       pc = preempt_count();
+       if (unlikely(tracing_selftest_running || tracing_disabled))
diff --git a/queue-3.15/tracing-fix-graph-tracer-with-stack-tracer-on-other-archs.patch b/queue-3.15/tracing-fix-graph-tracer-with-stack-tracer-on-other-archs.patch
new file mode 100644 (file)
index 0000000..e15a27c
--- /dev/null
@@ -0,0 +1,47 @@
+From 5f8bf2d263a20b986225ae1ed7d6759dc4b93af9 Mon Sep 17 00:00:00 2001
+From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
+Date: Tue, 15 Jul 2014 11:05:12 -0400
+Subject: tracing: Fix graph tracer with stack tracer on other archs
+
+From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
+
+commit 5f8bf2d263a20b986225ae1ed7d6759dc4b93af9 upstream.
+
+Running my ftrace tests on PowerPC, it failed the test that checks
+if function_graph tracer is affected by the stack tracer. It was.
+Looking into this, I found that the update_function_graph_func()
+must be called even if the trampoline function is not changed.
+This is because archs like PowerPC do not support ftrace_ops being
+passed by assembly and instead uses a helper function (what the
+trampoline function points to). Since this function is not changed
+even when multiple ftrace_ops are added to the code, the test that
+falls out before calling update_function_graph_func() will miss that
+the update must still be done.
+
+Call update_function_graph_function() for all calls to
+update_ftrace_function()
+
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/ftrace.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/kernel/trace/ftrace.c
++++ b/kernel/trace/ftrace.c
+@@ -325,12 +325,12 @@ static void update_ftrace_function(void)
+               func = ftrace_ops_list_func;
+       }
++      update_function_graph_func();
++
+       /* If there's no change, then do nothing more here */
+       if (ftrace_trace_function == func)
+               return;
+-      update_function_graph_func();
+-
+       /*
+        * If we are using the list function, it doesn't care
+        * about the function_trace_ops.
diff --git a/queue-3.15/tracing-instance_rmdir-leaks-ftrace_event_file-filter.patch b/queue-3.15/tracing-instance_rmdir-leaks-ftrace_event_file-filter.patch
new file mode 100644 (file)
index 0000000..972bc43
--- /dev/null
@@ -0,0 +1,38 @@
+From 2448e3493cb3874baa90725c87869455ebf11cd2 Mon Sep 17 00:00:00 2001
+From: Oleg Nesterov <oleg@redhat.com>
+Date: Fri, 11 Jul 2014 21:06:38 +0200
+Subject: tracing: instance_rmdir() leaks ftrace_event_file->filter
+
+From: Oleg Nesterov <oleg@redhat.com>
+
+commit 2448e3493cb3874baa90725c87869455ebf11cd2 upstream.
+
+instance_rmdir() path destroys the event files but forgets to free
+file->filter. Change remove_event_file_dir() to free_event_filter().
+
+Link: http://lkml.kernel.org/p/20140711190638.GA19517@redhat.com
+
+Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
+Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
+Cc: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
+Fixes: f6a84bdc75b5 "tracing: Introduce remove_event_file_dir()"
+Signed-off-by: Oleg Nesterov <oleg@redhat.com>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/trace_events.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/trace/trace_events.c
++++ b/kernel/trace/trace_events.c
+@@ -470,6 +470,7 @@ static void remove_event_file_dir(struct
+       list_del(&file->list);
+       remove_subsystem(file->system);
++      free_event_filter(file->filter);
+       kmem_cache_free(file_cachep, file);
+ }
diff --git a/queue-3.15/xen-balloon-set-ballooned-out-pages-as-invalid-in-p2m.patch b/queue-3.15/xen-balloon-set-ballooned-out-pages-as-invalid-in-p2m.patch
new file mode 100644 (file)
index 0000000..91f79e1
--- /dev/null
@@ -0,0 +1,62 @@
+From fb9a0c443691ceaab3daba966bbbd9f5ff3aa26f Mon Sep 17 00:00:00 2001
+From: David Vrabel <david.vrabel@citrix.com>
+Date: Fri, 27 Jun 2014 10:42:03 +0100
+Subject: xen/balloon: set ballooned out pages as invalid in p2m
+
+From: David Vrabel <david.vrabel@citrix.com>
+
+commit fb9a0c443691ceaab3daba966bbbd9f5ff3aa26f upstream.
+
+Since cd9151e26d31048b2b5e00fd02e110e07d2200c9 (xen/balloon: set a
+mapping for ballooned out pages), a ballooned out page had its entry
+in the p2m set to the MFN of one of the scratch pages.  This means
+that the p2m will contain many entries pointing to the same MFN.
+
+During a domain save, these many-to-one entries are not identified as
+such and the scratch page is saved multiple times. On restore the
+ballooned pages are populated with new frames and the domain may use
+up its allocation before all pages can be restored.
+
+Since the original fix only needed to keep a mapping for the ballooned
+page it is safe to set ballooned out pages as INVALID_P2M_ENTRY in the
+p2m (as they were before). Thus preventing them from being saved and
+re-populated on restore.
+
+Signed-off-by: David Vrabel <david.vrabel@citrix.com>
+Reported-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
+Tested-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
+Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/xen/balloon.c |   12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+--- a/drivers/xen/balloon.c
++++ b/drivers/xen/balloon.c
+@@ -426,20 +426,18 @@ static enum bp_state decrease_reservatio
+                * p2m are consistent.
+                */
+               if (!xen_feature(XENFEAT_auto_translated_physmap)) {
+-                      unsigned long p;
+-                      struct page   *scratch_page = get_balloon_scratch_page();
+-
+                       if (!PageHighMem(page)) {
++                              struct page *scratch_page = get_balloon_scratch_page();
++
+                               ret = HYPERVISOR_update_va_mapping(
+                                               (unsigned long)__va(pfn << PAGE_SHIFT),
+                                               pfn_pte(page_to_pfn(scratch_page),
+                                                       PAGE_KERNEL_RO), 0);
+                               BUG_ON(ret);
+-                      }
+-                      p = page_to_pfn(scratch_page);
+-                      __set_phys_to_machine(pfn, pfn_to_mfn(p));
+-                      put_balloon_scratch_page();
++                              put_balloon_scratch_page();
++                      }
++                      __set_phys_to_machine(pfn, INVALID_P2M_ENTRY);
+               }
+ #endif
diff --git a/queue-3.15/xen-manage-fix-potential-deadlock-when-resuming-the-console.patch b/queue-3.15/xen-manage-fix-potential-deadlock-when-resuming-the-console.patch
new file mode 100644 (file)
index 0000000..d27a672
--- /dev/null
@@ -0,0 +1,47 @@
+From 1b6478231c6f5f844185acb32045cf195028cfce Mon Sep 17 00:00:00 2001
+From: David Vrabel <david.vrabel@citrix.com>
+Date: Wed, 2 Jul 2014 17:25:23 +0100
+Subject: xen/manage: fix potential deadlock when resuming the console
+
+From: David Vrabel <david.vrabel@citrix.com>
+
+commit 1b6478231c6f5f844185acb32045cf195028cfce upstream.
+
+Calling xen_console_resume() in xen_suspend() causes a warning because
+it locks irq_mapping_update_lock (a mutex) and this may sleep.  If a
+userspace process is using the evtchn device then this mutex may be
+locked at the point of the stop_machine() call and
+xen_console_resume() would then deadlock.
+
+Resuming the console after stop_machine() returns avoids this
+deadlock.
+
+Signed-off-by: David Vrabel <david.vrabel@citrix.com>
+Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/xen/manage.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/xen/manage.c
++++ b/drivers/xen/manage.c
+@@ -109,7 +109,6 @@ static int xen_suspend(void *data)
+       if (!si->cancelled) {
+               xen_irq_resume();
+-              xen_console_resume();
+               xen_timer_resume();
+       }
+@@ -166,6 +165,10 @@ static void do_suspend(void)
+       err = stop_machine(xen_suspend, &si, cpumask_of(0));
++      /* Resume console as early as possible. */
++      if (!si.cancelled)
++              xen_console_resume();
++
+       raw_notifier_call_chain(&xen_resume_notifier, 0, NULL);
+       dpm_resume_start(si.cancelled ? PMSG_THAW : PMSG_RESTORE);