aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/pata_platform.c3
-rw-r--r--drivers/ata/pata_via.c1
-rw-r--r--drivers/char/agp/amd-k7-agp.c5
-rw-r--r--drivers/char/agp/amd64-agp.c2
-rw-r--r--drivers/char/agp/ati-agp.c36
-rw-r--r--drivers/char/agp/intel-agp.c9
-rw-r--r--drivers/char/agp/via-agp.c21
-rw-r--r--drivers/cpufreq/cpufreq.c17
-rw-r--r--drivers/ide/ide-pnp.c5
-rw-r--r--drivers/ide/ide.c5
-rw-r--r--drivers/ide/pci/aec62xx.c2
-rw-r--r--drivers/ide/pci/alim15x3.c2
-rw-r--r--drivers/ide/pci/amd74xx.c2
-rw-r--r--drivers/ide/pci/atiixp.c42
-rw-r--r--drivers/ide/pci/cmd64x.c2
-rw-r--r--drivers/ide/pci/cs5520.c2
-rw-r--r--drivers/ide/pci/cs5530.c2
-rw-r--r--drivers/ide/pci/cy82c693.c2
-rw-r--r--drivers/ide/pci/generic.c37
-rw-r--r--drivers/ide/pci/hpt34x.c2
-rw-r--r--drivers/ide/pci/hpt366.c2
-rw-r--r--drivers/ide/pci/jmicron.c3
-rw-r--r--drivers/ide/pci/ns87415.c2
-rw-r--r--drivers/ide/pci/opti621.c2
-rw-r--r--drivers/ide/pci/pdc202xx_new.c2
-rw-r--r--drivers/ide/pci/pdc202xx_old.c2
-rw-r--r--drivers/ide/pci/rz1000.c2
-rw-r--r--drivers/ide/pci/sc1200.c2
-rw-r--r--drivers/ide/pci/serverworks.c2
-rw-r--r--drivers/ide/pci/sgiioc4.c3
-rw-r--r--drivers/ide/pci/siimage.c2
-rw-r--r--drivers/ide/pci/sis5513.c2
-rw-r--r--drivers/ide/pci/sl82c105.c2
-rw-r--r--drivers/ide/pci/slc90e66.c2
-rw-r--r--drivers/ide/pci/triflex.c2
-rw-r--r--drivers/ide/pci/trm290.c2
-rw-r--r--drivers/ide/pci/via82cxxx.c5
-rw-r--r--drivers/kvm/svm.c2
-rw-r--r--drivers/mtd/nand/cafe.c1
-rw-r--r--drivers/net/82596.c7
-rw-r--r--drivers/net/b44.c52
-rw-r--r--drivers/net/bonding/bonding.h7
-rw-r--r--drivers/net/e100.c2
-rw-r--r--drivers/net/ehea/ehea.h2
-rw-r--r--drivers/net/ehea/ehea_main.c31
-rw-r--r--drivers/net/fs_enet/mac-fec.c13
-rw-r--r--drivers/net/fs_enet/mac-scc.c6
-rw-r--r--drivers/net/ifb.c3
-rw-r--r--drivers/net/phy/fixed.c2
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c2
-rw-r--r--drivers/serial/amba-pl010.c2
-rw-r--r--drivers/serial/amba-pl011.c2
-rw-r--r--drivers/serial/atmel_serial.c7
-rw-r--r--drivers/serial/atmel_serial.h2
54 files changed, 221 insertions, 160 deletions
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index ca2999f9f048..40ae11cbfda4 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -30,8 +30,7 @@ static int pio_mask = 1;
30 * Provide our own set_mode() as we don't want to change anything that has 30 * Provide our own set_mode() as we don't want to change anything that has
31 * already been configured.. 31 * already been configured..
32 */ 32 */
33static int pata_platform_set_mode(struct ata_port *ap, 33static int pata_platform_set_mode(struct ata_port *ap, struct ata_device **unused)
34 struct ata_device **r_failed_dev)
35{ 34{
36 int i; 35 int i;
37 36
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index f0d4f7e9ed31..0219419cae97 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -95,6 +95,7 @@ static const struct via_isa_bridge {
95 u8 rev_max; 95 u8 rev_max;
96 u16 flags; 96 u16 flags;
97} via_isa_bridges[] = { 97} via_isa_bridges[] = {
98 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
98 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 99 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
99 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 100 { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
100 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES}, 101 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES},
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index 51d0d562d01e..c85c8cadb6df 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -101,6 +101,11 @@ static int amd_create_gatt_pages(int nr_tables)
101 for (i = 0; i < nr_tables; i++) { 101 for (i = 0; i < nr_tables; i++) {
102 entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL); 102 entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL);
103 if (entry == NULL) { 103 if (entry == NULL) {
104 while (i > 0) {
105 kfree(tables[i-1]);
106 i--;
107 }
108 kfree(tables);
104 retval = -ENOMEM; 109 retval = -ENOMEM;
105 break; 110 break;
106 } 111 }
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 979300405c0e..93d2209fee4c 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -655,7 +655,7 @@ static struct pci_device_id agp_amd64_pci_table[] = {
655 .class = (PCI_CLASS_BRIDGE_HOST << 8), 655 .class = (PCI_CLASS_BRIDGE_HOST << 8),
656 .class_mask = ~0, 656 .class_mask = ~0,
657 .vendor = PCI_VENDOR_ID_VIA, 657 .vendor = PCI_VENDOR_ID_VIA,
658 .device = PCI_DEVICE_ID_VIA_K8M890CE, 658 .device = PCI_DEVICE_ID_VIA_VT3336,
659 .subvendor = PCI_ANY_ID, 659 .subvendor = PCI_ANY_ID,
660 .subdevice = PCI_ANY_ID, 660 .subdevice = PCI_ANY_ID,
661 }, 661 },
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index f244c6682738..9987dc2e0c3f 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -41,18 +41,18 @@ static struct gatt_mask ati_generic_masks[] =
41}; 41};
42 42
43 43
44typedef struct _ati_page_map { 44struct ati_page_map {
45 unsigned long *real; 45 unsigned long *real;
46 unsigned long __iomem *remapped; 46 unsigned long __iomem *remapped;
47} ati_page_map; 47};
48 48
49static struct _ati_generic_private { 49static struct _ati_generic_private {
50 volatile u8 __iomem *registers; 50 volatile u8 __iomem *registers;
51 ati_page_map **gatt_pages; 51 struct ati_page_map **gatt_pages;
52 int num_tables; 52 int num_tables;
53} ati_generic_private; 53} ati_generic_private;
54 54
55static int ati_create_page_map(ati_page_map *page_map) 55static int ati_create_page_map(struct ati_page_map *page_map)
56{ 56{
57 int i, err = 0; 57 int i, err = 0;
58 58
@@ -82,7 +82,7 @@ static int ati_create_page_map(ati_page_map *page_map)
82} 82}
83 83
84 84
85static void ati_free_page_map(ati_page_map *page_map) 85static void ati_free_page_map(struct ati_page_map *page_map)
86{ 86{
87 unmap_page_from_agp(virt_to_page(page_map->real)); 87 unmap_page_from_agp(virt_to_page(page_map->real));
88 iounmap(page_map->remapped); 88 iounmap(page_map->remapped);
@@ -94,8 +94,8 @@ static void ati_free_page_map(ati_page_map *page_map)
94static void ati_free_gatt_pages(void) 94static void ati_free_gatt_pages(void)
95{ 95{
96 int i; 96 int i;
97 ati_page_map **tables; 97 struct ati_page_map **tables;
98 ati_page_map *entry; 98 struct ati_page_map *entry;
99 99
100 tables = ati_generic_private.gatt_pages; 100 tables = ati_generic_private.gatt_pages;
101 for (i = 0; i < ati_generic_private.num_tables; i++) { 101 for (i = 0; i < ati_generic_private.num_tables; i++) {
@@ -112,30 +112,30 @@ static void ati_free_gatt_pages(void)
112 112
113static int ati_create_gatt_pages(int nr_tables) 113static int ati_create_gatt_pages(int nr_tables)
114{ 114{
115 ati_page_map **tables; 115 struct ati_page_map **tables;
116 ati_page_map *entry; 116 struct ati_page_map *entry;
117 int retval = 0; 117 int retval = 0;
118 int i; 118 int i;
119 119
120 tables = kzalloc((nr_tables + 1) * sizeof(ati_page_map *),GFP_KERNEL); 120 tables = kzalloc((nr_tables + 1) * sizeof(struct ati_page_map *),GFP_KERNEL);
121 if (tables == NULL) 121 if (tables == NULL)
122 return -ENOMEM; 122 return -ENOMEM;
123 123
124 for (i = 0; i < nr_tables; i++) { 124 for (i = 0; i < nr_tables; i++) {
125 entry = kzalloc(sizeof(ati_page_map), GFP_KERNEL); 125 entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL);
126 if (entry == NULL) { 126 if (entry == NULL) {
127 while (i>0) { 127 while (i > 0) {
128 kfree (tables[i-1]); 128 kfree(tables[i-1]);
129 i--; 129 i--;
130 } 130 }
131 kfree (tables); 131 kfree(tables);
132 tables = NULL;
133 retval = -ENOMEM; 132 retval = -ENOMEM;
134 break; 133 break;
135 } 134 }
136 tables[i] = entry; 135 tables[i] = entry;
137 retval = ati_create_page_map(entry); 136 retval = ati_create_page_map(entry);
138 if (retval != 0) break; 137 if (retval != 0)
138 break;
139 } 139 }
140 ati_generic_private.num_tables = nr_tables; 140 ati_generic_private.num_tables = nr_tables;
141 ati_generic_private.gatt_pages = tables; 141 ati_generic_private.gatt_pages = tables;
@@ -340,7 +340,7 @@ static int ati_remove_memory(struct agp_memory * mem, off_t pg_start,
340static int ati_create_gatt_table(struct agp_bridge_data *bridge) 340static int ati_create_gatt_table(struct agp_bridge_data *bridge)
341{ 341{
342 struct aper_size_info_lvl2 *value; 342 struct aper_size_info_lvl2 *value;
343 ati_page_map page_dir; 343 struct ati_page_map page_dir;
344 unsigned long addr; 344 unsigned long addr;
345 int retval; 345 int retval;
346 u32 temp; 346 u32 temp;
@@ -400,7 +400,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
400 400
401static int ati_free_gatt_table(struct agp_bridge_data *bridge) 401static int ati_free_gatt_table(struct agp_bridge_data *bridge)
402{ 402{
403 ati_page_map page_dir; 403 struct ati_page_map page_dir;
404 404
405 page_dir.real = (unsigned long *)agp_bridge->gatt_table_real; 405 page_dir.real = (unsigned long *)agp_bridge->gatt_table_real;
406 page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table; 406 page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table;
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index ab0a9c0ad7c0..a3011de51f7c 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -1955,6 +1955,15 @@ static int agp_intel_resume(struct pci_dev *pdev)
1955 1955
1956 pci_restore_state(pdev); 1956 pci_restore_state(pdev);
1957 1957
1958 /* We should restore our graphics device's config space,
1959 * as host bridge (00:00) resumes before graphics device (02:00),
1960 * then our access to its pci space can work right.
1961 */
1962 if (intel_i810_private.i810_dev)
1963 pci_restore_state(intel_i810_private.i810_dev);
1964 if (intel_i830_private.i830_dev)
1965 pci_restore_state(intel_i830_private.i830_dev);
1966
1958 if (bridge->driver == &intel_generic_driver) 1967 if (bridge->driver == &intel_generic_driver)
1959 intel_configure(); 1968 intel_configure();
1960 else if (bridge->driver == &intel_850_driver) 1969 else if (bridge->driver == &intel_850_driver)
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
index c149ac9ce9a7..2ded7a280d7f 100644
--- a/drivers/char/agp/via-agp.c
+++ b/drivers/char/agp/via-agp.c
@@ -380,9 +380,23 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata =
380 /* P4M800CE */ 380 /* P4M800CE */
381 { 381 {
382 .device_id = PCI_DEVICE_ID_VIA_P4M800CE, 382 .device_id = PCI_DEVICE_ID_VIA_P4M800CE,
383 .chipset_name = "P4M800CE", 383 .chipset_name = "VT3314",
384 },
385 /* CX700 */
386 {
387 .device_id = PCI_DEVICE_ID_VIA_CX700,
388 .chipset_name = "CX700",
389 },
390 /* VT3336 */
391 {
392 .device_id = PCI_DEVICE_ID_VIA_VT3336,
393 .chipset_name = "VT3336",
394 },
395 /* P4M890 */
396 {
397 .device_id = PCI_DEVICE_ID_VIA_P4M890,
398 .chipset_name = "P4M890",
384 }, 399 },
385
386 { }, /* dummy final entry, always present */ 400 { }, /* dummy final entry, always present */
387}; 401};
388 402
@@ -524,6 +538,9 @@ static const struct pci_device_id agp_via_pci_table[] = {
524 ID(PCI_DEVICE_ID_VIA_83_87XX_1), 538 ID(PCI_DEVICE_ID_VIA_83_87XX_1),
525 ID(PCI_DEVICE_ID_VIA_3296_0), 539 ID(PCI_DEVICE_ID_VIA_3296_0),
526 ID(PCI_DEVICE_ID_VIA_P4M800CE), 540 ID(PCI_DEVICE_ID_VIA_P4M800CE),
541 ID(PCI_DEVICE_ID_VIA_CX700),
542 ID(PCI_DEVICE_ID_VIA_VT3336),
543 ID(PCI_DEVICE_ID_VIA_P4M890),
527 { } 544 { }
528}; 545};
529 546
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index d91330432ba2..a45cc89e387a 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -722,8 +722,13 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
722 spin_unlock_irqrestore(&cpufreq_driver_lock, flags); 722 spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
723 723
724 dprintk("CPU already managed, adding link\n"); 724 dprintk("CPU already managed, adding link\n");
725 sysfs_create_link(&sys_dev->kobj, 725 ret = sysfs_create_link(&sys_dev->kobj,
726 &managed_policy->kobj, "cpufreq"); 726 &managed_policy->kobj,
727 "cpufreq");
728 if (ret) {
729 mutex_unlock(&policy->lock);
730 goto err_out_driver_exit;
731 }
727 732
728 cpufreq_debug_enable_ratelimit(); 733 cpufreq_debug_enable_ratelimit();
729 mutex_unlock(&policy->lock); 734 mutex_unlock(&policy->lock);
@@ -770,8 +775,12 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
770 dprintk("CPU %u already managed, adding link\n", j); 775 dprintk("CPU %u already managed, adding link\n", j);
771 cpufreq_cpu_get(cpu); 776 cpufreq_cpu_get(cpu);
772 cpu_sys_dev = get_cpu_sysdev(j); 777 cpu_sys_dev = get_cpu_sysdev(j);
773 sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj, 778 ret = sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj,
774 "cpufreq"); 779 "cpufreq");
780 if (ret) {
781 mutex_unlock(&policy->lock);
782 goto err_out_unregister;
783 }
775 } 784 }
776 785
777 policy->governor = NULL; /* to assure that the starting sequence is 786 policy->governor = NULL; /* to assure that the starting sequence is
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index df7d1504f84e..98410ca044cf 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -73,3 +73,8 @@ void __init pnpide_init(void)
73{ 73{
74 pnp_register_driver(&idepnp_driver); 74 pnp_register_driver(&idepnp_driver);
75} 75}
76
77void __exit pnpide_exit(void)
78{
79 pnp_unregister_driver(&idepnp_driver);
80}
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 16890769dca6..3b334af0c7b9 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1782,6 +1782,7 @@ done:
1782} 1782}
1783 1783
1784extern void pnpide_init(void); 1784extern void pnpide_init(void);
1785extern void pnpide_exit(void);
1785extern void h8300_ide_init(void); 1786extern void h8300_ide_init(void);
1786 1787
1787/* 1788/*
@@ -2094,6 +2095,10 @@ void cleanup_module (void)
2094 for (index = 0; index < MAX_HWIFS; ++index) 2095 for (index = 0; index < MAX_HWIFS; ++index)
2095 ide_unregister(index); 2096 ide_unregister(index);
2096 2097
2098#ifdef CONFIG_BLK_DEV_IDEPNP
2099 pnpide_exit();
2100#endif
2101
2097#ifdef CONFIG_PROC_FS 2102#ifdef CONFIG_PROC_FS
2098 proc_ide_destroy(); 2103 proc_ide_destroy();
2099#endif 2104#endif
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index f286079d233f..d261bfbad222 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -441,7 +441,7 @@ static struct pci_driver driver = {
441 .probe = aec62xx_init_one, 441 .probe = aec62xx_init_one,
442}; 442};
443 443
444static int aec62xx_ide_init(void) 444static int __init aec62xx_ide_init(void)
445{ 445{
446 return ide_pci_register_driver(&driver); 446 return ide_pci_register_driver(&driver);
447} 447}
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 89109be5162c..68df77ec502b 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -907,7 +907,7 @@ static struct pci_driver driver = {
907 .probe = alim15x3_init_one, 907 .probe = alim15x3_init_one,
908}; 908};
909 909
910static int ali15x3_ide_init(void) 910static int __init ali15x3_ide_init(void)
911{ 911{
912 return ide_pci_register_driver(&driver); 912 return ide_pci_register_driver(&driver);
913} 913}
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 753fe0e21456..a4336995a410 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -544,7 +544,7 @@ static struct pci_driver driver = {
544 .probe = amd74xx_probe, 544 .probe = amd74xx_probe,
545}; 545};
546 546
547static int amd74xx_ide_init(void) 547static int __init amd74xx_ide_init(void)
548{ 548{
549 return ide_pci_register_driver(&driver); 549 return ide_pci_register_driver(&driver);
550} 550}
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index 524e65de4398..982ac31fa995 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -291,8 +291,12 @@ fast_ata_pio:
291 291
292static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) 292static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
293{ 293{
294 u8 udma_mode = 0;
295 u8 ch = hwif->channel;
296 struct pci_dev *pdev = hwif->pci_dev;
297
294 if (!hwif->irq) 298 if (!hwif->irq)
295 hwif->irq = hwif->channel ? 15 : 14; 299 hwif->irq = ch ? 15 : 14;
296 300
297 hwif->autodma = 0; 301 hwif->autodma = 0;
298 hwif->tuneproc = &atiixp_tuneproc; 302 hwif->tuneproc = &atiixp_tuneproc;
@@ -308,8 +312,12 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
308 hwif->mwdma_mask = 0x06; 312 hwif->mwdma_mask = 0x06;
309 hwif->swdma_mask = 0x04; 313 hwif->swdma_mask = 0x04;
310 314
311 /* FIXME: proper cable detection needed */ 315 pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ch, &udma_mode);
312 hwif->udma_four = 1; 316 if ((udma_mode & 0x07) >= 0x04 || (udma_mode & 0x70) >= 0x40)
317 hwif->udma_four = 1;
318 else
319 hwif->udma_four = 0;
320
313 hwif->ide_dma_host_on = &atiixp_ide_dma_host_on; 321 hwif->ide_dma_host_on = &atiixp_ide_dma_host_on;
314 hwif->ide_dma_host_off = &atiixp_ide_dma_host_off; 322 hwif->ide_dma_host_off = &atiixp_ide_dma_host_off;
315 hwif->ide_dma_check = &atiixp_dma_check; 323 hwif->ide_dma_check = &atiixp_dma_check;
@@ -320,19 +328,6 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
320 hwif->drives[0].autodma = hwif->autodma; 328 hwif->drives[0].autodma = hwif->autodma;
321} 329}
322 330
323static void __devinit init_hwif_sb600_legacy(ide_hwif_t *hwif)
324{
325
326 hwif->atapi_dma = 1;
327 hwif->ultra_mask = 0x7f;
328 hwif->mwdma_mask = 0x07;
329 hwif->swdma_mask = 0x07;
330
331 if (!noautodma)
332 hwif->autodma = 1;
333 hwif->drives[0].autodma = hwif->autodma;
334 hwif->drives[1].autodma = hwif->autodma;
335}
336 331
337static ide_pci_device_t atiixp_pci_info[] __devinitdata = { 332static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
338 { /* 0 */ 333 { /* 0 */
@@ -343,12 +338,13 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = {
343 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, 338 .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}},
344 .bootable = ON_BOARD, 339 .bootable = ON_BOARD,
345 },{ /* 1 */ 340 },{ /* 1 */
346 .name = "ATI SB600 SATA Legacy IDE", 341 .name = "SB600_PATA",
347 .init_hwif = init_hwif_sb600_legacy, 342 .init_hwif = init_hwif_atiixp,
348 .channels = 2, 343 .channels = 1,
349 .autodma = AUTODMA, 344 .autodma = AUTODMA,
350 .bootable = ON_BOARD, 345 .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}},
351 } 346 .bootable = ON_BOARD,
347 },
352}; 348};
353 349
354/** 350/**
@@ -369,7 +365,7 @@ static struct pci_device_id atiixp_pci_tbl[] = {
369 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP200_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 365 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP200_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
370 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 366 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
371 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 367 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
372 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 368 { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
373 { 0, }, 369 { 0, },
374}; 370};
375MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); 371MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
@@ -380,7 +376,7 @@ static struct pci_driver driver = {
380 .probe = atiixp_init_one, 376 .probe = atiixp_init_one,
381}; 377};
382 378
383static int atiixp_ide_init(void) 379static int __init atiixp_ide_init(void)
384{ 380{
385 return ide_pci_register_driver(&driver); 381 return ide_pci_register_driver(&driver);
386} 382}
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 20c32716bbc4..aee947e8fc38 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -793,7 +793,7 @@ static struct pci_driver driver = {
793 .probe = cmd64x_init_one, 793 .probe = cmd64x_init_one,
794}; 794};
795 795
796static int cmd64x_ide_init(void) 796static int __init cmd64x_ide_init(void)
797{ 797{
798 return ide_pci_register_driver(&driver); 798 return ide_pci_register_driver(&driver);
799} 799}
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 079f7c86726b..ba6786aabf3b 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -260,7 +260,7 @@ static struct pci_driver driver = {
260 .probe = cs5520_init_one, 260 .probe = cs5520_init_one,
261}; 261};
262 262
263static int cs5520_ide_init(void) 263static int __init cs5520_ide_init(void)
264{ 264{
265 return ide_pci_register_driver(&driver); 265 return ide_pci_register_driver(&driver);
266} 266}
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index ae405fa32236..9bf5fdfc5b1f 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -374,7 +374,7 @@ static struct pci_driver driver = {
374 .probe = cs5530_init_one, 374 .probe = cs5530_init_one,
375}; 375};
376 376
377static int cs5530_ide_init(void) 377static int __init cs5530_ide_init(void)
378{ 378{
379 return ide_pci_register_driver(&driver); 379 return ide_pci_register_driver(&driver);
380} 380}
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index 64330c459bd4..9eafcbf444f4 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -519,7 +519,7 @@ static struct pci_driver driver = {
519 .probe = cy82c693_init_one, 519 .probe = cy82c693_init_one,
520}; 520};
521 521
522static int cy82c693_ide_init(void) 522static int __init cy82c693_ide_init(void)
523{ 523{
524 return ide_pci_register_driver(&driver); 524 return ide_pci_register_driver(&driver);
525} 525}
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index 9f306880491a..b408c6c517ea 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -185,36 +185,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
185 .channels = 2, 185 .channels = 2,
186 .autodma = AUTODMA, 186 .autodma = AUTODMA,
187 .bootable = OFF_BOARD, 187 .bootable = OFF_BOARD,
188 },{ /* 15 */
189 .name = "JMB361",
190 .init_hwif = init_hwif_generic,
191 .channels = 2,
192 .autodma = AUTODMA,
193 .bootable = OFF_BOARD,
194 },{ /* 16 */
195 .name = "JMB363",
196 .init_hwif = init_hwif_generic,
197 .channels = 2,
198 .autodma = AUTODMA,
199 .bootable = OFF_BOARD,
200 },{ /* 17 */
201 .name = "JMB365",
202 .init_hwif = init_hwif_generic,
203 .channels = 2,
204 .autodma = AUTODMA,
205 .bootable = OFF_BOARD,
206 },{ /* 18 */
207 .name = "JMB366",
208 .init_hwif = init_hwif_generic,
209 .channels = 2,
210 .autodma = AUTODMA,
211 .bootable = OFF_BOARD,
212 },{ /* 19 */
213 .name = "JMB368",
214 .init_hwif = init_hwif_generic,
215 .channels = 2,
216 .autodma = AUTODMA,
217 .bootable = OFF_BOARD,
218 } 188 }
219}; 189};
220 190
@@ -281,11 +251,6 @@ static struct pci_device_id generic_pci_tbl[] = {
281 { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, 251 { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12},
282 { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, 252 { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13},
283 { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, 253 { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14},
284 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15},
285 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16},
286 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17},
287 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18},
288 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19},
289 /* Must come last. If you add entries adjust this table appropriately and the init_one code */ 254 /* Must come last. If you add entries adjust this table appropriately and the init_one code */
290 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, 255 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0},
291 { 0, }, 256 { 0, },
@@ -298,7 +263,7 @@ static struct pci_driver driver = {
298 .probe = generic_init_one, 263 .probe = generic_init_one,
299}; 264};
300 265
301static int generic_ide_init(void) 266static int __init generic_ide_init(void)
302{ 267{
303 return ide_pci_register_driver(&driver); 268 return ide_pci_register_driver(&driver);
304} 269}
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index b46cb042290a..ce7b08f08a09 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -265,7 +265,7 @@ static struct pci_driver driver = {
265 .probe = hpt34x_init_one, 265 .probe = hpt34x_init_one,
266}; 266};
267 267
268static int hpt34x_ide_init(void) 268static int __init hpt34x_ide_init(void)
269{ 269{
270 return ide_pci_register_driver(&driver); 270 return ide_pci_register_driver(&driver);
271} 271}
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 08119da06d54..b486442dd5d7 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -1613,7 +1613,7 @@ static struct pci_driver driver = {
1613 .probe = hpt366_init_one, 1613 .probe = hpt366_init_one,
1614}; 1614};
1615 1615
1616static int hpt366_ide_init(void) 1616static int __init hpt366_ide_init(void)
1617{ 1617{
1618 return ide_pci_register_driver(&driver); 1618 return ide_pci_register_driver(&driver);
1619} 1619}
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index c1cec236ecf0..35dda8fcd0ac 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -93,8 +93,9 @@ static int __devinit ata66_jmicron(ide_hwif_t *hwif)
93 return 0; 93 return 0;
94 return 1; 94 return 1;
95 case PORT_SATA: 95 case PORT_SATA:
96 return 1; 96 break;
97 } 97 }
98 return 1; /* Avoid bogus "control reaches end of non-void function" */
98} 99}
99 100
100static void jmicron_tuneproc (ide_drive_t *drive, byte mode_wanted) 101static void jmicron_tuneproc (ide_drive_t *drive, byte mode_wanted)
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c
index d95714bcee4e..8aaea4ea5549 100644
--- a/drivers/ide/pci/ns87415.c
+++ b/drivers/ide/pci/ns87415.c
@@ -302,7 +302,7 @@ static struct pci_driver driver = {
302 .probe = ns87415_init_one, 302 .probe = ns87415_init_one,
303}; 303};
304 304
305static int ns87415_ide_init(void) 305static int __init ns87415_ide_init(void)
306{ 306{
307 return ide_pci_register_driver(&driver); 307 return ide_pci_register_driver(&driver);
308} 308}
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
index 7a7c2ef78ac2..22bbf613f948 100644
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -382,7 +382,7 @@ static struct pci_driver driver = {
382 .probe = opti621_init_one, 382 .probe = opti621_init_one,
383}; 383};
384 384
385static int opti621_ide_init(void) 385static int __init opti621_ide_init(void)
386{ 386{
387 return ide_pci_register_driver(&driver); 387 return ide_pci_register_driver(&driver);
388} 388}
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 7cb48576e479..77a9aaa7dab9 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -756,7 +756,7 @@ static struct pci_driver driver = {
756 .probe = pdc202new_init_one, 756 .probe = pdc202new_init_one,
757}; 757};
758 758
759static int pdc202new_ide_init(void) 759static int __init pdc202new_ide_init(void)
760{ 760{
761 return ide_pci_register_driver(&driver); 761 return ide_pci_register_driver(&driver);
762} 762}
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 184cdacddeb6..143239c093d5 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -719,7 +719,7 @@ static struct pci_driver driver = {
719 .probe = pdc202xx_init_one, 719 .probe = pdc202xx_init_one,
720}; 720};
721 721
722static int pdc202xx_ide_init(void) 722static int __init pdc202xx_ide_init(void)
723{ 723{
724 return ide_pci_register_driver(&driver); 724 return ide_pci_register_driver(&driver);
725} 725}
diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c
index 5f6950c2d1d1..c1855311052b 100644
--- a/drivers/ide/pci/rz1000.c
+++ b/drivers/ide/pci/rz1000.c
@@ -77,7 +77,7 @@ static struct pci_driver driver = {
77 .probe = rz1000_init_one, 77 .probe = rz1000_init_one,
78}; 78};
79 79
80static int rz1000_ide_init(void) 80static int __init rz1000_ide_init(void)
81{ 81{
82 return ide_pci_register_driver(&driver); 82 return ide_pci_register_driver(&driver);
83} 83}
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index ff80937d94dd..8d762d323f8b 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -507,7 +507,7 @@ static struct pci_driver driver = {
507#endif 507#endif
508}; 508};
509 509
510static int sc1200_ide_init(void) 510static int __init sc1200_ide_init(void)
511{ 511{
512 return ide_pci_register_driver(&driver); 512 return ide_pci_register_driver(&driver);
513} 513}
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index 057548d07205..ea9a28a45853 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -666,7 +666,7 @@ static struct pci_driver driver = {
666 .probe = svwks_init_one, 666 .probe = svwks_init_one,
667}; 667};
668 668
669static int svwks_ide_init(void) 669static int __init svwks_ide_init(void)
670{ 670{
671 return ide_pci_register_driver(&driver); 671 return ide_pci_register_driver(&driver);
672} 672}
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index cfad09accf52..b0bf01809279 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -762,8 +762,7 @@ static struct ioc4_submodule ioc4_ide_submodule = {
762/* .is_remove = ioc4_ide_remove_one, */ 762/* .is_remove = ioc4_ide_remove_one, */
763}; 763};
764 764
765static int __devinit 765static int __init ioc4_ide_init(void)
766ioc4_ide_init(void)
767{ 766{
768 return ioc4_register_submodule(&ioc4_ide_submodule); 767 return ioc4_register_submodule(&ioc4_ide_submodule);
769} 768}
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 697f566fb90a..4ff89c7d990a 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -1096,7 +1096,7 @@ static struct pci_driver driver = {
1096 .probe = siimage_init_one, 1096 .probe = siimage_init_one,
1097}; 1097};
1098 1098
1099static int siimage_ide_init(void) 1099static int __init siimage_ide_init(void)
1100{ 1100{
1101 return ide_pci_register_driver(&driver); 1101 return ide_pci_register_driver(&driver);
1102} 1102}
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 6b313139b5e4..1afff659ab55 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -968,7 +968,7 @@ static struct pci_driver driver = {
968 .probe = sis5513_init_one, 968 .probe = sis5513_init_one,
969}; 969};
970 970
971static int sis5513_ide_init(void) 971static int __init sis5513_ide_init(void)
972{ 972{
973 return ide_pci_register_driver(&driver); 973 return ide_pci_register_driver(&driver);
974} 974}
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
index 5afefe8692fe..170a26199050 100644
--- a/drivers/ide/pci/sl82c105.c
+++ b/drivers/ide/pci/sl82c105.c
@@ -492,7 +492,7 @@ static struct pci_driver driver = {
492 .probe = sl82c105_init_one, 492 .probe = sl82c105_init_one,
493}; 493};
494 494
495static int sl82c105_ide_init(void) 495static int __init sl82c105_ide_init(void)
496{ 496{
497 return ide_pci_register_driver(&driver); 497 return ide_pci_register_driver(&driver);
498} 498}
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 9be7e49cba0e..90e79c0844d2 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -253,7 +253,7 @@ static struct pci_driver driver = {
253 .probe = slc90e66_init_one, 253 .probe = slc90e66_init_one,
254}; 254};
255 255
256static int slc90e66_ide_init(void) 256static int __init slc90e66_ide_init(void)
257{ 257{
258 return ide_pci_register_driver(&driver); 258 return ide_pci_register_driver(&driver);
259} 259}
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c
index 56d84931d6de..b13cce1fd1a6 100644
--- a/drivers/ide/pci/triflex.c
+++ b/drivers/ide/pci/triflex.c
@@ -173,7 +173,7 @@ static struct pci_driver driver = {
173 .probe = triflex_init_one, 173 .probe = triflex_init_one,
174}; 174};
175 175
176static int triflex_ide_init(void) 176static int __init triflex_ide_init(void)
177{ 177{
178 return ide_pci_register_driver(&driver); 178 return ide_pci_register_driver(&driver);
179} 179}
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index 2a282529bfc1..174b88c4780e 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -355,7 +355,7 @@ static struct pci_driver driver = {
355 .probe = trm290_init_one, 355 .probe = trm290_init_one,
356}; 356};
357 357
358static int trm290_ide_init(void) 358static int __init trm290_ide_init(void)
359{ 359{
360 return ide_pci_register_driver(&driver); 360 return ide_pci_register_driver(&driver);
361} 361}
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 381cc6f101ce..a98b4d38b9dd 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -78,6 +78,8 @@ static struct via_isa_bridge {
78 u8 rev_max; 78 u8 rev_max;
79 u16 flags; 79 u16 flags;
80} via_isa_bridges[] = { 80} via_isa_bridges[] = {
81 { "cx7000", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
82 { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
81 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 83 { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
82 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 84 { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
83 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, 85 { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
@@ -504,6 +506,7 @@ static struct pci_device_id via_pci_tbl[] = {
504 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 506 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
505 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 507 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
506 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 508 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
509 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_SATA_EIDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
507 { 0, }, 510 { 0, },
508}; 511};
509MODULE_DEVICE_TABLE(pci, via_pci_tbl); 512MODULE_DEVICE_TABLE(pci, via_pci_tbl);
@@ -514,7 +517,7 @@ static struct pci_driver driver = {
514 .probe = via_init_one, 517 .probe = via_init_one,
515}; 518};
516 519
517static int via_ide_init(void) 520static int __init via_ide_init(void)
518{ 521{
519 return ide_pci_register_driver(&driver); 522 return ide_pci_register_driver(&driver);
520} 523}
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 9c70ff65e6b7..c79df79307ed 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1163,7 +1163,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
1163 case MSR_K6_STAR: 1163 case MSR_K6_STAR:
1164 vcpu->svm->vmcb->save.star = data; 1164 vcpu->svm->vmcb->save.star = data;
1165 break; 1165 break;
1166#ifdef CONFIG_X86_64_ 1166#ifdef CONFIG_X86_64
1167 case MSR_LSTAR: 1167 case MSR_LSTAR:
1168 vcpu->svm->vmcb->save.lstar = data; 1168 vcpu->svm->vmcb->save.lstar = data;
1169 break; 1169 break;
diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c
index b8d9b64cccc0..65f9bd3ceebf 100644
--- a/drivers/mtd/nand/cafe.c
+++ b/drivers/mtd/nand/cafe.c
@@ -14,6 +14,7 @@
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/dma-mapping.h>
17#include <asm/io.h> 18#include <asm/io.h>
18 19
19#define CAFE_NAND_CTRL1 0x00 20#define CAFE_NAND_CTRL1 0x00
diff --git a/drivers/net/82596.c b/drivers/net/82596.c
index 8236f26ffd46..640d7ca2ebcf 100644
--- a/drivers/net/82596.c
+++ b/drivers/net/82596.c
@@ -1066,8 +1066,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
1066 short length = skb->len; 1066 short length = skb->len;
1067 dev->trans_start = jiffies; 1067 dev->trans_start = jiffies;
1068 1068
1069 DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%x) called\n", dev->name, 1069 DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%p) called\n",
1070 skb->len, (unsigned int)skb->data)); 1070 dev->name, skb->len, skb->data));
1071 1071
1072 if (skb->len < ETH_ZLEN) { 1072 if (skb->len < ETH_ZLEN) {
1073 if (skb_padto(skb, ETH_ZLEN)) 1073 if (skb_padto(skb, ETH_ZLEN))
@@ -1246,7 +1246,8 @@ struct net_device * __init i82596_probe(int unit)
1246 dev->priv = (void *)(dev->mem_start); 1246 dev->priv = (void *)(dev->mem_start);
1247 1247
1248 lp = dev->priv; 1248 lp = dev->priv;
1249 DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", 1249 DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%zd bytes), "
1250 "lp->scb at 0x%08lx\n",
1250 dev->name, (unsigned long)lp, 1251 dev->name, (unsigned long)lp,
1251 sizeof(struct i596_private), (unsigned long)&lp->scb)); 1252 sizeof(struct i596_private), (unsigned long)&lp->scb));
1252 memset((void *) lp, 0, sizeof(struct i596_private)); 1253 memset((void *) lp, 0, sizeof(struct i596_private));
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 5eb2ec68393f..303a8d94ad4b 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -110,6 +110,11 @@ MODULE_DEVICE_TABLE(pci, b44_pci_tbl);
110 110
111static void b44_halt(struct b44 *); 111static void b44_halt(struct b44 *);
112static void b44_init_rings(struct b44 *); 112static void b44_init_rings(struct b44 *);
113
114#define B44_FULL_RESET 1
115#define B44_FULL_RESET_SKIP_PHY 2
116#define B44_PARTIAL_RESET 3
117
113static void b44_init_hw(struct b44 *, int); 118static void b44_init_hw(struct b44 *, int);
114 119
115static int dma_desc_align_mask; 120static int dma_desc_align_mask;
@@ -752,7 +757,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
752 dest_idx * sizeof(dest_desc), 757 dest_idx * sizeof(dest_desc),
753 DMA_BIDIRECTIONAL); 758 DMA_BIDIRECTIONAL);
754 759
755 pci_dma_sync_single_for_device(bp->pdev, src_desc->addr, 760 pci_dma_sync_single_for_device(bp->pdev, le32_to_cpu(src_desc->addr),
756 RX_PKT_BUF_SZ, 761 RX_PKT_BUF_SZ,
757 PCI_DMA_FROMDEVICE); 762 PCI_DMA_FROMDEVICE);
758} 763}
@@ -884,7 +889,7 @@ static int b44_poll(struct net_device *netdev, int *budget)
884 spin_lock_irqsave(&bp->lock, flags); 889 spin_lock_irqsave(&bp->lock, flags);
885 b44_halt(bp); 890 b44_halt(bp);
886 b44_init_rings(bp); 891 b44_init_rings(bp);
887 b44_init_hw(bp, 1); 892 b44_init_hw(bp, B44_FULL_RESET_SKIP_PHY);
888 netif_wake_queue(bp->dev); 893 netif_wake_queue(bp->dev);
889 spin_unlock_irqrestore(&bp->lock, flags); 894 spin_unlock_irqrestore(&bp->lock, flags);
890 done = 1; 895 done = 1;
@@ -954,7 +959,7 @@ static void b44_tx_timeout(struct net_device *dev)
954 959
955 b44_halt(bp); 960 b44_halt(bp);
956 b44_init_rings(bp); 961 b44_init_rings(bp);
957 b44_init_hw(bp, 1); 962 b44_init_hw(bp, B44_FULL_RESET);
958 963
959 spin_unlock_irq(&bp->lock); 964 spin_unlock_irq(&bp->lock);
960 965
@@ -1071,7 +1076,7 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu)
1071 b44_halt(bp); 1076 b44_halt(bp);
1072 dev->mtu = new_mtu; 1077 dev->mtu = new_mtu;
1073 b44_init_rings(bp); 1078 b44_init_rings(bp);
1074 b44_init_hw(bp, 1); 1079 b44_init_hw(bp, B44_FULL_RESET);
1075 spin_unlock_irq(&bp->lock); 1080 spin_unlock_irq(&bp->lock);
1076 1081
1077 b44_enable_ints(bp); 1082 b44_enable_ints(bp);
@@ -1368,12 +1373,12 @@ static int b44_set_mac_addr(struct net_device *dev, void *p)
1368 * packet processing. Invoked with bp->lock held. 1373 * packet processing. Invoked with bp->lock held.
1369 */ 1374 */
1370static void __b44_set_rx_mode(struct net_device *); 1375static void __b44_set_rx_mode(struct net_device *);
1371static void b44_init_hw(struct b44 *bp, int full_reset) 1376static void b44_init_hw(struct b44 *bp, int reset_kind)
1372{ 1377{
1373 u32 val; 1378 u32 val;
1374 1379
1375 b44_chip_reset(bp); 1380 b44_chip_reset(bp);
1376 if (full_reset) { 1381 if (reset_kind == B44_FULL_RESET) {
1377 b44_phy_reset(bp); 1382 b44_phy_reset(bp);
1378 b44_setup_phy(bp); 1383 b44_setup_phy(bp);
1379 } 1384 }
@@ -1390,7 +1395,10 @@ static void b44_init_hw(struct b44 *bp, int full_reset)
1390 bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); 1395 bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN);
1391 1396
1392 bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ 1397 bw32(bp, B44_TX_WMARK, 56); /* XXX magic */
1393 if (full_reset) { 1398 if (reset_kind == B44_PARTIAL_RESET) {
1399 bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE |
1400 (bp->rx_offset << DMARX_CTRL_ROSHIFT)));
1401 } else {
1394 bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); 1402 bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE);
1395 bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); 1403 bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset);
1396 bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | 1404 bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE |
@@ -1401,9 +1409,6 @@ static void b44_init_hw(struct b44 *bp, int full_reset)
1401 bp->rx_prod = bp->rx_pending; 1409 bp->rx_prod = bp->rx_pending;
1402 1410
1403 bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); 1411 bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ);
1404 } else {
1405 bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE |
1406 (bp->rx_offset << DMARX_CTRL_ROSHIFT)));
1407 } 1412 }
1408 1413
1409 val = br32(bp, B44_ENET_CTRL); 1414 val = br32(bp, B44_ENET_CTRL);
@@ -1420,7 +1425,7 @@ static int b44_open(struct net_device *dev)
1420 goto out; 1425 goto out;
1421 1426
1422 b44_init_rings(bp); 1427 b44_init_rings(bp);
1423 b44_init_hw(bp, 1); 1428 b44_init_hw(bp, B44_FULL_RESET);
1424 1429
1425 b44_check_phy(bp); 1430 b44_check_phy(bp);
1426 1431
@@ -1629,7 +1634,7 @@ static int b44_close(struct net_device *dev)
1629 netif_poll_enable(dev); 1634 netif_poll_enable(dev);
1630 1635
1631 if (bp->flags & B44_FLAG_WOL_ENABLE) { 1636 if (bp->flags & B44_FLAG_WOL_ENABLE) {
1632 b44_init_hw(bp, 0); 1637 b44_init_hw(bp, B44_PARTIAL_RESET);
1633 b44_setup_wol(bp); 1638 b44_setup_wol(bp);
1634 } 1639 }
1635 1640
@@ -1905,7 +1910,7 @@ static int b44_set_ringparam(struct net_device *dev,
1905 1910
1906 b44_halt(bp); 1911 b44_halt(bp);
1907 b44_init_rings(bp); 1912 b44_init_rings(bp);
1908 b44_init_hw(bp, 1); 1913 b44_init_hw(bp, B44_FULL_RESET);
1909 netif_wake_queue(bp->dev); 1914 netif_wake_queue(bp->dev);
1910 spin_unlock_irq(&bp->lock); 1915 spin_unlock_irq(&bp->lock);
1911 1916
@@ -1948,7 +1953,7 @@ static int b44_set_pauseparam(struct net_device *dev,
1948 if (bp->flags & B44_FLAG_PAUSE_AUTO) { 1953 if (bp->flags & B44_FLAG_PAUSE_AUTO) {
1949 b44_halt(bp); 1954 b44_halt(bp);
1950 b44_init_rings(bp); 1955 b44_init_rings(bp);
1951 b44_init_hw(bp, 1); 1956 b44_init_hw(bp, B44_FULL_RESET);
1952 } else { 1957 } else {
1953 __b44_set_flow_ctrl(bp, bp->flags); 1958 __b44_set_flow_ctrl(bp, bp->flags);
1954 } 1959 }
@@ -2304,7 +2309,7 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state)
2304 2309
2305 free_irq(dev->irq, dev); 2310 free_irq(dev->irq, dev);
2306 if (bp->flags & B44_FLAG_WOL_ENABLE) { 2311 if (bp->flags & B44_FLAG_WOL_ENABLE) {
2307 b44_init_hw(bp, 0); 2312 b44_init_hw(bp, B44_PARTIAL_RESET);
2308 b44_setup_wol(bp); 2313 b44_setup_wol(bp);
2309 } 2314 }
2310 pci_disable_device(pdev); 2315 pci_disable_device(pdev);
@@ -2315,21 +2320,32 @@ static int b44_resume(struct pci_dev *pdev)
2315{ 2320{
2316 struct net_device *dev = pci_get_drvdata(pdev); 2321 struct net_device *dev = pci_get_drvdata(pdev);
2317 struct b44 *bp = netdev_priv(dev); 2322 struct b44 *bp = netdev_priv(dev);
2323 int rc = 0;
2318 2324
2319 pci_restore_state(pdev); 2325 pci_restore_state(pdev);
2320 pci_enable_device(pdev); 2326 rc = pci_enable_device(pdev);
2327 if (rc) {
2328 printk(KERN_ERR PFX "%s: pci_enable_device failed\n",
2329 dev->name);
2330 return rc;
2331 }
2332
2321 pci_set_master(pdev); 2333 pci_set_master(pdev);
2322 2334
2323 if (!netif_running(dev)) 2335 if (!netif_running(dev))
2324 return 0; 2336 return 0;
2325 2337
2326 if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) 2338 rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev);
2339 if (rc) {
2327 printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); 2340 printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name);
2341 pci_disable_device(pdev);
2342 return rc;
2343 }
2328 2344
2329 spin_lock_irq(&bp->lock); 2345 spin_lock_irq(&bp->lock);
2330 2346
2331 b44_init_rings(bp); 2347 b44_init_rings(bp);
2332 b44_init_hw(bp, 1); 2348 b44_init_hw(bp, B44_FULL_RESET);
2333 netif_device_attach(bp->dev); 2349 netif_device_attach(bp->dev);
2334 spin_unlock_irq(&bp->lock); 2350 spin_unlock_irq(&bp->lock);
2335 2351
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index dc434fb6da85..0978c9ac6d2b 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -151,8 +151,8 @@ struct slave {
151 struct slave *next; 151 struct slave *next;
152 struct slave *prev; 152 struct slave *prev;
153 int delay; 153 int delay;
154 u32 jiffies; 154 unsigned long jiffies;
155 u32 last_arp_rx; 155 unsigned long last_arp_rx;
156 s8 link; /* one of BOND_LINK_XXXX */ 156 s8 link; /* one of BOND_LINK_XXXX */
157 s8 state; /* one of BOND_STATE_XXXX */ 157 s8 state; /* one of BOND_STATE_XXXX */
158 u32 original_flags; 158 u32 original_flags;
@@ -242,7 +242,8 @@ extern inline int slave_do_arp_validate(struct bonding *bond, struct slave *slav
242 return bond->params.arp_validate & (1 << slave->state); 242 return bond->params.arp_validate & (1 << slave->state);
243} 243}
244 244
245extern inline u32 slave_last_rx(struct bonding *bond, struct slave *slave) 245extern inline unsigned long slave_last_rx(struct bonding *bond,
246 struct slave *slave)
246{ 247{
247 if (slave_do_arp_validate(bond, slave)) 248 if (slave_do_arp_validate(bond, slave))
248 return slave->last_arp_rx; 249 return slave->last_arp_rx;
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index c2ae2a24629b..3208dac29168 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2725,6 +2725,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
2725 del_timer_sync(&nic->watchdog); 2725 del_timer_sync(&nic->watchdog);
2726 netif_carrier_off(nic->netdev); 2726 netif_carrier_off(nic->netdev);
2727 2727
2728 netif_device_detach(netdev);
2728 pci_save_state(pdev); 2729 pci_save_state(pdev);
2729 2730
2730 if ((nic->flags & wol_magic) | e100_asf(nic)) { 2731 if ((nic->flags & wol_magic) | e100_asf(nic)) {
@@ -2736,6 +2737,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
2736 } 2737 }
2737 2738
2738 pci_disable_device(pdev); 2739 pci_disable_device(pdev);
2740 free_irq(pdev->irq, netdev);
2739 pci_set_power_state(pdev, PCI_D3hot); 2741 pci_set_power_state(pdev, PCI_D3hot);
2740 2742
2741 return 0; 2743 return 0;
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index be10a3a26b5b..272e1ec51aa2 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -39,7 +39,7 @@
39#include <asm/io.h> 39#include <asm/io.h>
40 40
41#define DRV_NAME "ehea" 41#define DRV_NAME "ehea"
42#define DRV_VERSION "EHEA_0044" 42#define DRV_VERSION "EHEA_0045"
43 43
44#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ 44#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
45 | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) 45 | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 1072e69ef85d..9de2d38a5321 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2316,6 +2316,7 @@ static int ehea_setup_single_port(struct ehea_port *port,
2316 struct ehea_adapter *adapter = port->adapter; 2316 struct ehea_adapter *adapter = port->adapter;
2317 struct hcp_ehea_port_cb4 *cb4; 2317 struct hcp_ehea_port_cb4 *cb4;
2318 u32 *dn_log_port_id; 2318 u32 *dn_log_port_id;
2319 int jumbo = 0;
2319 2320
2320 sema_init(&port->port_lock, 1); 2321 sema_init(&port->port_lock, 1);
2321 port->state = EHEA_PORT_DOWN; 2322 port->state = EHEA_PORT_DOWN;
@@ -2357,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port,
2357 if (!cb4) { 2358 if (!cb4) {
2358 ehea_error("no mem for cb4"); 2359 ehea_error("no mem for cb4");
2359 } else { 2360 } else {
2360 cb4->jumbo_frame = 1; 2361 hret = ehea_h_query_ehea_port(adapter->handle,
2361 hret = ehea_h_modify_ehea_port(adapter->handle, 2362 port->logical_port_id,
2362 port->logical_port_id, 2363 H_PORT_CB4,
2363 H_PORT_CB4, H_PORT_CB4_JUMBO, 2364 H_PORT_CB4_JUMBO, cb4);
2364 cb4); 2365
2365 if (hret != H_SUCCESS) { 2366 if (hret == H_SUCCESS) {
2366 ehea_info("Jumbo frames not activated"); 2367 if (cb4->jumbo_frame)
2368 jumbo = 1;
2369 else {
2370 cb4->jumbo_frame = 1;
2371 hret = ehea_h_modify_ehea_port(adapter->handle,
2372 port->
2373 logical_port_id,
2374 H_PORT_CB4,
2375 H_PORT_CB4_JUMBO,
2376 cb4);
2377 if (hret == H_SUCCESS)
2378 jumbo = 1;
2379 }
2367 } 2380 }
2368 kfree(cb4); 2381 kfree(cb4);
2369 } 2382 }
@@ -2402,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port,
2402 goto out_free; 2415 goto out_free;
2403 } 2416 }
2404 2417
2418 ehea_info("%s: Jumbo frames are %sabled", dev->name,
2419 jumbo == 1 ? "en" : "dis");
2420
2405 port->netdev = dev; 2421 port->netdev = dev;
2406 ret = 0; 2422 ret = 0;
2407 goto out; 2423 goto out;
@@ -2582,6 +2598,7 @@ static int __devexit ehea_remove(struct ibmebus_dev *dev)
2582 destroy_workqueue(adapter->ehea_wq); 2598 destroy_workqueue(adapter->ehea_wq);
2583 2599
2584 ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter); 2600 ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter);
2601 tasklet_kill(&adapter->neq_tasklet);
2585 2602
2586 ehea_destroy_eq(adapter->neq); 2603 ehea_destroy_eq(adapter->neq);
2587 2604
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
index c2c5fd419bd0..ff6839477306 100644
--- a/drivers/net/fs_enet/mac-fec.c
+++ b/drivers/net/fs_enet/mac-fec.c
@@ -104,9 +104,9 @@ static int do_pd_setup(struct fs_enet_private *fep)
104 fep->interrupt = platform_get_irq_byname(pdev,"interrupt"); 104 fep->interrupt = platform_get_irq_byname(pdev,"interrupt");
105 if (fep->interrupt < 0) 105 if (fep->interrupt < 0)
106 return -EINVAL; 106 return -EINVAL;
107 107
108 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); 108 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
109 fep->fec.fecp =(void*)r->start; 109 fep->fec.fecp = ioremap(r->start, r->end - r->start + 1);
110 110
111 if(fep->fec.fecp == NULL) 111 if(fep->fec.fecp == NULL)
112 return -EINVAL; 112 return -EINVAL;
@@ -319,11 +319,14 @@ static void restart(struct net_device *dev)
319 * Clear any outstanding interrupt. 319 * Clear any outstanding interrupt.
320 */ 320 */
321 FW(fecp, ievent, 0xffc0); 321 FW(fecp, ievent, 0xffc0);
322#ifndef CONFIG_PPC_MERGE
322 FW(fecp, ivec, (fep->interrupt / 2) << 29); 323 FW(fecp, ivec, (fep->interrupt / 2) << 29);
323 324#else
325 FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29);
326#endif
324 327
325 /* 328 /*
326 * adjust to speed (only for DUET & RMII) 329 * adjust to speed (only for DUET & RMII)
327 */ 330 */
328#ifdef CONFIG_DUET 331#ifdef CONFIG_DUET
329 if (fpi->use_rmii) { 332 if (fpi->use_rmii) {
@@ -418,6 +421,7 @@ static void stop(struct net_device *dev)
418 421
419static void pre_request_irq(struct net_device *dev, int irq) 422static void pre_request_irq(struct net_device *dev, int irq)
420{ 423{
424#ifndef CONFIG_PPC_MERGE
421 immap_t *immap = fs_enet_immap; 425 immap_t *immap = fs_enet_immap;
422 u32 siel; 426 u32 siel;
423 427
@@ -431,6 +435,7 @@ static void pre_request_irq(struct net_device *dev, int irq)
431 siel &= ~(0x80000000 >> (irq & ~1)); 435 siel &= ~(0x80000000 >> (irq & ~1));
432 out_be32(&immap->im_siu_conf.sc_siel, siel); 436 out_be32(&immap->im_siu_conf.sc_siel, siel);
433 } 437 }
438#endif
434} 439}
435 440
436static void post_free_irq(struct net_device *dev, int irq) 441static void post_free_irq(struct net_device *dev, int irq)
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index 95ec5872c507..afd7fca7c6c4 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -121,13 +121,13 @@ static int do_pd_setup(struct fs_enet_private *fep)
121 return -EINVAL; 121 return -EINVAL;
122 122
123 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); 123 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
124 fep->scc.sccp = (void *)r->start; 124 fep->scc.sccp = ioremap(r->start, r->end - r->start + 1);
125 125
126 if (fep->scc.sccp == NULL) 126 if (fep->scc.sccp == NULL)
127 return -EINVAL; 127 return -EINVAL;
128 128
129 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); 129 r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram");
130 fep->scc.ep = (void *)r->start; 130 fep->scc.ep = ioremap(r->start, r->end - r->start + 1);
131 131
132 if (fep->scc.ep == NULL) 132 if (fep->scc.ep == NULL)
133 return -EINVAL; 133 return -EINVAL;
@@ -397,6 +397,7 @@ static void stop(struct net_device *dev)
397 397
398static void pre_request_irq(struct net_device *dev, int irq) 398static void pre_request_irq(struct net_device *dev, int irq)
399{ 399{
400#ifndef CONFIG_PPC_MERGE
400 immap_t *immap = fs_enet_immap; 401 immap_t *immap = fs_enet_immap;
401 u32 siel; 402 u32 siel;
402 403
@@ -410,6 +411,7 @@ static void pre_request_irq(struct net_device *dev, int irq)
410 siel &= ~(0x80000000 >> (irq & ~1)); 411 siel &= ~(0x80000000 >> (irq & ~1));
411 out_be32(&immap->im_siu_conf.sc_siel, siel); 412 out_be32(&immap->im_siu_conf.sc_siel, siel);
412 } 413 }
414#endif
413} 415}
414 416
415static void post_free_irq(struct net_device *dev, int irq) 417static void post_free_irq(struct net_device *dev, int irq)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index ca2b21f9d444..c4ca7c930a46 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -271,8 +271,7 @@ static int __init ifb_init_module(void)
271 for (i = 0; i < numifbs && !err; i++) 271 for (i = 0; i < numifbs && !err; i++)
272 err = ifb_init_one(i); 272 err = ifb_init_one(i);
273 if (err) { 273 if (err) {
274 i--; 274 while (i--)
275 while (--i >= 0)
276 ifb_free_one(i); 275 ifb_free_one(i);
277 } 276 }
278 277
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 096d4a100bf2..86135397f430 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -349,7 +349,7 @@ static int __init fixed_init(void)
349 fixed_mdio_register_device(0, 100, 1); 349 fixed_mdio_register_device(0, 100, 1);
350#endif 350#endif
351 351
352#ifdef CONFIX_FIXED_MII_10_FDX 352#ifdef CONFIG_FIXED_MII_10_FDX
353 fixed_mdio_register_device(0, 10, 1); 353 fixed_mdio_register_device(0, 10, 1);
354#endif 354#endif
355 return 0; 355 return 0;
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 9fb0ea5c1fb9..5b458d2478f7 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -545,8 +545,6 @@ SYM53C500_release(struct pcmcia_device *link)
545 */ 545 */
546 if (shost->irq) 546 if (shost->irq)
547 free_irq(shost->irq, shost); 547 free_irq(shost->irq, shost);
548 if (shost->dma_channel != 0xff)
549 free_dma(shost->dma_channel);
550 if (shost->io_port && shost->n_io_port) 548 if (shost->io_port && shost->n_io_port)
551 release_region(shost->io_port, shost->n_io_port); 549 release_region(shost->io_port, shost->n_io_port);
552 550
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 61db6973755a..f69bd097166e 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, char *options)
589 */ 589 */
590 if (co->index >= UART_NR) 590 if (co->index >= UART_NR)
591 co->index = 0; 591 co->index = 0;
592 if (!amba_ports[co->index])
593 return -ENODEV;
592 port = &amba_ports[co->index]->port; 594 port = &amba_ports[co->index]->port;
593 595
594 if (options) 596 if (options)
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 9a3b374b2a08..44639e71372a 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -661,6 +661,8 @@ static int __init pl011_console_setup(struct console *co, char *options)
661 if (co->index >= UART_NR) 661 if (co->index >= UART_NR)
662 co->index = 0; 662 co->index = 0;
663 uap = amba_ports[co->index]; 663 uap = amba_ports[co->index];
664 if (!uap)
665 return -ENODEV;
664 666
665 uap->port.uartclk = clk_get_rate(uap->clk); 667 uap->port.uartclk = clk_get_rate(uap->clk);
666 668
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index ed7f7209ea59..881f886b91c6 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -689,9 +689,9 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, struct
689 struct atmel_uart_data *data = pdev->dev.platform_data; 689 struct atmel_uart_data *data = pdev->dev.platform_data;
690 690
691 port->iotype = UPIO_MEM; 691 port->iotype = UPIO_MEM;
692 port->flags = UPF_BOOT_AUTOCONF; 692 port->flags = UPF_BOOT_AUTOCONF;
693 port->ops = &atmel_pops; 693 port->ops = &atmel_pops;
694 port->fifosize = 1; 694 port->fifosize = 1;
695 port->line = pdev->id; 695 port->line = pdev->id;
696 port->dev = &pdev->dev; 696 port->dev = &pdev->dev;
697 697
@@ -890,7 +890,6 @@ static int atmel_serial_suspend(struct platform_device *pdev, pm_message_t state
890 if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) 890 if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock())
891 enable_irq_wake(port->irq); 891 enable_irq_wake(port->irq);
892 else { 892 else {
893 disable_irq_wake(port->irq);
894 uart_suspend_port(&atmel_uart, port); 893 uart_suspend_port(&atmel_uart, port);
895 atmel_port->suspended = 1; 894 atmel_port->suspended = 1;
896 } 895 }
@@ -907,6 +906,8 @@ static int atmel_serial_resume(struct platform_device *pdev)
907 uart_resume_port(&atmel_uart, port); 906 uart_resume_port(&atmel_uart, port);
908 atmel_port->suspended = 0; 907 atmel_port->suspended = 0;
909 } 908 }
909 else
910 disable_irq_wake(port->irq);
910 911
911 return 0; 912 return 0;
912} 913}
diff --git a/drivers/serial/atmel_serial.h b/drivers/serial/atmel_serial.h
index fe1763b2a6d5..11b44360e108 100644
--- a/drivers/serial/atmel_serial.h
+++ b/drivers/serial/atmel_serial.h
@@ -106,7 +106,7 @@
106#define ATMEL_US_CSR 0x14 /* Channel Status Register */ 106#define ATMEL_US_CSR 0x14 /* Channel Status Register */
107#define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ 107#define ATMEL_US_RHR 0x18 /* Receiver Holding Register */
108#define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ 108#define ATMEL_US_THR 0x1c /* Transmitter Holding Register */
109#define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [SAM9 only] */ 109#define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [AT91SAM9261 only] */
110 110
111#define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ 111#define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */
112#define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ 112#define ATMEL_US_CD (0xffff << 0) /* Clock Divider */