Magellan Linux

Contents of /trunk/kernel26-alx/patches-2.6.27-r3/0102-2.6.27.3-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


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