diff options
Diffstat (limited to 'drivers')
41 files changed, 256 insertions, 150 deletions
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 18a455651121..52f3eb45d2b9 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
@@ -6,17 +6,29 @@ | |||
6 | # $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $ | 6 | # $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $ |
7 | # | 7 | # |
8 | 8 | ||
9 | menu 'EDAC - error detection and reporting (RAS)' | 9 | menu 'EDAC - error detection and reporting (RAS) (EXPERIMENTAL)' |
10 | 10 | ||
11 | config EDAC | 11 | config EDAC |
12 | tristate "EDAC core system error reporting" | 12 | tristate "EDAC core system error reporting (EXPERIMENTAL)" |
13 | depends on X86 | 13 | depends on X86 && EXPERIMENTAL |
14 | help | 14 | help |
15 | EDAC is designed to report errors in the core system. | 15 | EDAC is designed to report errors in the core system. |
16 | These are low-level errors that are reported in the CPU or | 16 | These are low-level errors that are reported in the CPU or |
17 | supporting chipset: memory errors, cache errors, PCI errors, | 17 | supporting chipset: memory errors, cache errors, PCI errors, |
18 | thermal throttling, etc.. If unsure, select 'Y'. | 18 | thermal throttling, etc.. If unsure, select 'Y'. |
19 | 19 | ||
20 | If this code is reporting problems on your system, please | ||
21 | see the EDAC project web pages for more information at: | ||
22 | |||
23 | <http://bluesmoke.sourceforge.net/> | ||
24 | |||
25 | and: | ||
26 | |||
27 | <http://buttersideup.com/edacwiki> | ||
28 | |||
29 | There is also a mailing list for the EDAC project, which can | ||
30 | be found via the sourceforge page. | ||
31 | |||
20 | 32 | ||
21 | comment "Reporting subsystems" | 33 | comment "Reporting subsystems" |
22 | depends on EDAC | 34 | depends on EDAC |
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index b10ee4698b1d..9c205274c1cb 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -38,6 +38,12 @@ | |||
38 | 38 | ||
39 | #define EDAC_MC_VERSION "edac_mc Ver: 2.0.0 " __DATE__ | 39 | #define EDAC_MC_VERSION "edac_mc Ver: 2.0.0 " __DATE__ |
40 | 40 | ||
41 | /* For now, disable the EDAC sysfs code. The sysfs interface that EDAC | ||
42 | * presents to user space needs more thought, and is likely to change | ||
43 | * substantially. | ||
44 | */ | ||
45 | #define DISABLE_EDAC_SYSFS | ||
46 | |||
41 | #ifdef CONFIG_EDAC_DEBUG | 47 | #ifdef CONFIG_EDAC_DEBUG |
42 | /* Values of 0 to 4 will generate output */ | 48 | /* Values of 0 to 4 will generate output */ |
43 | int edac_debug_level = 1; | 49 | int edac_debug_level = 1; |
@@ -47,7 +53,7 @@ EXPORT_SYMBOL(edac_debug_level); | |||
47 | /* EDAC Controls, setable by module parameter, and sysfs */ | 53 | /* EDAC Controls, setable by module parameter, and sysfs */ |
48 | static int log_ue = 1; | 54 | static int log_ue = 1; |
49 | static int log_ce = 1; | 55 | static int log_ce = 1; |
50 | static int panic_on_ue = 1; | 56 | static int panic_on_ue; |
51 | static int poll_msec = 1000; | 57 | static int poll_msec = 1000; |
52 | 58 | ||
53 | static int check_pci_parity = 0; /* default YES check PCI parity */ | 59 | static int check_pci_parity = 0; /* default YES check PCI parity */ |
@@ -77,6 +83,8 @@ static int pci_whitelist_count ; | |||
77 | 83 | ||
78 | /* START sysfs data and methods */ | 84 | /* START sysfs data and methods */ |
79 | 85 | ||
86 | #ifndef DISABLE_EDAC_SYSFS | ||
87 | |||
80 | static const char *mem_types[] = { | 88 | static const char *mem_types[] = { |
81 | [MEM_EMPTY] = "Empty", | 89 | [MEM_EMPTY] = "Empty", |
82 | [MEM_RESERVED] = "Reserved", | 90 | [MEM_RESERVED] = "Reserved", |
@@ -132,11 +140,13 @@ static struct kobject edac_pci_kobj; | |||
132 | * /sys/devices/system/edac/mc; | 140 | * /sys/devices/system/edac/mc; |
133 | * data structures and methods | 141 | * data structures and methods |
134 | */ | 142 | */ |
143 | #if 0 | ||
135 | static ssize_t memctrl_string_show(void *ptr, char *buffer) | 144 | static ssize_t memctrl_string_show(void *ptr, char *buffer) |
136 | { | 145 | { |
137 | char *value = (char*) ptr; | 146 | char *value = (char*) ptr; |
138 | return sprintf(buffer, "%s\n", value); | 147 | return sprintf(buffer, "%s\n", value); |
139 | } | 148 | } |
149 | #endif | ||
140 | 150 | ||
141 | static ssize_t memctrl_int_show(void *ptr, char *buffer) | 151 | static ssize_t memctrl_int_show(void *ptr, char *buffer) |
142 | { | 152 | { |
@@ -207,7 +217,9 @@ struct memctrl_dev_attribute attr_##_name = { \ | |||
207 | }; | 217 | }; |
208 | 218 | ||
209 | /* cwrow<id> attribute f*/ | 219 | /* cwrow<id> attribute f*/ |
220 | #if 0 | ||
210 | MEMCTRL_STRING_ATTR(mc_version,EDAC_MC_VERSION,S_IRUGO,memctrl_string_show,NULL); | 221 | MEMCTRL_STRING_ATTR(mc_version,EDAC_MC_VERSION,S_IRUGO,memctrl_string_show,NULL); |
222 | #endif | ||
211 | 223 | ||
212 | /* csrow<id> control files */ | 224 | /* csrow<id> control files */ |
213 | MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); | 225 | MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); |
@@ -222,7 +234,6 @@ static struct memctrl_dev_attribute *memctrl_attr[] = { | |||
222 | &attr_log_ue, | 234 | &attr_log_ue, |
223 | &attr_log_ce, | 235 | &attr_log_ce, |
224 | &attr_poll_msec, | 236 | &attr_poll_msec, |
225 | &attr_mc_version, | ||
226 | NULL, | 237 | NULL, |
227 | }; | 238 | }; |
228 | 239 | ||
@@ -238,6 +249,7 @@ static struct kobj_type ktype_memctrl = { | |||
238 | .default_attrs = (struct attribute **) memctrl_attr, | 249 | .default_attrs = (struct attribute **) memctrl_attr, |
239 | }; | 250 | }; |
240 | 251 | ||
252 | #endif /* DISABLE_EDAC_SYSFS */ | ||
241 | 253 | ||
242 | /* Initialize the main sysfs entries for edac: | 254 | /* Initialize the main sysfs entries for edac: |
243 | * /sys/devices/system/edac | 255 | * /sys/devices/system/edac |
@@ -248,6 +260,11 @@ static struct kobj_type ktype_memctrl = { | |||
248 | * !0 FAILURE | 260 | * !0 FAILURE |
249 | */ | 261 | */ |
250 | static int edac_sysfs_memctrl_setup(void) | 262 | static int edac_sysfs_memctrl_setup(void) |
263 | #ifdef DISABLE_EDAC_SYSFS | ||
264 | { | ||
265 | return 0; | ||
266 | } | ||
267 | #else | ||
251 | { | 268 | { |
252 | int err=0; | 269 | int err=0; |
253 | 270 | ||
@@ -280,6 +297,7 @@ static int edac_sysfs_memctrl_setup(void) | |||
280 | 297 | ||
281 | return err; | 298 | return err; |
282 | } | 299 | } |
300 | #endif /* DISABLE_EDAC_SYSFS */ | ||
283 | 301 | ||
284 | /* | 302 | /* |
285 | * MC teardown: | 303 | * MC teardown: |
@@ -287,6 +305,7 @@ static int edac_sysfs_memctrl_setup(void) | |||
287 | */ | 305 | */ |
288 | static void edac_sysfs_memctrl_teardown(void) | 306 | static void edac_sysfs_memctrl_teardown(void) |
289 | { | 307 | { |
308 | #ifndef DISABLE_EDAC_SYSFS | ||
290 | debugf0("MC: " __FILE__ ": %s()\n", __func__); | 309 | debugf0("MC: " __FILE__ ": %s()\n", __func__); |
291 | 310 | ||
292 | /* Unregister the MC's kobject */ | 311 | /* Unregister the MC's kobject */ |
@@ -297,8 +316,11 @@ static void edac_sysfs_memctrl_teardown(void) | |||
297 | 316 | ||
298 | /* Unregister the 'edac' object */ | 317 | /* Unregister the 'edac' object */ |
299 | sysdev_class_unregister(&edac_class); | 318 | sysdev_class_unregister(&edac_class); |
319 | #endif /* DISABLE_EDAC_SYSFS */ | ||
300 | } | 320 | } |
301 | 321 | ||
322 | #ifndef DISABLE_EDAC_SYSFS | ||
323 | |||
302 | /* | 324 | /* |
303 | * /sys/devices/system/edac/pci; | 325 | * /sys/devices/system/edac/pci; |
304 | * data structures and methods | 326 | * data structures and methods |
@@ -309,6 +331,8 @@ struct list_control { | |||
309 | int *count; | 331 | int *count; |
310 | }; | 332 | }; |
311 | 333 | ||
334 | |||
335 | #if 0 | ||
312 | /* Output the list as: vendor_id:device:id<,vendor_id:device_id> */ | 336 | /* Output the list as: vendor_id:device:id<,vendor_id:device_id> */ |
313 | static ssize_t edac_pci_list_string_show(void *ptr, char *buffer) | 337 | static ssize_t edac_pci_list_string_show(void *ptr, char *buffer) |
314 | { | 338 | { |
@@ -430,6 +454,7 @@ static ssize_t edac_pci_list_string_store(void *ptr, const char *buffer, | |||
430 | return count; | 454 | return count; |
431 | } | 455 | } |
432 | 456 | ||
457 | #endif | ||
433 | static ssize_t edac_pci_int_show(void *ptr, char *buffer) | 458 | static ssize_t edac_pci_int_show(void *ptr, char *buffer) |
434 | { | 459 | { |
435 | int *value = ptr; | 460 | int *value = ptr; |
@@ -498,6 +523,7 @@ struct edac_pci_dev_attribute edac_pci_attr_##_name = { \ | |||
498 | .store = _store, \ | 523 | .store = _store, \ |
499 | }; | 524 | }; |
500 | 525 | ||
526 | #if 0 | ||
501 | static struct list_control pci_whitelist_control = { | 527 | static struct list_control pci_whitelist_control = { |
502 | .list = pci_whitelist, | 528 | .list = pci_whitelist, |
503 | .count = &pci_whitelist_count | 529 | .count = &pci_whitelist_count |
@@ -520,6 +546,7 @@ EDAC_PCI_STRING_ATTR(pci_parity_blacklist, | |||
520 | S_IRUGO|S_IWUSR, | 546 | S_IRUGO|S_IWUSR, |
521 | edac_pci_list_string_show, | 547 | edac_pci_list_string_show, |
522 | edac_pci_list_string_store); | 548 | edac_pci_list_string_store); |
549 | #endif | ||
523 | 550 | ||
524 | /* PCI Parity control files */ | 551 | /* PCI Parity control files */ |
525 | EDAC_PCI_ATTR(check_pci_parity,S_IRUGO|S_IWUSR,edac_pci_int_show,edac_pci_int_store); | 552 | EDAC_PCI_ATTR(check_pci_parity,S_IRUGO|S_IWUSR,edac_pci_int_show,edac_pci_int_store); |
@@ -531,8 +558,6 @@ static struct edac_pci_dev_attribute *edac_pci_attr[] = { | |||
531 | &edac_pci_attr_check_pci_parity, | 558 | &edac_pci_attr_check_pci_parity, |
532 | &edac_pci_attr_panic_on_pci_parity, | 559 | &edac_pci_attr_panic_on_pci_parity, |
533 | &edac_pci_attr_pci_parity_count, | 560 | &edac_pci_attr_pci_parity_count, |
534 | &edac_pci_attr_pci_parity_whitelist, | ||
535 | &edac_pci_attr_pci_parity_blacklist, | ||
536 | NULL, | 561 | NULL, |
537 | }; | 562 | }; |
538 | 563 | ||
@@ -548,11 +573,18 @@ static struct kobj_type ktype_edac_pci = { | |||
548 | .default_attrs = (struct attribute **) edac_pci_attr, | 573 | .default_attrs = (struct attribute **) edac_pci_attr, |
549 | }; | 574 | }; |
550 | 575 | ||
576 | #endif /* DISABLE_EDAC_SYSFS */ | ||
577 | |||
551 | /** | 578 | /** |
552 | * edac_sysfs_pci_setup() | 579 | * edac_sysfs_pci_setup() |
553 | * | 580 | * |
554 | */ | 581 | */ |
555 | static int edac_sysfs_pci_setup(void) | 582 | static int edac_sysfs_pci_setup(void) |
583 | #ifdef DISABLE_EDAC_SYSFS | ||
584 | { | ||
585 | return 0; | ||
586 | } | ||
587 | #else | ||
556 | { | 588 | { |
557 | int err; | 589 | int err; |
558 | 590 | ||
@@ -576,16 +608,20 @@ static int edac_sysfs_pci_setup(void) | |||
576 | } | 608 | } |
577 | return err; | 609 | return err; |
578 | } | 610 | } |
579 | 611 | #endif /* DISABLE_EDAC_SYSFS */ | |
580 | 612 | ||
581 | static void edac_sysfs_pci_teardown(void) | 613 | static void edac_sysfs_pci_teardown(void) |
582 | { | 614 | { |
615 | #ifndef DISABLE_EDAC_SYSFS | ||
583 | debugf0("MC: " __FILE__ ": %s()\n", __func__); | 616 | debugf0("MC: " __FILE__ ": %s()\n", __func__); |
584 | 617 | ||
585 | kobject_unregister(&edac_pci_kobj); | 618 | kobject_unregister(&edac_pci_kobj); |
586 | kobject_put(&edac_pci_kobj); | 619 | kobject_put(&edac_pci_kobj); |
620 | #endif | ||
587 | } | 621 | } |
588 | 622 | ||
623 | #ifndef DISABLE_EDAC_SYSFS | ||
624 | |||
589 | /* EDAC sysfs CSROW data structures and methods */ | 625 | /* EDAC sysfs CSROW data structures and methods */ |
590 | 626 | ||
591 | /* Set of more detailed csrow<id> attribute show/store functions */ | 627 | /* Set of more detailed csrow<id> attribute show/store functions */ |
@@ -1039,6 +1075,8 @@ static struct kobj_type ktype_mci = { | |||
1039 | .default_attrs = (struct attribute **) mci_attr, | 1075 | .default_attrs = (struct attribute **) mci_attr, |
1040 | }; | 1076 | }; |
1041 | 1077 | ||
1078 | #endif /* DISABLE_EDAC_SYSFS */ | ||
1079 | |||
1042 | #define EDAC_DEVICE_SYMLINK "device" | 1080 | #define EDAC_DEVICE_SYMLINK "device" |
1043 | 1081 | ||
1044 | /* | 1082 | /* |
@@ -1050,6 +1088,11 @@ static struct kobj_type ktype_mci = { | |||
1050 | * !0 Failure | 1088 | * !0 Failure |
1051 | */ | 1089 | */ |
1052 | static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) | 1090 | static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci) |
1091 | #ifdef DISABLE_EDAC_SYSFS | ||
1092 | { | ||
1093 | return 0; | ||
1094 | } | ||
1095 | #else | ||
1053 | { | 1096 | { |
1054 | int i; | 1097 | int i; |
1055 | int err; | 1098 | int err; |
@@ -1118,12 +1161,14 @@ fail: | |||
1118 | 1161 | ||
1119 | return err; | 1162 | return err; |
1120 | } | 1163 | } |
1164 | #endif /* DISABLE_EDAC_SYSFS */ | ||
1121 | 1165 | ||
1122 | /* | 1166 | /* |
1123 | * remove a Memory Controller instance | 1167 | * remove a Memory Controller instance |
1124 | */ | 1168 | */ |
1125 | static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | 1169 | static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) |
1126 | { | 1170 | { |
1171 | #ifndef DISABLE_EDAC_SYSFS | ||
1127 | int i; | 1172 | int i; |
1128 | 1173 | ||
1129 | debugf0("MC: " __FILE__ ": %s()\n", __func__); | 1174 | debugf0("MC: " __FILE__ ": %s()\n", __func__); |
@@ -1140,6 +1185,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) | |||
1140 | 1185 | ||
1141 | kobject_unregister(&mci->edac_mci_kobj); | 1186 | kobject_unregister(&mci->edac_mci_kobj); |
1142 | kobject_put(&mci->edac_mci_kobj); | 1187 | kobject_put(&mci->edac_mci_kobj); |
1188 | #endif /* DISABLE_EDAC_SYSFS */ | ||
1143 | } | 1189 | } |
1144 | 1190 | ||
1145 | /* END OF sysfs data and methods */ | 1191 | /* END OF sysfs data and methods */ |
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index 8ed6ddbb9c5d..4652512f7d1a 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include "dcdbas.h" | 39 | #include "dcdbas.h" |
40 | 40 | ||
41 | #define DRIVER_NAME "dcdbas" | 41 | #define DRIVER_NAME "dcdbas" |
42 | #define DRIVER_VERSION "5.6.0-1" | 42 | #define DRIVER_VERSION "5.6.0-2" |
43 | #define DRIVER_DESCRIPTION "Dell Systems Management Base Driver" | 43 | #define DRIVER_DESCRIPTION "Dell Systems Management Base Driver" |
44 | 44 | ||
45 | static struct platform_device *dcdbas_pdev; | 45 | static struct platform_device *dcdbas_pdev; |
@@ -581,9 +581,13 @@ static int __init dcdbas_init(void) | |||
581 | */ | 581 | */ |
582 | static void __exit dcdbas_exit(void) | 582 | static void __exit dcdbas_exit(void) |
583 | { | 583 | { |
584 | platform_device_unregister(dcdbas_pdev); | 584 | /* |
585 | * make sure functions that use dcdbas_pdev are called | ||
586 | * before platform_device_unregister | ||
587 | */ | ||
585 | unregister_reboot_notifier(&dcdbas_reboot_nb); | 588 | unregister_reboot_notifier(&dcdbas_reboot_nb); |
586 | smi_data_buf_free(); | 589 | smi_data_buf_free(); |
590 | platform_device_unregister(dcdbas_pdev); | ||
587 | } | 591 | } |
588 | 592 | ||
589 | module_init(dcdbas_init); | 593 | module_init(dcdbas_init); |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 19b1b0121726..ad6217467676 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -58,7 +58,7 @@ static unsigned int psmouse_resetafter = 5; | |||
58 | module_param_named(resetafter, psmouse_resetafter, uint, 0644); | 58 | module_param_named(resetafter, psmouse_resetafter, uint, 0644); |
59 | MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never)."); | 59 | MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never)."); |
60 | 60 | ||
61 | static unsigned int psmouse_resync_time = 5; | 61 | static unsigned int psmouse_resync_time; |
62 | module_param_named(resync_time, psmouse_resync_time, uint, 0644); | 62 | module_param_named(resync_time, psmouse_resync_time, uint, 0644); |
63 | MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never)."); | 63 | MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never)."); |
64 | 64 | ||
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 6eb93e45fcd3..4a478eb0e27d 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -825,7 +825,7 @@ proc_get_info(char *page, char **start, off_t off, | |||
825 | p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION); | 825 | p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION); |
826 | p += sprintf(p, "PMU firmware version : %02x\n", pmu_version); | 826 | p += sprintf(p, "PMU firmware version : %02x\n", pmu_version); |
827 | p += sprintf(p, "AC Power : %d\n", | 827 | p += sprintf(p, "AC Power : %d\n", |
828 | ((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0)); | 828 | ((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0) || pmu_battery_count == 0); |
829 | p += sprintf(p, "Battery count : %d\n", pmu_battery_count); | 829 | p += sprintf(p, "Battery count : %d\n", pmu_battery_count); |
830 | 830 | ||
831 | return p - page; | 831 | return p - page; |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index d39f584cd8b3..5d88329e3c7a 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -306,6 +306,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
306 | r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); | 306 | r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); |
307 | int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state); | 307 | int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state); |
308 | conf_t *conf = mddev_to_conf(r1_bio->mddev); | 308 | conf_t *conf = mddev_to_conf(r1_bio->mddev); |
309 | struct bio *to_put = NULL; | ||
309 | 310 | ||
310 | if (bio->bi_size) | 311 | if (bio->bi_size) |
311 | return 1; | 312 | return 1; |
@@ -323,6 +324,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
323 | * this branch is our 'one mirror IO has finished' event handler: | 324 | * this branch is our 'one mirror IO has finished' event handler: |
324 | */ | 325 | */ |
325 | r1_bio->bios[mirror] = NULL; | 326 | r1_bio->bios[mirror] = NULL; |
327 | to_put = bio; | ||
326 | if (!uptodate) { | 328 | if (!uptodate) { |
327 | md_error(r1_bio->mddev, conf->mirrors[mirror].rdev); | 329 | md_error(r1_bio->mddev, conf->mirrors[mirror].rdev); |
328 | /* an I/O failed, we can't clear the bitmap */ | 330 | /* an I/O failed, we can't clear the bitmap */ |
@@ -375,7 +377,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
375 | /* Don't dec_pending yet, we want to hold | 377 | /* Don't dec_pending yet, we want to hold |
376 | * the reference over the retry | 378 | * the reference over the retry |
377 | */ | 379 | */ |
378 | return 0; | 380 | goto out; |
379 | } | 381 | } |
380 | if (test_bit(R1BIO_BehindIO, &r1_bio->state)) { | 382 | if (test_bit(R1BIO_BehindIO, &r1_bio->state)) { |
381 | /* free extra copy of the data pages */ | 383 | /* free extra copy of the data pages */ |
@@ -392,10 +394,11 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
392 | raid_end_bio_io(r1_bio); | 394 | raid_end_bio_io(r1_bio); |
393 | } | 395 | } |
394 | 396 | ||
395 | if (r1_bio->bios[mirror]==NULL) | ||
396 | bio_put(bio); | ||
397 | |||
398 | rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev); | 397 | rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev); |
398 | out: | ||
399 | if (to_put) | ||
400 | bio_put(to_put); | ||
401 | |||
399 | return 0; | 402 | return 0; |
400 | } | 403 | } |
401 | 404 | ||
@@ -857,7 +860,7 @@ static int make_request(request_queue_t *q, struct bio * bio) | |||
857 | atomic_set(&r1_bio->remaining, 0); | 860 | atomic_set(&r1_bio->remaining, 0); |
858 | atomic_set(&r1_bio->behind_remaining, 0); | 861 | atomic_set(&r1_bio->behind_remaining, 0); |
859 | 862 | ||
860 | do_barriers = bio->bi_rw & BIO_RW_BARRIER; | 863 | do_barriers = bio_barrier(bio); |
861 | if (do_barriers) | 864 | if (do_barriers) |
862 | set_bit(R1BIO_Barrier, &r1_bio->state); | 865 | set_bit(R1BIO_Barrier, &r1_bio->state); |
863 | 866 | ||
diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index 8416ceff524b..41715cacf926 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | mxb - v4l2 driver for the Multimedia eXtension Board | 2 | mxb - v4l2 driver for the Multimedia eXtension Board |
3 | 3 | ||
4 | Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de> | 4 | Copyright (C) 1998-2006 Michael Hunold <michael@mihu.de> |
5 | 5 | ||
6 | Visit http://www.mihu.de/linux/saa7146/mxb/ | 6 | Visit http://www.mihu.de/linux/saa7146/mxb/ |
7 | for further details about this card. | 7 | for further details about this card. |
@@ -327,6 +327,7 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
327 | struct video_decoder_init init; | 327 | struct video_decoder_init init; |
328 | struct i2c_msg msg; | 328 | struct i2c_msg msg; |
329 | struct tuner_setup tun_setup; | 329 | struct tuner_setup tun_setup; |
330 | v4l2_std_id std = V4L2_STD_PAL_BG; | ||
330 | 331 | ||
331 | int i = 0, err = 0; | 332 | int i = 0, err = 0; |
332 | struct tea6415c_multiplex vm; | 333 | struct tea6415c_multiplex vm; |
@@ -361,6 +362,9 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
361 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, | 362 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_FREQUENCY, |
362 | &mxb->cur_freq); | 363 | &mxb->cur_freq); |
363 | 364 | ||
365 | /* set a default video standard */ | ||
366 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); | ||
367 | |||
364 | /* mute audio on tea6420s */ | 368 | /* mute audio on tea6420s */ |
365 | mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]); | 369 | mxb->tea6420_1->driver->command(mxb->tea6420_1,TEA6420_SWITCH, &TEA6420_line[6][0]); |
366 | mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]); | 370 | mxb->tea6420_2->driver->command(mxb->tea6420_2,TEA6420_SWITCH, &TEA6420_line[6][1]); |
@@ -921,17 +925,21 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std) | |||
921 | int one = 1; | 925 | int one = 1; |
922 | 926 | ||
923 | if(V4L2_STD_PAL_I == std->id ) { | 927 | if(V4L2_STD_PAL_I == std->id ) { |
928 | v4l2_std_id std = V4L2_STD_PAL_I; | ||
924 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n")); | 929 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL_I.\n")); |
925 | /* set the 7146 gpio register -- I don't know what this does exactly */ | 930 | /* set the 7146 gpio register -- I don't know what this does exactly */ |
926 | saa7146_write(dev, GPIO_CTRL, 0x00404050); | 931 | saa7146_write(dev, GPIO_CTRL, 0x00404050); |
927 | /* unset the 7111 gpio register -- I don't know what this does exactly */ | 932 | /* unset the 7111 gpio register -- I don't know what this does exactly */ |
928 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero); | 933 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &zero); |
934 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); | ||
929 | } else { | 935 | } else { |
936 | v4l2_std_id std = V4L2_STD_PAL_BG; | ||
930 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n")); | 937 | DEB_D(("VIDIOC_S_STD: setting mxb for PAL/NTSC/SECAM.\n")); |
931 | /* set the 7146 gpio register -- I don't know what this does exactly */ | 938 | /* set the 7146 gpio register -- I don't know what this does exactly */ |
932 | saa7146_write(dev, GPIO_CTRL, 0x00404050); | 939 | saa7146_write(dev, GPIO_CTRL, 0x00404050); |
933 | /* set the 7111 gpio register -- I don't know what this does exactly */ | 940 | /* set the 7111 gpio register -- I don't know what this does exactly */ |
934 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one); | 941 | mxb->saa7111a->driver->command(mxb->saa7111a,DECODER_SET_GPIO, &one); |
942 | mxb->tuner->driver->command(mxb->tuner, VIDIOC_S_STD, &std); | ||
935 | } | 943 | } |
936 | return 0; | 944 | return 0; |
937 | } | 945 | } |
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h index 1cef2387fa65..6aba41954448 100644 --- a/drivers/misc/ibmasm/ibmasm.h +++ b/drivers/misc/ibmasm/ibmasm.h | |||
@@ -101,15 +101,16 @@ struct command { | |||
101 | static inline void command_put(struct command *cmd) | 101 | static inline void command_put(struct command *cmd) |
102 | { | 102 | { |
103 | unsigned long flags; | 103 | unsigned long flags; |
104 | spinlock_t *lock = cmd->lock; | ||
104 | 105 | ||
105 | spin_lock_irqsave(cmd->lock, flags); | 106 | spin_lock_irqsave(lock, flags); |
106 | kobject_put(&cmd->kobj); | 107 | kobject_put(&cmd->kobj); |
107 | spin_unlock_irqrestore(cmd->lock, flags); | 108 | spin_unlock_irqrestore(lock, flags); |
108 | } | 109 | } |
109 | 110 | ||
110 | static inline void command_get(struct command *cmd) | 111 | static inline void command_get(struct command *cmd) |
111 | { | 112 | { |
112 | kobject_get(&cmd->kobj); | 113 | kobject_get(&cmd->kobj); |
113 | } | 114 | } |
114 | 115 | ||
115 | 116 | ||
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 155737e7483f..a19480d07888 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -178,7 +178,7 @@ static int dataflash_erase(struct mtd_info *mtd, struct erase_info *instr) | |||
178 | * we're at a block boundary and need to erase the whole block. | 178 | * we're at a block boundary and need to erase the whole block. |
179 | */ | 179 | */ |
180 | pageaddr = instr->addr / priv->page_size; | 180 | pageaddr = instr->addr / priv->page_size; |
181 | do_block = (pageaddr & 0x7) == 0 && instr->len <= blocksize; | 181 | do_block = (pageaddr & 0x7) == 0 && instr->len >= blocksize; |
182 | pageaddr = pageaddr << priv->page_offset; | 182 | pageaddr = pageaddr << priv->page_offset; |
183 | 183 | ||
184 | command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE; | 184 | command[0] = do_block ? OP_ERASE_BLOCK : OP_ERASE_PAGE; |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 824e430486c2..830528dce0ca 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -1574,6 +1574,7 @@ MODULE_LICENSE("GPL"); | |||
1574 | 1574 | ||
1575 | static int __init el3_init_module(void) | 1575 | static int __init el3_init_module(void) |
1576 | { | 1576 | { |
1577 | int ret = 0; | ||
1577 | el3_cards = 0; | 1578 | el3_cards = 0; |
1578 | 1579 | ||
1579 | if (debug >= 0) | 1580 | if (debug >= 0) |
@@ -1589,14 +1590,16 @@ static int __init el3_init_module(void) | |||
1589 | } | 1590 | } |
1590 | 1591 | ||
1591 | #ifdef CONFIG_EISA | 1592 | #ifdef CONFIG_EISA |
1592 | if (eisa_driver_register (&el3_eisa_driver) < 0) { | 1593 | ret = eisa_driver_register(&el3_eisa_driver); |
1593 | eisa_driver_unregister (&el3_eisa_driver); | ||
1594 | } | ||
1595 | #endif | 1594 | #endif |
1596 | #ifdef CONFIG_MCA | 1595 | #ifdef CONFIG_MCA |
1597 | mca_register_driver(&el3_mca_driver); | 1596 | { |
1597 | int err = mca_register_driver(&el3_mca_driver); | ||
1598 | if (ret == 0) | ||
1599 | ret = err; | ||
1600 | } | ||
1598 | #endif | 1601 | #endif |
1599 | return 0; | 1602 | return ret; |
1600 | } | 1603 | } |
1601 | 1604 | ||
1602 | static void __exit el3_cleanup_module(void) | 1605 | static void __exit el3_cleanup_module(void) |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index e45a8f959719..aa633fa95e64 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1087,7 +1087,8 @@ config NE2000 | |||
1087 | without a specific driver are compatible with NE2000. | 1087 | without a specific driver are compatible with NE2000. |
1088 | 1088 | ||
1089 | If you have a PCI NE2000 card however, say N here and Y to "PCI | 1089 | If you have a PCI NE2000 card however, say N here and Y to "PCI |
1090 | NE2000 support", above. If you have a NE2000 card and are running on | 1090 | NE2000 and clone support" under "EISA, VLB, PCI and on board |
1091 | controllers" below. If you have a NE2000 card and are running on | ||
1091 | an MCA system (a bus system used on some IBM PS/2 computers and | 1092 | an MCA system (a bus system used on some IBM PS/2 computers and |
1092 | laptops), say N here and Y to "NE/2 (ne2000 MCA version) support", | 1093 | laptops), say N here and Y to "NE/2 (ne2000 MCA version) support", |
1093 | below. | 1094 | below. |
diff --git a/drivers/net/de620.c b/drivers/net/de620.c index 0069f5fa973a..22fc5b869a60 100644 --- a/drivers/net/de620.c +++ b/drivers/net/de620.c | |||
@@ -1012,7 +1012,7 @@ static int __init read_eeprom(struct net_device *dev) | |||
1012 | #ifdef MODULE | 1012 | #ifdef MODULE |
1013 | static struct net_device *de620_dev; | 1013 | static struct net_device *de620_dev; |
1014 | 1014 | ||
1015 | int init_module(void) | 1015 | int __init init_module(void) |
1016 | { | 1016 | { |
1017 | de620_dev = de620_probe(-1); | 1017 | de620_dev = de620_probe(-1); |
1018 | if (IS_ERR(de620_dev)) | 1018 | if (IS_ERR(de620_dev)) |
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 430c628279b3..fb9dae302dcc 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -50,8 +50,8 @@ | |||
50 | 50 | ||
51 | */ | 51 | */ |
52 | #define DRV_NAME "D-Link DL2000-based linux driver" | 52 | #define DRV_NAME "D-Link DL2000-based linux driver" |
53 | #define DRV_VERSION "v1.17a" | 53 | #define DRV_VERSION "v1.17b" |
54 | #define DRV_RELDATE "2002/10/04" | 54 | #define DRV_RELDATE "2006/03/10" |
55 | #include "dl2k.h" | 55 | #include "dl2k.h" |
56 | 56 | ||
57 | static char version[] __devinitdata = | 57 | static char version[] __devinitdata = |
@@ -765,7 +765,7 @@ rio_free_tx (struct net_device *dev, int irq) | |||
765 | break; | 765 | break; |
766 | skb = np->tx_skbuff[entry]; | 766 | skb = np->tx_skbuff[entry]; |
767 | pci_unmap_single (np->pdev, | 767 | pci_unmap_single (np->pdev, |
768 | np->tx_ring[entry].fraginfo, | 768 | np->tx_ring[entry].fraginfo & 0xffffffffffff, |
769 | skb->len, PCI_DMA_TODEVICE); | 769 | skb->len, PCI_DMA_TODEVICE); |
770 | if (irq) | 770 | if (irq) |
771 | dev_kfree_skb_irq (skb); | 771 | dev_kfree_skb_irq (skb); |
@@ -892,14 +892,16 @@ receive_packet (struct net_device *dev) | |||
892 | 892 | ||
893 | /* Small skbuffs for short packets */ | 893 | /* Small skbuffs for short packets */ |
894 | if (pkt_len > copy_thresh) { | 894 | if (pkt_len > copy_thresh) { |
895 | pci_unmap_single (np->pdev, desc->fraginfo, | 895 | pci_unmap_single (np->pdev, |
896 | desc->fraginfo & 0xffffffffffff, | ||
896 | np->rx_buf_sz, | 897 | np->rx_buf_sz, |
897 | PCI_DMA_FROMDEVICE); | 898 | PCI_DMA_FROMDEVICE); |
898 | skb_put (skb = np->rx_skbuff[entry], pkt_len); | 899 | skb_put (skb = np->rx_skbuff[entry], pkt_len); |
899 | np->rx_skbuff[entry] = NULL; | 900 | np->rx_skbuff[entry] = NULL; |
900 | } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) { | 901 | } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) { |
901 | pci_dma_sync_single_for_cpu(np->pdev, | 902 | pci_dma_sync_single_for_cpu(np->pdev, |
902 | desc->fraginfo, | 903 | desc->fraginfo & |
904 | 0xffffffffffff, | ||
903 | np->rx_buf_sz, | 905 | np->rx_buf_sz, |
904 | PCI_DMA_FROMDEVICE); | 906 | PCI_DMA_FROMDEVICE); |
905 | skb->dev = dev; | 907 | skb->dev = dev; |
@@ -910,7 +912,8 @@ receive_packet (struct net_device *dev) | |||
910 | pkt_len, 0); | 912 | pkt_len, 0); |
911 | skb_put (skb, pkt_len); | 913 | skb_put (skb, pkt_len); |
912 | pci_dma_sync_single_for_device(np->pdev, | 914 | pci_dma_sync_single_for_device(np->pdev, |
913 | desc->fraginfo, | 915 | desc->fraginfo & |
916 | 0xffffffffffff, | ||
914 | np->rx_buf_sz, | 917 | np->rx_buf_sz, |
915 | PCI_DMA_FROMDEVICE); | 918 | PCI_DMA_FROMDEVICE); |
916 | } | 919 | } |
@@ -1796,8 +1799,9 @@ rio_close (struct net_device *dev) | |||
1796 | np->rx_ring[i].fraginfo = 0; | 1799 | np->rx_ring[i].fraginfo = 0; |
1797 | skb = np->rx_skbuff[i]; | 1800 | skb = np->rx_skbuff[i]; |
1798 | if (skb) { | 1801 | if (skb) { |
1799 | pci_unmap_single (np->pdev, np->rx_ring[i].fraginfo, | 1802 | pci_unmap_single(np->pdev, |
1800 | skb->len, PCI_DMA_FROMDEVICE); | 1803 | np->rx_ring[i].fraginfo & 0xffffffffffff, |
1804 | skb->len, PCI_DMA_FROMDEVICE); | ||
1801 | dev_kfree_skb (skb); | 1805 | dev_kfree_skb (skb); |
1802 | np->rx_skbuff[i] = NULL; | 1806 | np->rx_skbuff[i] = NULL; |
1803 | } | 1807 | } |
@@ -1805,8 +1809,9 @@ rio_close (struct net_device *dev) | |||
1805 | for (i = 0; i < TX_RING_SIZE; i++) { | 1809 | for (i = 0; i < TX_RING_SIZE; i++) { |
1806 | skb = np->tx_skbuff[i]; | 1810 | skb = np->tx_skbuff[i]; |
1807 | if (skb) { | 1811 | if (skb) { |
1808 | pci_unmap_single (np->pdev, np->tx_ring[i].fraginfo, | 1812 | pci_unmap_single(np->pdev, |
1809 | skb->len, PCI_DMA_TODEVICE); | 1813 | np->tx_ring[i].fraginfo & 0xffffffffffff, |
1814 | skb->len, PCI_DMA_TODEVICE); | ||
1810 | dev_kfree_skb (skb); | 1815 | dev_kfree_skb (skb); |
1811 | np->tx_skbuff[i] = NULL; | 1816 | np->tx_skbuff[i] = NULL; |
1812 | } | 1817 | } |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 5b7d0f425af2..4c4db96d0b7b 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2917,7 +2917,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2917 | if (!__pskb_pull_tail(skb, pull_size)) { | 2917 | if (!__pskb_pull_tail(skb, pull_size)) { |
2918 | printk(KERN_ERR "__pskb_pull_tail failed.\n"); | 2918 | printk(KERN_ERR "__pskb_pull_tail failed.\n"); |
2919 | dev_kfree_skb_any(skb); | 2919 | dev_kfree_skb_any(skb); |
2920 | return -EFAULT; | 2920 | return NETDEV_TX_OK; |
2921 | } | 2921 | } |
2922 | len = skb->len - skb->data_len; | 2922 | len = skb->len - skb->data_len; |
2923 | } | 2923 | } |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 72c1630977d6..73260364cba3 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -74,7 +74,7 @@ | |||
74 | #define TX_RING_SIZE 512 | 74 | #define TX_RING_SIZE 512 |
75 | #define TX_DEF_PENDING (TX_RING_SIZE - 1) | 75 | #define TX_DEF_PENDING (TX_RING_SIZE - 1) |
76 | #define TX_MIN_PENDING 64 | 76 | #define TX_MIN_PENDING 64 |
77 | #define MAX_SKB_TX_LE (4 + 2*MAX_SKB_FRAGS) | 77 | #define MAX_SKB_TX_LE (4 + (sizeof(dma_addr_t)/sizeof(u32))*MAX_SKB_FRAGS) |
78 | 78 | ||
79 | #define STATUS_RING_SIZE 2048 /* 2 ports * (TX + 2*RX) */ | 79 | #define STATUS_RING_SIZE 2048 /* 2 ports * (TX + 2*RX) */ |
80 | #define STATUS_LE_BYTES (STATUS_RING_SIZE*sizeof(struct sky2_status_le)) | 80 | #define STATUS_LE_BYTES (STATUS_RING_SIZE*sizeof(struct sky2_status_le)) |
@@ -622,8 +622,8 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) | |||
622 | 622 | ||
623 | /* Configure Rx MAC FIFO */ | 623 | /* Configure Rx MAC FIFO */ |
624 | sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_CLR); | 624 | sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_CLR); |
625 | sky2_write16(hw, SK_REG(port, RX_GMF_CTRL_T), | 625 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), |
626 | GMF_RX_CTRL_DEF); | 626 | GMF_OPER_ON | GMF_RX_F_FL_ON); |
627 | 627 | ||
628 | /* Flush Rx MAC FIFO on any flow control or error */ | 628 | /* Flush Rx MAC FIFO on any flow control or error */ |
629 | sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR); | 629 | sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR); |
@@ -995,6 +995,10 @@ static int sky2_rx_start(struct sky2_port *sky2) | |||
995 | sky2_rx_add(sky2, re->mapaddr); | 995 | sky2_rx_add(sky2, re->mapaddr); |
996 | } | 996 | } |
997 | 997 | ||
998 | /* Truncate oversize frames */ | ||
999 | sky2_write16(hw, SK_REG(sky2->port, RX_GMF_TR_THR), sky2->rx_bufsize - 8); | ||
1000 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_TRUNC_ON); | ||
1001 | |||
998 | /* Tell chip about available buffers */ | 1002 | /* Tell chip about available buffers */ |
999 | sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put); | 1003 | sky2_write16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX), sky2->rx_put); |
1000 | sky2->rx_last_put = sky2_read16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX)); | 1004 | sky2->rx_last_put = sky2_read16(hw, Y2_QADDR(rxq, PREF_UNIT_PUT_IDX)); |
@@ -1145,6 +1149,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
1145 | struct sky2_tx_le *le = NULL; | 1149 | struct sky2_tx_le *le = NULL; |
1146 | struct tx_ring_info *re; | 1150 | struct tx_ring_info *re; |
1147 | unsigned i, len; | 1151 | unsigned i, len; |
1152 | int avail; | ||
1148 | dma_addr_t mapping; | 1153 | dma_addr_t mapping; |
1149 | u32 addr64; | 1154 | u32 addr64; |
1150 | u16 mss; | 1155 | u16 mss; |
@@ -1287,12 +1292,16 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
1287 | re->idx = sky2->tx_prod; | 1292 | re->idx = sky2->tx_prod; |
1288 | le->ctrl |= EOP; | 1293 | le->ctrl |= EOP; |
1289 | 1294 | ||
1295 | avail = tx_avail(sky2); | ||
1296 | if (mss != 0 || avail < TX_MIN_PENDING) { | ||
1297 | le->ctrl |= FRC_STAT; | ||
1298 | if (avail <= MAX_SKB_TX_LE) | ||
1299 | netif_stop_queue(dev); | ||
1300 | } | ||
1301 | |||
1290 | sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod, | 1302 | sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod, |
1291 | &sky2->tx_last_put, TX_RING_SIZE); | 1303 | &sky2->tx_last_put, TX_RING_SIZE); |
1292 | 1304 | ||
1293 | if (tx_avail(sky2) <= MAX_SKB_TX_LE) | ||
1294 | netif_stop_queue(dev); | ||
1295 | |||
1296 | out_unlock: | 1305 | out_unlock: |
1297 | spin_unlock(&sky2->tx_lock); | 1306 | spin_unlock(&sky2->tx_lock); |
1298 | 1307 | ||
@@ -1707,10 +1716,12 @@ static void sky2_tx_timeout(struct net_device *dev) | |||
1707 | 1716 | ||
1708 | 1717 | ||
1709 | #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) | 1718 | #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) |
1710 | /* Want receive buffer size to be multiple of 64 bits, and incl room for vlan */ | 1719 | /* Want receive buffer size to be multiple of 64 bits |
1720 | * and incl room for vlan and truncation | ||
1721 | */ | ||
1711 | static inline unsigned sky2_buf_size(int mtu) | 1722 | static inline unsigned sky2_buf_size(int mtu) |
1712 | { | 1723 | { |
1713 | return roundup(mtu + ETH_HLEN + 4, 8); | 1724 | return roundup(mtu + ETH_HLEN + VLAN_HLEN, 8) + 8; |
1714 | } | 1725 | } |
1715 | 1726 | ||
1716 | static int sky2_change_mtu(struct net_device *dev, int new_mtu) | 1727 | static int sky2_change_mtu(struct net_device *dev, int new_mtu) |
@@ -1793,7 +1804,7 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2, | |||
1793 | if (!(status & GMR_FS_RX_OK)) | 1804 | if (!(status & GMR_FS_RX_OK)) |
1794 | goto resubmit; | 1805 | goto resubmit; |
1795 | 1806 | ||
1796 | if ((status >> 16) != length || length > sky2->rx_bufsize) | 1807 | if (length > sky2->netdev->mtu + ETH_HLEN) |
1797 | goto oversize; | 1808 | goto oversize; |
1798 | 1809 | ||
1799 | if (length < copybreak) { | 1810 | if (length < copybreak) { |
@@ -3243,8 +3254,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, | |||
3243 | } | 3254 | } |
3244 | } | 3255 | } |
3245 | 3256 | ||
3246 | err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ | SA_SAMPLE_RANDOM, | 3257 | err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ, DRV_NAME, hw); |
3247 | DRV_NAME, hw); | ||
3248 | if (err) { | 3258 | if (err) { |
3249 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", | 3259 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", |
3250 | pci_name(pdev), pdev->irq); | 3260 | pci_name(pdev), pdev->irq); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 15545620ab0e..b8f1524da557 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -10543,8 +10543,6 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) | |||
10543 | strcat(str, "66MHz"); | 10543 | strcat(str, "66MHz"); |
10544 | else if (clock_ctrl == 6) | 10544 | else if (clock_ctrl == 6) |
10545 | strcat(str, "100MHz"); | 10545 | strcat(str, "100MHz"); |
10546 | else if (clock_ctrl == 7) | ||
10547 | strcat(str, "133MHz"); | ||
10548 | } else { | 10546 | } else { |
10549 | strcpy(str, "PCI:"); | 10547 | strcpy(str, "PCI:"); |
10550 | if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) | 10548 | if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index d7fb3ffe06ac..2d0cfbceee22 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -1362,7 +1362,6 @@ static int de_open (struct net_device *dev) | |||
1362 | { | 1362 | { |
1363 | struct de_private *de = dev->priv; | 1363 | struct de_private *de = dev->priv; |
1364 | int rc; | 1364 | int rc; |
1365 | unsigned long flags; | ||
1366 | 1365 | ||
1367 | if (netif_msg_ifup(de)) | 1366 | if (netif_msg_ifup(de)) |
1368 | printk(KERN_DEBUG "%s: enabling interface\n", dev->name); | 1367 | printk(KERN_DEBUG "%s: enabling interface\n", dev->name); |
@@ -1376,18 +1375,20 @@ static int de_open (struct net_device *dev) | |||
1376 | return rc; | 1375 | return rc; |
1377 | } | 1376 | } |
1378 | 1377 | ||
1379 | rc = de_init_hw(de); | 1378 | dw32(IntrMask, 0); |
1380 | if (rc) { | ||
1381 | printk(KERN_ERR "%s: h/w init failure, err=%d\n", | ||
1382 | dev->name, rc); | ||
1383 | goto err_out_free; | ||
1384 | } | ||
1385 | 1379 | ||
1386 | rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev); | 1380 | rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev); |
1387 | if (rc) { | 1381 | if (rc) { |
1388 | printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n", | 1382 | printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n", |
1389 | dev->name, dev->irq, rc); | 1383 | dev->name, dev->irq, rc); |
1390 | goto err_out_hw; | 1384 | goto err_out_free; |
1385 | } | ||
1386 | |||
1387 | rc = de_init_hw(de); | ||
1388 | if (rc) { | ||
1389 | printk(KERN_ERR "%s: h/w init failure, err=%d\n", | ||
1390 | dev->name, rc); | ||
1391 | goto err_out_free_irq; | ||
1391 | } | 1392 | } |
1392 | 1393 | ||
1393 | netif_start_queue(dev); | 1394 | netif_start_queue(dev); |
@@ -1395,11 +1396,8 @@ static int de_open (struct net_device *dev) | |||
1395 | 1396 | ||
1396 | return 0; | 1397 | return 0; |
1397 | 1398 | ||
1398 | err_out_hw: | 1399 | err_out_free_irq: |
1399 | spin_lock_irqsave(&de->lock, flags); | 1400 | free_irq(dev->irq, dev); |
1400 | de_stop_hw(de); | ||
1401 | spin_unlock_irqrestore(&de->lock, flags); | ||
1402 | |||
1403 | err_out_free: | 1401 | err_out_free: |
1404 | de_free_rings(de); | 1402 | de_free_rings(de); |
1405 | return rc; | 1403 | return rc; |
@@ -1455,6 +1453,8 @@ static void de_tx_timeout (struct net_device *dev) | |||
1455 | synchronize_irq(dev->irq); | 1453 | synchronize_irq(dev->irq); |
1456 | de_clean_rings(de); | 1454 | de_clean_rings(de); |
1457 | 1455 | ||
1456 | de_init_rings(de); | ||
1457 | |||
1458 | de_init_hw(de); | 1458 | de_init_hw(de); |
1459 | 1459 | ||
1460 | netif_wake_queue(dev); | 1460 | netif_wake_queue(dev); |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 50b8c6754b1e..a1ed2d983740 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -249,8 +249,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, | |||
249 | 249 | ||
250 | if (align) | 250 | if (align) |
251 | skb_reserve(skb, align); | 251 | skb_reserve(skb, align); |
252 | if (memcpy_fromiovec(skb_put(skb, len), iv, len)) | 252 | if (memcpy_fromiovec(skb_put(skb, len), iv, len)) { |
253 | tun->stats.rx_dropped++; | ||
254 | kfree_skb(skb); | ||
253 | return -EFAULT; | 255 | return -EFAULT; |
256 | } | ||
254 | 257 | ||
255 | skb->dev = tun->dev; | 258 | skb->dev = tun->dev; |
256 | switch (tun->flags & TUN_TYPE_MASK) { | 259 | switch (tun->flags & TUN_TYPE_MASK) { |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 54ad93daca3c..bb96ce1db08c 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -411,7 +411,7 @@ static int pcmcia_device_probe(struct device * dev) | |||
411 | * pseudo devices, and if not, add the second one. | 411 | * pseudo devices, and if not, add the second one. |
412 | */ | 412 | */ |
413 | did = (struct pcmcia_device_id *) p_dev->dev.driver_data; | 413 | did = (struct pcmcia_device_id *) p_dev->dev.driver_data; |
414 | if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && | 414 | if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && |
415 | (p_dev->socket->device_count == 1) && (p_dev->device_no == 0)) | 415 | (p_dev->socket->device_count == 1) && (p_dev->device_no == 0)) |
416 | pcmcia_add_pseudo_device(p_dev->socket); | 416 | pcmcia_add_pseudo_device(p_dev->socket); |
417 | 417 | ||
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 4c1acc8daa82..1aa3c261718a 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -94,7 +94,7 @@ dasd_devices_show(struct seq_file *m, void *v) | |||
94 | seq_printf(m, "basic"); | 94 | seq_printf(m, "basic"); |
95 | break; | 95 | break; |
96 | case DASD_STATE_UNFMT: | 96 | case DASD_STATE_UNFMT: |
97 | seq_printf(m, "unnformatted"); | 97 | seq_printf(m, "unformatted"); |
98 | break; | 98 | break; |
99 | case DASD_STATE_READY: | 99 | case DASD_STATE_READY: |
100 | case DASD_STATE_ONLINE: | 100 | case DASD_STATE_ONLINE: |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 1bbf231f8aaf..3c77d65960db 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -409,6 +409,9 @@ __init_channel_subsystem(struct subchannel_id schid, void *data) | |||
409 | /* -ENXIO: no more subchannels. */ | 409 | /* -ENXIO: no more subchannels. */ |
410 | case -ENXIO: | 410 | case -ENXIO: |
411 | return ret; | 411 | return ret; |
412 | /* -EIO: this subchannel set not supported. */ | ||
413 | case -EIO: | ||
414 | return ret; | ||
412 | default: | 415 | default: |
413 | return 0; | 416 | return 0; |
414 | } | 417 | } |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 7f551d66f47f..6eba56cd89ba 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -664,6 +664,7 @@ do { \ | |||
664 | #define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002 | 664 | #define ZFCP_STATUS_UNIT_TEMPORARY 0x00000002 |
665 | #define ZFCP_STATUS_UNIT_SHARED 0x00000004 | 665 | #define ZFCP_STATUS_UNIT_SHARED 0x00000004 |
666 | #define ZFCP_STATUS_UNIT_READONLY 0x00000008 | 666 | #define ZFCP_STATUS_UNIT_READONLY 0x00000008 |
667 | #define ZFCP_STATUS_UNIT_REGISTERED 0x00000010 | ||
667 | 668 | ||
668 | /* FSF request status (this does not have a common part) */ | 669 | /* FSF request status (this does not have a common part) */ |
669 | #define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000 | 670 | #define ZFCP_STATUS_FSFREQ_NOT_INIT 0x00000000 |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index e3c4bdd29a60..57cb628a05aa 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -3391,10 +3391,13 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, | |||
3391 | && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, | 3391 | && (!atomic_test_mask(ZFCP_STATUS_UNIT_TEMPORARY, |
3392 | &unit->status)) | 3392 | &unit->status)) |
3393 | && !unit->device | 3393 | && !unit->device |
3394 | && port->rport) | 3394 | && port->rport) { |
3395 | scsi_add_device(port->adapter->scsi_host, 0, | 3395 | atomic_set_mask(ZFCP_STATUS_UNIT_REGISTERED, |
3396 | port->rport->scsi_target_id, | 3396 | &unit->status); |
3397 | unit->scsi_lun); | 3397 | scsi_scan_target(&port->rport->dev, 0, |
3398 | port->rport->scsi_target_id, | ||
3399 | unit->scsi_lun, 0); | ||
3400 | } | ||
3398 | zfcp_unit_put(unit); | 3401 | zfcp_unit_put(unit); |
3399 | break; | 3402 | break; |
3400 | case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: | 3403 | case ZFCP_ERP_ACTION_REOPEN_PORT_FORCED: |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 9f6b4d7a46f3..9e6d07d7b3c8 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -68,7 +68,7 @@ struct zfcp_data zfcp_data = { | |||
68 | eh_host_reset_handler: zfcp_scsi_eh_host_reset_handler, | 68 | eh_host_reset_handler: zfcp_scsi_eh_host_reset_handler, |
69 | /* FIXME(openfcp): Tune */ | 69 | /* FIXME(openfcp): Tune */ |
70 | can_queue: 4096, | 70 | can_queue: 4096, |
71 | this_id: 0, | 71 | this_id: -1, |
72 | /* | 72 | /* |
73 | * FIXME: | 73 | * FIXME: |
74 | * one less? can zfcp_create_sbale cope with it? | 74 | * one less? can zfcp_create_sbale cope with it? |
@@ -183,7 +183,8 @@ zfcp_scsi_slave_alloc(struct scsi_device *sdp) | |||
183 | 183 | ||
184 | read_lock_irqsave(&zfcp_data.config_lock, flags); | 184 | read_lock_irqsave(&zfcp_data.config_lock, flags); |
185 | unit = zfcp_unit_lookup(adapter, sdp->channel, sdp->id, sdp->lun); | 185 | unit = zfcp_unit_lookup(adapter, sdp->channel, sdp->id, sdp->lun); |
186 | if (unit) { | 186 | if (unit && atomic_test_mask(ZFCP_STATUS_UNIT_REGISTERED, |
187 | &unit->status)) { | ||
187 | sdp->hostdata = unit; | 188 | sdp->hostdata = unit; |
188 | unit->device = sdp; | 189 | unit->device = sdp; |
189 | zfcp_unit_get(unit); | 190 | zfcp_unit_get(unit); |
@@ -208,6 +209,7 @@ zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | |||
208 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; | 209 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; |
209 | 210 | ||
210 | if (unit) { | 211 | if (unit) { |
212 | atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); | ||
211 | sdpnt->hostdata = NULL; | 213 | sdpnt->hostdata = NULL; |
212 | unit->device = NULL; | 214 | unit->device = NULL; |
213 | zfcp_unit_put(unit); | 215 | zfcp_unit_put(unit); |
@@ -291,7 +293,7 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit, | |||
291 | "on port 0x%016Lx in recovery\n", | 293 | "on port 0x%016Lx in recovery\n", |
292 | zfcp_get_busid_by_unit(unit), | 294 | zfcp_get_busid_by_unit(unit), |
293 | unit->fcp_lun, unit->port->wwpn); | 295 | unit->fcp_lun, unit->port->wwpn); |
294 | retval = SCSI_MLQUEUE_DEVICE_BUSY; | 296 | zfcp_scsi_command_fail(scpnt, DID_NO_CONNECT); |
295 | goto out; | 297 | goto out; |
296 | } | 298 | } |
297 | 299 | ||
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index a800fb51168b..559ff7aae3f1 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -742,23 +742,17 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
742 | struct ata_queued_cmd *qc; | 742 | struct ata_queued_cmd *qc; |
743 | qc = ata_qc_from_tag(ap, ap->active_tag); | 743 | qc = ata_qc_from_tag(ap, ap->active_tag); |
744 | if (!ahci_host_intr(ap, qc)) | 744 | if (!ahci_host_intr(ap, qc)) |
745 | if (ata_ratelimit()) { | 745 | if (ata_ratelimit()) |
746 | struct pci_dev *pdev = | 746 | dev_printk(KERN_WARNING, host_set->dev, |
747 | to_pci_dev(ap->host_set->dev); | ||
748 | dev_printk(KERN_WARNING, &pdev->dev, | ||
749 | "unhandled interrupt on port %u\n", | 747 | "unhandled interrupt on port %u\n", |
750 | i); | 748 | i); |
751 | } | ||
752 | 749 | ||
753 | VPRINTK("port %u\n", i); | 750 | VPRINTK("port %u\n", i); |
754 | } else { | 751 | } else { |
755 | VPRINTK("port %u (no irq)\n", i); | 752 | VPRINTK("port %u (no irq)\n", i); |
756 | if (ata_ratelimit()) { | 753 | if (ata_ratelimit()) |
757 | struct pci_dev *pdev = | 754 | dev_printk(KERN_WARNING, host_set->dev, |
758 | to_pci_dev(ap->host_set->dev); | ||
759 | dev_printk(KERN_WARNING, &pdev->dev, | ||
760 | "interrupt on disabled port %u\n", i); | 755 | "interrupt on disabled port %u\n", i); |
761 | } | ||
762 | } | 756 | } |
763 | 757 | ||
764 | irq_ack |= (1 << i); | 758 | irq_ack |= (1 << i); |
diff --git a/drivers/scsi/pcmcia/Kconfig b/drivers/scsi/pcmcia/Kconfig index df52190f4d94..eac8e179cfff 100644 --- a/drivers/scsi/pcmcia/Kconfig +++ b/drivers/scsi/pcmcia/Kconfig | |||
@@ -8,6 +8,7 @@ menu "PCMCIA SCSI adapter support" | |||
8 | config PCMCIA_AHA152X | 8 | config PCMCIA_AHA152X |
9 | tristate "Adaptec AHA152X PCMCIA support" | 9 | tristate "Adaptec AHA152X PCMCIA support" |
10 | depends on m && !64BIT | 10 | depends on m && !64BIT |
11 | select SCSI_SPI_ATTRS | ||
11 | help | 12 | help |
12 | Say Y here if you intend to attach this type of PCMCIA SCSI host | 13 | Say Y here if you intend to attach this type of PCMCIA SCSI host |
13 | adapter to your computer. | 14 | adapter to your computer. |
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index f01ec0a7c506..84c3937ae8fb 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c | |||
@@ -126,6 +126,7 @@ static struct { | |||
126 | {"ADAPTEC", "Adaptec 5400S", NULL, BLIST_FORCELUN}, | 126 | {"ADAPTEC", "Adaptec 5400S", NULL, BLIST_FORCELUN}, |
127 | {"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN}, | 127 | {"AFT PRO", "-IX CF", "0.0>", BLIST_FORCELUN}, |
128 | {"BELKIN", "USB 2 HS-CF", "1.95", BLIST_FORCELUN | BLIST_INQUIRY_36}, | 128 | {"BELKIN", "USB 2 HS-CF", "1.95", BLIST_FORCELUN | BLIST_INQUIRY_36}, |
129 | {"BROWNIE", "1600U3P", NULL, BLIST_NOREPORTLUN}, | ||
129 | {"CANON", "IPUBJD", NULL, BLIST_SPARSELUN}, | 130 | {"CANON", "IPUBJD", NULL, BLIST_SPARSELUN}, |
130 | {"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN | BLIST_INQUIRY_36}, | 131 | {"CBOX3", "USB Storage-SMC", "300A", BLIST_FORCELUN | BLIST_INQUIRY_36}, |
131 | {"CMD", "CRA-7280", NULL, BLIST_SPARSELUN}, /* CMD RAID Controller */ | 132 | {"CMD", "CRA-7280", NULL, BLIST_SPARSELUN}, /* CMD RAID Controller */ |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 929032e370db..13ea64119b73 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -223,7 +223,7 @@ static void fc_rport_terminate(struct fc_rport *rport); | |||
223 | */ | 223 | */ |
224 | #define FC_STARGET_NUM_ATTRS 3 | 224 | #define FC_STARGET_NUM_ATTRS 3 |
225 | #define FC_RPORT_NUM_ATTRS 9 | 225 | #define FC_RPORT_NUM_ATTRS 9 |
226 | #define FC_HOST_NUM_ATTRS 16 | 226 | #define FC_HOST_NUM_ATTRS 17 |
227 | 227 | ||
228 | struct fc_internal { | 228 | struct fc_internal { |
229 | struct scsi_transport_template t; | 229 | struct scsi_transport_template t; |
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index f3763d2ccb86..a37579ce6d76 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c | |||
@@ -2301,7 +2301,6 @@ static void receive_chars(struct uart_port *the_port) | |||
2301 | int read_count, request_count = IOC4_MAX_CHARS; | 2301 | int read_count, request_count = IOC4_MAX_CHARS; |
2302 | struct uart_icount *icount; | 2302 | struct uart_icount *icount; |
2303 | struct uart_info *info = the_port->info; | 2303 | struct uart_info *info = the_port->info; |
2304 | int flip = 0; | ||
2305 | unsigned long pflags; | 2304 | unsigned long pflags; |
2306 | 2305 | ||
2307 | /* Make sure all the pointers are "good" ones */ | 2306 | /* Make sure all the pointers are "good" ones */ |
@@ -2313,7 +2312,7 @@ static void receive_chars(struct uart_port *the_port) | |||
2313 | spin_lock_irqsave(&the_port->lock, pflags); | 2312 | spin_lock_irqsave(&the_port->lock, pflags); |
2314 | tty = info->tty; | 2313 | tty = info->tty; |
2315 | 2314 | ||
2316 | request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS - 2); | 2315 | request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS); |
2317 | 2316 | ||
2318 | if (request_count > 0) { | 2317 | if (request_count > 0) { |
2319 | icount = &the_port->icount; | 2318 | icount = &the_port->icount; |
@@ -2326,8 +2325,7 @@ static void receive_chars(struct uart_port *the_port) | |||
2326 | 2325 | ||
2327 | spin_unlock_irqrestore(&the_port->lock, pflags); | 2326 | spin_unlock_irqrestore(&the_port->lock, pflags); |
2328 | 2327 | ||
2329 | if (flip) | 2328 | tty_flip_buffer_push(tty); |
2330 | tty_flip_buffer_push(tty); | ||
2331 | } | 2329 | } |
2332 | 2330 | ||
2333 | /** | 2331 | /** |
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index df8e5667b348..466042808daf 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -253,7 +253,7 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper, | |||
253 | { | 253 | { |
254 | unsigned char *src; | 254 | unsigned char *src; |
255 | unsigned int xindex, yindex, chipindex, linesize; | 255 | unsigned int xindex, yindex, chipindex, linesize; |
256 | int i, count; | 256 | int i; |
257 | unsigned char val; | 257 | unsigned char val; |
258 | unsigned char bitmask, rightshift; | 258 | unsigned char bitmask, rightshift; |
259 | 259 | ||
@@ -282,7 +282,6 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper, | |||
282 | } | 282 | } |
283 | ks108_writeb_data(par, chipindex, val); | 283 | ks108_writeb_data(par, chipindex, val); |
284 | left++; | 284 | left++; |
285 | count++; | ||
286 | if (bitmask == 0x80) { | 285 | if (bitmask == 0x80) { |
287 | bitmask = 1; | 286 | bitmask = 1; |
288 | src++; | 287 | src++; |
@@ -460,11 +459,11 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou | |||
460 | inode = file->f_dentry->d_inode; | 459 | inode = file->f_dentry->d_inode; |
461 | fbidx = iminor(inode); | 460 | fbidx = iminor(inode); |
462 | info = registered_fb[fbidx]; | 461 | info = registered_fb[fbidx]; |
463 | par = info->par; | ||
464 | 462 | ||
465 | if (!info || !info->screen_base) | 463 | if (!info || !info->screen_base) |
466 | return -ENODEV; | 464 | return -ENODEV; |
467 | 465 | ||
466 | par = info->par; | ||
468 | xres = info->var.xres; | 467 | xres = info->var.xres; |
469 | fbmemlength = (xres * info->var.yres)/8; | 468 | fbmemlength = (xres * info->var.yres)/8; |
470 | 469 | ||
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index bfc8a93b2c73..620c9a934e0e 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -1326,7 +1326,7 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll, | |||
1326 | unsigned char post_dividers[] = {1,2,4,8,3,6,12}; | 1326 | unsigned char post_dividers[] = {1,2,4,8,3,6,12}; |
1327 | u32 output_freq; | 1327 | u32 output_freq; |
1328 | u32 vclk; /* in .01 MHz */ | 1328 | u32 vclk; /* in .01 MHz */ |
1329 | int i; | 1329 | int i = 0; |
1330 | u32 n, d; | 1330 | u32 n, d; |
1331 | 1331 | ||
1332 | vclk = 100000000 / period_in_ps; /* convert units to 10 kHz */ | 1332 | vclk = 100000000 / period_in_ps; /* convert units to 10 kHz */ |
@@ -1340,15 +1340,16 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll, | |||
1340 | /* now, find an acceptable divider */ | 1340 | /* now, find an acceptable divider */ |
1341 | for (i = 0; i < sizeof(post_dividers); i++) { | 1341 | for (i = 0; i < sizeof(post_dividers); i++) { |
1342 | output_freq = post_dividers[i] * vclk; | 1342 | output_freq = post_dividers[i] * vclk; |
1343 | if (output_freq >= c.ppll_min && output_freq <= c.ppll_max) | 1343 | if (output_freq >= c.ppll_min && output_freq <= c.ppll_max) { |
1344 | pll->post_divider = post_dividers[i]; | ||
1344 | break; | 1345 | break; |
1346 | } | ||
1345 | } | 1347 | } |
1346 | 1348 | ||
1347 | /* calculate feedback divider */ | 1349 | /* calculate feedback divider */ |
1348 | n = c.ref_divider * output_freq; | 1350 | n = c.ref_divider * output_freq; |
1349 | d = c.ref_clk; | 1351 | d = c.ref_clk; |
1350 | 1352 | ||
1351 | pll->post_divider = post_dividers[i]; | ||
1352 | pll->feedback_divider = round_div(n, d); | 1353 | pll->feedback_divider = round_div(n, d); |
1353 | pll->vclk = vclk; | 1354 | pll->vclk = vclk; |
1354 | 1355 | ||
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index 7f9838dceab5..98c05bc0de44 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
@@ -396,6 +396,10 @@ static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo, | |||
396 | s1[i] = *s; | 396 | s1[i] = *s; |
397 | i++; | 397 | i++; |
398 | } | 398 | } |
399 | |||
400 | if (i > 4) | ||
401 | i = 4; | ||
402 | |||
399 | } while (*s++); | 403 | } while (*s++); |
400 | if (second) | 404 | if (second) |
401 | s2[i] = 0; | 405 | s2[i] = 0; |
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index bd39bbd88d41..151fda8dded0 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c | |||
@@ -172,7 +172,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda | |||
172 | 172 | ||
173 | new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL); | 173 | new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL); |
174 | if (unlikely(!new_bd)) | 174 | if (unlikely(!new_bd)) |
175 | return ERR_PTR(ENOMEM); | 175 | return ERR_PTR(-ENOMEM); |
176 | 176 | ||
177 | init_MUTEX(&new_bd->sem); | 177 | init_MUTEX(&new_bd->sem); |
178 | new_bd->props = bp; | 178 | new_bd->props = bp; |
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 9e32485ee7bb..86908a60c630 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c | |||
@@ -171,7 +171,7 @@ struct lcd_device *lcd_device_register(const char *name, void *devdata, | |||
171 | 171 | ||
172 | new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL); | 172 | new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL); |
173 | if (unlikely(!new_ld)) | 173 | if (unlikely(!new_ld)) |
174 | return ERR_PTR(ENOMEM); | 174 | return ERR_PTR(-ENOMEM); |
175 | 175 | ||
176 | init_MUTEX(&new_ld->sem); | 176 | init_MUTEX(&new_ld->sem); |
177 | new_ld->props = lp; | 177 | new_ld->props = lp; |
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c index ad416ae47596..7db42542eb19 100644 --- a/drivers/video/imsttfb.c +++ b/drivers/video/imsttfb.c | |||
@@ -1510,6 +1510,8 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1510 | default: | 1510 | default: |
1511 | printk(KERN_INFO "imsttfb: Device 0x%x unknown, " | 1511 | printk(KERN_INFO "imsttfb: Device 0x%x unknown, " |
1512 | "contact maintainer.\n", pdev->device); | 1512 | "contact maintainer.\n", pdev->device); |
1513 | release_mem_region(addr, size); | ||
1514 | framebuffer_release(info); | ||
1513 | return -ENODEV; | 1515 | return -ENODEV; |
1514 | } | 1516 | } |
1515 | 1517 | ||
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 6b8bd3cdf9c0..995b47c165a7 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -1333,33 +1333,35 @@ intelfb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
1333 | if (regno > 255) | 1333 | if (regno > 255) |
1334 | return 1; | 1334 | return 1; |
1335 | 1335 | ||
1336 | switch (dinfo->depth) { | 1336 | if (dinfo->depth == 8) { |
1337 | case 8: | 1337 | red >>= 8; |
1338 | { | 1338 | green >>= 8; |
1339 | red >>= 8; | 1339 | blue >>= 8; |
1340 | green >>= 8; | 1340 | |
1341 | blue >>= 8; | 1341 | intelfbhw_setcolreg(dinfo, regno, red, green, blue, |
1342 | transp); | ||
1343 | } | ||
1342 | 1344 | ||
1343 | intelfbhw_setcolreg(dinfo, regno, red, green, blue, | 1345 | if (regno < 16) { |
1344 | transp); | 1346 | switch (dinfo->depth) { |
1347 | case 15: | ||
1348 | dinfo->pseudo_palette[regno] = ((red & 0xf800) >> 1) | | ||
1349 | ((green & 0xf800) >> 6) | | ||
1350 | ((blue & 0xf800) >> 11); | ||
1351 | break; | ||
1352 | case 16: | ||
1353 | dinfo->pseudo_palette[regno] = (red & 0xf800) | | ||
1354 | ((green & 0xfc00) >> 5) | | ||
1355 | ((blue & 0xf800) >> 11); | ||
1356 | break; | ||
1357 | case 24: | ||
1358 | dinfo->pseudo_palette[regno] = ((red & 0xff00) << 8) | | ||
1359 | (green & 0xff00) | | ||
1360 | ((blue & 0xff00) >> 8); | ||
1361 | break; | ||
1345 | } | 1362 | } |
1346 | break; | ||
1347 | case 15: | ||
1348 | dinfo->pseudo_palette[regno] = ((red & 0xf800) >> 1) | | ||
1349 | ((green & 0xf800) >> 6) | | ||
1350 | ((blue & 0xf800) >> 11); | ||
1351 | break; | ||
1352 | case 16: | ||
1353 | dinfo->pseudo_palette[regno] = (red & 0xf800) | | ||
1354 | ((green & 0xfc00) >> 5) | | ||
1355 | ((blue & 0xf800) >> 11); | ||
1356 | break; | ||
1357 | case 24: | ||
1358 | dinfo->pseudo_palette[regno] = ((red & 0xff00) << 8) | | ||
1359 | (green & 0xff00) | | ||
1360 | ((blue & 0xff00) >> 8); | ||
1361 | break; | ||
1362 | } | 1363 | } |
1364 | |||
1363 | return 0; | 1365 | return 0; |
1364 | } | 1366 | } |
1365 | 1367 | ||
diff --git a/drivers/video/kyro/STG4000VTG.c b/drivers/video/kyro/STG4000VTG.c index 3690b04190af..bd389709d234 100644 --- a/drivers/video/kyro/STG4000VTG.c +++ b/drivers/video/kyro/STG4000VTG.c | |||
@@ -17,7 +17,7 @@ | |||
17 | void DisableVGA(volatile STG4000REG __iomem *pSTGReg) | 17 | void DisableVGA(volatile STG4000REG __iomem *pSTGReg) |
18 | { | 18 | { |
19 | u32 tmp; | 19 | u32 tmp; |
20 | volatile u32 count, i; | 20 | volatile u32 count = 0, i; |
21 | 21 | ||
22 | /* Reset the VGA registers */ | 22 | /* Reset the VGA registers */ |
23 | tmp = STG_READ_REG(SoftwareReset); | 23 | tmp = STG_READ_REG(SoftwareReset); |
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index a2e201dc40f7..b961d5601bd9 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c | |||
@@ -486,10 +486,8 @@ static void vgaHWRestore(const struct fb_info *info, | |||
486 | static inline int neo2200_sync(struct fb_info *info) | 486 | static inline int neo2200_sync(struct fb_info *info) |
487 | { | 487 | { |
488 | struct neofb_par *par = info->par; | 488 | struct neofb_par *par = info->par; |
489 | int waitcycles; | ||
490 | 489 | ||
491 | while (readl(&par->neo2200->bltStat) & 1) | 490 | while (readl(&par->neo2200->bltStat) & 1); |
492 | waitcycles++; | ||
493 | return 0; | 491 | return 0; |
494 | } | 492 | } |
495 | 493 | ||
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index e5d0f92eeae3..feec47bdd479 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c | |||
@@ -588,6 +588,7 @@ s1d13xxxfb_probe(struct platform_device *pdev) | |||
588 | goto bail; | 588 | goto bail; |
589 | } | 589 | } |
590 | 590 | ||
591 | platform_set_drvdata(pdev, info); | ||
591 | default_par = info->par; | 592 | default_par = info->par; |
592 | default_par->regs = ioremap_nocache(pdev->resource[1].start, | 593 | default_par->regs = ioremap_nocache(pdev->resource[1].start, |
593 | pdev->resource[1].end - pdev->resource[1].start +1); | 594 | pdev->resource[1].end - pdev->resource[1].start +1); |
@@ -638,8 +639,6 @@ s1d13xxxfb_probe(struct platform_device *pdev) | |||
638 | goto bail; | 639 | goto bail; |
639 | } | 640 | } |
640 | 641 | ||
641 | platform_set_drvdata(pdev, info); | ||
642 | |||
643 | printk(KERN_INFO "fb%d: %s frame buffer device\n", | 642 | printk(KERN_INFO "fb%d: %s frame buffer device\n", |
644 | info->node, info->fix.id); | 643 | info->node, info->fix.id); |
645 | 644 | ||
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index ab727eaa7f43..10e6b3aab9ea 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
@@ -2021,8 +2021,8 @@ static int __devinit savagefb_probe (struct pci_dev* dev, | |||
2021 | #if defined(CONFIG_FB_SAVAGE_I2C) | 2021 | #if defined(CONFIG_FB_SAVAGE_I2C) |
2022 | savagefb_create_i2c_busses(info); | 2022 | savagefb_create_i2c_busses(info); |
2023 | savagefb_probe_i2c_connector(info, &par->edid); | 2023 | savagefb_probe_i2c_connector(info, &par->edid); |
2024 | kfree(par->edid); | ||
2025 | fb_edid_to_monspecs(par->edid, &info->monspecs); | 2024 | fb_edid_to_monspecs(par->edid, &info->monspecs); |
2025 | kfree(par->edid); | ||
2026 | fb_videomode_to_modelist(info->monspecs.modedb, | 2026 | fb_videomode_to_modelist(info->monspecs.modedb, |
2027 | info->monspecs.modedb_len, | 2027 | info->monspecs.modedb_len, |
2028 | &info->modelist); | 2028 | &info->modelist); |
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index 3e7baf4c9fa8..5e5328d682db 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c | |||
@@ -786,28 +786,32 @@ static int tdfxfb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
786 | if (regno >= info->cmap.len || regno > 255) return 1; | 786 | if (regno >= info->cmap.len || regno > 255) return 1; |
787 | 787 | ||
788 | switch (info->fix.visual) { | 788 | switch (info->fix.visual) { |
789 | case FB_VISUAL_PSEUDOCOLOR: | 789 | case FB_VISUAL_PSEUDOCOLOR: |
790 | rgbcol =(((u32)red & 0xff00) << 8) | | 790 | rgbcol =(((u32)red & 0xff00) << 8) | |
791 | (((u32)green & 0xff00) << 0) | | 791 | (((u32)green & 0xff00) << 0) | |
792 | (((u32)blue & 0xff00) >> 8); | 792 | (((u32)blue & 0xff00) >> 8); |
793 | do_setpalentry(par, regno, rgbcol); | 793 | do_setpalentry(par, regno, rgbcol); |
794 | break; | 794 | break; |
795 | /* Truecolor has no hardware color palettes. */ | 795 | /* Truecolor has no hardware color palettes. */ |
796 | case FB_VISUAL_TRUECOLOR: | 796 | case FB_VISUAL_TRUECOLOR: |
797 | if (regno < 16) { | ||
797 | rgbcol = (CNVT_TOHW( red, info->var.red.length) << | 798 | rgbcol = (CNVT_TOHW( red, info->var.red.length) << |
798 | info->var.red.offset) | | 799 | info->var.red.offset) | |
799 | (CNVT_TOHW( green, info->var.green.length) << | 800 | (CNVT_TOHW( green, info->var.green.length) << |
800 | info->var.green.offset) | | 801 | info->var.green.offset) | |
801 | (CNVT_TOHW( blue, info->var.blue.length) << | 802 | (CNVT_TOHW( blue, info->var.blue.length) << |
802 | info->var.blue.offset) | | 803 | info->var.blue.offset) | |
803 | (CNVT_TOHW( transp, info->var.transp.length) << | 804 | (CNVT_TOHW( transp, info->var.transp.length) << |
804 | info->var.transp.offset); | 805 | info->var.transp.offset); |
805 | par->palette[regno] = rgbcol; | 806 | par->palette[regno] = rgbcol; |
806 | break; | 807 | } |
807 | default: | 808 | |
808 | DPRINTK("bad depth %u\n", info->var.bits_per_pixel); | 809 | break; |
809 | break; | 810 | default: |
811 | DPRINTK("bad depth %u\n", info->var.bits_per_pixel); | ||
812 | break; | ||
810 | } | 813 | } |
814 | |||
811 | return 0; | 815 | return 0; |
812 | } | 816 | } |
813 | 817 | ||