]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.kernel.org/patch-2.6.27.2-3
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.kernel.org / patch-2.6.27.2-3
1 From: Greg Kroah-Hartman <gregkh@suse.de>
2 Subject: Linux 2.6.27.3
3
4 Upstream 2.6.27.3 release from kernel.org
5
6 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
7
8 diff --git a/Documentation/video4linux/CARDLIST.au0828 b/Documentation/video4linux/CARDLIST.au0828
9 index aa05e5b..d5cb4ea 100644
10 --- a/Documentation/video4linux/CARDLIST.au0828
11 +++ b/Documentation/video4linux/CARDLIST.au0828
12 @@ -1,5 +1,5 @@
13 0 -> Unknown board (au0828)
14 - 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721f,2040:7280,0fd9:0008]
15 + 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721e,2040:721f,2040:7280,0fd9:0008]
16 2 -> Hauppauge HVR850 (au0828) [2040:7240]
17 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620]
18 4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281]
19 diff --git a/Makefile b/Makefile
20 index 063fbe4..e4b635a 100644
21 --- a/Makefile
22 +++ b/Makefile
23 @@ -1,8 +1,8 @@
24 VERSION = 2
25 PATCHLEVEL = 6
26 SUBLEVEL = 27
27 -EXTRAVERSION = .2
28 -NAME = Rotary Wombat
29 +EXTRAVERSION = .3
30 +NAME = Trembling Tortoise
31
32 # *DOCUMENTATION*
33 # To see a list of typical targets execute "make help"
34 diff --git a/drivers/base/core.c b/drivers/base/core.c
35 index d021c98..473c323 100644
36 --- a/drivers/base/core.c
37 +++ b/drivers/base/core.c
38 @@ -523,11 +523,16 @@ static void klist_children_put(struct klist_node *n)
39 * device_initialize - init device structure.
40 * @dev: device.
41 *
42 - * This prepares the device for use by other layers,
43 - * including adding it to the device hierarchy.
44 + * This prepares the device for use by other layers by initializing
45 + * its fields.
46 * It is the first half of device_register(), if called by
47 - * that, though it can also be called separately, so one
48 - * may use @dev's fields (e.g. the refcount).
49 + * that function, though it can also be called separately, so one
50 + * may use @dev's fields. In particular, get_device()/put_device()
51 + * may be used for reference counting of @dev after calling this
52 + * function.
53 + *
54 + * NOTE: Use put_device() to give up your reference instead of freeing
55 + * @dev directly once you have called this function.
56 */
57 void device_initialize(struct device *dev)
58 {
59 @@ -836,9 +841,13 @@ static void device_remove_sys_dev_entry(struct device *dev)
60 * This is part 2 of device_register(), though may be called
61 * separately _iff_ device_initialize() has been called separately.
62 *
63 - * This adds it to the kobject hierarchy via kobject_add(), adds it
64 + * This adds @dev to the kobject hierarchy via kobject_add(), adds it
65 * to the global and sibling lists for the device, then
66 * adds it to the other relevant subsystems of the driver model.
67 + *
68 + * NOTE: _Never_ directly free @dev after calling this function, even
69 + * if it returned an error! Always use put_device() to give up your
70 + * reference instead.
71 */
72 int device_add(struct device *dev)
73 {
74 @@ -965,6 +974,10 @@ done:
75 * I.e. you should only call the two helpers separately if
76 * have a clearly defined need to use and refcount the device
77 * before it is added to the hierarchy.
78 + *
79 + * NOTE: _Never_ directly free @dev after calling this function, even
80 + * if it returned an error! Always use put_device() to give up the
81 + * reference initialized in this function instead.
82 */
83 int device_register(struct device *dev)
84 {
85 @@ -1243,7 +1256,7 @@ struct device *device_create_vargs(struct class *class, struct device *parent,
86 return dev;
87
88 error:
89 - kfree(dev);
90 + put_device(dev);
91 return ERR_PTR(retval);
92 }
93 EXPORT_SYMBOL_GPL(device_create_vargs);
94 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
95 index 8897434..a219ae4 100644
96 --- a/drivers/gpu/drm/i915/i915_dma.c
97 +++ b/drivers/gpu/drm/i915/i915_dma.c
98 @@ -836,7 +836,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
99 DRM_IOCTL_DEF(DRM_I915_SET_VBLANK_PIPE, i915_vblank_pipe_set, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY ),
100 DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE, i915_vblank_pipe_get, DRM_AUTH ),
101 DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH),
102 - DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH),
103 + DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
104 };
105
106 int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
107 diff --git a/drivers/md/md.c b/drivers/md/md.c
108 index deeac4b..fe6eccd 100644
109 --- a/drivers/md/md.c
110 +++ b/drivers/md/md.c
111 @@ -2109,8 +2109,6 @@ rdev_size_store(mdk_rdev_t *rdev, const char *buf, size_t len)
112
113 if (strict_strtoull(buf, 10, &size) < 0)
114 return -EINVAL;
115 - if (size < my_mddev->size)
116 - return -EINVAL;
117 if (my_mddev->pers && rdev->raid_disk >= 0) {
118 if (my_mddev->persistent) {
119 size = super_types[my_mddev->major_version].
120 @@ -2121,9 +2119,9 @@ rdev_size_store(mdk_rdev_t *rdev, const char *buf, size_t len)
121 size = (rdev->bdev->bd_inode->i_size >> 10);
122 size -= rdev->data_offset/2;
123 }
124 - if (size < my_mddev->size)
125 - return -EINVAL; /* component must fit device */
126 }
127 + if (size < my_mddev->size)
128 + return -EINVAL; /* component must fit device */
129
130 rdev->size = size;
131 if (size > oldsize && my_mddev->external) {
132 diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
133 index 9da260f..6f9b773 100644
134 --- a/drivers/media/dvb/siano/sms-cards.c
135 +++ b/drivers/media/dvb/siano/sms-cards.c
136 @@ -42,6 +42,10 @@ struct usb_device_id smsusb_id_table[] = {
137 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
138 { USB_DEVICE(0x2040, 0x5510),
139 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
140 + { USB_DEVICE(0x2040, 0x5520),
141 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
142 + { USB_DEVICE(0x2040, 0x5530),
143 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
144 { USB_DEVICE(0x2040, 0x5580),
145 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
146 { USB_DEVICE(0x2040, 0x5590),
147 diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c
148 index ed48908..6294938 100644
149 --- a/drivers/media/video/au0828/au0828-cards.c
150 +++ b/drivers/media/video/au0828/au0828-cards.c
151 @@ -90,6 +90,7 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
152 case 72221: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
153 case 72231: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
154 case 72241: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM and basic analog video */
155 + case 72251: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */
156 case 72301: /* WinTV-HVR850 (Retail, IR, ATSC and basic analog video */
157 case 72500: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM */
158 break;
159 @@ -198,6 +199,8 @@ struct usb_device_id au0828_usb_id_table [] = {
160 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
161 { USB_DEVICE(0x2040, 0x721b),
162 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
163 + { USB_DEVICE(0x2040, 0x721e),
164 + .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
165 { USB_DEVICE(0x2040, 0x721f),
166 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
167 { USB_DEVICE(0x2040, 0x7280),
168 diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
169 index 463680b..b59e472 100644
170 --- a/drivers/media/video/tvaudio.c
171 +++ b/drivers/media/video/tvaudio.c
172 @@ -1792,7 +1792,7 @@ static int chip_command(struct i2c_client *client,
173 break;
174 case VIDIOC_S_FREQUENCY:
175 chip->mode = 0; /* automatic */
176 - if (desc->checkmode) {
177 + if (desc->checkmode && desc->setmode) {
178 desc->setmode(chip,V4L2_TUNER_MODE_MONO);
179 if (chip->prevmode != V4L2_TUNER_MODE_MONO)
180 chip->prevmode = -1; /* reset previous mode */
181 diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h
182 index 2f84093..88f4cc3 100644
183 --- a/drivers/net/wireless/ath9k/core.h
184 +++ b/drivers/net/wireless/ath9k/core.h
185 @@ -316,7 +316,7 @@ void ath_descdma_cleanup(struct ath_softc *sc,
186 #define ATH_RX_TIMEOUT 40 /* 40 milliseconds */
187 #define WME_NUM_TID 16
188 #define IEEE80211_BAR_CTL_TID_M 0xF000 /* tid mask */
189 -#define IEEE80211_BAR_CTL_TID_S 2 /* tid shift */
190 +#define IEEE80211_BAR_CTL_TID_S 12 /* tid shift */
191
192 enum ATH_RX_TYPE {
193 ATH_RX_NON_CONSUMED = 0,
194 diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
195 index acebdf1..b4c7174 100644
196 --- a/drivers/net/wireless/ath9k/main.c
197 +++ b/drivers/net/wireless/ath9k/main.c
198 @@ -1007,6 +1007,11 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
199 return ret;
200 }
201
202 +static int ath9k_no_fragmentation(struct ieee80211_hw *hw, u32 value)
203 +{
204 + return -EOPNOTSUPP;
205 +}
206 +
207 static struct ieee80211_ops ath9k_ops = {
208 .tx = ath9k_tx,
209 .start = ath9k_start,
210 @@ -1031,7 +1036,8 @@ static struct ieee80211_ops ath9k_ops = {
211 .get_tsf = ath9k_get_tsf,
212 .reset_tsf = ath9k_reset_tsf,
213 .tx_last_beacon = NULL,
214 - .ampdu_action = ath9k_ampdu_action
215 + .ampdu_action = ath9k_ampdu_action,
216 + .set_frag_threshold = ath9k_no_fragmentation,
217 };
218
219 void ath_get_beaconconfig(struct ath_softc *sc,
220 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
221 index 8ab389d..706f3e6 100644
222 --- a/drivers/usb/core/hcd.c
223 +++ b/drivers/usb/core/hcd.c
224 @@ -81,6 +81,10 @@
225
226 /*-------------------------------------------------------------------------*/
227
228 +/* Keep track of which host controller drivers are loaded */
229 +unsigned long usb_hcds_loaded;
230 +EXPORT_SYMBOL_GPL(usb_hcds_loaded);
231 +
232 /* host controllers we manage */
233 LIST_HEAD (usb_bus_list);
234 EXPORT_SYMBOL_GPL (usb_bus_list);
235 diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
236 index e710ce0..2dcde61 100644
237 --- a/drivers/usb/core/hcd.h
238 +++ b/drivers/usb/core/hcd.h
239 @@ -482,4 +482,10 @@ static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb,
240 */
241 extern struct rw_semaphore ehci_cf_port_reset_rwsem;
242
243 +/* Keep track of which host controller drivers are loaded */
244 +#define USB_UHCI_LOADED 0
245 +#define USB_OHCI_LOADED 1
246 +#define USB_EHCI_LOADED 2
247 +extern unsigned long usb_hcds_loaded;
248 +
249 #endif /* __KERNEL__ */
250 diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
251 index 29d13eb..48f51b1 100644
252 --- a/drivers/usb/gadget/s3c2410_udc.c
253 +++ b/drivers/usb/gadget/s3c2410_udc.c
254 @@ -1651,7 +1651,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
255 return -EBUSY;
256
257 if (!driver->bind || !driver->setup
258 - || driver->speed != USB_SPEED_FULL) {
259 + || driver->speed < USB_SPEED_FULL) {
260 printk(KERN_ERR "Invalid driver: bind %p setup %p speed %d\n",
261 driver->bind, driver->setup, driver->speed);
262 return -EINVAL;
263 diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
264 index 3791e62..38a55af 100644
265 --- a/drivers/usb/gadget/u_ether.c
266 +++ b/drivers/usb/gadget/u_ether.c
267 @@ -873,6 +873,13 @@ struct net_device *gether_connect(struct gether *link)
268 spin_lock(&dev->lock);
269 dev->port_usb = link;
270 link->ioport = dev;
271 + if (netif_running(dev->net)) {
272 + if (link->open)
273 + link->open(link);
274 + } else {
275 + if (link->close)
276 + link->close(link);
277 + }
278 spin_unlock(&dev->lock);
279
280 netif_carrier_on(dev->net);
281 diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
282 index 8409e07..86e38b0 100644
283 --- a/drivers/usb/host/ehci-hcd.c
284 +++ b/drivers/usb/host/ehci-hcd.c
285 @@ -1049,6 +1049,12 @@ static int __init ehci_hcd_init(void)
286 {
287 int retval = 0;
288
289 + set_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
290 + if (test_bit(USB_UHCI_LOADED, &usb_hcds_loaded) ||
291 + test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
292 + printk(KERN_WARNING "Warning! ehci_hcd should always be loaded"
293 + " before uhci_hcd and ohci_hcd, not after\n");
294 +
295 pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
296 hcd_name,
297 sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
298 @@ -1056,8 +1062,10 @@ static int __init ehci_hcd_init(void)
299
300 #ifdef DEBUG
301 ehci_debug_root = debugfs_create_dir("ehci", NULL);
302 - if (!ehci_debug_root)
303 - return -ENOENT;
304 + if (!ehci_debug_root) {
305 + retval = -ENOENT;
306 + goto err_debug;
307 + }
308 #endif
309
310 #ifdef PLATFORM_DRIVER
311 @@ -1104,7 +1112,9 @@ clean0:
312 #ifdef DEBUG
313 debugfs_remove(ehci_debug_root);
314 ehci_debug_root = NULL;
315 +err_debug:
316 #endif
317 + clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
318 return retval;
319 }
320 module_init(ehci_hcd_init);
321 @@ -1126,6 +1136,7 @@ static void __exit ehci_hcd_cleanup(void)
322 #ifdef DEBUG
323 debugfs_remove(ehci_debug_root);
324 #endif
325 + clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
326 }
327 module_exit(ehci_hcd_cleanup);
328
329 diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
330 index 8990196..8bec02c 100644
331 --- a/drivers/usb/host/ohci-hcd.c
332 +++ b/drivers/usb/host/ohci-hcd.c
333 @@ -1098,6 +1098,7 @@ static int __init ohci_hcd_mod_init(void)
334 printk (KERN_DEBUG "%s: " DRIVER_INFO "\n", hcd_name);
335 pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
336 sizeof (struct ed), sizeof (struct td));
337 + set_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
338
339 #ifdef DEBUG
340 ohci_debug_root = debugfs_create_dir("ohci", NULL);
341 @@ -1184,6 +1185,7 @@ static int __init ohci_hcd_mod_init(void)
342 error_debug:
343 #endif
344
345 + clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
346 return retval;
347 }
348 module_init(ohci_hcd_mod_init);
349 @@ -1214,6 +1216,7 @@ static void __exit ohci_hcd_mod_exit(void)
350 #ifdef DEBUG
351 debugfs_remove(ohci_debug_root);
352 #endif
353 + clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
354 }
355 module_exit(ohci_hcd_mod_exit);
356
357 diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
358 index 7ea9a7b..32bbce9 100644
359 --- a/drivers/usb/host/ohci-hub.c
360 +++ b/drivers/usb/host/ohci-hub.c
361 @@ -359,21 +359,24 @@ static void ohci_finish_controller_resume(struct usb_hcd *hcd)
362
363 /* Carry out polling-, autostop-, and autoresume-related state changes */
364 static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
365 - int any_connected)
366 + int any_connected, int rhsc_status)
367 {
368 int poll_rh = 1;
369 - int rhsc;
370 + int rhsc_enable;
371
372 - rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC;
373 - switch (ohci->hc_control & OHCI_CTRL_HCFS) {
374 + /* Some broken controllers never turn off RHCS in the interrupt
375 + * status register. For their sake we won't re-enable RHSC
376 + * interrupts if the interrupt bit is already active.
377 + */
378 + rhsc_enable = ohci_readl(ohci, &ohci->regs->intrenable) &
379 + OHCI_INTR_RHSC;
380
381 + switch (ohci->hc_control & OHCI_CTRL_HCFS) {
382 case OHCI_USB_OPER:
383 - /* If no status changes are pending, enable status-change
384 - * interrupts.
385 - */
386 - if (!rhsc && !changed) {
387 - rhsc = OHCI_INTR_RHSC;
388 - ohci_writel(ohci, rhsc, &ohci->regs->intrenable);
389 + /* If no status changes are pending, enable RHSC interrupts. */
390 + if (!rhsc_enable && !rhsc_status && !changed) {
391 + rhsc_enable = OHCI_INTR_RHSC;
392 + ohci_writel(ohci, rhsc_enable, &ohci->regs->intrenable);
393 }
394
395 /* Keep on polling until we know a device is connected
396 @@ -383,7 +386,7 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
397 if (any_connected ||
398 !device_may_wakeup(&ohci_to_hcd(ohci)
399 ->self.root_hub->dev)) {
400 - if (rhsc)
401 + if (rhsc_enable)
402 poll_rh = 0;
403 } else {
404 ohci->autostop = 1;
405 @@ -396,34 +399,45 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
406 ohci->autostop = 0;
407 ohci->next_statechange = jiffies +
408 STATECHANGE_DELAY;
409 - } else if (rhsc && time_after_eq(jiffies,
410 + } else if (time_after_eq(jiffies,
411 ohci->next_statechange)
412 && !ohci->ed_rm_list
413 && !(ohci->hc_control &
414 OHCI_SCHED_ENABLES)) {
415 ohci_rh_suspend(ohci, 1);
416 - poll_rh = 0;
417 + if (rhsc_enable)
418 + poll_rh = 0;
419 }
420 }
421 break;
422
423 - /* if there is a port change, autostart or ask to be resumed */
424 case OHCI_USB_SUSPEND:
425 case OHCI_USB_RESUME:
426 + /* if there is a port change, autostart or ask to be resumed */
427 if (changed) {
428 if (ohci->autostop)
429 ohci_rh_resume(ohci);
430 else
431 usb_hcd_resume_root_hub(ohci_to_hcd(ohci));
432 - } else {
433 - if (!rhsc && (ohci->autostop ||
434 - ohci_to_hcd(ohci)->self.root_hub->
435 - do_remote_wakeup))
436 - ohci_writel(ohci, OHCI_INTR_RHSC,
437 - &ohci->regs->intrenable);
438
439 - /* everything is idle, no need for polling */
440 + /* If remote wakeup is disabled, stop polling */
441 + } else if (!ohci->autostop &&
442 + !ohci_to_hcd(ohci)->self.root_hub->
443 + do_remote_wakeup) {
444 poll_rh = 0;
445 +
446 + } else {
447 + /* If no status changes are pending,
448 + * enable RHSC interrupts
449 + */
450 + if (!rhsc_enable && !rhsc_status) {
451 + rhsc_enable = OHCI_INTR_RHSC;
452 + ohci_writel(ohci, rhsc_enable,
453 + &ohci->regs->intrenable);
454 + }
455 + /* Keep polling until RHSC is enabled */
456 + if (rhsc_enable)
457 + poll_rh = 0;
458 }
459 break;
460 }
461 @@ -441,18 +455,22 @@ static inline int ohci_rh_resume(struct ohci_hcd *ohci)
462 * autostop isn't used when CONFIG_PM is turned off.
463 */
464 static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
465 - int any_connected)
466 + int any_connected, int rhsc_status)
467 {
468 /* If RHSC is enabled, don't poll */
469 if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC)
470 return 0;
471
472 - /* If no status changes are pending, enable status-change interrupts */
473 - if (!changed) {
474 - ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);
475 - return 0;
476 - }
477 - return 1;
478 + /* If status changes are pending, continue polling.
479 + * Conversely, if no status changes are pending but the RHSC
480 + * status bit was set, then RHSC may be broken so continue polling.
481 + */
482 + if (changed || rhsc_status)
483 + return 1;
484 +
485 + /* It's safe to re-enable RHSC interrupts */
486 + ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);
487 + return 0;
488 }
489
490 #endif /* CONFIG_PM */
491 @@ -467,6 +485,7 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
492 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
493 int i, changed = 0, length = 1;
494 int any_connected = 0;
495 + int rhsc_status;
496 unsigned long flags;
497
498 spin_lock_irqsave (&ohci->lock, flags);
499 @@ -492,12 +511,10 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
500 length++;
501 }
502
503 - /* Some broken controllers never turn off RHCS in the interrupt
504 - * status register. For their sake we won't re-enable RHSC
505 - * interrupts if the flag is already set.
506 - */
507 - if (ohci_readl(ohci, &ohci->regs->intrstatus) & OHCI_INTR_RHSC)
508 - changed = 1;
509 + /* Clear the RHSC status flag before reading the port statuses */
510 + ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrstatus);
511 + rhsc_status = ohci_readl(ohci, &ohci->regs->intrstatus) &
512 + OHCI_INTR_RHSC;
513
514 /* look at each port */
515 for (i = 0; i < ohci->num_ports; i++) {
516 @@ -517,7 +534,7 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
517 }
518
519 hcd->poll_rh = ohci_root_hub_state_changes(ohci, changed,
520 - any_connected);
521 + any_connected, rhsc_status);
522
523 done:
524 spin_unlock_irqrestore (&ohci->lock, flags);
525 diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
526 index 3a7bfe7..59bed3c 100644
527 --- a/drivers/usb/host/uhci-hcd.c
528 +++ b/drivers/usb/host/uhci-hcd.c
529 @@ -953,6 +953,7 @@ static int __init uhci_hcd_init(void)
530
531 printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "%s\n",
532 ignore_oc ? ", overcurrent ignored" : "");
533 + set_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
534
535 if (usb_disabled())
536 return -ENODEV;
537 @@ -988,6 +989,7 @@ debug_failed:
538
539 errbuf_failed:
540
541 + clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
542 return retval;
543 }
544
545 @@ -997,6 +999,7 @@ static void __exit uhci_hcd_cleanup(void)
546 kmem_cache_destroy(uhci_up_cachep);
547 debugfs_remove(uhci_debugfs_root);
548 kfree(errbuf);
549 + clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
550 }
551
552 module_init(uhci_hcd_init);
553 diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
554 index 58b2b8f..4b9542b 100644
555 --- a/drivers/usb/musb/Kconfig
556 +++ b/drivers/usb/musb/Kconfig
557 @@ -33,10 +33,6 @@ config USB_MUSB_SOC
558 default y if ARCH_DAVINCI
559 default y if ARCH_OMAP2430
560 default y if ARCH_OMAP34XX
561 - help
562 - Use a static <asm/arch/hdrc_cnf.h> file to describe how the
563 - controller is configured (endpoints, mechanisms, etc) on the
564 - current iteration of a given system-on-chip.
565
566 comment "DaVinci 644x USB support"
567 depends on USB_MUSB_HDRC && ARCH_DAVINCI
568 diff --git a/drivers/usb/musb/cppi_dma.h b/drivers/usb/musb/cppi_dma.h
569 index fc5216b..729b407 100644
570 --- a/drivers/usb/musb/cppi_dma.h
571 +++ b/drivers/usb/musb/cppi_dma.h
572 @@ -119,8 +119,8 @@ struct cppi {
573 void __iomem *mregs; /* Mentor regs */
574 void __iomem *tibase; /* TI/CPPI regs */
575
576 - struct cppi_channel tx[MUSB_C_NUM_EPT - 1];
577 - struct cppi_channel rx[MUSB_C_NUM_EPR - 1];
578 + struct cppi_channel tx[4];
579 + struct cppi_channel rx[4];
580
581 struct dma_pool *pool;
582
583 diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
584 index 75baf18..dfb3bcb 100644
585 --- a/drivers/usb/musb/davinci.c
586 +++ b/drivers/usb/musb/davinci.c
587 @@ -30,6 +30,7 @@
588 #include <linux/delay.h>
589 #include <linux/clk.h>
590 #include <linux/io.h>
591 +#include <linux/gpio.h>
592
593 #include <asm/arch/hardware.h>
594 #include <asm/arch/memory.h>
595 @@ -39,7 +40,7 @@
596 #include "musb_core.h"
597
598 #ifdef CONFIG_MACH_DAVINCI_EVM
599 -#include <asm/arch/i2c-client.h>
600 +#define GPIO_nVBUS_DRV 87
601 #endif
602
603 #include "davinci.h"
604 @@ -138,7 +139,6 @@ static int vbus_state = -1;
605 /* VBUS SWITCHING IS BOARD-SPECIFIC */
606
607 #ifdef CONFIG_MACH_DAVINCI_EVM
608 -#ifndef CONFIG_MACH_DAVINCI_EVM_OTG
609
610 /* I2C operations are always synchronous, and require a task context.
611 * With unloaded systems, using the shared workqueue seems to suffice
612 @@ -146,12 +146,11 @@ static int vbus_state = -1;
613 */
614 static void evm_deferred_drvvbus(struct work_struct *ignored)
615 {
616 - davinci_i2c_expander_op(0x3a, USB_DRVVBUS, vbus_state);
617 + gpio_set_value_cansleep(GPIO_nVBUS_DRV, vbus_state);
618 vbus_state = !vbus_state;
619 }
620 static DECLARE_WORK(evm_vbus_work, evm_deferred_drvvbus);
621
622 -#endif /* modified board */
623 #endif /* EVM */
624
625 static void davinci_source_power(struct musb *musb, int is_on, int immediate)
626 @@ -165,21 +164,10 @@ static void davinci_source_power(struct musb *musb, int is_on, int immediate)
627
628 #ifdef CONFIG_MACH_DAVINCI_EVM
629 if (machine_is_davinci_evm()) {
630 -#ifdef CONFIG_MACH_DAVINCI_EVM_OTG
631 - /* modified EVM board switching VBUS with GPIO(6) not I2C
632 - * NOTE: PINMUX0.RGB888 (bit23) must be clear
633 - */
634 - if (is_on)
635 - gpio_set(GPIO(6));
636 - else
637 - gpio_clear(GPIO(6));
638 - immediate = 1;
639 -#else
640 if (immediate)
641 - davinci_i2c_expander_op(0x3a, USB_DRVVBUS, !is_on);
642 + gpio_set_value_cansleep(GPIO_nVBUS_DRV, vbus_state);
643 else
644 schedule_work(&evm_vbus_work);
645 -#endif
646 }
647 #endif
648 if (immediate)
649 diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
650 index 128e949..5c5bc1a 100644
651 --- a/drivers/usb/musb/musb_core.c
652 +++ b/drivers/usb/musb/musb_core.c
653 @@ -82,9 +82,9 @@
654 /*
655 * This gets many kinds of configuration information:
656 * - Kconfig for everything user-configurable
657 - * - <asm/arch/hdrc_cnf.h> for SOC or family details
658 * - platform_device for addressing, irq, and platform_data
659 * - platform_data is mostly for board-specific informarion
660 + * (plus recentrly, SOC or family details)
661 *
662 * Most of the conditional compilation will (someday) vanish.
663 */
664 @@ -974,9 +974,9 @@ static void musb_shutdown(struct platform_device *pdev)
665 /*
666 * The silicon either has hard-wired endpoint configurations, or else
667 * "dynamic fifo" sizing. The driver has support for both, though at this
668 - * writing only the dynamic sizing is very well tested. We use normal
669 - * idioms to so both modes are compile-tested, but dead code elimination
670 - * leaves only the relevant one in the object file.
671 + * writing only the dynamic sizing is very well tested. Since we switched
672 + * away from compile-time hardware parameters, we can no longer rely on
673 + * dead code elimination to leave only the relevant one in the object file.
674 *
675 * We don't currently use dynamic fifo setup capability to do anything
676 * more than selecting one of a bunch of predefined configurations.
677 diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
678 index 8b4be01..13205fe 100644
679 --- a/drivers/usb/musb/musb_host.c
680 +++ b/drivers/usb/musb/musb_host.c
681 @@ -108,7 +108,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
682 /*
683 * Clear TX fifo. Needed to avoid BABBLE errors.
684 */
685 -static inline void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
686 +static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
687 {
688 void __iomem *epio = ep->regs;
689 u16 csr;
690 @@ -436,7 +436,7 @@ musb_advance_schedule(struct musb *musb, struct urb *urb,
691 }
692 }
693
694 -static inline u16 musb_h_flush_rxfifo(struct musb_hw_ep *hw_ep, u16 csr)
695 +static u16 musb_h_flush_rxfifo(struct musb_hw_ep *hw_ep, u16 csr)
696 {
697 /* we don't want fifo to fill itself again;
698 * ignore dma (various models),
699 @@ -1005,7 +1005,7 @@ static bool musb_h_ep0_continue(struct musb *musb, u16 len, struct urb *urb)
700
701 /*
702 * Handle default endpoint interrupt as host. Only called in IRQ time
703 - * from the LinuxIsr() interrupt service routine.
704 + * from musb_interrupt().
705 *
706 * called with controller irqlocked
707 */
708 diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
709 index 9cbff84..038ea62 100644
710 --- a/drivers/video/console/fbcon.c
711 +++ b/drivers/video/console/fbcon.c
712 @@ -2996,8 +2996,8 @@ static void fbcon_set_all_vcs(struct fb_info *info)
713 p = &fb_display[vc->vc_num];
714 set_blitting_type(vc, info);
715 var_to_display(p, &info->var, info);
716 - cols = FBCON_SWAP(p->rotate, info->var.xres, info->var.yres);
717 - rows = FBCON_SWAP(p->rotate, info->var.yres, info->var.xres);
718 + cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
719 + rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
720 cols /= vc->vc_font.width;
721 rows /= vc->vc_font.height;
722 vc_resize(vc, cols, rows);
723 diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
724 index 18d3c84..cbdf97d 100644
725 --- a/fs/xfs/linux-2.6/xfs_super.c
726 +++ b/fs/xfs/linux-2.6/xfs_super.c
727 @@ -1323,7 +1323,7 @@ xfs_fs_remount(
728 "XFS: mount option \"%s\" not supported for remount\n", p);
729 return -EINVAL;
730 #else
731 - return 0;
732 + break;
733 #endif
734 }
735 }
736 diff --git a/kernel/module.c b/kernel/module.c
737 index 9db1191..d5fcd24 100644
738 --- a/kernel/module.c
739 +++ b/kernel/module.c
740 @@ -1173,7 +1173,7 @@ static void free_notes_attrs(struct module_notes_attrs *notes_attrs,
741 while (i-- > 0)
742 sysfs_remove_bin_file(notes_attrs->dir,
743 &notes_attrs->attrs[i]);
744 - kobject_del(notes_attrs->dir);
745 + kobject_put(notes_attrs->dir);
746 }
747 kfree(notes_attrs);
748 }
749 diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
750 index 34fa8ed..48db9bb 100644
751 --- a/net/mac80211/wext.c
752 +++ b/net/mac80211/wext.c
753 @@ -804,7 +804,7 @@ static int ieee80211_ioctl_siwfrag(struct net_device *dev,
754 * configure it here */
755
756 if (local->ops->set_frag_threshold)
757 - local->ops->set_frag_threshold(
758 + return local->ops->set_frag_threshold(
759 local_to_hw(local),
760 local->fragmentation_threshold);
761