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