Magellan Linux

Contents of /trunk/kernel-magellan/patches-3.11/0100-3.11.1-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2284 - (show annotations) (download)
Mon Sep 16 12:01:46 2013 UTC (10 years, 7 months ago) by niro
File size: 13415 byte(s)
-patches for linux-3.11
1 diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp
2 index 90956b6..4dfdc8f 100644
3 --- a/Documentation/hwmon/k10temp
4 +++ b/Documentation/hwmon/k10temp
5 @@ -12,6 +12,7 @@ Supported chips:
6 * AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series)
7 * AMD Family 14h processors: "Brazos" (C/E/G/Z-Series)
8 * AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity"
9 +* AMD Family 16h processors: "Kabini"
10
11 Prefix: 'k10temp'
12 Addresses scanned: PCI space
13 diff --git a/Makefile b/Makefile
14 index fe8204b..efd2396 100644
15 --- a/Makefile
16 +++ b/Makefile
17 @@ -1,6 +1,6 @@
18 VERSION = 3
19 PATCHLEVEL = 11
20 -SUBLEVEL = 0
21 +SUBLEVEL = 1
22 EXTRAVERSION =
23 NAME = Linux for Workgroups
24
25 diff --git a/arch/x86/include/asm/xor_avx.h b/arch/x86/include/asm/xor_avx.h
26 index 7ea79c5..492b298 100644
27 --- a/arch/x86/include/asm/xor_avx.h
28 +++ b/arch/x86/include/asm/xor_avx.h
29 @@ -167,12 +167,12 @@ static struct xor_block_template xor_block_avx = {
30
31 #define AVX_XOR_SPEED \
32 do { \
33 - if (cpu_has_avx) \
34 + if (cpu_has_avx && cpu_has_osxsave) \
35 xor_speed(&xor_block_avx); \
36 } while (0)
37
38 #define AVX_SELECT(FASTEST) \
39 - (cpu_has_avx ? &xor_block_avx : FASTEST)
40 + (cpu_has_avx && cpu_has_osxsave ? &xor_block_avx : FASTEST)
41
42 #else
43
44 diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
45 index 80403c1..45af90a 100644
46 --- a/drivers/acpi/ec.c
47 +++ b/drivers/acpi/ec.c
48 @@ -987,6 +987,10 @@ static struct dmi_system_id __initdata ec_dmi_table[] = {
49 ec_skip_dsdt_scan, "HP Folio 13", {
50 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
51 DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13"),}, NULL},
52 + {
53 + ec_validate_ecdt, "ASUS hardware", {
54 + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek Computer Inc."),
55 + DMI_MATCH(DMI_PRODUCT_NAME, "L4R"),}, NULL},
56 {},
57 };
58
59 diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
60 index 0df7590..461f47b 100644
61 --- a/drivers/hv/channel_mgmt.c
62 +++ b/drivers/hv/channel_mgmt.c
63 @@ -262,6 +262,13 @@ static void vmbus_process_offer(struct work_struct *work)
64 }
65
66 /*
67 + * This state is used to indicate a successful open
68 + * so that when we do close the channel normally, we
69 + * can cleanup properly
70 + */
71 + newchannel->state = CHANNEL_OPEN_STATE;
72 +
73 + /*
74 * Start the process of binding this offer to the driver
75 * We need to set the DeviceObject field before calling
76 * vmbus_child_dev_add()
77 @@ -287,13 +294,6 @@ static void vmbus_process_offer(struct work_struct *work)
78 kfree(newchannel->device_obj);
79
80 free_channel(newchannel);
81 - } else {
82 - /*
83 - * This state is used to indicate a successful open
84 - * so that when we do close the channel normally, we
85 - * can cleanup properly
86 - */
87 - newchannel->state = CHANNEL_OPEN_STATE;
88 }
89 }
90
91 diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
92 index e989f7f..1e27838 100644
93 --- a/drivers/hwmon/Kconfig
94 +++ b/drivers/hwmon/Kconfig
95 @@ -296,8 +296,8 @@ config SENSORS_K10TEMP
96 If you say yes here you get support for the temperature
97 sensor(s) inside your CPU. Supported are later revisions of
98 the AMD Family 10h and all revisions of the AMD Family 11h,
99 - 12h (Llano), 14h (Brazos) and 15h (Bulldozer/Trinity)
100 - microarchitectures.
101 + 12h (Llano), 14h (Brazos), 15h (Bulldozer/Trinity) and
102 + 16h (Kabini) microarchitectures.
103
104 This driver can also be built as a module. If so, the module
105 will be called k10temp.
106 diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
107 index e3b037c..e633856 100644
108 --- a/drivers/hwmon/k10temp.c
109 +++ b/drivers/hwmon/k10temp.c
110 @@ -1,5 +1,5 @@
111 /*
112 - * k10temp.c - AMD Family 10h/11h/12h/14h/15h processor hardware monitoring
113 + * k10temp.c - AMD Family 10h/11h/12h/14h/15h/16h processor hardware monitoring
114 *
115 * Copyright (c) 2009 Clemens Ladisch <clemens@ladisch.de>
116 *
117 @@ -211,6 +211,7 @@ static DEFINE_PCI_DEVICE_TABLE(k10temp_id_table) = {
118 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
119 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) },
120 { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
121 + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
122 {}
123 };
124 MODULE_DEVICE_TABLE(pci, k10temp_id_table);
125 diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
126 index 621c7a3..b83e3ca 100644
127 --- a/drivers/misc/hpilo.c
128 +++ b/drivers/misc/hpilo.c
129 @@ -759,7 +759,7 @@ static int ilo_probe(struct pci_dev *pdev,
130
131 /* Ignore subsystem_device = 0x1979 (set by BIOS) */
132 if (pdev->subsystem_device == 0x1979)
133 - goto out;
134 + return 0;
135
136 if (max_ccb > MAX_CCB)
137 max_ccb = MAX_CCB;
138 @@ -899,7 +899,7 @@ static void __exit ilo_exit(void)
139 class_destroy(ilo_class);
140 }
141
142 -MODULE_VERSION("1.4");
143 +MODULE_VERSION("1.4.1");
144 MODULE_ALIAS(ILO_NAME);
145 MODULE_DESCRIPTION(ILO_NAME);
146 MODULE_AUTHOR("David Altobelli <david.altobelli@hp.com>");
147 diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
148 index b22c7e2..3412adc 100644
149 --- a/drivers/misc/mei/hw-me.c
150 +++ b/drivers/misc/mei/hw-me.c
151 @@ -176,21 +176,18 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
152 struct mei_me_hw *hw = to_me_hw(dev);
153 u32 hcsr = mei_hcsr_read(hw);
154
155 - dev_dbg(&dev->pdev->dev, "before reset HCSR = 0x%08x.\n", hcsr);
156 -
157 - hcsr |= (H_RST | H_IG);
158 + hcsr |= H_RST | H_IG | H_IS;
159
160 if (intr_enable)
161 hcsr |= H_IE;
162 else
163 - hcsr |= ~H_IE;
164 + hcsr &= ~H_IE;
165
166 - mei_hcsr_set(hw, hcsr);
167 + mei_me_reg_write(hw, H_CSR, hcsr);
168
169 if (dev->dev_state == MEI_DEV_POWER_DOWN)
170 mei_me_hw_reset_release(dev);
171
172 - dev_dbg(&dev->pdev->dev, "current HCSR = 0x%08x.\n", mei_hcsr_read(hw));
173 return 0;
174 }
175
176 diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
177 index 1753431..108267d 100644
178 --- a/drivers/net/wireless/mwifiex/main.c
179 +++ b/drivers/net/wireless/mwifiex/main.c
180 @@ -458,20 +458,6 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
181 dev_err(adapter->dev, "cannot create default STA interface\n");
182 goto err_add_intf;
183 }
184 -
185 - /* Create AP interface by default */
186 - if (!mwifiex_add_virtual_intf(adapter->wiphy, "uap%d",
187 - NL80211_IFTYPE_AP, NULL, NULL)) {
188 - dev_err(adapter->dev, "cannot create default AP interface\n");
189 - goto err_add_intf;
190 - }
191 -
192 - /* Create P2P interface by default */
193 - if (!mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d",
194 - NL80211_IFTYPE_P2P_CLIENT, NULL, NULL)) {
195 - dev_err(adapter->dev, "cannot create default P2P interface\n");
196 - goto err_add_intf;
197 - }
198 rtnl_unlock();
199
200 mwifiex_drv_get_driver_version(adapter, fmt, sizeof(fmt) - 1);
201 diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
202 index 9915cb9..9efe118 100644
203 --- a/drivers/rtc/rtc-max77686.c
204 +++ b/drivers/rtc/rtc-max77686.c
205 @@ -240,9 +240,9 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
206 }
207
208 alrm->pending = 0;
209 - ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS1, &val);
210 + ret = regmap_read(info->max77686->regmap, MAX77686_REG_STATUS2, &val);
211 if (ret < 0) {
212 - dev_err(info->dev, "%s:%d fail to read status1 reg(%d)\n",
213 + dev_err(info->dev, "%s:%d fail to read status2 reg(%d)\n",
214 __func__, __LINE__, ret);
215 goto out;
216 }
217 diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
218 index 9854a1d..6bc205b 100644
219 --- a/drivers/staging/imx-drm/imx-drm-core.c
220 +++ b/drivers/staging/imx-drm/imx-drm-core.c
221 @@ -678,6 +678,7 @@ found:
222
223 return i;
224 }
225 +EXPORT_SYMBOL_GPL(imx_drm_encoder_get_mux_id);
226
227 /*
228 * imx_drm_remove_encoder - remove an encoder
229 diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
230 index f73da43..3a17930 100644
231 --- a/drivers/target/iscsi/iscsi_target.c
232 +++ b/drivers/target/iscsi/iscsi_target.c
233 @@ -1086,7 +1086,6 @@ int iscsit_process_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
234 if (cmd->reject_reason)
235 return 0;
236
237 - target_put_sess_cmd(conn->sess->se_sess, &cmd->se_cmd);
238 return 1;
239 }
240 /*
241 @@ -1124,14 +1123,10 @@ after_immediate_data:
242 */
243 cmdsn_ret = iscsit_sequence_cmd(cmd->conn, cmd,
244 (unsigned char *)hdr, hdr->cmdsn);
245 - if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER) {
246 + if (cmdsn_ret == CMDSN_ERROR_CANNOT_RECOVER)
247 return -1;
248 - } else if (cmdsn_ret == CMDSN_LOWER_THAN_EXP) {
249 - target_put_sess_cmd(conn->sess->se_sess, &cmd->se_cmd);
250 - return 0;
251 - }
252
253 - if (cmd->sense_reason) {
254 + if (cmd->sense_reason || cmdsn_ret == CMDSN_LOWER_THAN_EXP) {
255 int rc;
256
257 rc = iscsit_dump_data_payload(cmd->conn,
258 @@ -1527,6 +1522,10 @@ int iscsit_setup_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
259 if (hdr->itt == RESERVED_ITT && !(hdr->opcode & ISCSI_OP_IMMEDIATE)) {
260 pr_err("NOPOUT ITT is reserved, but Immediate Bit is"
261 " not set, protocol error.\n");
262 + if (!cmd)
263 + return iscsit_add_reject(conn, ISCSI_REASON_PROTOCOL_ERROR,
264 + (unsigned char *)hdr);
265 +
266 return iscsit_reject_cmd(cmd, ISCSI_REASON_PROTOCOL_ERROR,
267 (unsigned char *)hdr);
268 }
269 @@ -1536,6 +1535,10 @@ int iscsit_setup_nop_out(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
270 " greater than MaxXmitDataSegmentLength: %u, protocol"
271 " error.\n", payload_length,
272 conn->conn_ops->MaxXmitDataSegmentLength);
273 + if (!cmd)
274 + return iscsit_add_reject(conn, ISCSI_REASON_PROTOCOL_ERROR,
275 + (unsigned char *)hdr);
276 +
277 return iscsit_reject_cmd(cmd, ISCSI_REASON_PROTOCOL_ERROR,
278 (unsigned char *)hdr);
279 }
280 diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
281 index 3402241..bc788c5 100644
282 --- a/drivers/target/iscsi/iscsi_target_login.c
283 +++ b/drivers/target/iscsi/iscsi_target_login.c
284 @@ -1163,12 +1163,11 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
285 if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
286 spin_unlock_bh(&np->np_thread_lock);
287 complete(&np->np_restart_comp);
288 - if (ret == -ENODEV) {
289 - iscsit_put_transport(conn->conn_transport);
290 - kfree(conn);
291 - conn = NULL;
292 + iscsit_put_transport(conn->conn_transport);
293 + kfree(conn);
294 + conn = NULL;
295 + if (ret == -ENODEV)
296 goto out;
297 - }
298 /* Get another socket */
299 return 1;
300 }
301 diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
302 index 4cb667d..9fabbf7 100644
303 --- a/drivers/target/target_core_spc.c
304 +++ b/drivers/target/target_core_spc.c
305 @@ -97,9 +97,12 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf)
306
307 buf[7] = 0x2; /* CmdQue=1 */
308
309 - snprintf(&buf[8], 8, "LIO-ORG");
310 - snprintf(&buf[16], 16, "%s", dev->t10_wwn.model);
311 - snprintf(&buf[32], 4, "%s", dev->t10_wwn.revision);
312 + memcpy(&buf[8], "LIO-ORG ", 8);
313 + memset(&buf[16], 0x20, 16);
314 + memcpy(&buf[16], dev->t10_wwn.model,
315 + min_t(size_t, strlen(dev->t10_wwn.model), 16));
316 + memcpy(&buf[32], dev->t10_wwn.revision,
317 + min_t(size_t, strlen(dev->t10_wwn.revision), 4));
318 buf[4] = 31; /* Set additional length to 31 */
319
320 return 0;
321 diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
322 index 7172d00..d8e49d7 100644
323 --- a/drivers/target/target_core_transport.c
324 +++ b/drivers/target/target_core_transport.c
325 @@ -2134,6 +2134,7 @@ static void transport_write_pending_qf(struct se_cmd *cmd)
326
327 int transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
328 {
329 + unsigned long flags;
330 int ret = 0;
331
332 if (!(cmd->se_cmd_flags & SCF_SE_LUN_CMD)) {
333 @@ -2144,6 +2145,16 @@ int transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
334 } else {
335 if (wait_for_tasks)
336 transport_wait_for_tasks(cmd);
337 + /*
338 + * Handle WRITE failure case where transport_generic_new_cmd()
339 + * has already added se_cmd to state_list, but fabric has
340 + * failed command before I/O submission.
341 + */
342 + if (cmd->state_active) {
343 + spin_lock_irqsave(&cmd->t_state_lock, flags);
344 + target_remove_from_state_list(cmd);
345 + spin_unlock_irqrestore(&cmd->t_state_lock, flags);
346 + }
347
348 if (cmd->se_lun)
349 transport_lun_remove_cmd(cmd);
350 diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
351 index 4b7e33e..ab1065a 100644
352 --- a/drivers/usb/gadget/f_acm.c
353 +++ b/drivers/usb/gadget/f_acm.c
354 @@ -285,6 +285,7 @@ static struct usb_string acm_string_defs[] = {
355 [ACM_CTRL_IDX].s = "CDC Abstract Control Model (ACM)",
356 [ACM_DATA_IDX].s = "CDC ACM Data",
357 [ACM_IAD_IDX ].s = "CDC Serial",
358 + { } /* end of list */
359 };
360
361 static struct usb_gadget_strings acm_string_table = {
362 diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
363 index aa43854..805b83e 100644
364 --- a/sound/soc/fsl/Kconfig
365 +++ b/sound/soc/fsl/Kconfig
366 @@ -109,11 +109,11 @@ config SND_SOC_IMX_SSI
367 tristate
368
369 config SND_SOC_IMX_PCM_FIQ
370 - bool
371 + tristate
372 select FIQ
373
374 config SND_SOC_IMX_PCM_DMA
375 - bool
376 + tristate
377 select SND_SOC_GENERIC_DMAENGINE_PCM
378
379 config SND_SOC_IMX_AUDMUX
380 diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h
381 index 67f656c..0e3619e 100644
382 --- a/sound/soc/fsl/imx-pcm.h
383 +++ b/sound/soc/fsl/imx-pcm.h
384 @@ -32,7 +32,7 @@ imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data,
385 dma_data->peripheral_type = IMX_DMATYPE_SSI;
386 }
387
388 -#ifdef CONFIG_SND_SOC_IMX_PCM_DMA
389 +#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA)
390 int imx_pcm_dma_init(struct platform_device *pdev);
391 void imx_pcm_dma_exit(struct platform_device *pdev);
392 #else
393 @@ -46,7 +46,7 @@ static inline void imx_pcm_dma_exit(struct platform_device *pdev)
394 }
395 #endif
396
397 -#ifdef CONFIG_SND_SOC_IMX_PCM_FIQ
398 +#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_FIQ)
399 int imx_pcm_fiq_init(struct platform_device *pdev);
400 void imx_pcm_fiq_exit(struct platform_device *pdev);
401 #else