diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-04-30 15:12:13 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-04-30 15:16:49 -0400 |
commit | 3c56999eec7acc105a31b4546c94aad2fb844b13 (patch) | |
tree | 293aef41f1441875323541cbc4f790c291b83679 /drivers | |
parent | bad760089c1ef7fe525c0f268a4078b9cb483903 (diff) | |
parent | 12d161147f828192b5bcc33166f468a827832767 (diff) |
Merge branch 'core/signal' into perfcounters/core
This is necessary to avoid the conflict of syscall numbers.
Conflicts:
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
Fixes up the borked syscall numbers of perfcounters versus
preadv/pwritev as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/Makefile | 4 | ||||
-rw-r--r-- | drivers/isdn/capi/kcapi.c | 171 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-core.c | 6 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-audio.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-i2c.c | 16 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/Kconfig | 44 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 1 | ||||
-rw-r--r-- | drivers/media/video/mx3_camera.c | 4 | ||||
-rw-r--r-- | drivers/media/video/s2255drv.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa5246a.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa5249.c | 4 | ||||
-rw-r--r-- | drivers/net/e100.c | 30 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 31 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 51 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 10 | ||||
-rw-r--r-- | drivers/net/mlx4/en_netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/mlx4/en_rx.c | 4 | ||||
-rw-r--r-- | drivers/net/veth.c | 41 |
19 files changed, 291 insertions, 139 deletions
diff --git a/drivers/Makefile b/drivers/Makefile index 2618a6169a13..1266ead6ace0 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
@@ -36,7 +36,7 @@ obj-$(CONFIG_FB_INTEL) += video/intelfb/ | |||
36 | 36 | ||
37 | obj-y += serial/ | 37 | obj-y += serial/ |
38 | obj-$(CONFIG_PARPORT) += parport/ | 38 | obj-$(CONFIG_PARPORT) += parport/ |
39 | obj-y += base/ block/ misc/ mfd/ media/ | 39 | obj-y += base/ block/ misc/ mfd/ |
40 | obj-$(CONFIG_NUBUS) += nubus/ | 40 | obj-$(CONFIG_NUBUS) += nubus/ |
41 | obj-y += macintosh/ | 41 | obj-y += macintosh/ |
42 | obj-$(CONFIG_IDE) += ide/ | 42 | obj-$(CONFIG_IDE) += ide/ |
@@ -71,7 +71,7 @@ obj-$(CONFIG_GAMEPORT) += input/gameport/ | |||
71 | obj-$(CONFIG_INPUT) += input/ | 71 | obj-$(CONFIG_INPUT) += input/ |
72 | obj-$(CONFIG_I2O) += message/ | 72 | obj-$(CONFIG_I2O) += message/ |
73 | obj-$(CONFIG_RTC_LIB) += rtc/ | 73 | obj-$(CONFIG_RTC_LIB) += rtc/ |
74 | obj-y += i2c/ | 74 | obj-y += i2c/ media/ |
75 | obj-$(CONFIG_W1) += w1/ | 75 | obj-$(CONFIG_W1) += w1/ |
76 | obj-$(CONFIG_POWER_SUPPLY) += power/ | 76 | obj-$(CONFIG_POWER_SUPPLY) += power/ |
77 | obj-$(CONFIG_HWMON) += hwmon/ | 77 | obj-$(CONFIG_HWMON) += hwmon/ |
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 5360c4fd4739..f33170368cd1 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c | |||
@@ -270,6 +270,15 @@ static void recv_handler(struct work_struct *work) | |||
270 | mutex_unlock(&ap->recv_mtx); | 270 | mutex_unlock(&ap->recv_mtx); |
271 | } | 271 | } |
272 | 272 | ||
273 | /** | ||
274 | * capi_ctr_handle_message() - handle incoming CAPI message | ||
275 | * @card: controller descriptor structure. | ||
276 | * @appl: application ID. | ||
277 | * @skb: message. | ||
278 | * | ||
279 | * Called by hardware driver to pass a CAPI message to the application. | ||
280 | */ | ||
281 | |||
273 | void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb) | 282 | void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb) |
274 | { | 283 | { |
275 | struct capi20_appl *ap; | 284 | struct capi20_appl *ap; |
@@ -348,6 +357,13 @@ error: | |||
348 | 357 | ||
349 | EXPORT_SYMBOL(capi_ctr_handle_message); | 358 | EXPORT_SYMBOL(capi_ctr_handle_message); |
350 | 359 | ||
360 | /** | ||
361 | * capi_ctr_ready() - signal CAPI controller ready | ||
362 | * @card: controller descriptor structure. | ||
363 | * | ||
364 | * Called by hardware driver to signal that the controller is up and running. | ||
365 | */ | ||
366 | |||
351 | void capi_ctr_ready(struct capi_ctr * card) | 367 | void capi_ctr_ready(struct capi_ctr * card) |
352 | { | 368 | { |
353 | card->cardstate = CARD_RUNNING; | 369 | card->cardstate = CARD_RUNNING; |
@@ -360,6 +376,14 @@ void capi_ctr_ready(struct capi_ctr * card) | |||
360 | 376 | ||
361 | EXPORT_SYMBOL(capi_ctr_ready); | 377 | EXPORT_SYMBOL(capi_ctr_ready); |
362 | 378 | ||
379 | /** | ||
380 | * capi_ctr_reseted() - signal CAPI controller reset | ||
381 | * @card: controller descriptor structure. | ||
382 | * | ||
383 | * Called by hardware driver to signal that the controller is down and | ||
384 | * unavailable for use. | ||
385 | */ | ||
386 | |||
363 | void capi_ctr_reseted(struct capi_ctr * card) | 387 | void capi_ctr_reseted(struct capi_ctr * card) |
364 | { | 388 | { |
365 | u16 appl; | 389 | u16 appl; |
@@ -391,6 +415,13 @@ void capi_ctr_reseted(struct capi_ctr * card) | |||
391 | 415 | ||
392 | EXPORT_SYMBOL(capi_ctr_reseted); | 416 | EXPORT_SYMBOL(capi_ctr_reseted); |
393 | 417 | ||
418 | /** | ||
419 | * capi_ctr_suspend_output() - suspend controller | ||
420 | * @card: controller descriptor structure. | ||
421 | * | ||
422 | * Called by hardware driver to stop data flow. | ||
423 | */ | ||
424 | |||
394 | void capi_ctr_suspend_output(struct capi_ctr *card) | 425 | void capi_ctr_suspend_output(struct capi_ctr *card) |
395 | { | 426 | { |
396 | if (!card->blocked) { | 427 | if (!card->blocked) { |
@@ -401,6 +432,13 @@ void capi_ctr_suspend_output(struct capi_ctr *card) | |||
401 | 432 | ||
402 | EXPORT_SYMBOL(capi_ctr_suspend_output); | 433 | EXPORT_SYMBOL(capi_ctr_suspend_output); |
403 | 434 | ||
435 | /** | ||
436 | * capi_ctr_resume_output() - resume controller | ||
437 | * @card: controller descriptor structure. | ||
438 | * | ||
439 | * Called by hardware driver to resume data flow. | ||
440 | */ | ||
441 | |||
404 | void capi_ctr_resume_output(struct capi_ctr *card) | 442 | void capi_ctr_resume_output(struct capi_ctr *card) |
405 | { | 443 | { |
406 | if (card->blocked) { | 444 | if (card->blocked) { |
@@ -413,6 +451,14 @@ EXPORT_SYMBOL(capi_ctr_resume_output); | |||
413 | 451 | ||
414 | /* ------------------------------------------------------------- */ | 452 | /* ------------------------------------------------------------- */ |
415 | 453 | ||
454 | /** | ||
455 | * attach_capi_ctr() - register CAPI controller | ||
456 | * @card: controller descriptor structure. | ||
457 | * | ||
458 | * Called by hardware driver to register a controller with the CAPI subsystem. | ||
459 | * Return value: 0 on success, error code < 0 on error | ||
460 | */ | ||
461 | |||
416 | int | 462 | int |
417 | attach_capi_ctr(struct capi_ctr *card) | 463 | attach_capi_ctr(struct capi_ctr *card) |
418 | { | 464 | { |
@@ -459,6 +505,15 @@ attach_capi_ctr(struct capi_ctr *card) | |||
459 | 505 | ||
460 | EXPORT_SYMBOL(attach_capi_ctr); | 506 | EXPORT_SYMBOL(attach_capi_ctr); |
461 | 507 | ||
508 | /** | ||
509 | * detach_capi_ctr() - unregister CAPI controller | ||
510 | * @card: controller descriptor structure. | ||
511 | * | ||
512 | * Called by hardware driver to remove the registration of a controller | ||
513 | * with the CAPI subsystem. | ||
514 | * Return value: 0 on success, error code < 0 on error | ||
515 | */ | ||
516 | |||
462 | int detach_capi_ctr(struct capi_ctr *card) | 517 | int detach_capi_ctr(struct capi_ctr *card) |
463 | { | 518 | { |
464 | if (card->cardstate != CARD_DETECTED) | 519 | if (card->cardstate != CARD_DETECTED) |
@@ -479,6 +534,13 @@ int detach_capi_ctr(struct capi_ctr *card) | |||
479 | 534 | ||
480 | EXPORT_SYMBOL(detach_capi_ctr); | 535 | EXPORT_SYMBOL(detach_capi_ctr); |
481 | 536 | ||
537 | /** | ||
538 | * register_capi_driver() - register CAPI driver | ||
539 | * @driver: driver descriptor structure. | ||
540 | * | ||
541 | * Called by hardware driver to register itself with the CAPI subsystem. | ||
542 | */ | ||
543 | |||
482 | void register_capi_driver(struct capi_driver *driver) | 544 | void register_capi_driver(struct capi_driver *driver) |
483 | { | 545 | { |
484 | unsigned long flags; | 546 | unsigned long flags; |
@@ -490,6 +552,13 @@ void register_capi_driver(struct capi_driver *driver) | |||
490 | 552 | ||
491 | EXPORT_SYMBOL(register_capi_driver); | 553 | EXPORT_SYMBOL(register_capi_driver); |
492 | 554 | ||
555 | /** | ||
556 | * unregister_capi_driver() - unregister CAPI driver | ||
557 | * @driver: driver descriptor structure. | ||
558 | * | ||
559 | * Called by hardware driver to unregister itself from the CAPI subsystem. | ||
560 | */ | ||
561 | |||
493 | void unregister_capi_driver(struct capi_driver *driver) | 562 | void unregister_capi_driver(struct capi_driver *driver) |
494 | { | 563 | { |
495 | unsigned long flags; | 564 | unsigned long flags; |
@@ -505,6 +574,13 @@ EXPORT_SYMBOL(unregister_capi_driver); | |||
505 | /* -------- CAPI2.0 Interface ---------------------------------- */ | 574 | /* -------- CAPI2.0 Interface ---------------------------------- */ |
506 | /* ------------------------------------------------------------- */ | 575 | /* ------------------------------------------------------------- */ |
507 | 576 | ||
577 | /** | ||
578 | * capi20_isinstalled() - CAPI 2.0 operation CAPI_INSTALLED | ||
579 | * | ||
580 | * Return value: CAPI result code (CAPI_NOERROR if at least one ISDN controller | ||
581 | * is ready for use, CAPI_REGNOTINSTALLED otherwise) | ||
582 | */ | ||
583 | |||
508 | u16 capi20_isinstalled(void) | 584 | u16 capi20_isinstalled(void) |
509 | { | 585 | { |
510 | int i; | 586 | int i; |
@@ -517,6 +593,18 @@ u16 capi20_isinstalled(void) | |||
517 | 593 | ||
518 | EXPORT_SYMBOL(capi20_isinstalled); | 594 | EXPORT_SYMBOL(capi20_isinstalled); |
519 | 595 | ||
596 | /** | ||
597 | * capi20_register() - CAPI 2.0 operation CAPI_REGISTER | ||
598 | * @ap: CAPI application descriptor structure. | ||
599 | * | ||
600 | * Register an application's presence with CAPI. | ||
601 | * A unique application ID is assigned and stored in @ap->applid. | ||
602 | * After this function returns successfully, the message receive | ||
603 | * callback function @ap->recv_message() may be called at any time | ||
604 | * until capi20_release() has been called for the same @ap. | ||
605 | * Return value: CAPI result code | ||
606 | */ | ||
607 | |||
520 | u16 capi20_register(struct capi20_appl *ap) | 608 | u16 capi20_register(struct capi20_appl *ap) |
521 | { | 609 | { |
522 | int i; | 610 | int i; |
@@ -571,6 +659,16 @@ u16 capi20_register(struct capi20_appl *ap) | |||
571 | 659 | ||
572 | EXPORT_SYMBOL(capi20_register); | 660 | EXPORT_SYMBOL(capi20_register); |
573 | 661 | ||
662 | /** | ||
663 | * capi20_release() - CAPI 2.0 operation CAPI_RELEASE | ||
664 | * @ap: CAPI application descriptor structure. | ||
665 | * | ||
666 | * Terminate an application's registration with CAPI. | ||
667 | * After this function returns successfully, the message receive | ||
668 | * callback function @ap->recv_message() will no longer be called. | ||
669 | * Return value: CAPI result code | ||
670 | */ | ||
671 | |||
574 | u16 capi20_release(struct capi20_appl *ap) | 672 | u16 capi20_release(struct capi20_appl *ap) |
575 | { | 673 | { |
576 | int i; | 674 | int i; |
@@ -603,6 +701,15 @@ u16 capi20_release(struct capi20_appl *ap) | |||
603 | 701 | ||
604 | EXPORT_SYMBOL(capi20_release); | 702 | EXPORT_SYMBOL(capi20_release); |
605 | 703 | ||
704 | /** | ||
705 | * capi20_put_message() - CAPI 2.0 operation CAPI_PUT_MESSAGE | ||
706 | * @ap: CAPI application descriptor structure. | ||
707 | * @skb: CAPI message. | ||
708 | * | ||
709 | * Transfer a single message to CAPI. | ||
710 | * Return value: CAPI result code | ||
711 | */ | ||
712 | |||
606 | u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb) | 713 | u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb) |
607 | { | 714 | { |
608 | struct capi_ctr *card; | 715 | struct capi_ctr *card; |
@@ -668,6 +775,16 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb) | |||
668 | 775 | ||
669 | EXPORT_SYMBOL(capi20_put_message); | 776 | EXPORT_SYMBOL(capi20_put_message); |
670 | 777 | ||
778 | /** | ||
779 | * capi20_get_manufacturer() - CAPI 2.0 operation CAPI_GET_MANUFACTURER | ||
780 | * @contr: controller number. | ||
781 | * @buf: result buffer (64 bytes). | ||
782 | * | ||
783 | * Retrieve information about the manufacturer of the specified ISDN controller | ||
784 | * or (for @contr == 0) the driver itself. | ||
785 | * Return value: CAPI result code | ||
786 | */ | ||
787 | |||
671 | u16 capi20_get_manufacturer(u32 contr, u8 *buf) | 788 | u16 capi20_get_manufacturer(u32 contr, u8 *buf) |
672 | { | 789 | { |
673 | struct capi_ctr *card; | 790 | struct capi_ctr *card; |
@@ -685,6 +802,16 @@ u16 capi20_get_manufacturer(u32 contr, u8 *buf) | |||
685 | 802 | ||
686 | EXPORT_SYMBOL(capi20_get_manufacturer); | 803 | EXPORT_SYMBOL(capi20_get_manufacturer); |
687 | 804 | ||
805 | /** | ||
806 | * capi20_get_version() - CAPI 2.0 operation CAPI_GET_VERSION | ||
807 | * @contr: controller number. | ||
808 | * @verp: result structure. | ||
809 | * | ||
810 | * Retrieve version information for the specified ISDN controller | ||
811 | * or (for @contr == 0) the driver itself. | ||
812 | * Return value: CAPI result code | ||
813 | */ | ||
814 | |||
688 | u16 capi20_get_version(u32 contr, struct capi_version *verp) | 815 | u16 capi20_get_version(u32 contr, struct capi_version *verp) |
689 | { | 816 | { |
690 | struct capi_ctr *card; | 817 | struct capi_ctr *card; |
@@ -703,6 +830,16 @@ u16 capi20_get_version(u32 contr, struct capi_version *verp) | |||
703 | 830 | ||
704 | EXPORT_SYMBOL(capi20_get_version); | 831 | EXPORT_SYMBOL(capi20_get_version); |
705 | 832 | ||
833 | /** | ||
834 | * capi20_get_serial() - CAPI 2.0 operation CAPI_GET_SERIAL_NUMBER | ||
835 | * @contr: controller number. | ||
836 | * @serial: result buffer (8 bytes). | ||
837 | * | ||
838 | * Retrieve the serial number of the specified ISDN controller | ||
839 | * or (for @contr == 0) the driver itself. | ||
840 | * Return value: CAPI result code | ||
841 | */ | ||
842 | |||
706 | u16 capi20_get_serial(u32 contr, u8 *serial) | 843 | u16 capi20_get_serial(u32 contr, u8 *serial) |
707 | { | 844 | { |
708 | struct capi_ctr *card; | 845 | struct capi_ctr *card; |
@@ -721,6 +858,16 @@ u16 capi20_get_serial(u32 contr, u8 *serial) | |||
721 | 858 | ||
722 | EXPORT_SYMBOL(capi20_get_serial); | 859 | EXPORT_SYMBOL(capi20_get_serial); |
723 | 860 | ||
861 | /** | ||
862 | * capi20_get_profile() - CAPI 2.0 operation CAPI_GET_PROFILE | ||
863 | * @contr: controller number. | ||
864 | * @profp: result structure. | ||
865 | * | ||
866 | * Retrieve capability information for the specified ISDN controller | ||
867 | * or (for @contr == 0) the number of installed controllers. | ||
868 | * Return value: CAPI result code | ||
869 | */ | ||
870 | |||
724 | u16 capi20_get_profile(u32 contr, struct capi_profile *profp) | 871 | u16 capi20_get_profile(u32 contr, struct capi_profile *profp) |
725 | { | 872 | { |
726 | struct capi_ctr *card; | 873 | struct capi_ctr *card; |
@@ -903,6 +1050,15 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) | |||
903 | } | 1050 | } |
904 | #endif | 1051 | #endif |
905 | 1052 | ||
1053 | /** | ||
1054 | * capi20_manufacturer() - CAPI 2.0 operation CAPI_MANUFACTURER | ||
1055 | * @cmd: command. | ||
1056 | * @data: parameter. | ||
1057 | * | ||
1058 | * Perform manufacturer specific command. | ||
1059 | * Return value: CAPI result code | ||
1060 | */ | ||
1061 | |||
906 | int capi20_manufacturer(unsigned int cmd, void __user *data) | 1062 | int capi20_manufacturer(unsigned int cmd, void __user *data) |
907 | { | 1063 | { |
908 | struct capi_ctr *card; | 1064 | struct capi_ctr *card; |
@@ -981,6 +1137,21 @@ int capi20_manufacturer(unsigned int cmd, void __user *data) | |||
981 | EXPORT_SYMBOL(capi20_manufacturer); | 1137 | EXPORT_SYMBOL(capi20_manufacturer); |
982 | 1138 | ||
983 | /* temporary hack */ | 1139 | /* temporary hack */ |
1140 | |||
1141 | /** | ||
1142 | * capi20_set_callback() - set CAPI application notification callback function | ||
1143 | * @ap: CAPI application descriptor structure. | ||
1144 | * @callback: callback function (NULL to remove). | ||
1145 | * | ||
1146 | * If not NULL, the callback function will be called to notify the | ||
1147 | * application of the addition or removal of a controller. | ||
1148 | * The first argument (cmd) will tell whether the controller was added | ||
1149 | * (KCI_CONTRUP) or removed (KCI_CONTRDOWN). | ||
1150 | * The second argument (contr) will be the controller number. | ||
1151 | * For cmd==KCI_CONTRUP the third argument (data) will be a pointer to the | ||
1152 | * new controller's capability profile structure. | ||
1153 | */ | ||
1154 | |||
984 | void capi20_set_callback(struct capi20_appl *ap, | 1155 | void capi20_set_callback(struct capi20_appl *ap, |
985 | void (*callback) (unsigned int cmd, __u32 contr, void *data)) | 1156 | void (*callback) (unsigned int cmd, __u32 contr, void *data)) |
986 | { | 1157 | { |
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index 4cee0b92eeee..a1e4c0d769a6 100644 --- a/drivers/media/video/au0828/au0828-core.c +++ b/drivers/media/video/au0828/au0828-core.c | |||
@@ -192,8 +192,6 @@ static int au0828_usb_probe(struct usb_interface *interface, | |||
192 | dev->usbdev = usbdev; | 192 | dev->usbdev = usbdev; |
193 | dev->boardnr = id->driver_info; | 193 | dev->boardnr = id->driver_info; |
194 | 194 | ||
195 | usb_set_intfdata(interface, dev); | ||
196 | |||
197 | /* Create the v4l2_device */ | 195 | /* Create the v4l2_device */ |
198 | retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); | 196 | retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); |
199 | if (retval) { | 197 | if (retval) { |
@@ -222,6 +220,10 @@ static int au0828_usb_probe(struct usb_interface *interface, | |||
222 | /* Digital TV */ | 220 | /* Digital TV */ |
223 | au0828_dvb_register(dev); | 221 | au0828_dvb_register(dev); |
224 | 222 | ||
223 | /* Store the pointer to the au0828_dev so it can be accessed in | ||
224 | au0828_usb_disconnect */ | ||
225 | usb_set_intfdata(interface, dev); | ||
226 | |||
225 | printk(KERN_INFO "Registered device AU0828 [%s]\n", | 227 | printk(KERN_INFO "Registered device AU0828 [%s]\n", |
226 | dev->board.name == NULL ? "Unset" : dev->board.name); | 228 | dev->board.name == NULL ? "Unset" : dev->board.name); |
227 | 229 | ||
diff --git a/drivers/media/video/cx18/cx18-audio.c b/drivers/media/video/cx18/cx18-audio.c index 1519e91c677a..7a8ad5963de8 100644 --- a/drivers/media/video/cx18/cx18-audio.c +++ b/drivers/media/video/cx18/cx18-audio.c | |||
@@ -44,7 +44,7 @@ int cx18_audio_set_io(struct cx18 *cx) | |||
44 | 44 | ||
45 | /* handle muxer chips */ | 45 | /* handle muxer chips */ |
46 | v4l2_subdev_call(cx->sd_extmux, audio, s_routing, | 46 | v4l2_subdev_call(cx->sd_extmux, audio, s_routing, |
47 | in->audio_input, 0, 0); | 47 | (u32) in->muxer_input, 0, 0); |
48 | 48 | ||
49 | err = cx18_call_hw_err(cx, cx->card->hw_audio_ctrl, | 49 | err = cx18_call_hw_err(cx, cx->card->hw_audio_ctrl, |
50 | audio, s_routing, in->audio_input, 0, 0); | 50 | audio, s_routing, in->audio_input, 0, 0); |
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c index b9b7064a2be8..8591e4fc359f 100644 --- a/drivers/media/video/cx18/cx18-i2c.c +++ b/drivers/media/video/cx18/cx18-i2c.c | |||
@@ -211,7 +211,7 @@ static struct i2c_algo_bit_data cx18_i2c_algo_template = { | |||
211 | /* init + register i2c algo-bit adapter */ | 211 | /* init + register i2c algo-bit adapter */ |
212 | int init_cx18_i2c(struct cx18 *cx) | 212 | int init_cx18_i2c(struct cx18 *cx) |
213 | { | 213 | { |
214 | int i; | 214 | int i, err; |
215 | CX18_DEBUG_I2C("i2c init\n"); | 215 | CX18_DEBUG_I2C("i2c init\n"); |
216 | 216 | ||
217 | for (i = 0; i < 2; i++) { | 217 | for (i = 0; i < 2; i++) { |
@@ -268,8 +268,18 @@ int init_cx18_i2c(struct cx18 *cx) | |||
268 | cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, | 268 | cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, |
269 | core, reset, (u32) CX18_GPIO_RESET_I2C); | 269 | core, reset, (u32) CX18_GPIO_RESET_I2C); |
270 | 270 | ||
271 | return i2c_bit_add_bus(&cx->i2c_adap[0]) || | 271 | err = i2c_bit_add_bus(&cx->i2c_adap[0]); |
272 | i2c_bit_add_bus(&cx->i2c_adap[1]); | 272 | if (err) |
273 | goto err; | ||
274 | err = i2c_bit_add_bus(&cx->i2c_adap[1]); | ||
275 | if (err) | ||
276 | goto err_del_bus_0; | ||
277 | return 0; | ||
278 | |||
279 | err_del_bus_0: | ||
280 | i2c_del_adapter(&cx->i2c_adap[0]); | ||
281 | err: | ||
282 | return err; | ||
273 | } | 283 | } |
274 | 284 | ||
275 | void exit_cx18_i2c(struct cx18 *cx) | 285 | void exit_cx18_i2c(struct cx18 *cx) |
diff --git a/drivers/media/video/cx231xx/Kconfig b/drivers/media/video/cx231xx/Kconfig index 91156546a07a..477d4ab5e9ac 100644 --- a/drivers/media/video/cx231xx/Kconfig +++ b/drivers/media/video/cx231xx/Kconfig | |||
@@ -1,12 +1,11 @@ | |||
1 | config VIDEO_CX231XX | 1 | config VIDEO_CX231XX |
2 | tristate "Conexant cx231xx USB video capture support" | 2 | tristate "Conexant cx231xx USB video capture support" |
3 | depends on VIDEO_DEV && I2C && INPUT | 3 | depends on VIDEO_DEV && I2C && INPUT |
4 | select VIDEO_TUNER | 4 | select VIDEO_TUNER |
5 | select VIDEO_TVEEPROM | 5 | select VIDEO_TVEEPROM |
6 | select VIDEO_IR | 6 | select VIDEO_IR |
7 | select VIDEOBUF_VMALLOC | 7 | select VIDEOBUF_VMALLOC |
8 | select VIDEO_CX25840 | 8 | select VIDEO_CX25840 |
9 | select VIDEO_CX231XX_ALSA | ||
10 | 9 | ||
11 | ---help--- | 10 | ---help--- |
12 | This is a video4linux driver for Conexant 231xx USB based TV cards. | 11 | This is a video4linux driver for Conexant 231xx USB based TV cards. |
@@ -15,21 +14,22 @@ config VIDEO_CX231XX | |||
15 | module will be called cx231xx | 14 | module will be called cx231xx |
16 | 15 | ||
17 | config VIDEO_CX231XX_ALSA | 16 | config VIDEO_CX231XX_ALSA |
18 | tristate "Conexant Cx231xx ALSA audio module" | 17 | tristate "Conexant Cx231xx ALSA audio module" |
19 | depends on VIDEO_CX231XX && SND | 18 | depends on VIDEO_CX231XX && SND |
20 | select SND_PCM | 19 | select SND_PCM |
21 | 20 | ||
22 | ---help--- | 21 | ---help--- |
23 | This is an ALSA driver for Cx231xx USB based TV cards. | 22 | This is an ALSA driver for Cx231xx USB based TV cards. |
24 | 23 | ||
25 | To compile this driver as a module, choose M here: the | 24 | To compile this driver as a module, choose M here: the |
26 | module will be called cx231xx-alsa | 25 | module will be called cx231xx-alsa |
27 | 26 | ||
28 | config VIDEO_CX231XX_DVB | 27 | config VIDEO_CX231XX_DVB |
29 | tristate "DVB/ATSC Support for Cx231xx based TV cards" | 28 | tristate "DVB/ATSC Support for Cx231xx based TV cards" |
30 | depends on VIDEO_CX231XX && DVB_CORE | 29 | depends on VIDEO_CX231XX && DVB_CORE |
31 | select VIDEOBUF_DVB | 30 | select VIDEOBUF_DVB |
32 | select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE | 31 | select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE |
33 | ---help--- | 32 | |
34 | This adds support for DVB cards based on the | 33 | ---help--- |
35 | Conexant cx231xx chips. | 34 | This adds support for DVB cards based on the |
35 | Conexant cx231xx chips. | ||
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index a3c0565be1a9..6d6293f7d428 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -441,9 +441,9 @@ int cx23885_tuner_callback(void *priv, int component, int command, int arg) | |||
441 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | 441 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
442 | /* Two identical tuners on two different i2c buses, | 442 | /* Two identical tuners on two different i2c buses, |
443 | * we need to reset the correct gpio. */ | 443 | * we need to reset the correct gpio. */ |
444 | if (port->nr == 0) | 444 | if (port->nr == 1) |
445 | bitmask = 0x01; | 445 | bitmask = 0x01; |
446 | else if (port->nr == 1) | 446 | else if (port->nr == 2) |
447 | bitmask = 0x04; | 447 | bitmask = 0x04; |
448 | break; | 448 | break; |
449 | } | 449 | } |
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index f48454ab3900..0c49a98213c4 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -314,6 +314,7 @@ static struct zl10353_config dvico_fusionhdtv_xc3028 = { | |||
314 | .demod_address = 0x0f, | 314 | .demod_address = 0x0f, |
315 | .if2 = 45600, | 315 | .if2 = 45600, |
316 | .no_tuner = 1, | 316 | .no_tuner = 1, |
317 | .disable_i2c_gate_ctrl = 1, | ||
317 | }; | 318 | }; |
318 | 319 | ||
319 | static struct stv0900_config netup_stv0900_config = { | 320 | static struct stv0900_config netup_stv0900_config = { |
diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index c462b811e994..2d0781118eb0 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c | |||
@@ -1063,10 +1063,6 @@ static struct soc_camera_host_ops mx3_soc_camera_host_ops = { | |||
1063 | .owner = THIS_MODULE, | 1063 | .owner = THIS_MODULE, |
1064 | .add = mx3_camera_add_device, | 1064 | .add = mx3_camera_add_device, |
1065 | .remove = mx3_camera_remove_device, | 1065 | .remove = mx3_camera_remove_device, |
1066 | #ifdef CONFIG_PM | ||
1067 | .suspend = mx3_camera_suspend, | ||
1068 | .resume = mx3_camera_resume, | ||
1069 | #endif | ||
1070 | .set_crop = mx3_camera_set_crop, | 1066 | .set_crop = mx3_camera_set_crop, |
1071 | .set_fmt = mx3_camera_set_fmt, | 1067 | .set_fmt = mx3_camera_set_fmt, |
1072 | .try_fmt = mx3_camera_try_fmt, | 1068 | .try_fmt = mx3_camera_try_fmt, |
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 5202cadb2aae..30f4698be90a 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -1237,6 +1237,7 @@ static int s2255_set_mode(struct s2255_dev *dev, unsigned long chn, | |||
1237 | buffer[1] = (u32) chn_rev; | 1237 | buffer[1] = (u32) chn_rev; |
1238 | buffer[2] = CMD_SET_MODE; | 1238 | buffer[2] = CMD_SET_MODE; |
1239 | memcpy(&buffer[3], &dev->mode[chn], sizeof(struct s2255_mode)); | 1239 | memcpy(&buffer[3], &dev->mode[chn], sizeof(struct s2255_mode)); |
1240 | dev->setmode_ready[chn] = 0; | ||
1240 | res = s2255_write_config(dev->udev, (unsigned char *)buffer, 512); | 1241 | res = s2255_write_config(dev->udev, (unsigned char *)buffer, 512); |
1241 | if (debug) | 1242 | if (debug) |
1242 | dump_verify_mode(dev, mode); | 1243 | dump_verify_mode(dev, mode); |
@@ -1245,7 +1246,6 @@ static int s2255_set_mode(struct s2255_dev *dev, unsigned long chn, | |||
1245 | 1246 | ||
1246 | /* wait at least 3 frames before continuing */ | 1247 | /* wait at least 3 frames before continuing */ |
1247 | if (mode->restart) { | 1248 | if (mode->restart) { |
1248 | dev->setmode_ready[chn] = 0; | ||
1249 | wait_event_timeout(dev->wait_setmode[chn], | 1249 | wait_event_timeout(dev->wait_setmode[chn], |
1250 | (dev->setmode_ready[chn] != 0), | 1250 | (dev->setmode_ready[chn] != 0), |
1251 | msecs_to_jiffies(S2255_SETMODE_TIMEOUT)); | 1251 | msecs_to_jiffies(S2255_SETMODE_TIMEOUT)); |
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index da47b2f05288..155804b061e9 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -1092,9 +1092,8 @@ static int saa5246a_probe(struct i2c_client *client, | |||
1092 | /* Register it */ | 1092 | /* Register it */ |
1093 | err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); | 1093 | err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); |
1094 | if (err < 0) { | 1094 | if (err < 0) { |
1095 | kfree(t); | ||
1096 | video_device_release(t->vdev); | 1095 | video_device_release(t->vdev); |
1097 | t->vdev = NULL; | 1096 | kfree(t); |
1098 | return err; | 1097 | return err; |
1099 | } | 1098 | } |
1100 | return 0; | 1099 | return 0; |
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 48b27fe48087..271d6e931b75 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -598,6 +598,7 @@ static int saa5249_probe(struct i2c_client *client, | |||
598 | /* Now create a video4linux device */ | 598 | /* Now create a video4linux device */ |
599 | t->vdev = video_device_alloc(); | 599 | t->vdev = video_device_alloc(); |
600 | if (t->vdev == NULL) { | 600 | if (t->vdev == NULL) { |
601 | kfree(t); | ||
601 | kfree(client); | 602 | kfree(client); |
602 | return -ENOMEM; | 603 | return -ENOMEM; |
603 | } | 604 | } |
@@ -617,9 +618,8 @@ static int saa5249_probe(struct i2c_client *client, | |||
617 | /* Register it */ | 618 | /* Register it */ |
618 | err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); | 619 | err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); |
619 | if (err < 0) { | 620 | if (err < 0) { |
620 | kfree(t); | ||
621 | video_device_release(t->vdev); | 621 | video_device_release(t->vdev); |
622 | t->vdev = NULL; | 622 | kfree(t); |
623 | return err; | 623 | return err; |
624 | } | 624 | } |
625 | return 0; | 625 | return 0; |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 5c0b457c7868..0f9ee1348552 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2728,7 +2728,7 @@ static void __devexit e100_remove(struct pci_dev *pdev) | |||
2728 | #define E100_82552_SMARTSPEED 0x14 /* SmartSpeed Ctrl register */ | 2728 | #define E100_82552_SMARTSPEED 0x14 /* SmartSpeed Ctrl register */ |
2729 | #define E100_82552_REV_ANEG 0x0200 /* Reverse auto-negotiation */ | 2729 | #define E100_82552_REV_ANEG 0x0200 /* Reverse auto-negotiation */ |
2730 | #define E100_82552_ANEG_NOW 0x0400 /* Auto-negotiate now */ | 2730 | #define E100_82552_ANEG_NOW 0x0400 /* Auto-negotiate now */ |
2731 | static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | 2731 | static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake) |
2732 | { | 2732 | { |
2733 | struct net_device *netdev = pci_get_drvdata(pdev); | 2733 | struct net_device *netdev = pci_get_drvdata(pdev); |
2734 | struct nic *nic = netdev_priv(netdev); | 2734 | struct nic *nic = netdev_priv(netdev); |
@@ -2749,19 +2749,32 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2749 | E100_82552_SMARTSPEED, smartspeed | | 2749 | E100_82552_SMARTSPEED, smartspeed | |
2750 | E100_82552_REV_ANEG | E100_82552_ANEG_NOW); | 2750 | E100_82552_REV_ANEG | E100_82552_ANEG_NOW); |
2751 | } | 2751 | } |
2752 | if (pci_enable_wake(pdev, PCI_D3cold, true)) | 2752 | *enable_wake = true; |
2753 | pci_enable_wake(pdev, PCI_D3hot, true); | ||
2754 | } else { | 2753 | } else { |
2755 | pci_enable_wake(pdev, PCI_D3hot, false); | 2754 | *enable_wake = false; |
2756 | } | 2755 | } |
2757 | 2756 | ||
2758 | pci_disable_device(pdev); | 2757 | pci_disable_device(pdev); |
2759 | pci_set_power_state(pdev, PCI_D3hot); | 2758 | } |
2760 | 2759 | ||
2761 | return 0; | 2760 | static int __e100_power_off(struct pci_dev *pdev, bool wake) |
2761 | { | ||
2762 | if (wake) { | ||
2763 | return pci_prepare_to_sleep(pdev); | ||
2764 | } else { | ||
2765 | pci_wake_from_d3(pdev, false); | ||
2766 | return pci_set_power_state(pdev, PCI_D3hot); | ||
2767 | } | ||
2762 | } | 2768 | } |
2763 | 2769 | ||
2764 | #ifdef CONFIG_PM | 2770 | #ifdef CONFIG_PM |
2771 | static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | ||
2772 | { | ||
2773 | bool wake; | ||
2774 | __e100_shutdown(pdev, &wake); | ||
2775 | return __e100_power_off(pdev, wake); | ||
2776 | } | ||
2777 | |||
2765 | static int e100_resume(struct pci_dev *pdev) | 2778 | static int e100_resume(struct pci_dev *pdev) |
2766 | { | 2779 | { |
2767 | struct net_device *netdev = pci_get_drvdata(pdev); | 2780 | struct net_device *netdev = pci_get_drvdata(pdev); |
@@ -2792,7 +2805,10 @@ static int e100_resume(struct pci_dev *pdev) | |||
2792 | 2805 | ||
2793 | static void e100_shutdown(struct pci_dev *pdev) | 2806 | static void e100_shutdown(struct pci_dev *pdev) |
2794 | { | 2807 | { |
2795 | e100_suspend(pdev, PMSG_SUSPEND); | 2808 | bool wake; |
2809 | __e100_shutdown(pdev, &wake); | ||
2810 | if (system_state == SYSTEM_POWER_OFF) | ||
2811 | __e100_power_off(pdev, wake); | ||
2796 | } | 2812 | } |
2797 | 2813 | ||
2798 | /* ------------------ PCI Error Recovery infrastructure -------------- */ | 2814 | /* ------------------ PCI Error Recovery infrastructure -------------- */ |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 11d5db16ed9c..f9a846b1b92f 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -1880,6 +1880,7 @@ static void nv_init_tx(struct net_device *dev) | |||
1880 | np->tx_pkts_in_progress = 0; | 1880 | np->tx_pkts_in_progress = 0; |
1881 | np->tx_change_owner = NULL; | 1881 | np->tx_change_owner = NULL; |
1882 | np->tx_end_flip = NULL; | 1882 | np->tx_end_flip = NULL; |
1883 | np->tx_stop = 0; | ||
1883 | 1884 | ||
1884 | for (i = 0; i < np->tx_ring_size; i++) { | 1885 | for (i = 0; i < np->tx_ring_size; i++) { |
1885 | if (!nv_optimized(np)) { | 1886 | if (!nv_optimized(np)) { |
@@ -2530,6 +2531,8 @@ static void nv_tx_timeout(struct net_device *dev) | |||
2530 | struct fe_priv *np = netdev_priv(dev); | 2531 | struct fe_priv *np = netdev_priv(dev); |
2531 | u8 __iomem *base = get_hwbase(dev); | 2532 | u8 __iomem *base = get_hwbase(dev); |
2532 | u32 status; | 2533 | u32 status; |
2534 | union ring_type put_tx; | ||
2535 | int saved_tx_limit; | ||
2533 | 2536 | ||
2534 | if (np->msi_flags & NV_MSI_X_ENABLED) | 2537 | if (np->msi_flags & NV_MSI_X_ENABLED) |
2535 | status = readl(base + NvRegMSIXIrqStatus) & NVREG_IRQSTAT_MASK; | 2538 | status = readl(base + NvRegMSIXIrqStatus) & NVREG_IRQSTAT_MASK; |
@@ -2589,24 +2592,32 @@ static void nv_tx_timeout(struct net_device *dev) | |||
2589 | /* 1) stop tx engine */ | 2592 | /* 1) stop tx engine */ |
2590 | nv_stop_tx(dev); | 2593 | nv_stop_tx(dev); |
2591 | 2594 | ||
2592 | /* 2) check that the packets were not sent already: */ | 2595 | /* 2) complete any outstanding tx and do not give HW any limited tx pkts */ |
2596 | saved_tx_limit = np->tx_limit; | ||
2597 | np->tx_limit = 0; /* prevent giving HW any limited pkts */ | ||
2598 | np->tx_stop = 0; /* prevent waking tx queue */ | ||
2593 | if (!nv_optimized(np)) | 2599 | if (!nv_optimized(np)) |
2594 | nv_tx_done(dev, np->tx_ring_size); | 2600 | nv_tx_done(dev, np->tx_ring_size); |
2595 | else | 2601 | else |
2596 | nv_tx_done_optimized(dev, np->tx_ring_size); | 2602 | nv_tx_done_optimized(dev, np->tx_ring_size); |
2597 | 2603 | ||
2598 | /* 3) if there are dead entries: clear everything */ | 2604 | /* save current HW postion */ |
2599 | if (np->get_tx_ctx != np->put_tx_ctx) { | 2605 | if (np->tx_change_owner) |
2600 | printk(KERN_DEBUG "%s: tx_timeout: dead entries!\n", dev->name); | 2606 | put_tx.ex = np->tx_change_owner->first_tx_desc; |
2601 | nv_drain_tx(dev); | 2607 | else |
2602 | nv_init_tx(dev); | 2608 | put_tx = np->put_tx; |
2603 | setup_hw_rings(dev, NV_SETUP_TX_RING); | ||
2604 | } | ||
2605 | 2609 | ||
2606 | netif_wake_queue(dev); | 2610 | /* 3) clear all tx state */ |
2611 | nv_drain_tx(dev); | ||
2612 | nv_init_tx(dev); | ||
2613 | |||
2614 | /* 4) restore state to current HW position */ | ||
2615 | np->get_tx = np->put_tx = put_tx; | ||
2616 | np->tx_limit = saved_tx_limit; | ||
2607 | 2617 | ||
2608 | /* 4) restart tx engine */ | 2618 | /* 5) restart tx engine */ |
2609 | nv_start_tx(dev); | 2619 | nv_start_tx(dev); |
2620 | netif_wake_queue(dev); | ||
2610 | spin_unlock_irq(&np->lock); | 2621 | spin_unlock_irq(&np->lock); |
2611 | } | 2622 | } |
2612 | 2623 | ||
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 5567519676d5..186a65069b33 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -50,7 +50,6 @@ static u16 ixgbe_calc_eeprom_checksum(struct ixgbe_hw *hw); | |||
50 | static void ixgbe_enable_rar(struct ixgbe_hw *hw, u32 index); | 50 | static void ixgbe_enable_rar(struct ixgbe_hw *hw, u32 index); |
51 | static void ixgbe_disable_rar(struct ixgbe_hw *hw, u32 index); | 51 | static void ixgbe_disable_rar(struct ixgbe_hw *hw, u32 index); |
52 | static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr); | 52 | static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr); |
53 | static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr); | ||
54 | static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq); | 53 | static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq); |
55 | 54 | ||
56 | /** | 55 | /** |
@@ -1377,8 +1376,7 @@ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, u8 *addr_list, | |||
1377 | * Clear accounting of old secondary address list, | 1376 | * Clear accounting of old secondary address list, |
1378 | * don't count RAR[0] | 1377 | * don't count RAR[0] |
1379 | */ | 1378 | */ |
1380 | uc_addr_in_use = hw->addr_ctrl.rar_used_count - | 1379 | uc_addr_in_use = hw->addr_ctrl.rar_used_count - 1; |
1381 | hw->addr_ctrl.mc_addr_in_rar_count - 1; | ||
1382 | hw->addr_ctrl.rar_used_count -= uc_addr_in_use; | 1380 | hw->addr_ctrl.rar_used_count -= uc_addr_in_use; |
1383 | hw->addr_ctrl.overflow_promisc = 0; | 1381 | hw->addr_ctrl.overflow_promisc = 0; |
1384 | 1382 | ||
@@ -1493,40 +1491,6 @@ static void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr) | |||
1493 | } | 1491 | } |
1494 | 1492 | ||
1495 | /** | 1493 | /** |
1496 | * ixgbe_add_mc_addr - Adds a multicast address. | ||
1497 | * @hw: pointer to hardware structure | ||
1498 | * @mc_addr: new multicast address | ||
1499 | * | ||
1500 | * Adds it to unused receive address register or to the multicast table. | ||
1501 | **/ | ||
1502 | static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr) | ||
1503 | { | ||
1504 | u32 rar_entries = hw->mac.num_rar_entries; | ||
1505 | u32 rar; | ||
1506 | |||
1507 | hw_dbg(hw, " MC Addr =%.2X %.2X %.2X %.2X %.2X %.2X\n", | ||
1508 | mc_addr[0], mc_addr[1], mc_addr[2], | ||
1509 | mc_addr[3], mc_addr[4], mc_addr[5]); | ||
1510 | |||
1511 | /* | ||
1512 | * Place this multicast address in the RAR if there is room, | ||
1513 | * else put it in the MTA | ||
1514 | */ | ||
1515 | if (hw->addr_ctrl.rar_used_count < rar_entries) { | ||
1516 | /* use RAR from the end up for multicast */ | ||
1517 | rar = rar_entries - hw->addr_ctrl.mc_addr_in_rar_count - 1; | ||
1518 | hw->mac.ops.set_rar(hw, rar, mc_addr, 0, IXGBE_RAH_AV); | ||
1519 | hw_dbg(hw, "Added a multicast address to RAR[%d]\n", rar); | ||
1520 | hw->addr_ctrl.rar_used_count++; | ||
1521 | hw->addr_ctrl.mc_addr_in_rar_count++; | ||
1522 | } else { | ||
1523 | ixgbe_set_mta(hw, mc_addr); | ||
1524 | } | ||
1525 | |||
1526 | hw_dbg(hw, "ixgbe_add_mc_addr Complete\n"); | ||
1527 | } | ||
1528 | |||
1529 | /** | ||
1530 | * ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses | 1494 | * ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses |
1531 | * @hw: pointer to hardware structure | 1495 | * @hw: pointer to hardware structure |
1532 | * @mc_addr_list: the list of new multicast addresses | 1496 | * @mc_addr_list: the list of new multicast addresses |
@@ -1542,7 +1506,6 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | |||
1542 | u32 mc_addr_count, ixgbe_mc_addr_itr next) | 1506 | u32 mc_addr_count, ixgbe_mc_addr_itr next) |
1543 | { | 1507 | { |
1544 | u32 i; | 1508 | u32 i; |
1545 | u32 rar_entries = hw->mac.num_rar_entries; | ||
1546 | u32 vmdq; | 1509 | u32 vmdq; |
1547 | 1510 | ||
1548 | /* | 1511 | /* |
@@ -1550,18 +1513,8 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | |||
1550 | * use. | 1513 | * use. |
1551 | */ | 1514 | */ |
1552 | hw->addr_ctrl.num_mc_addrs = mc_addr_count; | 1515 | hw->addr_ctrl.num_mc_addrs = mc_addr_count; |
1553 | hw->addr_ctrl.rar_used_count -= hw->addr_ctrl.mc_addr_in_rar_count; | ||
1554 | hw->addr_ctrl.mc_addr_in_rar_count = 0; | ||
1555 | hw->addr_ctrl.mta_in_use = 0; | 1516 | hw->addr_ctrl.mta_in_use = 0; |
1556 | 1517 | ||
1557 | /* Zero out the other receive addresses. */ | ||
1558 | hw_dbg(hw, "Clearing RAR[%d-%d]\n", hw->addr_ctrl.rar_used_count, | ||
1559 | rar_entries - 1); | ||
1560 | for (i = hw->addr_ctrl.rar_used_count; i < rar_entries; i++) { | ||
1561 | IXGBE_WRITE_REG(hw, IXGBE_RAL(i), 0); | ||
1562 | IXGBE_WRITE_REG(hw, IXGBE_RAH(i), 0); | ||
1563 | } | ||
1564 | |||
1565 | /* Clear the MTA */ | 1518 | /* Clear the MTA */ |
1566 | hw_dbg(hw, " Clearing MTA\n"); | 1519 | hw_dbg(hw, " Clearing MTA\n"); |
1567 | for (i = 0; i < hw->mac.mcft_size; i++) | 1520 | for (i = 0; i < hw->mac.mcft_size; i++) |
@@ -1570,7 +1523,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | |||
1570 | /* Add the new addresses */ | 1523 | /* Add the new addresses */ |
1571 | for (i = 0; i < mc_addr_count; i++) { | 1524 | for (i = 0; i < mc_addr_count; i++) { |
1572 | hw_dbg(hw, " Adding the multicast addresses:\n"); | 1525 | hw_dbg(hw, " Adding the multicast addresses:\n"); |
1573 | ixgbe_add_mc_addr(hw, next(hw, &mc_addr_list, &vmdq)); | 1526 | ixgbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq)); |
1574 | } | 1527 | } |
1575 | 1528 | ||
1576 | /* Enable mta */ | 1529 | /* Enable mta */ |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 01884256f4c9..07e778d3e5d2 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3646,6 +3646,8 @@ static int ixgbe_resume(struct pci_dev *pdev) | |||
3646 | 3646 | ||
3647 | ixgbe_reset(adapter); | 3647 | ixgbe_reset(adapter); |
3648 | 3648 | ||
3649 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); | ||
3650 | |||
3649 | if (netif_running(netdev)) { | 3651 | if (netif_running(netdev)) { |
3650 | err = ixgbe_open(adapter->netdev); | 3652 | err = ixgbe_open(adapter->netdev); |
3651 | if (err) | 3653 | if (err) |
@@ -4575,7 +4577,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
4575 | const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data]; | 4577 | const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data]; |
4576 | static int cards_found; | 4578 | static int cards_found; |
4577 | int i, err, pci_using_dac; | 4579 | int i, err, pci_using_dac; |
4578 | u16 pm_value = 0; | ||
4579 | u32 part_num, eec; | 4580 | u32 part_num, eec; |
4580 | 4581 | ||
4581 | err = pci_enable_device(pdev); | 4582 | err = pci_enable_device(pdev); |
@@ -4763,11 +4764,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
4763 | 4764 | ||
4764 | switch (pdev->device) { | 4765 | switch (pdev->device) { |
4765 | case IXGBE_DEV_ID_82599_KX4: | 4766 | case IXGBE_DEV_ID_82599_KX4: |
4766 | #define IXGBE_PCIE_PMCSR 0x44 | 4767 | adapter->wol = (IXGBE_WUFC_MAG | IXGBE_WUFC_EX | |
4767 | adapter->wol = IXGBE_WUFC_MAG; | 4768 | IXGBE_WUFC_MC | IXGBE_WUFC_BC); |
4768 | pci_read_config_word(pdev, IXGBE_PCIE_PMCSR, &pm_value); | ||
4769 | pci_write_config_word(pdev, IXGBE_PCIE_PMCSR, | ||
4770 | (pm_value | (1 << 8))); | ||
4771 | break; | 4769 | break; |
4772 | default: | 4770 | default: |
4773 | adapter->wol = 0; | 4771 | adapter->wol = 0; |
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 438678ab2a10..7bcc49de1637 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -583,7 +583,7 @@ int mlx4_en_start_port(struct net_device *dev) | |||
583 | err = mlx4_en_activate_cq(priv, cq); | 583 | err = mlx4_en_activate_cq(priv, cq); |
584 | if (err) { | 584 | if (err) { |
585 | mlx4_err(mdev, "Failed activating Rx CQ\n"); | 585 | mlx4_err(mdev, "Failed activating Rx CQ\n"); |
586 | goto rx_err; | 586 | goto cq_err; |
587 | } | 587 | } |
588 | for (j = 0; j < cq->size; j++) | 588 | for (j = 0; j < cq->size; j++) |
589 | cq->buf[j].owner_sr_opcode = MLX4_CQE_OWNER_MASK; | 589 | cq->buf[j].owner_sr_opcode = MLX4_CQE_OWNER_MASK; |
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index 0cbb78ca7b29..7942c4d3cd88 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c | |||
@@ -610,6 +610,10 @@ static struct sk_buff *mlx4_en_rx_skb(struct mlx4_en_priv *priv, | |||
610 | used_frags = mlx4_en_complete_rx_desc(priv, rx_desc, skb_frags, | 610 | used_frags = mlx4_en_complete_rx_desc(priv, rx_desc, skb_frags, |
611 | skb_shinfo(skb)->frags, | 611 | skb_shinfo(skb)->frags, |
612 | page_alloc, length); | 612 | page_alloc, length); |
613 | if (unlikely(!used_frags)) { | ||
614 | kfree_skb(skb); | ||
615 | return NULL; | ||
616 | } | ||
613 | skb_shinfo(skb)->nr_frags = used_frags; | 617 | skb_shinfo(skb)->nr_frags = used_frags; |
614 | 618 | ||
615 | /* Copy headers into the skb linear buffer */ | 619 | /* Copy headers into the skb linear buffer */ |
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 015db1cece72..8e56fcf0a0e3 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -210,14 +210,11 @@ rx_drop: | |||
210 | 210 | ||
211 | static struct net_device_stats *veth_get_stats(struct net_device *dev) | 211 | static struct net_device_stats *veth_get_stats(struct net_device *dev) |
212 | { | 212 | { |
213 | struct veth_priv *priv; | 213 | struct veth_priv *priv = netdev_priv(dev); |
214 | struct net_device_stats *dev_stats; | 214 | struct net_device_stats *dev_stats = &dev->stats; |
215 | int cpu; | 215 | unsigned int cpu; |
216 | struct veth_net_stats *stats; | 216 | struct veth_net_stats *stats; |
217 | 217 | ||
218 | priv = netdev_priv(dev); | ||
219 | dev_stats = &dev->stats; | ||
220 | |||
221 | dev_stats->rx_packets = 0; | 218 | dev_stats->rx_packets = 0; |
222 | dev_stats->tx_packets = 0; | 219 | dev_stats->tx_packets = 0; |
223 | dev_stats->rx_bytes = 0; | 220 | dev_stats->rx_bytes = 0; |
@@ -225,16 +222,17 @@ static struct net_device_stats *veth_get_stats(struct net_device *dev) | |||
225 | dev_stats->tx_dropped = 0; | 222 | dev_stats->tx_dropped = 0; |
226 | dev_stats->rx_dropped = 0; | 223 | dev_stats->rx_dropped = 0; |
227 | 224 | ||
228 | for_each_online_cpu(cpu) { | 225 | if (priv->stats) |
229 | stats = per_cpu_ptr(priv->stats, cpu); | 226 | for_each_online_cpu(cpu) { |
227 | stats = per_cpu_ptr(priv->stats, cpu); | ||
230 | 228 | ||
231 | dev_stats->rx_packets += stats->rx_packets; | 229 | dev_stats->rx_packets += stats->rx_packets; |
232 | dev_stats->tx_packets += stats->tx_packets; | 230 | dev_stats->tx_packets += stats->tx_packets; |
233 | dev_stats->rx_bytes += stats->rx_bytes; | 231 | dev_stats->rx_bytes += stats->rx_bytes; |
234 | dev_stats->tx_bytes += stats->tx_bytes; | 232 | dev_stats->tx_bytes += stats->tx_bytes; |
235 | dev_stats->tx_dropped += stats->tx_dropped; | 233 | dev_stats->tx_dropped += stats->tx_dropped; |
236 | dev_stats->rx_dropped += stats->rx_dropped; | 234 | dev_stats->rx_dropped += stats->rx_dropped; |
237 | } | 235 | } |
238 | 236 | ||
239 | return dev_stats; | 237 | return dev_stats; |
240 | } | 238 | } |
@@ -261,6 +259,8 @@ static int veth_close(struct net_device *dev) | |||
261 | netif_carrier_off(dev); | 259 | netif_carrier_off(dev); |
262 | netif_carrier_off(priv->peer); | 260 | netif_carrier_off(priv->peer); |
263 | 261 | ||
262 | free_percpu(priv->stats); | ||
263 | priv->stats = NULL; | ||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
@@ -291,15 +291,6 @@ static int veth_dev_init(struct net_device *dev) | |||
291 | return 0; | 291 | return 0; |
292 | } | 292 | } |
293 | 293 | ||
294 | static void veth_dev_free(struct net_device *dev) | ||
295 | { | ||
296 | struct veth_priv *priv; | ||
297 | |||
298 | priv = netdev_priv(dev); | ||
299 | free_percpu(priv->stats); | ||
300 | free_netdev(dev); | ||
301 | } | ||
302 | |||
303 | static const struct net_device_ops veth_netdev_ops = { | 294 | static const struct net_device_ops veth_netdev_ops = { |
304 | .ndo_init = veth_dev_init, | 295 | .ndo_init = veth_dev_init, |
305 | .ndo_open = veth_open, | 296 | .ndo_open = veth_open, |
@@ -317,7 +308,7 @@ static void veth_setup(struct net_device *dev) | |||
317 | dev->netdev_ops = &veth_netdev_ops; | 308 | dev->netdev_ops = &veth_netdev_ops; |
318 | dev->ethtool_ops = &veth_ethtool_ops; | 309 | dev->ethtool_ops = &veth_ethtool_ops; |
319 | dev->features |= NETIF_F_LLTX; | 310 | dev->features |= NETIF_F_LLTX; |
320 | dev->destructor = veth_dev_free; | 311 | dev->destructor = free_netdev; |
321 | } | 312 | } |
322 | 313 | ||
323 | /* | 314 | /* |