/[linux-patches]/genpatches-2.6/tags/2.6.27-7/1001_linux-2.6.27.2.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.27-7/1001_linux-2.6.27.2.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1422 - (show annotations) (download)
Fri Dec 5 23:04:14 2008 UTC (9 years, 10 months ago) by dsd
File size: 19734 byte(s)
2.6.27-7 release
1 diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
2 index 65a0c1b..f509cfc 100644
3 --- a/arch/x86/kernel/alternative.c
4 +++ b/arch/x86/kernel/alternative.c
5 @@ -444,7 +444,7 @@ void __init alternative_instructions(void)
6 _text, _etext);
7
8 /* Only switch to UP mode if we don't immediately boot others */
9 - if (num_possible_cpus() == 1 || setup_max_cpus <= 1)
10 + if (num_present_cpus() == 1 || setup_max_cpus <= 1)
11 alternatives_smp_switch(0);
12 }
13 #endif
14 diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
15 index 4353cf5..6b839b1 100644
16 --- a/arch/x86/kernel/early-quirks.c
17 +++ b/arch/x86/kernel/early-quirks.c
18 @@ -95,6 +95,52 @@ static void __init nvidia_bugs(int num, int slot, int func)
19
20 }
21
22 +static u32 ati_ixp4x0_rev(int num, int slot, int func)
23 +{
24 + u32 d;
25 + u8 b;
26 +
27 + b = read_pci_config_byte(num, slot, func, 0xac);
28 + b &= ~(1<<5);
29 + write_pci_config_byte(num, slot, func, 0xac, b);
30 +
31 + d = read_pci_config(num, slot, func, 0x70);
32 + d |= 1<<8;
33 + write_pci_config(num, slot, func, 0x70, d);
34 +
35 + d = read_pci_config(num, slot, func, 0x8);
36 + d &= 0xff;
37 + return d;
38 +}
39 +
40 +static void __init ati_bugs(int num, int slot, int func)
41 +{
42 +#if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC)
43 + u32 d;
44 + u8 b;
45 +
46 + if (acpi_use_timer_override)
47 + return;
48 +
49 + d = ati_ixp4x0_rev(num, slot, func);
50 + if (d < 0x82)
51 + acpi_skip_timer_override = 1;
52 + else {
53 + /* check for IRQ0 interrupt swap */
54 + outb(0x72, 0xcd6); b = inb(0xcd7);
55 + if (!(b & 0x2))
56 + acpi_skip_timer_override = 1;
57 + }
58 +
59 + if (acpi_skip_timer_override) {
60 + printk(KERN_INFO "SB4X0 revision 0x%x\n", d);
61 + printk(KERN_INFO "Ignoring ACPI timer override.\n");
62 + printk(KERN_INFO "If you got timer trouble "
63 + "try acpi_use_timer_override\n");
64 + }
65 +#endif
66 +}
67 +
68 #define QFLAG_APPLY_ONCE 0x1
69 #define QFLAG_APPLIED 0x2
70 #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
71 @@ -114,6 +160,8 @@ static struct chipset early_qrk[] __initdata = {
72 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs },
73 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
74 PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
75 + { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
76 + PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
77 {}
78 };
79
80 diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
81 index 09cddb5..bfd9fc5 100644
82 --- a/arch/x86/kernel/io_apic_32.c
83 +++ b/arch/x86/kernel/io_apic_32.c
84 @@ -2314,6 +2314,9 @@ void __init setup_IO_APIC(void)
85 for (i = first_system_vector; i < NR_VECTORS; i++)
86 set_bit(i, used_vectors);
87
88 + /* Mark FIRST_DEVICE_VECTOR which is assigned to IRQ0 as used. */
89 + set_bit(FIRST_DEVICE_VECTOR, used_vectors);
90 +
91 enable_IO_APIC();
92
93 io_apic_irqs = ~PIC_IRQS;
94 diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
95 index d4b6e6a..d0975fc 100644
96 --- a/arch/x86/mm/ioremap.c
97 +++ b/arch/x86/mm/ioremap.c
98 @@ -595,7 +595,7 @@ void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
99 */
100 offset = phys_addr & ~PAGE_MASK;
101 phys_addr &= PAGE_MASK;
102 - size = PAGE_ALIGN(last_addr) - phys_addr;
103 + size = PAGE_ALIGN(last_addr + 1) - phys_addr;
104
105 /*
106 * Mappings have to fit in the FIX_BTMAP area.
107 diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
108 index e4dce87..0232485 100644
109 --- a/drivers/char/tty_io.c
110 +++ b/drivers/char/tty_io.c
111 @@ -2996,7 +2996,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
112 case TIOCSTI:
113 return tiocsti(tty, p);
114 case TIOCGWINSZ:
115 - return tiocgwinsz(tty, p);
116 + return tiocgwinsz(real_tty, p);
117 case TIOCSWINSZ:
118 return tiocswinsz(tty, real_tty, p);
119 case TIOCCONS:
120 diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
121 index 7685b99..9b60352 100644
122 --- a/drivers/net/atl1e/atl1e_main.c
123 +++ b/drivers/net/atl1e/atl1e_main.c
124 @@ -2390,9 +2390,7 @@ static int __devinit atl1e_probe(struct pci_dev *pdev,
125 }
126
127 /* Init GPHY as early as possible due to power saving issue */
128 - spin_lock(&adapter->mdio_lock);
129 atl1e_phy_init(&adapter->hw);
130 - spin_unlock(&adapter->mdio_lock);
131 /* reset the controller to
132 * put the device in a known good starting state */
133 err = atl1e_reset_hw(&adapter->hw);
134 diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
135 index e24b25c..b4be33a 100644
136 --- a/drivers/net/sky2.c
137 +++ b/drivers/net/sky2.c
138 @@ -3034,7 +3034,8 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
139 struct sky2_port *sky2 = netdev_priv(dev);
140 struct sky2_hw *hw = sky2->hw;
141
142 - if (wol->wolopts & ~sky2_wol_supported(sky2->hw))
143 + if ((wol->wolopts & ~sky2_wol_supported(sky2->hw))
144 + || !device_can_wakeup(&hw->pdev->dev))
145 return -EOPNOTSUPP;
146
147 sky2->wol = wol->wolopts;
148 @@ -3045,6 +3046,8 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
149 sky2_write32(hw, B0_CTST, sky2->wol
150 ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF);
151
152 + device_set_wakeup_enable(&hw->pdev->dev, sky2->wol);
153 +
154 if (!netif_running(dev))
155 sky2_wol_init(sky2);
156 return 0;
157 @@ -4166,18 +4169,6 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
158 return err;
159 }
160
161 -static int __devinit pci_wake_enabled(struct pci_dev *dev)
162 -{
163 - int pm = pci_find_capability(dev, PCI_CAP_ID_PM);
164 - u16 value;
165 -
166 - if (!pm)
167 - return 0;
168 - if (pci_read_config_word(dev, pm + PCI_PM_CTRL, &value))
169 - return 0;
170 - return value & PCI_PM_CTRL_PME_ENABLE;
171 -}
172 -
173 /* This driver supports yukon2 chipset only */
174 static const char *sky2_name(u8 chipid, char *buf, int sz)
175 {
176 @@ -4238,7 +4229,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
177 }
178 }
179
180 - wol_default = pci_wake_enabled(pdev) ? WAKE_MAGIC : 0;
181 + wol_default = device_may_wakeup(&pdev->dev) ? WAKE_MAGIC : 0;
182
183 err = -ENOMEM;
184 hw = kzalloc(sizeof(*hw), GFP_KERNEL);
185 diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
186 index 68e1f8c..8d5ff62 100644
187 --- a/drivers/net/wireless/b43legacy/xmit.c
188 +++ b/drivers/net/wireless/b43legacy/xmit.c
189 @@ -626,7 +626,7 @@ void b43legacy_handle_hwtxstatus(struct b43legacy_wldev *dev,
190 tmp = hw->count;
191 status.frame_count = (tmp >> 4);
192 status.rts_count = (tmp & 0x0F);
193 - tmp = hw->flags;
194 + tmp = hw->flags << 1;
195 status.supp_reason = ((tmp & 0x1C) >> 2);
196 status.pm_indicated = !!(tmp & 0x80);
197 status.intermediate = !!(tmp & 0x40);
198 diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
199 index bd32ac0..5bcf561 100644
200 --- a/drivers/net/wireless/libertas/main.c
201 +++ b/drivers/net/wireless/libertas/main.c
202 @@ -1196,7 +1196,13 @@ void lbs_remove_card(struct lbs_private *priv)
203 cancel_delayed_work_sync(&priv->scan_work);
204 cancel_delayed_work_sync(&priv->assoc_work);
205 cancel_work_sync(&priv->mcast_work);
206 +
207 + /* worker thread destruction blocks on the in-flight command which
208 + * should have been cleared already in lbs_stop_card().
209 + */
210 + lbs_deb_main("destroying worker thread\n");
211 destroy_workqueue(priv->work_thread);
212 + lbs_deb_main("done destroying worker thread\n");
213
214 if (priv->psmode == LBS802_11POWERMODEMAX_PSP) {
215 priv->psmode = LBS802_11POWERMODECAM;
216 @@ -1314,14 +1320,26 @@ void lbs_stop_card(struct lbs_private *priv)
217 device_remove_file(&dev->dev, &dev_attr_lbs_rtap);
218 }
219
220 - /* Flush pending command nodes */
221 + /* Delete the timeout of the currently processing command */
222 del_timer_sync(&priv->command_timer);
223 +
224 + /* Flush pending command nodes */
225 spin_lock_irqsave(&priv->driver_lock, flags);
226 + lbs_deb_main("clearing pending commands\n");
227 list_for_each_entry(cmdnode, &priv->cmdpendingq, list) {
228 cmdnode->result = -ENOENT;
229 cmdnode->cmdwaitqwoken = 1;
230 wake_up_interruptible(&cmdnode->cmdwait_q);
231 }
232 +
233 + /* Flush the command the card is currently processing */
234 + if (priv->cur_cmd) {
235 + lbs_deb_main("clearing current command\n");
236 + priv->cur_cmd->result = -ENOENT;
237 + priv->cur_cmd->cmdwaitqwoken = 1;
238 + wake_up_interruptible(&priv->cur_cmd->cmdwait_q);
239 + }
240 + lbs_deb_main("done clearing commands\n");
241 spin_unlock_irqrestore(&priv->driver_lock, flags);
242
243 unregister_netdev(dev);
244 diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
245 index 8dfd6f2..0d22479 100644
246 --- a/fs/cifs/cifsglob.h
247 +++ b/fs/cifs/cifsglob.h
248 @@ -309,6 +309,7 @@ struct cifs_search_info {
249 __u32 resume_key;
250 char *ntwrk_buf_start;
251 char *srch_entries_start;
252 + char *last_entry;
253 char *presume_name;
254 unsigned int resume_name_len;
255 bool endOfSearch:1;
256 diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
257 index 994de7c..77a0d1f 100644
258 --- a/fs/cifs/cifssmb.c
259 +++ b/fs/cifs/cifssmb.c
260 @@ -3636,6 +3636,8 @@ findFirstRetry:
261 le16_to_cpu(parms->SearchCount);
262 psrch_inf->index_of_last_entry = 2 /* skip . and .. */ +
263 psrch_inf->entries_in_buffer;
264 + psrch_inf->last_entry = psrch_inf->srch_entries_start +
265 + le16_to_cpu(parms->LastNameOffset);
266 *pnetfid = parms->SearchHandle;
267 } else {
268 cifs_buf_release(pSMB);
269 @@ -3751,6 +3753,8 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
270 le16_to_cpu(parms->SearchCount);
271 psrch_inf->index_of_last_entry +=
272 psrch_inf->entries_in_buffer;
273 + psrch_inf->last_entry = psrch_inf->srch_entries_start +
274 + le16_to_cpu(parms->LastNameOffset);
275 /* cFYI(1,("fnxt2 entries in buf %d index_of_last %d",
276 psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry)); */
277
278 diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
279 index 5f40ed3..765adf1 100644
280 --- a/fs/cifs/readdir.c
281 +++ b/fs/cifs/readdir.c
282 @@ -640,6 +640,70 @@ static int is_dir_changed(struct file *file)
283
284 }
285
286 +static int cifs_save_resume_key(const char *current_entry,
287 + struct cifsFileInfo *cifsFile)
288 +{
289 + int rc = 0;
290 + unsigned int len = 0;
291 + __u16 level;
292 + char *filename;
293 +
294 + if ((cifsFile == NULL) || (current_entry == NULL))
295 + return -EINVAL;
296 +
297 + level = cifsFile->srch_inf.info_level;
298 +
299 + if (level == SMB_FIND_FILE_UNIX) {
300 + FILE_UNIX_INFO *pFindData = (FILE_UNIX_INFO *)current_entry;
301 +
302 + filename = &pFindData->FileName[0];
303 + if (cifsFile->srch_inf.unicode) {
304 + len = cifs_unicode_bytelen(filename);
305 + } else {
306 + /* BB should we make this strnlen of PATH_MAX? */
307 + len = strnlen(filename, PATH_MAX);
308 + }
309 + cifsFile->srch_inf.resume_key = pFindData->ResumeKey;
310 + } else if (level == SMB_FIND_FILE_DIRECTORY_INFO) {
311 + FILE_DIRECTORY_INFO *pFindData =
312 + (FILE_DIRECTORY_INFO *)current_entry;
313 + filename = &pFindData->FileName[0];
314 + len = le32_to_cpu(pFindData->FileNameLength);
315 + cifsFile->srch_inf.resume_key = pFindData->FileIndex;
316 + } else if (level == SMB_FIND_FILE_FULL_DIRECTORY_INFO) {
317 + FILE_FULL_DIRECTORY_INFO *pFindData =
318 + (FILE_FULL_DIRECTORY_INFO *)current_entry;
319 + filename = &pFindData->FileName[0];
320 + len = le32_to_cpu(pFindData->FileNameLength);
321 + cifsFile->srch_inf.resume_key = pFindData->FileIndex;
322 + } else if (level == SMB_FIND_FILE_ID_FULL_DIR_INFO) {
323 + SEARCH_ID_FULL_DIR_INFO *pFindData =
324 + (SEARCH_ID_FULL_DIR_INFO *)current_entry;
325 + filename = &pFindData->FileName[0];
326 + len = le32_to_cpu(pFindData->FileNameLength);
327 + cifsFile->srch_inf.resume_key = pFindData->FileIndex;
328 + } else if (level == SMB_FIND_FILE_BOTH_DIRECTORY_INFO) {
329 + FILE_BOTH_DIRECTORY_INFO *pFindData =
330 + (FILE_BOTH_DIRECTORY_INFO *)current_entry;
331 + filename = &pFindData->FileName[0];
332 + len = le32_to_cpu(pFindData->FileNameLength);
333 + cifsFile->srch_inf.resume_key = pFindData->FileIndex;
334 + } else if (level == SMB_FIND_FILE_INFO_STANDARD) {
335 + FIND_FILE_STANDARD_INFO *pFindData =
336 + (FIND_FILE_STANDARD_INFO *)current_entry;
337 + filename = &pFindData->FileName[0];
338 + /* one byte length, no name conversion */
339 + len = (unsigned int)pFindData->FileNameLength;
340 + cifsFile->srch_inf.resume_key = pFindData->ResumeKey;
341 + } else {
342 + cFYI(1, ("Unknown findfirst level %d", level));
343 + return -EINVAL;
344 + }
345 + cifsFile->srch_inf.resume_name_len = len;
346 + cifsFile->srch_inf.presume_name = filename;
347 + return rc;
348 +}
349 +
350 /* find the corresponding entry in the search */
351 /* Note that the SMB server returns search entries for . and .. which
352 complicates logic here if we choose to parse for them and we do not
353 @@ -703,6 +767,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
354 while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) &&
355 (rc == 0) && !cifsFile->srch_inf.endOfSearch) {
356 cFYI(1, ("calling findnext2"));
357 + cifs_save_resume_key(cifsFile->srch_inf.last_entry, cifsFile);
358 rc = CIFSFindNext(xid, pTcon, cifsFile->netfid,
359 &cifsFile->srch_inf);
360 if (rc)
361 @@ -919,69 +984,6 @@ static int cifs_filldir(char *pfindEntry, struct file *file,
362 return rc;
363 }
364
365 -static int cifs_save_resume_key(const char *current_entry,
366 - struct cifsFileInfo *cifsFile)
367 -{
368 - int rc = 0;
369 - unsigned int len = 0;
370 - __u16 level;
371 - char *filename;
372 -
373 - if ((cifsFile == NULL) || (current_entry == NULL))
374 - return -EINVAL;
375 -
376 - level = cifsFile->srch_inf.info_level;
377 -
378 - if (level == SMB_FIND_FILE_UNIX) {
379 - FILE_UNIX_INFO *pFindData = (FILE_UNIX_INFO *)current_entry;
380 -
381 - filename = &pFindData->FileName[0];
382 - if (cifsFile->srch_inf.unicode) {
383 - len = cifs_unicode_bytelen(filename);
384 - } else {
385 - /* BB should we make this strnlen of PATH_MAX? */
386 - len = strnlen(filename, PATH_MAX);
387 - }
388 - cifsFile->srch_inf.resume_key = pFindData->ResumeKey;
389 - } else if (level == SMB_FIND_FILE_DIRECTORY_INFO) {
390 - FILE_DIRECTORY_INFO *pFindData =
391 - (FILE_DIRECTORY_INFO *)current_entry;
392 - filename = &pFindData->FileName[0];
393 - len = le32_to_cpu(pFindData->FileNameLength);
394 - cifsFile->srch_inf.resume_key = pFindData->FileIndex;
395 - } else if (level == SMB_FIND_FILE_FULL_DIRECTORY_INFO) {
396 - FILE_FULL_DIRECTORY_INFO *pFindData =
397 - (FILE_FULL_DIRECTORY_INFO *)current_entry;
398 - filename = &pFindData->FileName[0];
399 - len = le32_to_cpu(pFindData->FileNameLength);
400 - cifsFile->srch_inf.resume_key = pFindData->FileIndex;
401 - } else if (level == SMB_FIND_FILE_ID_FULL_DIR_INFO) {
402 - SEARCH_ID_FULL_DIR_INFO *pFindData =
403 - (SEARCH_ID_FULL_DIR_INFO *)current_entry;
404 - filename = &pFindData->FileName[0];
405 - len = le32_to_cpu(pFindData->FileNameLength);
406 - cifsFile->srch_inf.resume_key = pFindData->FileIndex;
407 - } else if (level == SMB_FIND_FILE_BOTH_DIRECTORY_INFO) {
408 - FILE_BOTH_DIRECTORY_INFO *pFindData =
409 - (FILE_BOTH_DIRECTORY_INFO *)current_entry;
410 - filename = &pFindData->FileName[0];
411 - len = le32_to_cpu(pFindData->FileNameLength);
412 - cifsFile->srch_inf.resume_key = pFindData->FileIndex;
413 - } else if (level == SMB_FIND_FILE_INFO_STANDARD) {
414 - FIND_FILE_STANDARD_INFO *pFindData =
415 - (FIND_FILE_STANDARD_INFO *)current_entry;
416 - filename = &pFindData->FileName[0];
417 - /* one byte length, no name conversion */
418 - len = (unsigned int)pFindData->FileNameLength;
419 - cifsFile->srch_inf.resume_key = pFindData->ResumeKey;
420 - } else {
421 - cFYI(1, ("Unknown findfirst level %d", level));
422 - return -EINVAL;
423 - }
424 - cifsFile->srch_inf.resume_name_len = len;
425 - cifsFile->srch_inf.presume_name = filename;
426 - return rc;
427 -}
428
429 int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
430 {
431 diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
432 index 986061a..36d5fcd 100644
433 --- a/fs/xfs/linux-2.6/xfs_buf.c
434 +++ b/fs/xfs/linux-2.6/xfs_buf.c
435 @@ -1001,12 +1001,13 @@ xfs_buf_iodone_work(
436 * We can get an EOPNOTSUPP to ordered writes. Here we clear the
437 * ordered flag and reissue them. Because we can't tell the higher
438 * layers directly that they should not issue ordered I/O anymore, they
439 - * need to check if the ordered flag was cleared during I/O completion.
440 + * need to check if the _XFS_BARRIER_FAILED flag was set during I/O completion.
441 */
442 if ((bp->b_error == EOPNOTSUPP) &&
443 (bp->b_flags & (XBF_ORDERED|XBF_ASYNC)) == (XBF_ORDERED|XBF_ASYNC)) {
444 XB_TRACE(bp, "ordered_retry", bp->b_iodone);
445 bp->b_flags &= ~XBF_ORDERED;
446 + bp->b_flags |= _XFS_BARRIER_FAILED;
447 xfs_buf_iorequest(bp);
448 } else if (bp->b_iodone)
449 (*(bp->b_iodone))(bp);
450 diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
451 index fe01099..456519a 100644
452 --- a/fs/xfs/linux-2.6/xfs_buf.h
453 +++ b/fs/xfs/linux-2.6/xfs_buf.h
454 @@ -85,6 +85,14 @@ typedef enum {
455 * modifications being lost.
456 */
457 _XBF_PAGE_LOCKED = (1 << 22),
458 +
459 + /*
460 + * If we try a barrier write, but it fails we have to communicate
461 + * this to the upper layers. Unfortunately b_error gets overwritten
462 + * when the buffer is re-issued so we have to add another flag to
463 + * keep this information.
464 + */
465 + _XFS_BARRIER_FAILED = (1 << 23),
466 } xfs_buf_flags_t;
467
468 typedef enum {
469 diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
470 index 503ea89..0b02c64 100644
471 --- a/fs/xfs/xfs_log.c
472 +++ b/fs/xfs/xfs_log.c
473 @@ -1033,11 +1033,12 @@ xlog_iodone(xfs_buf_t *bp)
474 l = iclog->ic_log;
475
476 /*
477 - * If the ordered flag has been removed by a lower
478 - * layer, it means the underlyin device no longer supports
479 + * If the _XFS_BARRIER_FAILED flag was set by a lower
480 + * layer, it means the underlying device no longer supports
481 * barrier I/O. Warn loudly and turn off barriers.
482 */
483 - if ((l->l_mp->m_flags & XFS_MOUNT_BARRIER) && !XFS_BUF_ISORDERED(bp)) {
484 + if (bp->b_flags & _XFS_BARRIER_FAILED) {
485 + bp->b_flags &= ~_XFS_BARRIER_FAILED;
486 l->l_mp->m_flags &= ~XFS_MOUNT_BARRIER;
487 xfs_fs_cmn_err(CE_WARN, l->l_mp,
488 "xlog_iodone: Barriers are no longer supported"
489 diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
490 index 1113157..37f0721 100644
491 --- a/kernel/sched_rt.c
492 +++ b/kernel/sched_rt.c
493 @@ -102,12 +102,12 @@ static void dequeue_rt_entity(struct sched_rt_entity *rt_se);
494
495 static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
496 {
497 + struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;
498 struct sched_rt_entity *rt_se = rt_rq->rt_se;
499
500 - if (rt_se && !on_rt_rq(rt_se) && rt_rq->rt_nr_running) {
501 - struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;
502 -
503 - enqueue_rt_entity(rt_se);
504 + if (rt_rq->rt_nr_running) {
505 + if (rt_se && !on_rt_rq(rt_se))
506 + enqueue_rt_entity(rt_se);
507 if (rt_rq->highest_prio < curr->prio)
508 resched_task(curr);
509 }
510 diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
511 index 8165df5..5c7bbe0 100644
512 --- a/net/mac80211/debugfs_netdev.c
513 +++ b/net/mac80211/debugfs_netdev.c
514 @@ -537,6 +537,7 @@ static int netdev_notify(struct notifier_block *nb,
515 {
516 struct net_device *dev = ndev;
517 struct dentry *dir;
518 + struct ieee80211_local *local;
519 struct ieee80211_sub_if_data *sdata;
520 char buf[10+IFNAMSIZ];
521
522 @@ -549,10 +550,19 @@ static int netdev_notify(struct notifier_block *nb,
523 if (dev->ieee80211_ptr->wiphy->privid != mac80211_wiphy_privid)
524 return 0;
525
526 - sdata = IEEE80211_DEV_TO_SUB_IF(dev);
527 + /*
528 + * Do not use IEEE80211_DEV_TO_SUB_IF because that
529 + * BUG_ONs for the master netdev which we need to
530 + * handle here.
531 + */
532 + sdata = netdev_priv(dev);
533
534 - sprintf(buf, "netdev:%s", dev->name);
535 dir = sdata->debugfsdir;
536 +
537 + if (!dir)
538 + return 0;
539 +
540 + sprintf(buf, "netdev:%s", dev->name);
541 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf))
542 printk(KERN_ERR "mac80211: debugfs: failed to rename debugfs "
543 "dir to %s\n", buf);
544 diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
545 index 74aecc0..10b05ce 100644
546 --- a/net/rfkill/rfkill.c
547 +++ b/net/rfkill/rfkill.c
548 @@ -117,6 +117,7 @@ static void rfkill_led_trigger_activate(struct led_classdev *led)
549
550 static void notify_rfkill_state_change(struct rfkill *rfkill)
551 {
552 + rfkill_led_trigger(rfkill, rfkill->state);
553 blocking_notifier_call_chain(&rfkill_notifier_list,
554 RFKILL_STATE_CHANGED,
555 rfkill);
556 @@ -204,10 +205,8 @@ static int rfkill_toggle_radio(struct rfkill *rfkill,
557 rfkill->state = state;
558 }
559
560 - if (force || rfkill->state != oldstate) {
561 - rfkill_led_trigger(rfkill, rfkill->state);
562 + if (force || rfkill->state != oldstate)
563 notify_rfkill_state_change(rfkill);
564 - }
565
566 return retval;
567 }

  ViewVC Help
Powered by ViewVC 1.1.20