diff options
Diffstat (limited to 'drivers')
89 files changed, 614 insertions, 399 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 14f6a6201da3..05983a312d50 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -555,7 +555,7 @@ fore200e_pca_reset(struct fore200e* fore200e) | |||
555 | } | 555 | } |
556 | 556 | ||
557 | 557 | ||
558 | static int __init | 558 | static int __devinit |
559 | fore200e_pca_map(struct fore200e* fore200e) | 559 | fore200e_pca_map(struct fore200e* fore200e) |
560 | { | 560 | { |
561 | DPRINTK(2, "device %s being mapped in memory\n", fore200e->name); | 561 | DPRINTK(2, "device %s being mapped in memory\n", fore200e->name); |
@@ -589,7 +589,7 @@ fore200e_pca_unmap(struct fore200e* fore200e) | |||
589 | } | 589 | } |
590 | 590 | ||
591 | 591 | ||
592 | static int __init | 592 | static int __devinit |
593 | fore200e_pca_configure(struct fore200e* fore200e) | 593 | fore200e_pca_configure(struct fore200e* fore200e) |
594 | { | 594 | { |
595 | struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev; | 595 | struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev; |
@@ -2125,7 +2125,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags) | |||
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | 2127 | ||
2128 | static int __init | 2128 | static int __devinit |
2129 | fore200e_irq_request(struct fore200e* fore200e) | 2129 | fore200e_irq_request(struct fore200e* fore200e) |
2130 | { | 2130 | { |
2131 | if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) { | 2131 | if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) { |
@@ -2148,7 +2148,7 @@ fore200e_irq_request(struct fore200e* fore200e) | |||
2148 | } | 2148 | } |
2149 | 2149 | ||
2150 | 2150 | ||
2151 | static int __init | 2151 | static int __devinit |
2152 | fore200e_get_esi(struct fore200e* fore200e) | 2152 | fore200e_get_esi(struct fore200e* fore200e) |
2153 | { | 2153 | { |
2154 | struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); | 2154 | struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); |
@@ -2180,7 +2180,7 @@ fore200e_get_esi(struct fore200e* fore200e) | |||
2180 | } | 2180 | } |
2181 | 2181 | ||
2182 | 2182 | ||
2183 | static int __init | 2183 | static int __devinit |
2184 | fore200e_alloc_rx_buf(struct fore200e* fore200e) | 2184 | fore200e_alloc_rx_buf(struct fore200e* fore200e) |
2185 | { | 2185 | { |
2186 | int scheme, magn, nbr, size, i; | 2186 | int scheme, magn, nbr, size, i; |
@@ -2245,7 +2245,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e) | |||
2245 | } | 2245 | } |
2246 | 2246 | ||
2247 | 2247 | ||
2248 | static int __init | 2248 | static int __devinit |
2249 | fore200e_init_bs_queue(struct fore200e* fore200e) | 2249 | fore200e_init_bs_queue(struct fore200e* fore200e) |
2250 | { | 2250 | { |
2251 | int scheme, magn, i; | 2251 | int scheme, magn, i; |
@@ -2308,7 +2308,7 @@ fore200e_init_bs_queue(struct fore200e* fore200e) | |||
2308 | } | 2308 | } |
2309 | 2309 | ||
2310 | 2310 | ||
2311 | static int __init | 2311 | static int __devinit |
2312 | fore200e_init_rx_queue(struct fore200e* fore200e) | 2312 | fore200e_init_rx_queue(struct fore200e* fore200e) |
2313 | { | 2313 | { |
2314 | struct host_rxq* rxq = &fore200e->host_rxq; | 2314 | struct host_rxq* rxq = &fore200e->host_rxq; |
@@ -2368,7 +2368,7 @@ fore200e_init_rx_queue(struct fore200e* fore200e) | |||
2368 | } | 2368 | } |
2369 | 2369 | ||
2370 | 2370 | ||
2371 | static int __init | 2371 | static int __devinit |
2372 | fore200e_init_tx_queue(struct fore200e* fore200e) | 2372 | fore200e_init_tx_queue(struct fore200e* fore200e) |
2373 | { | 2373 | { |
2374 | struct host_txq* txq = &fore200e->host_txq; | 2374 | struct host_txq* txq = &fore200e->host_txq; |
@@ -2431,7 +2431,7 @@ fore200e_init_tx_queue(struct fore200e* fore200e) | |||
2431 | } | 2431 | } |
2432 | 2432 | ||
2433 | 2433 | ||
2434 | static int __init | 2434 | static int __devinit |
2435 | fore200e_init_cmd_queue(struct fore200e* fore200e) | 2435 | fore200e_init_cmd_queue(struct fore200e* fore200e) |
2436 | { | 2436 | { |
2437 | struct host_cmdq* cmdq = &fore200e->host_cmdq; | 2437 | struct host_cmdq* cmdq = &fore200e->host_cmdq; |
@@ -2487,7 +2487,7 @@ fore200e_param_bs_queue(struct fore200e* fore200e, | |||
2487 | } | 2487 | } |
2488 | 2488 | ||
2489 | 2489 | ||
2490 | static int __init | 2490 | static int __devinit |
2491 | fore200e_initialize(struct fore200e* fore200e) | 2491 | fore200e_initialize(struct fore200e* fore200e) |
2492 | { | 2492 | { |
2493 | struct cp_queues __iomem * cpq; | 2493 | struct cp_queues __iomem * cpq; |
@@ -2539,7 +2539,7 @@ fore200e_initialize(struct fore200e* fore200e) | |||
2539 | } | 2539 | } |
2540 | 2540 | ||
2541 | 2541 | ||
2542 | static void __init | 2542 | static void __devinit |
2543 | fore200e_monitor_putc(struct fore200e* fore200e, char c) | 2543 | fore200e_monitor_putc(struct fore200e* fore200e, char c) |
2544 | { | 2544 | { |
2545 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; | 2545 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; |
@@ -2551,7 +2551,7 @@ fore200e_monitor_putc(struct fore200e* fore200e, char c) | |||
2551 | } | 2551 | } |
2552 | 2552 | ||
2553 | 2553 | ||
2554 | static int __init | 2554 | static int __devinit |
2555 | fore200e_monitor_getc(struct fore200e* fore200e) | 2555 | fore200e_monitor_getc(struct fore200e* fore200e) |
2556 | { | 2556 | { |
2557 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; | 2557 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; |
@@ -2576,7 +2576,7 @@ fore200e_monitor_getc(struct fore200e* fore200e) | |||
2576 | } | 2576 | } |
2577 | 2577 | ||
2578 | 2578 | ||
2579 | static void __init | 2579 | static void __devinit |
2580 | fore200e_monitor_puts(struct fore200e* fore200e, char* str) | 2580 | fore200e_monitor_puts(struct fore200e* fore200e, char* str) |
2581 | { | 2581 | { |
2582 | while (*str) { | 2582 | while (*str) { |
@@ -2591,7 +2591,7 @@ fore200e_monitor_puts(struct fore200e* fore200e, char* str) | |||
2591 | } | 2591 | } |
2592 | 2592 | ||
2593 | 2593 | ||
2594 | static int __init | 2594 | static int __devinit |
2595 | fore200e_start_fw(struct fore200e* fore200e) | 2595 | fore200e_start_fw(struct fore200e* fore200e) |
2596 | { | 2596 | { |
2597 | int ok; | 2597 | int ok; |
@@ -2622,7 +2622,7 @@ fore200e_start_fw(struct fore200e* fore200e) | |||
2622 | } | 2622 | } |
2623 | 2623 | ||
2624 | 2624 | ||
2625 | static int __init | 2625 | static int __devinit |
2626 | fore200e_load_fw(struct fore200e* fore200e) | 2626 | fore200e_load_fw(struct fore200e* fore200e) |
2627 | { | 2627 | { |
2628 | u32* fw_data = (u32*) fore200e->bus->fw_data; | 2628 | u32* fw_data = (u32*) fore200e->bus->fw_data; |
@@ -2648,7 +2648,7 @@ fore200e_load_fw(struct fore200e* fore200e) | |||
2648 | } | 2648 | } |
2649 | 2649 | ||
2650 | 2650 | ||
2651 | static int __init | 2651 | static int __devinit |
2652 | fore200e_register(struct fore200e* fore200e) | 2652 | fore200e_register(struct fore200e* fore200e) |
2653 | { | 2653 | { |
2654 | struct atm_dev* atm_dev; | 2654 | struct atm_dev* atm_dev; |
@@ -2675,7 +2675,7 @@ fore200e_register(struct fore200e* fore200e) | |||
2675 | } | 2675 | } |
2676 | 2676 | ||
2677 | 2677 | ||
2678 | static int __init | 2678 | static int __devinit |
2679 | fore200e_init(struct fore200e* fore200e) | 2679 | fore200e_init(struct fore200e* fore200e) |
2680 | { | 2680 | { |
2681 | if (fore200e_register(fore200e) < 0) | 2681 | if (fore200e_register(fore200e) < 0) |
@@ -2721,7 +2721,7 @@ fore200e_init(struct fore200e* fore200e) | |||
2721 | return -EBUSY; | 2721 | return -EBUSY; |
2722 | 2722 | ||
2723 | fore200e_supply(fore200e); | 2723 | fore200e_supply(fore200e); |
2724 | 2724 | ||
2725 | /* all done, board initialization is now complete */ | 2725 | /* all done, board initialization is now complete */ |
2726 | fore200e->state = FORE200E_STATE_COMPLETE; | 2726 | fore200e->state = FORE200E_STATE_COMPLETE; |
2727 | return 0; | 2727 | return 0; |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 6ede1f352c29..37b8cda3e8bc 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/timer.h> | 41 | #include <linux/timer.h> |
42 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
43 | #include <linux/init.h> | 43 | #include <linux/init.h> |
44 | #include <linux/random.h> | ||
44 | #include <asm/io.h> | 45 | #include <asm/io.h> |
45 | #include <asm/uaccess.h> | 46 | #include <asm/uaccess.h> |
46 | #include "DAC960.h" | 47 | #include "DAC960.h" |
@@ -3463,7 +3464,7 @@ static inline boolean DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, | |||
3463 | Command->SegmentCount, Command->DmaDirection); | 3464 | Command->SegmentCount, Command->DmaDirection); |
3464 | 3465 | ||
3465 | if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) { | 3466 | if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) { |
3466 | 3467 | add_disk_randomness(Request->rq_disk); | |
3467 | end_that_request_last(Request, UpToDate); | 3468 | end_that_request_last(Request, UpToDate); |
3468 | 3469 | ||
3469 | if (Command->Completion) { | 3470 | if (Command->Completion) { |
diff --git a/drivers/char/hw_random.c b/drivers/char/hw_random.c index b3bc2e37e616..29dc87e59020 100644 --- a/drivers/char/hw_random.c +++ b/drivers/char/hw_random.c | |||
@@ -131,7 +131,9 @@ enum { | |||
131 | rng_hw_none, | 131 | rng_hw_none, |
132 | rng_hw_intel, | 132 | rng_hw_intel, |
133 | rng_hw_amd, | 133 | rng_hw_amd, |
134 | #ifdef __i386__ | ||
134 | rng_hw_via, | 135 | rng_hw_via, |
136 | #endif | ||
135 | rng_hw_geode, | 137 | rng_hw_geode, |
136 | }; | 138 | }; |
137 | 139 | ||
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index c92378121b4c..1b05fa688996 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c | |||
@@ -675,7 +675,7 @@ static int __init mmtimer_init(void) | |||
675 | cnodeid_t node, maxn = -1; | 675 | cnodeid_t node, maxn = -1; |
676 | 676 | ||
677 | if (!ia64_platform_is("sn2")) | 677 | if (!ia64_platform_is("sn2")) |
678 | return -1; | 678 | return 0; |
679 | 679 | ||
680 | /* | 680 | /* |
681 | * Sanity check the cycles/sec variable | 681 | * Sanity check the cycles/sec variable |
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/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 2d2d4ac3525a..960dae5c87d1 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -1155,6 +1155,12 @@ static int srp_send_tsk_mgmt(struct scsi_cmnd *scmnd, u8 func) | |||
1155 | 1155 | ||
1156 | spin_lock_irq(target->scsi_host->host_lock); | 1156 | spin_lock_irq(target->scsi_host->host_lock); |
1157 | 1157 | ||
1158 | if (target->state == SRP_TARGET_DEAD || | ||
1159 | target->state == SRP_TARGET_REMOVED) { | ||
1160 | scmnd->result = DID_BAD_TARGET << 16; | ||
1161 | goto out; | ||
1162 | } | ||
1163 | |||
1158 | if (scmnd->host_scribble == (void *) -1L) | 1164 | if (scmnd->host_scribble == (void *) -1L) |
1159 | goto out; | 1165 | goto out; |
1160 | 1166 | ||
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/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 8159bcecd0c2..df9d65201819 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c | |||
@@ -1929,6 +1929,8 @@ static struct pci_device_id hisax_pci_tbl[] __initdata = { | |||
1929 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, PCI_ANY_ID, PCI_ANY_ID}, | 1929 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, PCI_ANY_ID, PCI_ANY_ID}, |
1930 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, PCI_ANY_ID, PCI_ANY_ID}, | 1930 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, PCI_ANY_ID, PCI_ANY_ID}, |
1931 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, PCI_ANY_ID, PCI_ANY_ID}, | 1931 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, PCI_ANY_ID, PCI_ANY_ID}, |
1932 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B700, PCI_ANY_ID, PCI_ANY_ID}, | ||
1933 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B701, PCI_ANY_ID, PCI_ANY_ID}, | ||
1932 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, PCI_ANY_ID, PCI_ANY_ID}, | 1934 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, PCI_ANY_ID, PCI_ANY_ID}, |
1933 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, PCI_ANY_ID, PCI_ANY_ID}, | 1935 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, PCI_ANY_ID, PCI_ANY_ID}, |
1934 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, PCI_ANY_ID, PCI_ANY_ID}, | 1936 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, PCI_ANY_ID, PCI_ANY_ID}, |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 4866fc32d8d9..91d25acb5ede 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
@@ -51,6 +51,8 @@ static const PCI_ENTRY id_list[] = | |||
51 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, "Billion", "B00B"}, | 51 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, "Billion", "B00B"}, |
52 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, "Billion", "B00C"}, | 52 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, "Billion", "B00C"}, |
53 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, "Seyeon", "B100"}, | 53 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, "Seyeon", "B100"}, |
54 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B700, "Primux II S0", "B700"}, | ||
55 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B701, "Primux II S0 NT", "B701"}, | ||
54 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, "Abocom/Magitek", "2BD1"}, | 56 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, "Abocom/Magitek", "2BD1"}, |
55 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, "Asuscom/Askey", "675"}, | 57 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, "Asuscom/Askey", "675"}, |
56 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, "German telekom", "T-Concept"}, | 58 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, "German telekom", "T-Concept"}, |
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index ca5b4a3b683e..262c44127419 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * hfc_usb.c | 2 | * hfc_usb.c |
3 | * | 3 | * |
4 | * $Id: hfc_usb.c,v 4.36 2005/04/08 09:55:13 martinb1 Exp $ | 4 | * $Id: hfc_usb.c,v 2.3.2.13 2006/02/17 17:17:22 mbachem Exp $ |
5 | * | 5 | * |
6 | * modular HiSax ISDN driver for Colognechip HFC-S USB chip | 6 | * modular HiSax ISDN driver for Colognechip HFC-S USB chip |
7 | * | 7 | * |
@@ -45,7 +45,7 @@ | |||
45 | #include "hfc_usb.h" | 45 | #include "hfc_usb.h" |
46 | 46 | ||
47 | static const char *hfcusb_revision = | 47 | static const char *hfcusb_revision = |
48 | "$Revision: 4.36 $ $Date: 2005/04/08 09:55:13 $ "; | 48 | "$Revision: 2.3.2.13 $ $Date: 2006/02/17 17:17:22 $ "; |
49 | 49 | ||
50 | /* Hisax debug support | 50 | /* Hisax debug support |
51 | * use "modprobe debug=x" where x is bitfield of USB_DBG & ISDN_DBG | 51 | * use "modprobe debug=x" where x is bitfield of USB_DBG & ISDN_DBG |
@@ -219,7 +219,7 @@ symbolic(struct hfcusb_symbolic_list list[], const int num) | |||
219 | for (i = 0; list[i].name != NULL; i++) | 219 | for (i = 0; list[i].name != NULL; i++) |
220 | if (list[i].num == num) | 220 | if (list[i].num == num) |
221 | return (list[i].name); | 221 | return (list[i].name); |
222 | return "<unkown ERROR>"; | 222 | return "<unknown ERROR>"; |
223 | } | 223 | } |
224 | 224 | ||
225 | 225 | ||
@@ -235,9 +235,9 @@ ctrl_start_transfer(hfcusb_data * hfc) | |||
235 | hfc->ctrl_urb->transfer_buffer = NULL; | 235 | hfc->ctrl_urb->transfer_buffer = NULL; |
236 | hfc->ctrl_urb->transfer_buffer_length = 0; | 236 | hfc->ctrl_urb->transfer_buffer_length = 0; |
237 | hfc->ctrl_write.wIndex = | 237 | hfc->ctrl_write.wIndex = |
238 | hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg; | 238 | cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg); |
239 | hfc->ctrl_write.wValue = | 239 | hfc->ctrl_write.wValue = |
240 | hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val; | 240 | cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val); |
241 | 241 | ||
242 | usb_submit_urb(hfc->ctrl_urb, GFP_ATOMIC); /* start transfer */ | 242 | usb_submit_urb(hfc->ctrl_urb, GFP_ATOMIC); /* start transfer */ |
243 | } | 243 | } |
@@ -1282,7 +1282,7 @@ usb_init(hfcusb_data * hfc) | |||
1282 | /* init the background machinery for control requests */ | 1282 | /* init the background machinery for control requests */ |
1283 | hfc->ctrl_read.bRequestType = 0xc0; | 1283 | hfc->ctrl_read.bRequestType = 0xc0; |
1284 | hfc->ctrl_read.bRequest = 1; | 1284 | hfc->ctrl_read.bRequest = 1; |
1285 | hfc->ctrl_read.wLength = 1; | 1285 | hfc->ctrl_read.wLength = cpu_to_le16(1); |
1286 | hfc->ctrl_write.bRequestType = 0x40; | 1286 | hfc->ctrl_write.bRequestType = 0x40; |
1287 | hfc->ctrl_write.bRequest = 0; | 1287 | hfc->ctrl_write.bRequest = 0; |
1288 | hfc->ctrl_write.wLength = 0; | 1288 | hfc->ctrl_write.wLength = 0; |
@@ -1373,9 +1373,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1373 | 1373 | ||
1374 | vend_idx = 0xffff; | 1374 | vend_idx = 0xffff; |
1375 | for (i = 0; hfcusb_idtab[i].idVendor; i++) { | 1375 | for (i = 0; hfcusb_idtab[i].idVendor; i++) { |
1376 | if (dev->descriptor.idVendor == hfcusb_idtab[i].idVendor | 1376 | if ((le16_to_cpu(dev->descriptor.idVendor) == hfcusb_idtab[i].idVendor) |
1377 | && dev->descriptor.idProduct == | 1377 | && (le16_to_cpu(dev->descriptor.idProduct) == hfcusb_idtab[i].idProduct)) { |
1378 | hfcusb_idtab[i].idProduct) { | ||
1379 | vend_idx = i; | 1378 | vend_idx = i; |
1380 | continue; | 1379 | continue; |
1381 | } | 1380 | } |
@@ -1516,8 +1515,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1516 | usb_transfer_mode | 1515 | usb_transfer_mode |
1517 | = USB_INT; | 1516 | = USB_INT; |
1518 | packet_size = | 1517 | packet_size = |
1519 | ep->desc. | 1518 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1520 | wMaxPacketSize; | ||
1521 | break; | 1519 | break; |
1522 | case USB_ENDPOINT_XFER_BULK: | 1520 | case USB_ENDPOINT_XFER_BULK: |
1523 | if (ep_addr & 0x80) | 1521 | if (ep_addr & 0x80) |
@@ -1545,8 +1543,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1545 | usb_transfer_mode | 1543 | usb_transfer_mode |
1546 | = USB_BULK; | 1544 | = USB_BULK; |
1547 | packet_size = | 1545 | packet_size = |
1548 | ep->desc. | 1546 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1549 | wMaxPacketSize; | ||
1550 | break; | 1547 | break; |
1551 | case USB_ENDPOINT_XFER_ISOC: | 1548 | case USB_ENDPOINT_XFER_ISOC: |
1552 | if (ep_addr & 0x80) | 1549 | if (ep_addr & 0x80) |
@@ -1574,8 +1571,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1574 | usb_transfer_mode | 1571 | usb_transfer_mode |
1575 | = USB_ISOC; | 1572 | = USB_ISOC; |
1576 | iso_packet_size = | 1573 | iso_packet_size = |
1577 | ep->desc. | 1574 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1578 | wMaxPacketSize; | ||
1579 | break; | 1575 | break; |
1580 | default: | 1576 | default: |
1581 | context-> | 1577 | context-> |
@@ -1588,10 +1584,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1588 | fifonum = cidx; | 1584 | fifonum = cidx; |
1589 | context->fifos[cidx].hfc = | 1585 | context->fifos[cidx].hfc = |
1590 | context; | 1586 | context; |
1591 | context->fifos[cidx]. | 1587 | context->fifos[cidx].usb_packet_maxlen = |
1592 | usb_packet_maxlen = | 1588 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1593 | ep->desc. | ||
1594 | wMaxPacketSize; | ||
1595 | context->fifos[cidx]. | 1589 | context->fifos[cidx]. |
1596 | intervall = | 1590 | intervall = |
1597 | ep->desc.bInterval; | 1591 | ep->desc.bInterval; |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 393633681f49..aeaa1db74bd8 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -1682,6 +1682,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp) | |||
1682 | #ifdef ISDN_DEBUG_MODEM_OPEN | 1682 | #ifdef ISDN_DEBUG_MODEM_OPEN |
1683 | printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n"); | 1683 | printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n"); |
1684 | #endif | 1684 | #endif |
1685 | module_put(info->owner); | ||
1685 | return; | 1686 | return; |
1686 | } | 1687 | } |
1687 | info->flags |= ISDN_ASYNC_CLOSING; | 1688 | info->flags |= ISDN_ASYNC_CLOSING; |
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/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index bb8d5efe19bf..6c0ba04bc57a 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | 37 | ||
38 | #include <asm/prom.h> | ||
39 | |||
38 | #include "windfarm.h" | 40 | #include "windfarm.h" |
39 | 41 | ||
40 | #define VERSION "0.2" | 42 | #define VERSION "0.2" |
@@ -465,6 +467,11 @@ static int __init windfarm_core_init(void) | |||
465 | { | 467 | { |
466 | DBG("wf: core loaded\n"); | 468 | DBG("wf: core loaded\n"); |
467 | 469 | ||
470 | /* Don't register on old machines that use therm_pm72 for now */ | ||
471 | if (machine_is_compatible("PowerMac7,2") || | ||
472 | machine_is_compatible("PowerMac7,3") || | ||
473 | machine_is_compatible("RackMac3,1")) | ||
474 | return -ENODEV; | ||
468 | platform_device_register(&wf_platform_device); | 475 | platform_device_register(&wf_platform_device); |
469 | return 0; | 476 | return 0; |
470 | } | 477 | } |
diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh/windfarm_cpufreq_clamp.c index 607dbaca69c9..81337cd16e80 100644 --- a/drivers/macintosh/windfarm_cpufreq_clamp.c +++ b/drivers/macintosh/windfarm_cpufreq_clamp.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/wait.h> | 8 | #include <linux/wait.h> |
9 | #include <linux/cpufreq.h> | 9 | #include <linux/cpufreq.h> |
10 | 10 | ||
11 | #include <asm/prom.h> | ||
12 | |||
11 | #include "windfarm.h" | 13 | #include "windfarm.h" |
12 | 14 | ||
13 | #define VERSION "0.3" | 15 | #define VERSION "0.3" |
@@ -74,6 +76,12 @@ static int __init wf_cpufreq_clamp_init(void) | |||
74 | { | 76 | { |
75 | struct wf_control *clamp; | 77 | struct wf_control *clamp; |
76 | 78 | ||
79 | /* Don't register on old machines that use therm_pm72 for now */ | ||
80 | if (machine_is_compatible("PowerMac7,2") || | ||
81 | machine_is_compatible("PowerMac7,3") || | ||
82 | machine_is_compatible("RackMac3,1")) | ||
83 | return -ENODEV; | ||
84 | |||
77 | clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); | 85 | clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); |
78 | if (clamp == NULL) | 86 | if (clamp == NULL) |
79 | return -ENOMEM; | 87 | return -ENOMEM; |
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index 906d3ecae6e6..423bfa2432c0 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include "windfarm.h" | 26 | #include "windfarm.h" |
27 | 27 | ||
28 | #define VERSION "0.1" | 28 | #define VERSION "0.2" |
29 | 29 | ||
30 | #undef DEBUG | 30 | #undef DEBUG |
31 | 31 | ||
@@ -113,6 +113,7 @@ static struct wf_lm75_sensor *wf_lm75_create(struct i2c_adapter *adapter, | |||
113 | const char *loc) | 113 | const char *loc) |
114 | { | 114 | { |
115 | struct wf_lm75_sensor *lm; | 115 | struct wf_lm75_sensor *lm; |
116 | int rc; | ||
116 | 117 | ||
117 | DBG("wf_lm75: creating %s device at address 0x%02x\n", | 118 | DBG("wf_lm75: creating %s device at address 0x%02x\n", |
118 | ds1775 ? "ds1775" : "lm75", addr); | 119 | ds1775 ? "ds1775" : "lm75", addr); |
@@ -139,9 +140,11 @@ static struct wf_lm75_sensor *wf_lm75_create(struct i2c_adapter *adapter, | |||
139 | lm->i2c.driver = &wf_lm75_driver; | 140 | lm->i2c.driver = &wf_lm75_driver; |
140 | strncpy(lm->i2c.name, lm->sens.name, I2C_NAME_SIZE-1); | 141 | strncpy(lm->i2c.name, lm->sens.name, I2C_NAME_SIZE-1); |
141 | 142 | ||
142 | if (i2c_attach_client(&lm->i2c)) { | 143 | rc = i2c_attach_client(&lm->i2c); |
143 | printk(KERN_ERR "windfarm: failed to attach %s %s to i2c\n", | 144 | if (rc) { |
144 | ds1775 ? "ds1775" : "lm75", lm->i2c.name); | 145 | printk(KERN_ERR "windfarm: failed to attach %s %s to i2c," |
146 | " err %d\n", ds1775 ? "ds1775" : "lm75", | ||
147 | lm->i2c.name, rc); | ||
145 | goto fail; | 148 | goto fail; |
146 | } | 149 | } |
147 | 150 | ||
@@ -175,16 +178,22 @@ static int wf_lm75_attach(struct i2c_adapter *adapter) | |||
175 | (dev = of_get_next_child(busnode, dev)) != NULL;) { | 178 | (dev = of_get_next_child(busnode, dev)) != NULL;) { |
176 | const char *loc = | 179 | const char *loc = |
177 | get_property(dev, "hwsensor-location", NULL); | 180 | get_property(dev, "hwsensor-location", NULL); |
178 | u32 *reg = (u32 *)get_property(dev, "reg", NULL); | 181 | u8 addr; |
179 | DBG(" dev: %s... (loc: %p, reg: %p)\n", dev->name, loc, reg); | 182 | |
180 | if (loc == NULL || reg == NULL) | 183 | /* We must re-match the adapter in order to properly check |
184 | * the channel on multibus setups | ||
185 | */ | ||
186 | if (!pmac_i2c_match_adapter(dev, adapter)) | ||
187 | continue; | ||
188 | addr = pmac_i2c_get_dev_addr(dev); | ||
189 | if (loc == NULL || addr == 0) | ||
181 | continue; | 190 | continue; |
182 | /* real lm75 */ | 191 | /* real lm75 */ |
183 | if (device_is_compatible(dev, "lm75")) | 192 | if (device_is_compatible(dev, "lm75")) |
184 | wf_lm75_create(adapter, *reg, 0, loc); | 193 | wf_lm75_create(adapter, addr, 0, loc); |
185 | /* ds1775 (compatible, better resolution */ | 194 | /* ds1775 (compatible, better resolution */ |
186 | else if (device_is_compatible(dev, "ds1775")) | 195 | else if (device_is_compatible(dev, "ds1775")) |
187 | wf_lm75_create(adapter, *reg, 1, loc); | 196 | wf_lm75_create(adapter, addr, 1, loc); |
188 | } | 197 | } |
189 | return 0; | 198 | return 0; |
190 | } | 199 | } |
@@ -206,6 +215,11 @@ static int wf_lm75_detach(struct i2c_client *client) | |||
206 | 215 | ||
207 | static int __init wf_lm75_sensor_init(void) | 216 | static int __init wf_lm75_sensor_init(void) |
208 | { | 217 | { |
218 | /* Don't register on old machines that use therm_pm72 for now */ | ||
219 | if (machine_is_compatible("PowerMac7,2") || | ||
220 | machine_is_compatible("PowerMac7,3") || | ||
221 | machine_is_compatible("RackMac3,1")) | ||
222 | return -ENODEV; | ||
209 | return i2c_add_driver(&wf_lm75_driver); | 223 | return i2c_add_driver(&wf_lm75_driver); |
210 | } | 224 | } |
211 | 225 | ||
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c index 5b9ad6ca7cba..8e99d408fddd 100644 --- a/drivers/macintosh/windfarm_max6690_sensor.c +++ b/drivers/macintosh/windfarm_max6690_sensor.c | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include "windfarm.h" | 18 | #include "windfarm.h" |
19 | 19 | ||
20 | #define VERSION "0.1" | 20 | #define VERSION "0.2" |
21 | 21 | ||
22 | /* This currently only exports the external temperature sensor, | 22 | /* This currently only exports the external temperature sensor, |
23 | since that's all the control loops need. */ | 23 | since that's all the control loops need. */ |
@@ -81,7 +81,7 @@ static struct wf_sensor_ops wf_max6690_ops = { | |||
81 | static void wf_max6690_create(struct i2c_adapter *adapter, u8 addr) | 81 | static void wf_max6690_create(struct i2c_adapter *adapter, u8 addr) |
82 | { | 82 | { |
83 | struct wf_6690_sensor *max; | 83 | struct wf_6690_sensor *max; |
84 | char *name = "u4-temp"; | 84 | char *name = "backside-temp"; |
85 | 85 | ||
86 | max = kzalloc(sizeof(struct wf_6690_sensor), GFP_KERNEL); | 86 | max = kzalloc(sizeof(struct wf_6690_sensor), GFP_KERNEL); |
87 | if (max == NULL) { | 87 | if (max == NULL) { |
@@ -118,7 +118,6 @@ static int wf_max6690_attach(struct i2c_adapter *adapter) | |||
118 | struct device_node *busnode, *dev = NULL; | 118 | struct device_node *busnode, *dev = NULL; |
119 | struct pmac_i2c_bus *bus; | 119 | struct pmac_i2c_bus *bus; |
120 | const char *loc; | 120 | const char *loc; |
121 | u32 *reg; | ||
122 | 121 | ||
123 | bus = pmac_i2c_adapter_to_bus(adapter); | 122 | bus = pmac_i2c_adapter_to_bus(adapter); |
124 | if (bus == NULL) | 123 | if (bus == NULL) |
@@ -126,16 +125,23 @@ static int wf_max6690_attach(struct i2c_adapter *adapter) | |||
126 | busnode = pmac_i2c_get_bus_node(bus); | 125 | busnode = pmac_i2c_get_bus_node(bus); |
127 | 126 | ||
128 | while ((dev = of_get_next_child(busnode, dev)) != NULL) { | 127 | while ((dev = of_get_next_child(busnode, dev)) != NULL) { |
128 | u8 addr; | ||
129 | |||
130 | /* We must re-match the adapter in order to properly check | ||
131 | * the channel on multibus setups | ||
132 | */ | ||
133 | if (!pmac_i2c_match_adapter(dev, adapter)) | ||
134 | continue; | ||
129 | if (!device_is_compatible(dev, "max6690")) | 135 | if (!device_is_compatible(dev, "max6690")) |
130 | continue; | 136 | continue; |
137 | addr = pmac_i2c_get_dev_addr(dev); | ||
131 | loc = get_property(dev, "hwsensor-location", NULL); | 138 | loc = get_property(dev, "hwsensor-location", NULL); |
132 | reg = (u32 *) get_property(dev, "reg", NULL); | 139 | if (loc == NULL || addr == 0) |
133 | if (!loc || !reg) | ||
134 | continue; | 140 | continue; |
135 | printk("found max6690, loc=%s reg=%x\n", loc, *reg); | 141 | printk("found max6690, loc=%s addr=0x%02x\n", loc, addr); |
136 | if (strcmp(loc, "BACKSIDE")) | 142 | if (strcmp(loc, "BACKSIDE")) |
137 | continue; | 143 | continue; |
138 | wf_max6690_create(adapter, *reg); | 144 | wf_max6690_create(adapter, addr); |
139 | } | 145 | } |
140 | 146 | ||
141 | return 0; | 147 | return 0; |
@@ -153,6 +159,11 @@ static int wf_max6690_detach(struct i2c_client *client) | |||
153 | 159 | ||
154 | static int __init wf_max6690_sensor_init(void) | 160 | static int __init wf_max6690_sensor_init(void) |
155 | { | 161 | { |
162 | /* Don't register on old machines that use therm_pm72 for now */ | ||
163 | if (machine_is_compatible("PowerMac7,2") || | ||
164 | machine_is_compatible("PowerMac7,3") || | ||
165 | machine_is_compatible("RackMac3,1")) | ||
166 | return -ENODEV; | ||
156 | return i2c_add_driver(&wf_max6690_driver); | 167 | return i2c_add_driver(&wf_max6690_driver); |
157 | } | 168 | } |
158 | 169 | ||
diff --git a/drivers/macintosh/windfarm_pid.c b/drivers/macintosh/windfarm_pid.c index 0842432e27ad..f10efb28cae4 100644 --- a/drivers/macintosh/windfarm_pid.c +++ b/drivers/macintosh/windfarm_pid.c | |||
@@ -143,3 +143,7 @@ s32 wf_cpu_pid_run(struct wf_cpu_pid_state *st, s32 new_power, s32 new_temp) | |||
143 | return st->target; | 143 | return st->target; |
144 | } | 144 | } |
145 | EXPORT_SYMBOL_GPL(wf_cpu_pid_run); | 145 | EXPORT_SYMBOL_GPL(wf_cpu_pid_run); |
146 | |||
147 | MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); | ||
148 | MODULE_DESCRIPTION("PID algorithm for PowerMacs thermal control"); | ||
149 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c index c2a4e689c784..ef66bf2778ec 100644 --- a/drivers/macintosh/windfarm_pm112.c +++ b/drivers/macintosh/windfarm_pm112.c | |||
@@ -358,6 +358,7 @@ static void backside_fan_tick(void) | |||
358 | return; | 358 | return; |
359 | if (!backside_tick) { | 359 | if (!backside_tick) { |
360 | /* first time; initialize things */ | 360 | /* first time; initialize things */ |
361 | printk(KERN_INFO "windfarm: Backside control loop started.\n"); | ||
361 | backside_param.min = backside_fan->ops->get_min(backside_fan); | 362 | backside_param.min = backside_fan->ops->get_min(backside_fan); |
362 | backside_param.max = backside_fan->ops->get_max(backside_fan); | 363 | backside_param.max = backside_fan->ops->get_max(backside_fan); |
363 | wf_pid_init(&backside_pid, &backside_param); | 364 | wf_pid_init(&backside_pid, &backside_param); |
@@ -407,6 +408,7 @@ static void drive_bay_fan_tick(void) | |||
407 | return; | 408 | return; |
408 | if (!drive_bay_tick) { | 409 | if (!drive_bay_tick) { |
409 | /* first time; initialize things */ | 410 | /* first time; initialize things */ |
411 | printk(KERN_INFO "windfarm: Drive bay control loop started.\n"); | ||
410 | drive_bay_prm.min = drive_bay_fan->ops->get_min(drive_bay_fan); | 412 | drive_bay_prm.min = drive_bay_fan->ops->get_min(drive_bay_fan); |
411 | drive_bay_prm.max = drive_bay_fan->ops->get_max(drive_bay_fan); | 413 | drive_bay_prm.max = drive_bay_fan->ops->get_max(drive_bay_fan); |
412 | wf_pid_init(&drive_bay_pid, &drive_bay_prm); | 414 | wf_pid_init(&drive_bay_pid, &drive_bay_prm); |
@@ -458,6 +460,7 @@ static void slots_fan_tick(void) | |||
458 | return; | 460 | return; |
459 | if (!slots_started) { | 461 | if (!slots_started) { |
460 | /* first time; initialize things */ | 462 | /* first time; initialize things */ |
463 | printk(KERN_INFO "windfarm: Slots control loop started.\n"); | ||
461 | wf_pid_init(&slots_pid, &slots_param); | 464 | wf_pid_init(&slots_pid, &slots_param); |
462 | slots_started = 1; | 465 | slots_started = 1; |
463 | } | 466 | } |
@@ -504,6 +507,7 @@ static void pm112_tick(void) | |||
504 | 507 | ||
505 | if (!started) { | 508 | if (!started) { |
506 | started = 1; | 509 | started = 1; |
510 | printk(KERN_INFO "windfarm: CPUs control loops started.\n"); | ||
507 | for (i = 0; i < nr_cores; ++i) { | 511 | for (i = 0; i < nr_cores; ++i) { |
508 | if (create_cpu_loop(i) < 0) { | 512 | if (create_cpu_loop(i) < 0) { |
509 | failure_state = FAILURE_PERM; | 513 | failure_state = FAILURE_PERM; |
@@ -594,8 +598,6 @@ static void pm112_new_sensor(struct wf_sensor *sr) | |||
594 | { | 598 | { |
595 | unsigned int i; | 599 | unsigned int i; |
596 | 600 | ||
597 | if (have_all_sensors) | ||
598 | return; | ||
599 | if (!strncmp(sr->name, "cpu-temp-", 9)) { | 601 | if (!strncmp(sr->name, "cpu-temp-", 9)) { |
600 | i = sr->name[9] - '0'; | 602 | i = sr->name[9] - '0'; |
601 | if (sr->name[10] == 0 && i < NR_CORES && | 603 | if (sr->name[10] == 0 && i < NR_CORES && |
@@ -613,7 +615,7 @@ static void pm112_new_sensor(struct wf_sensor *sr) | |||
613 | } else if (!strcmp(sr->name, "slots-power")) { | 615 | } else if (!strcmp(sr->name, "slots-power")) { |
614 | if (slots_power == NULL && wf_get_sensor(sr) == 0) | 616 | if (slots_power == NULL && wf_get_sensor(sr) == 0) |
615 | slots_power = sr; | 617 | slots_power = sr; |
616 | } else if (!strcmp(sr->name, "u4-temp")) { | 618 | } else if (!strcmp(sr->name, "backside-temp")) { |
617 | if (u4_temp == NULL && wf_get_sensor(sr) == 0) | 619 | if (u4_temp == NULL && wf_get_sensor(sr) == 0) |
618 | u4_temp = sr; | 620 | u4_temp = sr; |
619 | } else | 621 | } else |
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/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index 390cc3a99ce6..9c7f122826e0 100644 --- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c | |||
@@ -526,7 +526,7 @@ int flexcop_frontend_init(struct flexcop_device *fc) | |||
526 | info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); | 526 | info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); |
527 | } else | 527 | } else |
528 | /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ | 528 | /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ |
529 | if ((fc->fe = vp310_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { | 529 | if ((fc->fe = vp310_mt312_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { |
530 | ops = fc->fe->ops; | 530 | ops = fc->fe->ops; |
531 | 531 | ||
532 | ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd; | 532 | ops->diseqc_send_master_cmd = flexcop_diseqc_send_master_cmd; |
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index 34c3189a1a33..356f447ee2ab 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c | |||
@@ -382,7 +382,7 @@ bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet * | |||
382 | EXPORT_SYMBOL(bt878_device_control); | 382 | EXPORT_SYMBOL(bt878_device_control); |
383 | 383 | ||
384 | 384 | ||
385 | struct cards card_list[] __devinitdata = { | 385 | static struct cards card_list[] __devinitdata = { |
386 | 386 | ||
387 | { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, | 387 | { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, |
388 | { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" }, | 388 | { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" }, |
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 3a2ff1cc24b7..0310e3dd07e6 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -602,7 +602,7 @@ static int dst_type_print(u8 type) | |||
602 | 602 | ||
603 | */ | 603 | */ |
604 | 604 | ||
605 | struct dst_types dst_tlist[] = { | 605 | static struct dst_types dst_tlist[] = { |
606 | { | 606 | { |
607 | .device_id = "200103A", | 607 | .device_id = "200103A", |
608 | .offset = 0, | 608 | .offset = 0, |
diff --git a/drivers/media/dvb/dvb-core/demux.h b/drivers/media/dvb/dvb-core/demux.h index 9f025825b2d2..0c1d87c5227a 100644 --- a/drivers/media/dvb/dvb-core/demux.h +++ b/drivers/media/dvb/dvb-core/demux.h | |||
@@ -216,7 +216,7 @@ struct dmx_frontend { | |||
216 | /*--------------------------------------------------------------------------*/ | 216 | /*--------------------------------------------------------------------------*/ |
217 | 217 | ||
218 | /* | 218 | /* |
219 | * Flags OR'ed in the capabilites field of struct dmx_demux. | 219 | * Flags OR'ed in the capabilities field of struct dmx_demux. |
220 | */ | 220 | */ |
221 | 221 | ||
222 | #define DMX_TS_FILTERING 1 | 222 | #define DMX_TS_FILTERING 1 |
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index f327fac1688e..162f9795cd89 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -282,7 +282,7 @@ static struct cx22702_config cxusb_cx22702_config = { | |||
282 | .pll_set = dvb_usb_pll_set_i2c, | 282 | .pll_set = dvb_usb_pll_set_i2c, |
283 | }; | 283 | }; |
284 | 284 | ||
285 | static struct lgdt330x_config cxusb_lgdt330x_config = { | 285 | static struct lgdt330x_config cxusb_lgdt3303_config = { |
286 | .demod_address = 0x0e, | 286 | .demod_address = 0x0e, |
287 | .demod_chip = LGDT3303, | 287 | .demod_chip = LGDT3303, |
288 | .pll_set = dvb_usb_pll_set_i2c, | 288 | .pll_set = dvb_usb_pll_set_i2c, |
@@ -357,14 +357,14 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d) | |||
357 | return -EIO; | 357 | return -EIO; |
358 | } | 358 | } |
359 | 359 | ||
360 | static int cxusb_lgdt330x_frontend_attach(struct dvb_usb_device *d) | 360 | static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_device *d) |
361 | { | 361 | { |
362 | if (usb_set_interface(d->udev,0,7) < 0) | 362 | if (usb_set_interface(d->udev,0,7) < 0) |
363 | err("set interface failed"); | 363 | err("set interface failed"); |
364 | 364 | ||
365 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | 365 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); |
366 | 366 | ||
367 | if ((d->fe = lgdt330x_attach(&cxusb_lgdt330x_config, &d->i2c_adap)) != NULL) | 367 | if ((d->fe = lgdt330x_attach(&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL) |
368 | return 0; | 368 | return 0; |
369 | 369 | ||
370 | return -EIO; | 370 | return -EIO; |
@@ -506,7 +506,7 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { | |||
506 | 506 | ||
507 | .streaming_ctrl = cxusb_streaming_ctrl, | 507 | .streaming_ctrl = cxusb_streaming_ctrl, |
508 | .power_ctrl = cxusb_power_ctrl, | 508 | .power_ctrl = cxusb_power_ctrl, |
509 | .frontend_attach = cxusb_lgdt330x_frontend_attach, | 509 | .frontend_attach = cxusb_lgdt3303_frontend_attach, |
510 | .tuner_attach = cxusb_lgh064f_tuner_attach, | 510 | .tuner_attach = cxusb_lgh064f_tuner_attach, |
511 | 511 | ||
512 | .i2c_algo = &cxusb_i2c_algo, | 512 | .i2c_algo = &cxusb_i2c_algo, |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c index 716f8bf528cd..ce34a55e5c24 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c | |||
@@ -47,7 +47,7 @@ static int dvb_usb_init(struct dvb_usb_device *d) | |||
47 | 47 | ||
48 | d->state = DVB_USB_STATE_INIT; | 48 | d->state = DVB_USB_STATE_INIT; |
49 | 49 | ||
50 | /* check the capabilites and set appropriate variables */ | 50 | /* check the capabilities and set appropriate variables */ |
51 | 51 | ||
52 | /* speed - when running at FULL speed we need a HW PID filter */ | 52 | /* speed - when running at FULL speed we need a HW PID filter */ |
53 | if (d->udev->speed == USB_SPEED_FULL && !(d->props.caps & DVB_USB_HAS_PID_FILTER)) { | 53 | if (d->udev->speed == USB_SPEED_FULL && !(d->props.caps & DVB_USB_HAS_PID_FILTER)) { |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 5e5d21ad93c9..d4909e5c67e0 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -87,7 +87,7 @@ struct dvb_usb_device; | |||
87 | 87 | ||
88 | /** | 88 | /** |
89 | * struct dvb_usb_properties - properties of a dvb-usb-device | 89 | * struct dvb_usb_properties - properties of a dvb-usb-device |
90 | * @caps: capabilites of the DVB USB device. | 90 | * @caps: capabilities of the DVB USB device. |
91 | * @pid_filter_count: number of PID filter position in the optional hardware | 91 | * @pid_filter_count: number of PID filter position in the optional hardware |
92 | * PID-filter. | 92 | * PID-filter. |
93 | * | 93 | * |
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig index 76b6a2aef32f..c676b1e23ab0 100644 --- a/drivers/media/dvb/frontends/Kconfig +++ b/drivers/media/dvb/frontends/Kconfig | |||
@@ -29,7 +29,7 @@ config DVB_TDA8083 | |||
29 | A DVB-S tuner module. Say Y when you want to support this frontend. | 29 | A DVB-S tuner module. Say Y when you want to support this frontend. |
30 | 30 | ||
31 | config DVB_MT312 | 31 | config DVB_MT312 |
32 | tristate "Zarlink MT312 based" | 32 | tristate "Zarlink VP310/MT312 based" |
33 | depends on DVB_CORE | 33 | depends on DVB_CORE |
34 | help | 34 | help |
35 | A DVB-S tuner module. Say Y when you want to support this frontend. | 35 | A DVB-S tuner module. Say Y when you want to support this frontend. |
diff --git a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c index ec4e641acc64..d3aea83cf218 100644 --- a/drivers/media/dvb/frontends/mt312.c +++ b/drivers/media/dvb/frontends/mt312.c | |||
@@ -612,76 +612,6 @@ static void mt312_release(struct dvb_frontend* fe) | |||
612 | kfree(state); | 612 | kfree(state); |
613 | } | 613 | } |
614 | 614 | ||
615 | static struct dvb_frontend_ops vp310_mt312_ops; | ||
616 | |||
617 | struct dvb_frontend* vp310_attach(const struct mt312_config* config, | ||
618 | struct i2c_adapter* i2c) | ||
619 | { | ||
620 | struct mt312_state* state = NULL; | ||
621 | |||
622 | /* allocate memory for the internal state */ | ||
623 | state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL); | ||
624 | if (state == NULL) | ||
625 | goto error; | ||
626 | |||
627 | /* setup the state */ | ||
628 | state->config = config; | ||
629 | state->i2c = i2c; | ||
630 | memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops)); | ||
631 | strcpy(state->ops.info.name, "Zarlink VP310 DVB-S"); | ||
632 | |||
633 | /* check if the demod is there */ | ||
634 | if (mt312_readreg(state, ID, &state->id) < 0) | ||
635 | goto error; | ||
636 | if (state->id != ID_VP310) { | ||
637 | goto error; | ||
638 | } | ||
639 | |||
640 | /* create dvb_frontend */ | ||
641 | state->frequency = 90; | ||
642 | state->frontend.ops = &state->ops; | ||
643 | state->frontend.demodulator_priv = state; | ||
644 | return &state->frontend; | ||
645 | |||
646 | error: | ||
647 | kfree(state); | ||
648 | return NULL; | ||
649 | } | ||
650 | |||
651 | struct dvb_frontend* mt312_attach(const struct mt312_config* config, | ||
652 | struct i2c_adapter* i2c) | ||
653 | { | ||
654 | struct mt312_state* state = NULL; | ||
655 | |||
656 | /* allocate memory for the internal state */ | ||
657 | state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL); | ||
658 | if (state == NULL) | ||
659 | goto error; | ||
660 | |||
661 | /* setup the state */ | ||
662 | state->config = config; | ||
663 | state->i2c = i2c; | ||
664 | memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops)); | ||
665 | strcpy(state->ops.info.name, "Zarlink MT312 DVB-S"); | ||
666 | |||
667 | /* check if the demod is there */ | ||
668 | if (mt312_readreg(state, ID, &state->id) < 0) | ||
669 | goto error; | ||
670 | if (state->id != ID_MT312) { | ||
671 | goto error; | ||
672 | } | ||
673 | |||
674 | /* create dvb_frontend */ | ||
675 | state->frequency = 60; | ||
676 | state->frontend.ops = &state->ops; | ||
677 | state->frontend.demodulator_priv = state; | ||
678 | return &state->frontend; | ||
679 | |||
680 | error: | ||
681 | kfree(state); | ||
682 | return NULL; | ||
683 | } | ||
684 | |||
685 | static struct dvb_frontend_ops vp310_mt312_ops = { | 615 | static struct dvb_frontend_ops vp310_mt312_ops = { |
686 | 616 | ||
687 | .info = { | 617 | .info = { |
@@ -720,6 +650,49 @@ static struct dvb_frontend_ops vp310_mt312_ops = { | |||
720 | .set_voltage = mt312_set_voltage, | 650 | .set_voltage = mt312_set_voltage, |
721 | }; | 651 | }; |
722 | 652 | ||
653 | struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, | ||
654 | struct i2c_adapter* i2c) | ||
655 | { | ||
656 | struct mt312_state* state = NULL; | ||
657 | |||
658 | /* allocate memory for the internal state */ | ||
659 | state = kmalloc(sizeof(struct mt312_state), GFP_KERNEL); | ||
660 | if (state == NULL) | ||
661 | goto error; | ||
662 | |||
663 | /* setup the state */ | ||
664 | state->config = config; | ||
665 | state->i2c = i2c; | ||
666 | memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops)); | ||
667 | |||
668 | /* check if the demod is there */ | ||
669 | if (mt312_readreg(state, ID, &state->id) < 0) | ||
670 | goto error; | ||
671 | |||
672 | switch (state->id) { | ||
673 | case ID_VP310: | ||
674 | strcpy(state->ops.info.name, "Zarlink VP310 DVB-S"); | ||
675 | state->frequency = 90; | ||
676 | break; | ||
677 | case ID_MT312: | ||
678 | strcpy(state->ops.info.name, "Zarlink MT312 DVB-S"); | ||
679 | state->frequency = 60; | ||
680 | break; | ||
681 | default: | ||
682 | printk (KERN_WARNING "Only Zarlink VP310/MT312 are supported chips.\n"); | ||
683 | goto error; | ||
684 | } | ||
685 | |||
686 | /* create dvb_frontend */ | ||
687 | state->frontend.ops = &state->ops; | ||
688 | state->frontend.demodulator_priv = state; | ||
689 | return &state->frontend; | ||
690 | |||
691 | error: | ||
692 | kfree(state); | ||
693 | return NULL; | ||
694 | } | ||
695 | |||
723 | module_param(debug, int, 0644); | 696 | module_param(debug, int, 0644); |
724 | MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); | 697 | MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); |
725 | 698 | ||
@@ -727,5 +700,4 @@ MODULE_DESCRIPTION("Zarlink VP310/MT312 DVB-S Demodulator driver"); | |||
727 | MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>"); | 700 | MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>"); |
728 | MODULE_LICENSE("GPL"); | 701 | MODULE_LICENSE("GPL"); |
729 | 702 | ||
730 | EXPORT_SYMBOL(mt312_attach); | 703 | EXPORT_SYMBOL(vp310_mt312_attach); |
731 | EXPORT_SYMBOL(vp310_attach); | ||
diff --git a/drivers/media/dvb/frontends/mt312.h b/drivers/media/dvb/frontends/mt312.h index b3a53a73a117..074d844f0139 100644 --- a/drivers/media/dvb/frontends/mt312.h +++ b/drivers/media/dvb/frontends/mt312.h | |||
@@ -38,10 +38,8 @@ struct mt312_config | |||
38 | int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); | 38 | int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params); |
39 | }; | 39 | }; |
40 | 40 | ||
41 | extern struct dvb_frontend* mt312_attach(const struct mt312_config* config, | 41 | struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config, |
42 | struct i2c_adapter* i2c); | 42 | struct i2c_adapter* i2c); |
43 | 43 | ||
44 | extern struct dvb_frontend* vp310_attach(const struct mt312_config* config, | ||
45 | struct i2c_adapter* i2c); | ||
46 | 44 | ||
47 | #endif // MT312_H | 45 | #endif // MT312_H |
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c index 6122ba754bc5..eb15676d374f 100644 --- a/drivers/media/dvb/frontends/stv0297.c +++ b/drivers/media/dvb/frontends/stv0297.c | |||
@@ -393,10 +393,6 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par | |||
393 | break; | 393 | break; |
394 | 394 | ||
395 | case QAM_128: | 395 | case QAM_128: |
396 | delay = 150; | ||
397 | sweeprate = 1000; | ||
398 | break; | ||
399 | |||
400 | case QAM_256: | 396 | case QAM_256: |
401 | delay = 200; | 397 | delay = 200; |
402 | sweeprate = 500; | 398 | sweeprate = 500; |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index d36369e9e88f..7c6ccb96b157 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -1439,7 +1439,7 @@ static int check_firmware(struct av7110* av7110) | |||
1439 | len = ntohl(*(u32*) ptr); | 1439 | len = ntohl(*(u32*) ptr); |
1440 | ptr += 4; | 1440 | ptr += 4; |
1441 | if (len >= 512) { | 1441 | if (len >= 512) { |
1442 | printk("dvb-ttpci: dpram file is way to big.\n"); | 1442 | printk("dvb-ttpci: dpram file is way too big.\n"); |
1443 | return -EINVAL; | 1443 | return -EINVAL; |
1444 | } | 1444 | } |
1445 | if (crc != crc32_le(0, ptr, len)) { | 1445 | if (crc != crc32_le(0, ptr, len)) { |
@@ -2477,7 +2477,8 @@ static int frontend_init(struct av7110 *av7110) | |||
2477 | * The same behaviour of missing VSYNC can be duplicated on budget | 2477 | * The same behaviour of missing VSYNC can be duplicated on budget |
2478 | * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. | 2478 | * cards, by seting DD1_INIT trigger mode 7 in 3rd nibble. |
2479 | */ | 2479 | */ |
2480 | static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) | 2480 | static int __devinit av7110_attach(struct saa7146_dev* dev, |
2481 | struct saa7146_pci_extension_data *pci_ext) | ||
2481 | { | 2482 | { |
2482 | const int length = TS_WIDTH * TS_HEIGHT; | 2483 | const int length = TS_WIDTH * TS_HEIGHT; |
2483 | struct pci_dev *pdev = dev->pci; | 2484 | struct pci_dev *pdev = dev->pci; |
@@ -2827,7 +2828,7 @@ err_kfree_0: | |||
2827 | goto out; | 2828 | goto out; |
2828 | } | 2829 | } |
2829 | 2830 | ||
2830 | static int av7110_detach(struct saa7146_dev* saa) | 2831 | static int __devexit av7110_detach(struct saa7146_dev* saa) |
2831 | { | 2832 | { |
2832 | struct av7110 *av7110 = saa->ext_priv; | 2833 | struct av7110 *av7110 = saa->ext_priv; |
2833 | dprintk(4, "%p\n", av7110); | 2834 | dprintk(4, "%p\n", av7110); |
@@ -2974,7 +2975,7 @@ static struct saa7146_extension av7110_extension = { | |||
2974 | .module = THIS_MODULE, | 2975 | .module = THIS_MODULE, |
2975 | .pci_tbl = &pci_tbl[0], | 2976 | .pci_tbl = &pci_tbl[0], |
2976 | .attach = av7110_attach, | 2977 | .attach = av7110_attach, |
2977 | .detach = av7110_detach, | 2978 | .detach = __devexit_p(av7110_detach), |
2978 | 2979 | ||
2979 | .irq_mask = MASK_19 | MASK_03 | MASK_10, | 2980 | .irq_mask = MASK_19 | MASK_03 | MASK_10, |
2980 | .irq_func = av7110_irq, | 2981 | .irq_func = av7110_irq, |
diff --git a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c index b2e63e9fc053..0bb6e74ae7f0 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.c +++ b/drivers/media/dvb/ttpci/av7110_hw.c | |||
@@ -245,6 +245,9 @@ int av7110_bootarm(struct av7110 *av7110) | |||
245 | 245 | ||
246 | /* test DEBI */ | 246 | /* test DEBI */ |
247 | iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); | 247 | iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); |
248 | /* FIXME: Why does Nexus CA require 2x iwdebi for first init? */ | ||
249 | iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); | ||
250 | |||
248 | if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) { | 251 | if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) { |
249 | printk(KERN_ERR "dvb-ttpci: debi test in av7110_bootarm() failed: " | 252 | printk(KERN_ERR "dvb-ttpci: debi test in av7110_bootarm() failed: " |
250 | "%08x != %08x (check your BIOS 'Plug&Play OS' settings)\n", | 253 | "%08x != %08x (check your BIOS 'Plug&Play OS' settings)\n", |
diff --git a/drivers/media/dvb/ttpci/av7110_ir.c b/drivers/media/dvb/ttpci/av7110_ir.c index 617e4f6c0ed7..d54bbcdde2cc 100644 --- a/drivers/media/dvb/ttpci/av7110_ir.c +++ b/drivers/media/dvb/ttpci/av7110_ir.c | |||
@@ -208,7 +208,7 @@ static void ir_handler(struct av7110 *av7110, u32 ircom) | |||
208 | } | 208 | } |
209 | 209 | ||
210 | 210 | ||
211 | int __init av7110_ir_init(struct av7110 *av7110) | 211 | int __devinit av7110_ir_init(struct av7110 *av7110) |
212 | { | 212 | { |
213 | static struct proc_dir_entry *e; | 213 | static struct proc_dir_entry *e; |
214 | 214 | ||
@@ -248,7 +248,7 @@ int __init av7110_ir_init(struct av7110 *av7110) | |||
248 | } | 248 | } |
249 | 249 | ||
250 | 250 | ||
251 | void __exit av7110_ir_exit(struct av7110 *av7110) | 251 | void __devexit av7110_ir_exit(struct av7110 *av7110) |
252 | { | 252 | { |
253 | int i; | 253 | int i; |
254 | 254 | ||
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c index 9f59541155d9..85d964b5b33c 100644 --- a/drivers/media/video/cpia.c +++ b/drivers/media/video/cpia.c | |||
@@ -3369,7 +3369,7 @@ static int cpia_do_ioctl(struct inode *inode, struct file *file, | |||
3369 | //DBG("cpia_ioctl: %u\n", ioctlnr); | 3369 | //DBG("cpia_ioctl: %u\n", ioctlnr); |
3370 | 3370 | ||
3371 | switch (ioctlnr) { | 3371 | switch (ioctlnr) { |
3372 | /* query capabilites */ | 3372 | /* query capabilities */ |
3373 | case VIDIOCGCAP: | 3373 | case VIDIOCGCAP: |
3374 | { | 3374 | { |
3375 | struct video_capability *b = arg; | 3375 | struct video_capability *b = arg; |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 08ffd1f325fc..5588b9a5c430 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -567,7 +567,7 @@ static struct v4l2_queryctrl cx25840_qctrl[] = { | |||
567 | .type = V4L2_CTRL_TYPE_INTEGER, | 567 | .type = V4L2_CTRL_TYPE_INTEGER, |
568 | .name = "Contrast", | 568 | .name = "Contrast", |
569 | .minimum = 0, | 569 | .minimum = 0, |
570 | .maximum = 255, | 570 | .maximum = 127, |
571 | .step = 1, | 571 | .step = 1, |
572 | .default_value = 64, | 572 | .default_value = 64, |
573 | .flags = 0, | 573 | .flags = 0, |
@@ -576,7 +576,7 @@ static struct v4l2_queryctrl cx25840_qctrl[] = { | |||
576 | .type = V4L2_CTRL_TYPE_INTEGER, | 576 | .type = V4L2_CTRL_TYPE_INTEGER, |
577 | .name = "Saturation", | 577 | .name = "Saturation", |
578 | .minimum = 0, | 578 | .minimum = 0, |
579 | .maximum = 255, | 579 | .maximum = 127, |
580 | .step = 1, | 580 | .step = 1, |
581 | .default_value = 64, | 581 | .default_value = 64, |
582 | .flags = 0, | 582 | .flags = 0, |
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/media/video/saa7115.c b/drivers/media/video/saa7115.c index 048d000941c7..ffd87ce55556 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1027,7 +1027,7 @@ static struct v4l2_queryctrl saa7115_qctrl[] = { | |||
1027 | .type = V4L2_CTRL_TYPE_INTEGER, | 1027 | .type = V4L2_CTRL_TYPE_INTEGER, |
1028 | .name = "Contrast", | 1028 | .name = "Contrast", |
1029 | .minimum = 0, | 1029 | .minimum = 0, |
1030 | .maximum = 255, | 1030 | .maximum = 127, |
1031 | .step = 1, | 1031 | .step = 1, |
1032 | .default_value = 64, | 1032 | .default_value = 64, |
1033 | .flags = 0, | 1033 | .flags = 0, |
@@ -1036,7 +1036,7 @@ static struct v4l2_queryctrl saa7115_qctrl[] = { | |||
1036 | .type = V4L2_CTRL_TYPE_INTEGER, | 1036 | .type = V4L2_CTRL_TYPE_INTEGER, |
1037 | .name = "Saturation", | 1037 | .name = "Saturation", |
1038 | .minimum = 0, | 1038 | .minimum = 0, |
1039 | .maximum = 255, | 1039 | .maximum = 127, |
1040 | .step = 1, | 1040 | .step = 1, |
1041 | .default_value = 64, | 1041 | .default_value = 64, |
1042 | .flags = 0, | 1042 | .flags = 0, |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index a7a6ab9298a9..7df5e0826e12 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -54,10 +54,12 @@ MODULE_PARM_DESC(debug,"enable debug messages [alsa]"); | |||
54 | 54 | ||
55 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | 55 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ |
56 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 56 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ |
57 | static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0}; | 57 | static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; |
58 | 58 | ||
59 | module_param_array(index, int, NULL, 0444); | 59 | module_param_array(index, int, NULL, 0444); |
60 | module_param_array(enable, int, NULL, 0444); | ||
60 | MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); | 61 | MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); |
62 | MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s)."); | ||
61 | 63 | ||
62 | #define dprintk(fmt, arg...) if (debug) \ | 64 | #define dprintk(fmt, arg...) if (debug) \ |
63 | printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) | 65 | printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 5a35d3b6550d..6bc63a4086c1 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -977,7 +977,7 @@ struct saa7134_board saa7134_boards[] = { | |||
977 | .radio_type = UNSET, | 977 | .radio_type = UNSET, |
978 | .tuner_addr = ADDR_UNSET, | 978 | .tuner_addr = ADDR_UNSET, |
979 | .radio_addr = ADDR_UNSET, | 979 | .radio_addr = ADDR_UNSET, |
980 | .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE, | 980 | .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE, |
981 | .inputs = {{ | 981 | .inputs = {{ |
982 | .name = name_tv, | 982 | .name = name_tv, |
983 | .vmux = 3, | 983 | .vmux = 3, |
@@ -1666,7 +1666,7 @@ struct saa7134_board saa7134_boards[] = { | |||
1666 | .radio_type = UNSET, | 1666 | .radio_type = UNSET, |
1667 | .tuner_addr = ADDR_UNSET, | 1667 | .tuner_addr = ADDR_UNSET, |
1668 | .radio_addr = ADDR_UNSET, | 1668 | .radio_addr = ADDR_UNSET, |
1669 | .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_ACTIVE, | 1669 | .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER | TDA9887_PORT2_INACTIVE, |
1670 | .mpeg = SAA7134_MPEG_DVB, | 1670 | .mpeg = SAA7134_MPEG_DVB, |
1671 | .inputs = {{ | 1671 | .inputs = {{ |
1672 | .name = name_tv, | 1672 | .name = name_tv, |
@@ -2187,7 +2187,7 @@ struct saa7134_board saa7134_boards[] = { | |||
2187 | .radio_type = UNSET, | 2187 | .radio_type = UNSET, |
2188 | .tuner_addr = 0x61, | 2188 | .tuner_addr = 0x61, |
2189 | .radio_addr = ADDR_UNSET, | 2189 | .radio_addr = ADDR_UNSET, |
2190 | .tda9887_conf = TDA9887_PRESENT, | 2190 | .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE, |
2191 | .mpeg = SAA7134_MPEG_DVB, | 2191 | .mpeg = SAA7134_MPEG_DVB, |
2192 | .inputs = {{ | 2192 | .inputs = {{ |
2193 | .name = name_tv, | 2193 | .name = name_tv, |
@@ -2211,7 +2211,7 @@ struct saa7134_board saa7134_boards[] = { | |||
2211 | .radio_type = UNSET, | 2211 | .radio_type = UNSET, |
2212 | .tuner_addr = 0x61, | 2212 | .tuner_addr = 0x61, |
2213 | .radio_addr = ADDR_UNSET, | 2213 | .radio_addr = ADDR_UNSET, |
2214 | .tda9887_conf = TDA9887_PRESENT, | 2214 | .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE, |
2215 | .mpeg = SAA7134_MPEG_DVB, | 2215 | .mpeg = SAA7134_MPEG_DVB, |
2216 | .inputs = {{ | 2216 | .inputs = {{ |
2217 | .name = name_tv, | 2217 | .name = name_tv, |
@@ -2392,7 +2392,7 @@ struct saa7134_board saa7134_boards[] = { | |||
2392 | }}, | 2392 | }}, |
2393 | }, | 2393 | }, |
2394 | [SAA7134_BOARD_PINNACLE_PCTV_110i] = { | 2394 | [SAA7134_BOARD_PINNACLE_PCTV_110i] = { |
2395 | .name = "Pinnacle PCTV 110i (saa7133)", | 2395 | .name = "Pinnacle PCTV 40i/50i/110i (saa7133)", |
2396 | .audio_clock = 0x00187de7, | 2396 | .audio_clock = 0x00187de7, |
2397 | .tuner_type = TUNER_PHILIPS_TDA8290, | 2397 | .tuner_type = TUNER_PHILIPS_TDA8290, |
2398 | .radio_type = UNSET, | 2398 | .radio_type = UNSET, |
@@ -2407,6 +2407,10 @@ struct saa7134_board saa7134_boards[] = { | |||
2407 | },{ | 2407 | },{ |
2408 | .name = name_comp1, | 2408 | .name = name_comp1, |
2409 | .vmux = 1, | 2409 | .vmux = 1, |
2410 | .amux = LINE2, | ||
2411 | },{ | ||
2412 | .name = name_comp2, | ||
2413 | .vmux = 0, | ||
2410 | .amux = LINE2, | 2414 | .amux = LINE2, |
2411 | },{ | 2415 | },{ |
2412 | .name = name_svideo, | 2416 | .name = name_svideo, |
@@ -2745,7 +2749,7 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
2745 | .vendor = PCI_VENDOR_ID_PHILIPS, | 2749 | .vendor = PCI_VENDOR_ID_PHILIPS, |
2746 | .device = PCI_DEVICE_ID_PHILIPS_SAA7130, | 2750 | .device = PCI_DEVICE_ID_PHILIPS_SAA7130, |
2747 | .subvendor = 0x1048, | 2751 | .subvendor = 0x1048, |
2748 | .subdevice = 0x226b, | 2752 | .subdevice = 0x226a, |
2749 | .driver_data = SAA7134_BOARD_ELSA_500TV, | 2753 | .driver_data = SAA7134_BOARD_ELSA_500TV, |
2750 | },{ | 2754 | },{ |
2751 | .vendor = PCI_VENDOR_ID_PHILIPS, | 2755 | .vendor = PCI_VENDOR_ID_PHILIPS, |
@@ -3201,6 +3205,11 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3201 | /* power-up tuner chip */ | 3205 | /* power-up tuner chip */ |
3202 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); | 3206 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); |
3203 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000); | 3207 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000); |
3208 | case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL: | ||
3209 | /* this turns the remote control chip off to work around a bug in it */ | ||
3210 | saa_writeb(SAA7134_GPIO_GPMODE1, 0x80); | ||
3211 | saa_writeb(SAA7134_GPIO_GPSTATUS1, 0x80); | ||
3212 | break; | ||
3204 | case SAA7134_BOARD_MONSTERTV_MOBILE: | 3213 | case SAA7134_BOARD_MONSTERTV_MOBILE: |
3205 | /* power-up tuner chip */ | 3214 | /* power-up tuner chip */ |
3206 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); | 3215 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00040000, 0x00040000); |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 1a536e865277..9db8e13f21c3 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -110,6 +110,7 @@ static int mt352_pinnacle_init(struct dvb_frontend* fe) | |||
110 | mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg)); | 110 | mt352_write(fe, fsm_ctl_cfg, sizeof(fsm_ctl_cfg)); |
111 | mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg)); | 111 | mt352_write(fe, scan_ctl_cfg, sizeof(scan_ctl_cfg)); |
112 | mt352_write(fe, irq_cfg, sizeof(irq_cfg)); | 112 | mt352_write(fe, irq_cfg, sizeof(irq_cfg)); |
113 | |||
113 | return 0; | 114 | return 0; |
114 | } | 115 | } |
115 | 116 | ||
@@ -117,8 +118,10 @@ static int mt352_pinnacle_pll_set(struct dvb_frontend* fe, | |||
117 | struct dvb_frontend_parameters* params, | 118 | struct dvb_frontend_parameters* params, |
118 | u8* pllbuf) | 119 | u8* pllbuf) |
119 | { | 120 | { |
120 | static int on = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE; | 121 | u8 off[] = { 0x00, 0xf1}; |
121 | static int off = TDA9887_PRESENT | TDA9887_PORT2_ACTIVE; | 122 | u8 on[] = { 0x00, 0x71}; |
123 | struct i2c_msg msg = {.addr=0x43, .flags=0, .buf=off, .len = sizeof(off)}; | ||
124 | |||
122 | struct saa7134_dev *dev = fe->dvb->priv; | 125 | struct saa7134_dev *dev = fe->dvb->priv; |
123 | struct v4l2_frequency f; | 126 | struct v4l2_frequency f; |
124 | 127 | ||
@@ -126,9 +129,10 @@ static int mt352_pinnacle_pll_set(struct dvb_frontend* fe, | |||
126 | f.tuner = 0; | 129 | f.tuner = 0; |
127 | f.type = V4L2_TUNER_DIGITAL_TV; | 130 | f.type = V4L2_TUNER_DIGITAL_TV; |
128 | f.frequency = params->frequency / 1000 * 16 / 1000; | 131 | f.frequency = params->frequency / 1000 * 16 / 1000; |
129 | saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&on); | 132 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
130 | saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); | 133 | saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); |
131 | saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG,&off); | 134 | msg.buf = on; |
135 | i2c_transfer(&dev->i2c_adap, &msg, 1); | ||
132 | 136 | ||
133 | pinnacle_antenna_pwr(dev, antenna_pwr); | 137 | pinnacle_antenna_pwr(dev, antenna_pwr); |
134 | 138 | ||
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 7b4fb282ac82..a796a4e1917c 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -580,9 +580,10 @@ int tda8290_init(struct i2c_client *c) | |||
580 | 580 | ||
581 | int tda8290_probe(struct i2c_client *c) | 581 | int tda8290_probe(struct i2c_client *c) |
582 | { | 582 | { |
583 | unsigned char soft_reset[] = { 0x00, 0x00 }; | 583 | unsigned char soft_reset[] = { 0x00, 0x00 }; |
584 | unsigned char easy_mode_b[] = { 0x01, 0x02 }; | 584 | unsigned char easy_mode_b[] = { 0x01, 0x02 }; |
585 | unsigned char easy_mode_g[] = { 0x01, 0x04 }; | 585 | unsigned char easy_mode_g[] = { 0x01, 0x04 }; |
586 | unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 }; | ||
586 | unsigned char addr_dto_lsb = 0x07; | 587 | unsigned char addr_dto_lsb = 0x07; |
587 | unsigned char data; | 588 | unsigned char data; |
588 | 589 | ||
@@ -599,6 +600,7 @@ int tda8290_probe(struct i2c_client *c) | |||
599 | return 0; | 600 | return 0; |
600 | } | 601 | } |
601 | } | 602 | } |
603 | i2c_master_send(c, restore_9886, 3); | ||
602 | return -1; | 604 | return -1; |
603 | } | 605 | } |
604 | 606 | ||
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index e7ee619d62c5..b6101bf446d4 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -713,8 +713,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
713 | struct v4l2_frequency *f = arg; | 713 | struct v4l2_frequency *f = arg; |
714 | 714 | ||
715 | switch_v4l2(); | 715 | switch_v4l2(); |
716 | if (V4L2_TUNER_RADIO == f->type && | 716 | if ((V4L2_TUNER_RADIO == f->type && V4L2_TUNER_RADIO != t->mode) |
717 | V4L2_TUNER_RADIO != t->mode) { | 717 | || (V4L2_TUNER_DIGITAL_TV == f->type |
718 | && V4L2_TUNER_DIGITAL_TV != t->mode)) { | ||
718 | if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") | 719 | if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") |
719 | == EINVAL) | 720 | == EINVAL) |
720 | return 0; | 721 | return 0; |
diff --git a/drivers/media/video/videocodec.h b/drivers/media/video/videocodec.h index 156ae57096fe..b1239ac7f371 100644 --- a/drivers/media/video/videocodec.h +++ b/drivers/media/video/videocodec.h | |||
@@ -56,7 +56,7 @@ | |||
56 | the slave is bound to it). Otherwise it doesn't need this functions and | 56 | the slave is bound to it). Otherwise it doesn't need this functions and |
57 | therfor they may not be initialized. | 57 | therfor they may not be initialized. |
58 | 58 | ||
59 | The other fuctions are just for convenience, as they are for shure used by | 59 | The other fuctions are just for convenience, as they are for sure used by |
60 | most/all of the codecs. The last ones may be ommited, too. | 60 | most/all of the codecs. The last ones may be ommited, too. |
61 | 61 | ||
62 | See the structure declaration below for more information and which data has | 62 | See the structure declaration below for more information and which data has |
diff --git a/drivers/media/video/zr36050.c b/drivers/media/video/zr36050.c index bd0cd28543ca..6699725be605 100644 --- a/drivers/media/video/zr36050.c +++ b/drivers/media/video/zr36050.c | |||
@@ -159,7 +159,7 @@ zr36050_wait_end (struct zr36050 *ptr) | |||
159 | 159 | ||
160 | while (!(zr36050_read_status1(ptr) & 0x4)) { | 160 | while (!(zr36050_read_status1(ptr) & 0x4)) { |
161 | udelay(1); | 161 | udelay(1); |
162 | if (i++ > 200000) { // 200ms, there is for shure something wrong!!! | 162 | if (i++ > 200000) { // 200ms, there is for sure something wrong!!! |
163 | dprintk(1, | 163 | dprintk(1, |
164 | "%s: timout at wait_end (last status: 0x%02x)\n", | 164 | "%s: timout at wait_end (last status: 0x%02x)\n", |
165 | ptr->name, ptr->status1); | 165 | ptr->name, ptr->status1); |
diff --git a/drivers/media/video/zr36060.c b/drivers/media/video/zr36060.c index 28fa31a5f150..d8dd003a7aad 100644 --- a/drivers/media/video/zr36060.c +++ b/drivers/media/video/zr36060.c | |||
@@ -161,7 +161,7 @@ zr36060_wait_end (struct zr36060 *ptr) | |||
161 | 161 | ||
162 | while (zr36060_read_status(ptr) & ZR060_CFSR_Busy) { | 162 | while (zr36060_read_status(ptr) & ZR060_CFSR_Busy) { |
163 | udelay(1); | 163 | udelay(1); |
164 | if (i++ > 200000) { // 200ms, there is for shure something wrong!!! | 164 | if (i++ > 200000) { // 200ms, there is for sure something wrong!!! |
165 | dprintk(1, | 165 | dprintk(1, |
166 | "%s: timout at wait_end (last status: 0x%02x)\n", | 166 | "%s: timout at wait_end (last status: 0x%02x)\n", |
167 | ptr->name, ptr->status); | 167 | ptr->name, ptr->status); |
diff --git a/drivers/media/video/zr36120_i2c.c b/drivers/media/video/zr36120_i2c.c index 6bfe84d657f1..21fde43a6aed 100644 --- a/drivers/media/video/zr36120_i2c.c +++ b/drivers/media/video/zr36120_i2c.c | |||
@@ -65,7 +65,7 @@ void attach_inform(struct i2c_bus *bus, int id) | |||
65 | case I2C_DRIVERID_VIDEODECODER: | 65 | case I2C_DRIVERID_VIDEODECODER: |
66 | DEBUG(printk(CARD_INFO "decoder attached\n",CARD)); | 66 | DEBUG(printk(CARD_INFO "decoder attached\n",CARD)); |
67 | 67 | ||
68 | /* fetch the capabilites of the decoder */ | 68 | /* fetch the capabilities of the decoder */ |
69 | rv = i2c_control_device(&ztv->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_GET_CAPABILITIES, &dc); | 69 | rv = i2c_control_device(&ztv->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_GET_CAPABILITIES, &dc); |
70 | if (rv) { | 70 | if (rv) { |
71 | DEBUG(printk(CARD_DEBUG "decoder is not V4L aware!\n",CARD)); | 71 | DEBUG(printk(CARD_DEBUG "decoder is not V4L aware!\n",CARD)); |
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/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 227c39a7c1b4..8d84b045bc83 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/config.h> | 37 | #include <linux/config.h> |
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/device.h> | 40 | #include <linux/platform_device.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/dma-mapping.h> | 43 | #include <linux/dma-mapping.h> |
@@ -194,7 +194,7 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, | |||
194 | 194 | ||
195 | u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); | 195 | u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); |
196 | 196 | ||
197 | switch (mmc_rsp_type(cmd->flags)) { | 197 | switch (mmc_resp_type(cmd)) { |
198 | case MMC_RSP_R1: | 198 | case MMC_RSP_R1: |
199 | mmccmd |= SD_CMD_RT_1; | 199 | mmccmd |= SD_CMD_RT_1; |
200 | break; | 200 | break; |
@@ -740,7 +740,6 @@ static void au1xmmc_set_ios(struct mmc_host* mmc, struct mmc_ios* ios) | |||
740 | static void au1xmmc_dma_callback(int irq, void *dev_id, struct pt_regs *regs) | 740 | static void au1xmmc_dma_callback(int irq, void *dev_id, struct pt_regs *regs) |
741 | { | 741 | { |
742 | struct au1xmmc_host *host = (struct au1xmmc_host *) dev_id; | 742 | struct au1xmmc_host *host = (struct au1xmmc_host *) dev_id; |
743 | u32 status; | ||
744 | 743 | ||
745 | /* Avoid spurious interrupts */ | 744 | /* Avoid spurious interrupts */ |
746 | 745 | ||
@@ -887,7 +886,7 @@ struct mmc_host_ops au1xmmc_ops = { | |||
887 | .set_ios = au1xmmc_set_ios, | 886 | .set_ios = au1xmmc_set_ios, |
888 | }; | 887 | }; |
889 | 888 | ||
890 | static int au1xmmc_probe(struct device *dev) | 889 | static int __devinit au1xmmc_probe(struct platform_device *pdev) |
891 | { | 890 | { |
892 | 891 | ||
893 | int i, ret = 0; | 892 | int i, ret = 0; |
@@ -904,7 +903,7 @@ static int au1xmmc_probe(struct device *dev) | |||
904 | disable_irq(AU1100_SD_IRQ); | 903 | disable_irq(AU1100_SD_IRQ); |
905 | 904 | ||
906 | for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) { | 905 | for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) { |
907 | struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), dev); | 906 | struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev); |
908 | struct au1xmmc_host *host = 0; | 907 | struct au1xmmc_host *host = 0; |
909 | 908 | ||
910 | if (!mmc) { | 909 | if (!mmc) { |
@@ -967,7 +966,7 @@ static int au1xmmc_probe(struct device *dev) | |||
967 | return 0; | 966 | return 0; |
968 | } | 967 | } |
969 | 968 | ||
970 | static int au1xmmc_remove(struct device *dev) | 969 | static int __devexit au1xmmc_remove(struct platform_device *pdev) |
971 | { | 970 | { |
972 | 971 | ||
973 | int i; | 972 | int i; |
@@ -997,23 +996,24 @@ static int au1xmmc_remove(struct device *dev) | |||
997 | return 0; | 996 | return 0; |
998 | } | 997 | } |
999 | 998 | ||
1000 | static struct device_driver au1xmmc_driver = { | 999 | static struct platform_driver au1xmmc_driver = { |
1001 | .name = DRIVER_NAME, | ||
1002 | .bus = &platform_bus_type, | ||
1003 | .probe = au1xmmc_probe, | 1000 | .probe = au1xmmc_probe, |
1004 | .remove = au1xmmc_remove, | 1001 | .remove = au1xmmc_remove, |
1005 | .suspend = NULL, | 1002 | .suspend = NULL, |
1006 | .resume = NULL | 1003 | .resume = NULL, |
1004 | .driver = { | ||
1005 | .name = DRIVER_NAME, | ||
1006 | }, | ||
1007 | }; | 1007 | }; |
1008 | 1008 | ||
1009 | static int __init au1xmmc_init(void) | 1009 | static int __init au1xmmc_init(void) |
1010 | { | 1010 | { |
1011 | return driver_register(&au1xmmc_driver); | 1011 | return platform_driver_register(&au1xmmc_driver); |
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | static void __exit au1xmmc_exit(void) | 1014 | static void __exit au1xmmc_exit(void) |
1015 | { | 1015 | { |
1016 | driver_unregister(&au1xmmc_driver); | 1016 | platform_driver_unregister(&au1xmmc_driver); |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | module_init(au1xmmc_init); | 1019 | module_init(au1xmmc_init); |
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/chelsio/espi.c b/drivers/net/chelsio/espi.c index 230642571c92..e824acaf188a 100644 --- a/drivers/net/chelsio/espi.c +++ b/drivers/net/chelsio/espi.c | |||
@@ -296,9 +296,7 @@ void t1_espi_destroy(struct peespi *espi) | |||
296 | 296 | ||
297 | struct peespi *t1_espi_create(adapter_t *adapter) | 297 | struct peespi *t1_espi_create(adapter_t *adapter) |
298 | { | 298 | { |
299 | struct peespi *espi = kmalloc(sizeof(*espi), GFP_KERNEL); | 299 | struct peespi *espi = kzalloc(sizeof(*espi), GFP_KERNEL); |
300 | |||
301 | memset(espi, 0, sizeof(*espi)); | ||
302 | 300 | ||
303 | if (espi) | 301 | if (espi) |
304 | espi->adapter = adapter; | 302 | espi->adapter = adapter; |
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/s2io.c b/drivers/net/s2io.c index 49b597cbc19a..b7f00d6eb6a6 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -4092,6 +4092,7 @@ static void s2io_set_multicast(struct net_device *dev) | |||
4092 | i++, mclist = mclist->next) { | 4092 | i++, mclist = mclist->next) { |
4093 | memcpy(sp->usr_addrs[i].addr, mclist->dmi_addr, | 4093 | memcpy(sp->usr_addrs[i].addr, mclist->dmi_addr, |
4094 | ETH_ALEN); | 4094 | ETH_ALEN); |
4095 | mac_addr = 0; | ||
4095 | for (j = 0; j < ETH_ALEN; j++) { | 4096 | for (j = 0; j < ETH_ALEN; j++) { |
4096 | mac_addr |= mclist->dmi_addr[j]; | 4097 | mac_addr |= mclist->dmi_addr[j]; |
4097 | mac_addr <<= 8; | 4098 | mac_addr <<= 8; |
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 e8e92c853e89..b8f1524da557 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -3532,9 +3532,23 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len) | |||
3532 | (base + len + 8 < base)); | 3532 | (base + len + 8 < base)); |
3533 | } | 3533 | } |
3534 | 3534 | ||
3535 | /* Test for DMA addresses > 40-bit */ | ||
3536 | static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, | ||
3537 | int len) | ||
3538 | { | ||
3539 | #if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64) | ||
3540 | if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) | ||
3541 | return (((u64) mapping + len) > DMA_40BIT_MASK); | ||
3542 | return 0; | ||
3543 | #else | ||
3544 | return 0; | ||
3545 | #endif | ||
3546 | } | ||
3547 | |||
3535 | static void tg3_set_txd(struct tg3 *, int, dma_addr_t, int, u32, u32); | 3548 | static void tg3_set_txd(struct tg3 *, int, dma_addr_t, int, u32, u32); |
3536 | 3549 | ||
3537 | static int tigon3_4gb_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb, | 3550 | /* Workaround 4GB and 40-bit hardware DMA bugs. */ |
3551 | static int tigon3_dma_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb, | ||
3538 | u32 last_plus_one, u32 *start, | 3552 | u32 last_plus_one, u32 *start, |
3539 | u32 base_flags, u32 mss) | 3553 | u32 base_flags, u32 mss) |
3540 | { | 3554 | { |
@@ -3742,6 +3756,9 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3742 | if (tg3_4g_overflow_test(mapping, len)) | 3756 | if (tg3_4g_overflow_test(mapping, len)) |
3743 | would_hit_hwbug = 1; | 3757 | would_hit_hwbug = 1; |
3744 | 3758 | ||
3759 | if (tg3_40bit_overflow_test(tp, mapping, len)) | ||
3760 | would_hit_hwbug = 1; | ||
3761 | |||
3745 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) | 3762 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) |
3746 | tg3_set_txd(tp, entry, mapping, len, | 3763 | tg3_set_txd(tp, entry, mapping, len, |
3747 | base_flags, (i == last)|(mss << 1)); | 3764 | base_flags, (i == last)|(mss << 1)); |
@@ -3763,7 +3780,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3763 | /* If the workaround fails due to memory/mapping | 3780 | /* If the workaround fails due to memory/mapping |
3764 | * failure, silently drop this packet. | 3781 | * failure, silently drop this packet. |
3765 | */ | 3782 | */ |
3766 | if (tigon3_4gb_hwbug_workaround(tp, skb, last_plus_one, | 3783 | if (tigon3_dma_hwbug_workaround(tp, skb, last_plus_one, |
3767 | &start, base_flags, mss)) | 3784 | &start, base_flags, mss)) |
3768 | goto out_unlock; | 3785 | goto out_unlock; |
3769 | 3786 | ||
@@ -10526,8 +10543,6 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) | |||
10526 | strcat(str, "66MHz"); | 10543 | strcat(str, "66MHz"); |
10527 | else if (clock_ctrl == 6) | 10544 | else if (clock_ctrl == 6) |
10528 | strcat(str, "100MHz"); | 10545 | strcat(str, "100MHz"); |
10529 | else if (clock_ctrl == 7) | ||
10530 | strcat(str, "133MHz"); | ||
10531 | } else { | 10546 | } else { |
10532 | strcpy(str, "PCI:"); | 10547 | strcpy(str, "PCI:"); |
10533 | if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) | 10548 | if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) |
@@ -10608,8 +10623,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10608 | unsigned long tg3reg_base, tg3reg_len; | 10623 | unsigned long tg3reg_base, tg3reg_len; |
10609 | struct net_device *dev; | 10624 | struct net_device *dev; |
10610 | struct tg3 *tp; | 10625 | struct tg3 *tp; |
10611 | int i, err, pci_using_dac, pm_cap; | 10626 | int i, err, pm_cap; |
10612 | char str[40]; | 10627 | char str[40]; |
10628 | u64 dma_mask, persist_dma_mask; | ||
10613 | 10629 | ||
10614 | if (tg3_version_printed++ == 0) | 10630 | if (tg3_version_printed++ == 0) |
10615 | printk(KERN_INFO "%s", version); | 10631 | printk(KERN_INFO "%s", version); |
@@ -10646,26 +10662,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10646 | goto err_out_free_res; | 10662 | goto err_out_free_res; |
10647 | } | 10663 | } |
10648 | 10664 | ||
10649 | /* Configure DMA attributes. */ | ||
10650 | err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); | ||
10651 | if (!err) { | ||
10652 | pci_using_dac = 1; | ||
10653 | err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); | ||
10654 | if (err < 0) { | ||
10655 | printk(KERN_ERR PFX "Unable to obtain 64 bit DMA " | ||
10656 | "for consistent allocations\n"); | ||
10657 | goto err_out_free_res; | ||
10658 | } | ||
10659 | } else { | ||
10660 | err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | ||
10661 | if (err) { | ||
10662 | printk(KERN_ERR PFX "No usable DMA configuration, " | ||
10663 | "aborting.\n"); | ||
10664 | goto err_out_free_res; | ||
10665 | } | ||
10666 | pci_using_dac = 0; | ||
10667 | } | ||
10668 | |||
10669 | tg3reg_base = pci_resource_start(pdev, 0); | 10665 | tg3reg_base = pci_resource_start(pdev, 0); |
10670 | tg3reg_len = pci_resource_len(pdev, 0); | 10666 | tg3reg_len = pci_resource_len(pdev, 0); |
10671 | 10667 | ||
@@ -10679,8 +10675,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10679 | SET_MODULE_OWNER(dev); | 10675 | SET_MODULE_OWNER(dev); |
10680 | SET_NETDEV_DEV(dev, &pdev->dev); | 10676 | SET_NETDEV_DEV(dev, &pdev->dev); |
10681 | 10677 | ||
10682 | if (pci_using_dac) | ||
10683 | dev->features |= NETIF_F_HIGHDMA; | ||
10684 | dev->features |= NETIF_F_LLTX; | 10678 | dev->features |= NETIF_F_LLTX; |
10685 | #if TG3_VLAN_TAG_USED | 10679 | #if TG3_VLAN_TAG_USED |
10686 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 10680 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
@@ -10765,6 +10759,44 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10765 | goto err_out_iounmap; | 10759 | goto err_out_iounmap; |
10766 | } | 10760 | } |
10767 | 10761 | ||
10762 | /* 5714, 5715 and 5780 cannot support DMA addresses > 40-bit. | ||
10763 | * On 64-bit systems with IOMMU, use 40-bit dma_mask. | ||
10764 | * On 64-bit systems without IOMMU, use 64-bit dma_mask and | ||
10765 | * do DMA address check in tg3_start_xmit(). | ||
10766 | */ | ||
10767 | if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { | ||
10768 | persist_dma_mask = dma_mask = DMA_40BIT_MASK; | ||
10769 | #ifdef CONFIG_HIGHMEM | ||
10770 | dma_mask = DMA_64BIT_MASK; | ||
10771 | #endif | ||
10772 | } else if (tp->tg3_flags2 & TG3_FLG2_IS_5788) | ||
10773 | persist_dma_mask = dma_mask = DMA_32BIT_MASK; | ||
10774 | else | ||
10775 | persist_dma_mask = dma_mask = DMA_64BIT_MASK; | ||
10776 | |||
10777 | /* Configure DMA attributes. */ | ||
10778 | if (dma_mask > DMA_32BIT_MASK) { | ||
10779 | err = pci_set_dma_mask(pdev, dma_mask); | ||
10780 | if (!err) { | ||
10781 | dev->features |= NETIF_F_HIGHDMA; | ||
10782 | err = pci_set_consistent_dma_mask(pdev, | ||
10783 | persist_dma_mask); | ||
10784 | if (err < 0) { | ||
10785 | printk(KERN_ERR PFX "Unable to obtain 64 bit " | ||
10786 | "DMA for consistent allocations\n"); | ||
10787 | goto err_out_iounmap; | ||
10788 | } | ||
10789 | } | ||
10790 | } | ||
10791 | if (err || dma_mask == DMA_32BIT_MASK) { | ||
10792 | err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | ||
10793 | if (err) { | ||
10794 | printk(KERN_ERR PFX "No usable DMA configuration, " | ||
10795 | "aborting.\n"); | ||
10796 | goto err_out_iounmap; | ||
10797 | } | ||
10798 | } | ||
10799 | |||
10768 | tg3_init_bufmgr_config(tp); | 10800 | tg3_init_bufmgr_config(tp); |
10769 | 10801 | ||
10770 | #if TG3_TSO_SUPPORT != 0 | 10802 | #if TG3_TSO_SUPPORT != 0 |
@@ -10833,9 +10865,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10833 | } else | 10865 | } else |
10834 | tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS; | 10866 | tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS; |
10835 | 10867 | ||
10836 | if (tp->tg3_flags2 & TG3_FLG2_IS_5788) | ||
10837 | dev->features &= ~NETIF_F_HIGHDMA; | ||
10838 | |||
10839 | /* flow control autonegotiation is default behavior */ | 10868 | /* flow control autonegotiation is default behavior */ |
10840 | tp->tg3_flags |= TG3_FLAG_PAUSE_AUTONEG; | 10869 | tp->tg3_flags |= TG3_FLAG_PAUSE_AUTONEG; |
10841 | 10870 | ||
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/parport/parport_serial.c b/drivers/parport/parport_serial.c index 166de3507780..10845253c9e0 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c | |||
@@ -312,8 +312,7 @@ static int __devinit parport_register (struct pci_dev *dev, | |||
312 | { | 312 | { |
313 | struct parport_pc_pci *card; | 313 | struct parport_pc_pci *card; |
314 | struct parport_serial_private *priv = pci_get_drvdata (dev); | 314 | struct parport_serial_private *priv = pci_get_drvdata (dev); |
315 | int i = id->driver_data, n; | 315 | int n, success = 0; |
316 | int success = 0; | ||
317 | 316 | ||
318 | priv->par = cards[id->driver_data]; | 317 | priv->par = cards[id->driver_data]; |
319 | card = &priv->par; | 318 | card = &priv->par; |
@@ -344,10 +343,8 @@ static int __devinit parport_register (struct pci_dev *dev, | |||
344 | "hi" as an offset (see SYBA | 343 | "hi" as an offset (see SYBA |
345 | def.) */ | 344 | def.) */ |
346 | /* TODO: test if sharing interrupts works */ | 345 | /* TODO: test if sharing interrupts works */ |
347 | printk (KERN_DEBUG "PCI parallel port detected: %04x:%04x, " | 346 | dev_dbg(&dev->dev, "PCI parallel port detected: I/O at " |
348 | "I/O at %#lx(%#lx)\n", | 347 | "%#lx(%#lx)\n", io_lo, io_hi); |
349 | parport_serial_pci_tbl[i].vendor, | ||
350 | parport_serial_pci_tbl[i].device, io_lo, io_hi); | ||
351 | port = parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE, | 348 | port = parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE, |
352 | PARPORT_DMA_NONE, dev); | 349 | PARPORT_DMA_NONE, dev); |
353 | if (port) { | 350 | if (port) { |
@@ -359,7 +356,7 @@ static int __devinit parport_register (struct pci_dev *dev, | |||
359 | if (card->postinit_hook) | 356 | if (card->postinit_hook) |
360 | card->postinit_hook (dev, card, !success); | 357 | card->postinit_hook (dev, card, !success); |
361 | 358 | ||
362 | return success ? 0 : 1; | 359 | return 0; |
363 | } | 360 | } |
364 | 361 | ||
365 | static int __devinit parport_serial_pci_probe (struct pci_dev *dev, | 362 | static int __devinit parport_serial_pci_probe (struct pci_dev *dev, |
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.c b/drivers/s390/block/dasd.c index af1d5b404cee..33157c84d1d3 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -215,9 +215,10 @@ dasd_state_basic_to_known(struct dasd_device * device) | |||
215 | * interrupt for this detection ccw uses the kernel event daemon to | 215 | * interrupt for this detection ccw uses the kernel event daemon to |
216 | * trigger the call to dasd_change_state. All this is done in the | 216 | * trigger the call to dasd_change_state. All this is done in the |
217 | * discipline code, see dasd_eckd.c. | 217 | * discipline code, see dasd_eckd.c. |
218 | * After the analysis ccw is done (do_analysis returned 0 or error) | 218 | * After the analysis ccw is done (do_analysis returned 0) the block |
219 | * the block device is setup. Either a fake disk is added to allow | 219 | * device is setup. |
220 | * formatting or a proper device request queue is created. | 220 | * In case the analysis returns an error, the device setup is stopped |
221 | * (a fake disk was already added to allow formatting). | ||
221 | */ | 222 | */ |
222 | static inline int | 223 | static inline int |
223 | dasd_state_basic_to_ready(struct dasd_device * device) | 224 | dasd_state_basic_to_ready(struct dasd_device * device) |
@@ -227,13 +228,19 @@ dasd_state_basic_to_ready(struct dasd_device * device) | |||
227 | rc = 0; | 228 | rc = 0; |
228 | if (device->discipline->do_analysis != NULL) | 229 | if (device->discipline->do_analysis != NULL) |
229 | rc = device->discipline->do_analysis(device); | 230 | rc = device->discipline->do_analysis(device); |
230 | if (rc) | 231 | if (rc) { |
232 | if (rc != -EAGAIN) | ||
233 | device->state = DASD_STATE_UNFMT; | ||
231 | return rc; | 234 | return rc; |
235 | } | ||
236 | /* make disk known with correct capacity */ | ||
232 | dasd_setup_queue(device); | 237 | dasd_setup_queue(device); |
238 | set_capacity(device->gdp, device->blocks << device->s2b_shift); | ||
233 | device->state = DASD_STATE_READY; | 239 | device->state = DASD_STATE_READY; |
234 | if (dasd_scan_partitions(device) != 0) | 240 | rc = dasd_scan_partitions(device); |
241 | if (rc) | ||
235 | device->state = DASD_STATE_BASIC; | 242 | device->state = DASD_STATE_BASIC; |
236 | return 0; | 243 | return rc; |
237 | } | 244 | } |
238 | 245 | ||
239 | /* | 246 | /* |
@@ -254,6 +261,15 @@ dasd_state_ready_to_basic(struct dasd_device * device) | |||
254 | } | 261 | } |
255 | 262 | ||
256 | /* | 263 | /* |
264 | * Back to basic. | ||
265 | */ | ||
266 | static inline void | ||
267 | dasd_state_unfmt_to_basic(struct dasd_device * device) | ||
268 | { | ||
269 | device->state = DASD_STATE_BASIC; | ||
270 | } | ||
271 | |||
272 | /* | ||
257 | * Make the device online and schedule the bottom half to start | 273 | * Make the device online and schedule the bottom half to start |
258 | * the requeueing of requests from the linux request queue to the | 274 | * the requeueing of requests from the linux request queue to the |
259 | * ccw queue. | 275 | * ccw queue. |
@@ -319,8 +335,12 @@ dasd_decrease_state(struct dasd_device *device) | |||
319 | if (device->state == DASD_STATE_READY && | 335 | if (device->state == DASD_STATE_READY && |
320 | device->target <= DASD_STATE_BASIC) | 336 | device->target <= DASD_STATE_BASIC) |
321 | dasd_state_ready_to_basic(device); | 337 | dasd_state_ready_to_basic(device); |
322 | 338 | ||
323 | if (device->state == DASD_STATE_BASIC && | 339 | if (device->state == DASD_STATE_UNFMT && |
340 | device->target <= DASD_STATE_BASIC) | ||
341 | dasd_state_unfmt_to_basic(device); | ||
342 | |||
343 | if (device->state == DASD_STATE_BASIC && | ||
324 | device->target <= DASD_STATE_KNOWN) | 344 | device->target <= DASD_STATE_KNOWN) |
325 | dasd_state_basic_to_known(device); | 345 | dasd_state_basic_to_known(device); |
326 | 346 | ||
@@ -1722,7 +1742,7 @@ dasd_open(struct inode *inp, struct file *filp) | |||
1722 | goto out; | 1742 | goto out; |
1723 | } | 1743 | } |
1724 | 1744 | ||
1725 | if (device->state < DASD_STATE_BASIC) { | 1745 | if (device->state <= DASD_STATE_BASIC) { |
1726 | DBF_DEV_EVENT(DBF_ERR, device, " %s", | 1746 | DBF_DEV_EVENT(DBF_ERR, device, " %s", |
1727 | " Cannot open unrecognized device"); | 1747 | " Cannot open unrecognized device"); |
1728 | rc = -ENODEV; | 1748 | rc = -ENODEV; |
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 65dc844b975c..fce2835e7d19 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c | |||
@@ -100,8 +100,6 @@ dasd_scan_partitions(struct dasd_device * device) | |||
100 | { | 100 | { |
101 | struct block_device *bdev; | 101 | struct block_device *bdev; |
102 | 102 | ||
103 | /* Make the disk known. */ | ||
104 | set_capacity(device->gdp, device->blocks << device->s2b_shift); | ||
105 | bdev = bdget_disk(device->gdp, 0); | 103 | bdev = bdget_disk(device->gdp, 0); |
106 | if (!bdev || blkdev_get(bdev, FMODE_READ, 1) < 0) | 104 | if (!bdev || blkdev_get(bdev, FMODE_READ, 1) < 0) |
107 | return -ENODEV; | 105 | return -ENODEV; |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 0592354cc604..7cb0b9e78a6a 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -26,7 +26,7 @@ | |||
26 | * new: the dasd_device structure is allocated. | 26 | * new: the dasd_device structure is allocated. |
27 | * known: the discipline for the device is identified. | 27 | * known: the discipline for the device is identified. |
28 | * basic: the device can do basic i/o. | 28 | * basic: the device can do basic i/o. |
29 | * accept: the device is analysed (format is known). | 29 | * unfmt: the device could not be analyzed (format is unknown). |
30 | * ready: partition detection is done and the device is can do block io. | 30 | * ready: partition detection is done and the device is can do block io. |
31 | * online: the device accepts requests from the block device queue. | 31 | * online: the device accepts requests from the block device queue. |
32 | * | 32 | * |
@@ -47,8 +47,9 @@ | |||
47 | #define DASD_STATE_NEW 0 | 47 | #define DASD_STATE_NEW 0 |
48 | #define DASD_STATE_KNOWN 1 | 48 | #define DASD_STATE_KNOWN 1 |
49 | #define DASD_STATE_BASIC 2 | 49 | #define DASD_STATE_BASIC 2 |
50 | #define DASD_STATE_READY 3 | 50 | #define DASD_STATE_UNFMT 3 |
51 | #define DASD_STATE_ONLINE 4 | 51 | #define DASD_STATE_READY 4 |
52 | #define DASD_STATE_ONLINE 5 | ||
52 | 53 | ||
53 | #include <linux/module.h> | 54 | #include <linux/module.h> |
54 | #include <linux/wait.h> | 55 | #include <linux/wait.h> |
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 2d5da3c75ca7..1aa3c261718a 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -93,6 +93,9 @@ dasd_devices_show(struct seq_file *m, void *v) | |||
93 | case DASD_STATE_BASIC: | 93 | case DASD_STATE_BASIC: |
94 | seq_printf(m, "basic"); | 94 | seq_printf(m, "basic"); |
95 | break; | 95 | break; |
96 | case DASD_STATE_UNFMT: | ||
97 | seq_printf(m, "unformatted"); | ||
98 | break; | ||
96 | case DASD_STATE_READY: | 99 | case DASD_STATE_READY: |
97 | case DASD_STATE_ONLINE: | 100 | case DASD_STATE_ONLINE: |
98 | seq_printf(m, "active "); | 101 | seq_printf(m, "active "); |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 8cf9905d484b..f4183d660258 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -1115,6 +1115,9 @@ chsc_enable_facility(int operation_code) | |||
1115 | goto out; | 1115 | goto out; |
1116 | } | 1116 | } |
1117 | switch (sda_area->response.code) { | 1117 | switch (sda_area->response.code) { |
1118 | case 0x0001: /* everything ok */ | ||
1119 | ret = 0; | ||
1120 | break; | ||
1118 | case 0x0003: /* invalid request block */ | 1121 | case 0x0003: /* invalid request block */ |
1119 | case 0x0007: | 1122 | case 0x0007: |
1120 | ret = -EINVAL; | 1123 | ret = -EINVAL; |
@@ -1123,6 +1126,8 @@ chsc_enable_facility(int operation_code) | |||
1123 | case 0x0101: /* facility not provided */ | 1126 | case 0x0101: /* facility not provided */ |
1124 | ret = -EOPNOTSUPP; | 1127 | ret = -EOPNOTSUPP; |
1125 | break; | 1128 | break; |
1129 | default: /* something went wrong */ | ||
1130 | ret = -EIO; | ||
1126 | } | 1131 | } |
1127 | out: | 1132 | out: |
1128 | free_page((unsigned long)sda_area); | 1133 | free_page((unsigned long)sda_area); |
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index d6469baa7e16..72118ee68954 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -168,7 +168,7 @@ smsg_init(void) | |||
168 | driver_unregister(&smsg_driver); | 168 | driver_unregister(&smsg_driver); |
169 | return -EIO; /* better errno ? */ | 169 | return -EIO; /* better errno ? */ |
170 | } | 170 | } |
171 | rc = iucv_connect (&smsg_pathid, 1, 0, "*MSG ", 0, 0, 0, 0, | 171 | rc = iucv_connect (&smsg_pathid, 255, 0, "*MSG ", 0, 0, 0, 0, |
172 | smsg_handle, 0); | 172 | smsg_handle, 0); |
173 | if (rc) { | 173 | if (rc) { |
174 | printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG"); | 174 | printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG"); |
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/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index 5d02ff4db6cc..b65462f76484 100644 --- a/drivers/scsi/sr_ioctl.c +++ b/drivers/scsi/sr_ioctl.c | |||
@@ -192,7 +192,7 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) | |||
192 | SDev = cd->device; | 192 | SDev = cd->device; |
193 | 193 | ||
194 | if (!sense) { | 194 | if (!sense) { |
195 | sense = kmalloc(sizeof(*sense), GFP_KERNEL); | 195 | sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); |
196 | if (!sense) { | 196 | if (!sense) { |
197 | err = -ENOMEM; | 197 | err = -ENOMEM; |
198 | goto out; | 198 | goto out; |
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/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 419dd3cd7862..193722d680cf 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
@@ -420,10 +420,8 @@ static void ip22zilog_transmit_chars(struct uart_ip22zilog_port *up, | |||
420 | if (up->port.info == NULL) | 420 | if (up->port.info == NULL) |
421 | goto ack_tx_int; | 421 | goto ack_tx_int; |
422 | xmit = &up->port.info->xmit; | 422 | xmit = &up->port.info->xmit; |
423 | if (uart_circ_empty(xmit)) { | 423 | if (uart_circ_empty(xmit)) |
424 | uart_write_wakeup(&up->port); | ||
425 | goto ack_tx_int; | 424 | goto ack_tx_int; |
426 | } | ||
427 | if (uart_tx_stopped(&up->port)) | 425 | if (uart_tx_stopped(&up->port)) |
428 | goto ack_tx_int; | 426 | goto ack_tx_int; |
429 | 427 | ||
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 95fb4939c675..cc1faa31d124 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -71,6 +71,11 @@ static void uart_change_pm(struct uart_state *state, int pm_state); | |||
71 | void uart_write_wakeup(struct uart_port *port) | 71 | void uart_write_wakeup(struct uart_port *port) |
72 | { | 72 | { |
73 | struct uart_info *info = port->info; | 73 | struct uart_info *info = port->info; |
74 | /* | ||
75 | * This means you called this function _after_ the port was | ||
76 | * closed. No cookie for you. | ||
77 | */ | ||
78 | BUG_ON(!info); | ||
74 | tasklet_schedule(&info->tlet); | 79 | tasklet_schedule(&info->tlet); |
75 | } | 80 | } |
76 | 81 | ||
@@ -471,14 +476,26 @@ static void uart_flush_chars(struct tty_struct *tty) | |||
471 | } | 476 | } |
472 | 477 | ||
473 | static int | 478 | static int |
474 | uart_write(struct tty_struct *tty, const unsigned char * buf, int count) | 479 | uart_write(struct tty_struct *tty, const unsigned char *buf, int count) |
475 | { | 480 | { |
476 | struct uart_state *state = tty->driver_data; | 481 | struct uart_state *state = tty->driver_data; |
477 | struct uart_port *port = state->port; | 482 | struct uart_port *port; |
478 | struct circ_buf *circ = &state->info->xmit; | 483 | struct circ_buf *circ; |
479 | unsigned long flags; | 484 | unsigned long flags; |
480 | int c, ret = 0; | 485 | int c, ret = 0; |
481 | 486 | ||
487 | /* | ||
488 | * This means you called this function _after_ the port was | ||
489 | * closed. No cookie for you. | ||
490 | */ | ||
491 | if (!state || !state->info) { | ||
492 | WARN_ON(1); | ||
493 | return -EL3HLT; | ||
494 | } | ||
495 | |||
496 | port = state->port; | ||
497 | circ = &state->info->xmit; | ||
498 | |||
482 | if (!circ->buf) | 499 | if (!circ->buf) |
483 | return 0; | 500 | return 0; |
484 | 501 | ||
@@ -521,6 +538,15 @@ static void uart_flush_buffer(struct tty_struct *tty) | |||
521 | struct uart_port *port = state->port; | 538 | struct uart_port *port = state->port; |
522 | unsigned long flags; | 539 | unsigned long flags; |
523 | 540 | ||
541 | /* | ||
542 | * This means you called this function _after_ the port was | ||
543 | * closed. No cookie for you. | ||
544 | */ | ||
545 | if (!state || !state->info) { | ||
546 | WARN_ON(1); | ||
547 | return; | ||
548 | } | ||
549 | |||
524 | DPRINTK("uart_flush_buffer(%d) called\n", tty->index); | 550 | DPRINTK("uart_flush_buffer(%d) called\n", tty->index); |
525 | 551 | ||
526 | spin_lock_irqsave(&port->lock, flags); | 552 | spin_lock_irqsave(&port->lock, flags); |
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 43e67d6c29d4..60ea4a3f0713 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c | |||
@@ -820,7 +820,7 @@ static int __init sn_sal_module_init(void) | |||
820 | int retval; | 820 | int retval; |
821 | 821 | ||
822 | if (!ia64_platform_is("sn2")) | 822 | if (!ia64_platform_is("sn2")) |
823 | return -ENODEV; | 823 | return 0; |
824 | 824 | ||
825 | printk(KERN_INFO "sn_console: Console driver init\n"); | 825 | printk(KERN_INFO "sn_console: Console driver init\n"); |
826 | 826 | ||
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 4dd6865d32b0..b5c96e74a903 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -242,8 +242,10 @@ static void serial_close(struct tty_struct *tty, struct file * filp) | |||
242 | 242 | ||
243 | down(&port->sem); | 243 | down(&port->sem); |
244 | 244 | ||
245 | if (port->open_count == 0) | 245 | if (port->open_count == 0) { |
246 | goto out; | 246 | up(&port->sem); |
247 | return; | ||
248 | } | ||
247 | 249 | ||
248 | --port->open_count; | 250 | --port->open_count; |
249 | if (port->open_count == 0) { | 251 | if (port->open_count == 0) { |
@@ -260,10 +262,8 @@ static void serial_close(struct tty_struct *tty, struct file * filp) | |||
260 | module_put(port->serial->type->driver.owner); | 262 | module_put(port->serial->type->driver.owner); |
261 | } | 263 | } |
262 | 264 | ||
263 | kref_put(&port->serial->kref, destroy_serial); | ||
264 | |||
265 | out: | ||
266 | up(&port->sem); | 265 | up(&port->sem); |
266 | kref_put(&port->serial->kref, destroy_serial); | ||
267 | } | 267 | } |
268 | 268 | ||
269 | static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) | 269 | static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) |
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 | ||