aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pcmcia')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c30
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c39
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c117
-rw-r--r--drivers/char/pcmcia/ipwireless/main.h5
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.h1
-rw-r--r--drivers/char/pcmcia/synclink_cs.c46
6 files changed, 62 insertions, 176 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 7d091b68d247..c4e52ec85c6e 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -34,7 +34,6 @@
34#include <linux/uaccess.h> 34#include <linux/uaccess.h>
35#include <linux/io.h> 35#include <linux/io.h>
36 36
37#include <pcmcia/cs.h>
38#include <pcmcia/cistpl.h> 37#include <pcmcia/cistpl.h>
39#include <pcmcia/cisreg.h> 38#include <pcmcia/cisreg.h>
40#include <pcmcia/ciscode.h> 39#include <pcmcia/ciscode.h>
@@ -56,7 +55,6 @@
56 } while (0) 55 } while (0)
57 56
58static DEFINE_MUTEX(cmm_mutex); 57static DEFINE_MUTEX(cmm_mutex);
59static char *version = "cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte";
60 58
61#define T_1SEC (HZ) 59#define T_1SEC (HZ)
62#define T_10MSEC msecs_to_jiffies(10) 60#define T_10MSEC msecs_to_jiffies(10)
@@ -1743,20 +1741,8 @@ static void cmm_cm4000_release(struct pcmcia_device * link)
1743 1741
1744/*==== Interface to PCMCIA Layer =======================================*/ 1742/*==== Interface to PCMCIA Layer =======================================*/
1745 1743
1746static int cm4000_config_check(struct pcmcia_device *p_dev, 1744static int cm4000_config_check(struct pcmcia_device *p_dev, void *priv_data)
1747 cistpl_cftable_entry_t *cfg,
1748 cistpl_cftable_entry_t *dflt,
1749 unsigned int vcc,
1750 void *priv_data)
1751{ 1745{
1752 if (!cfg->io.nwin)
1753 return -ENODEV;
1754
1755 p_dev->resource[0]->start = cfg->io.win[0].base;
1756 p_dev->resource[0]->end = cfg->io.win[0].len;
1757 p_dev->resource[0]->flags |= pcmcia_io_cfg_data_width(cfg->io.flags);
1758 p_dev->io_lines = cfg->io.flags & CISTPL_IO_LINES_MASK;
1759
1760 return pcmcia_request_io(p_dev); 1746 return pcmcia_request_io(p_dev);
1761} 1747}
1762 1748
@@ -1764,13 +1750,13 @@ static int cm4000_config(struct pcmcia_device * link, int devno)
1764{ 1750{
1765 struct cm4000_dev *dev; 1751 struct cm4000_dev *dev;
1766 1752
1753 link->config_flags |= CONF_AUTO_SET_IO;
1754
1767 /* read the config-tuples */ 1755 /* read the config-tuples */
1768 if (pcmcia_loop_config(link, cm4000_config_check, NULL)) 1756 if (pcmcia_loop_config(link, cm4000_config_check, NULL))
1769 goto cs_release; 1757 goto cs_release;
1770 1758
1771 link->conf.IntType = 00000002; 1759 if (pcmcia_enable_device(link))
1772
1773 if (pcmcia_request_configuration(link, &link->conf))
1774 goto cs_release; 1760 goto cs_release;
1775 1761
1776 dev = link->priv; 1762 dev = link->priv;
@@ -1830,7 +1816,6 @@ static int cm4000_probe(struct pcmcia_device *link)
1830 1816
1831 dev->p_dev = link; 1817 dev->p_dev = link;
1832 link->priv = dev; 1818 link->priv = dev;
1833 link->conf.IntType = INT_MEMORY_AND_IO;
1834 dev_table[i] = link; 1819 dev_table[i] = link;
1835 1820
1836 init_waitqueue_head(&dev->devq); 1821 init_waitqueue_head(&dev->devq);
@@ -1892,9 +1877,7 @@ MODULE_DEVICE_TABLE(pcmcia, cm4000_ids);
1892 1877
1893static struct pcmcia_driver cm4000_driver = { 1878static struct pcmcia_driver cm4000_driver = {
1894 .owner = THIS_MODULE, 1879 .owner = THIS_MODULE,
1895 .drv = { 1880 .name = "cm4000_cs",
1896 .name = "cm4000_cs",
1897 },
1898 .probe = cm4000_probe, 1881 .probe = cm4000_probe,
1899 .remove = cm4000_detach, 1882 .remove = cm4000_detach,
1900 .suspend = cm4000_suspend, 1883 .suspend = cm4000_suspend,
@@ -1906,8 +1889,6 @@ static int __init cmm_init(void)
1906{ 1889{
1907 int rc; 1890 int rc;
1908 1891
1909 printk(KERN_INFO "%s\n", version);
1910
1911 cmm_class = class_create(THIS_MODULE, "cardman_4000"); 1892 cmm_class = class_create(THIS_MODULE, "cardman_4000");
1912 if (IS_ERR(cmm_class)) 1893 if (IS_ERR(cmm_class))
1913 return PTR_ERR(cmm_class); 1894 return PTR_ERR(cmm_class);
@@ -1932,7 +1913,6 @@ static int __init cmm_init(void)
1932 1913
1933static void __exit cmm_exit(void) 1914static void __exit cmm_exit(void)
1934{ 1915{
1935 printk(KERN_INFO MODULE_NAME ": unloading\n");
1936 pcmcia_unregister_driver(&cm4000_driver); 1916 pcmcia_unregister_driver(&cm4000_driver);
1937 unregister_chrdev(major, DEVICE_NAME); 1917 unregister_chrdev(major, DEVICE_NAME);
1938 class_destroy(cmm_class); 1918 class_destroy(cmm_class);
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 04c0a895740e..d7c32cb40ca3 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -29,7 +29,6 @@
29#include <asm/uaccess.h> 29#include <asm/uaccess.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <pcmcia/cs.h>
33#include <pcmcia/cistpl.h> 32#include <pcmcia/cistpl.h>
34#include <pcmcia/cisreg.h> 33#include <pcmcia/cisreg.h>
35#include <pcmcia/ciscode.h> 34#include <pcmcia/ciscode.h>
@@ -50,8 +49,6 @@
50 } while (0) 49 } while (0)
51 50
52static DEFINE_MUTEX(cm4040_mutex); 51static DEFINE_MUTEX(cm4040_mutex);
53static char *version =
54"OMNIKEY CardMan 4040 v1.1.0gm5 - All bugs added by Harald Welte";
55 52
56#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ) 53#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ)
57#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ) 54#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ)
@@ -517,26 +514,9 @@ static void cm4040_reader_release(struct pcmcia_device *link)
517 return; 514 return;
518} 515}
519 516
520static int cm4040_config_check(struct pcmcia_device *p_dev, 517static int cm4040_config_check(struct pcmcia_device *p_dev, void *priv_data)
521 cistpl_cftable_entry_t *cfg,
522 cistpl_cftable_entry_t *dflt,
523 unsigned int vcc,
524 void *priv_data)
525{ 518{
526 int rc; 519 return pcmcia_request_io(p_dev);
527 if (!cfg->io.nwin)
528 return -ENODEV;
529
530 /* Get the IOaddr */
531 p_dev->resource[0]->start = cfg->io.win[0].base;
532 p_dev->resource[0]->end = cfg->io.win[0].len;
533 p_dev->resource[0]->flags |= pcmcia_io_cfg_data_width(cfg->io.flags);
534 p_dev->io_lines = cfg->io.flags & CISTPL_IO_LINES_MASK;
535 rc = pcmcia_request_io(p_dev);
536
537 dev_printk(KERN_INFO, &p_dev->dev,
538 "pcmcia_request_io returned 0x%x\n", rc);
539 return rc;
540} 520}
541 521
542 522
@@ -545,15 +525,15 @@ static int reader_config(struct pcmcia_device *link, int devno)
545 struct reader_dev *dev; 525 struct reader_dev *dev;
546 int fail_rc; 526 int fail_rc;
547 527
528 link->config_flags |= CONF_AUTO_SET_IO;
529
548 if (pcmcia_loop_config(link, cm4040_config_check, NULL)) 530 if (pcmcia_loop_config(link, cm4040_config_check, NULL))
549 goto cs_release; 531 goto cs_release;
550 532
551 link->conf.IntType = 00000002; 533 fail_rc = pcmcia_enable_device(link);
552
553 fail_rc = pcmcia_request_configuration(link, &link->conf);
554 if (fail_rc != 0) { 534 if (fail_rc != 0) {
555 dev_printk(KERN_INFO, &link->dev, 535 dev_printk(KERN_INFO, &link->dev,
556 "pcmcia_request_configuration failed 0x%x\n", 536 "pcmcia_enable_device failed 0x%x\n",
557 fail_rc); 537 fail_rc);
558 goto cs_release; 538 goto cs_release;
559 } 539 }
@@ -600,7 +580,6 @@ static int reader_probe(struct pcmcia_device *link)
600 link->priv = dev; 580 link->priv = dev;
601 dev->p_dev = link; 581 dev->p_dev = link;
602 582
603 link->conf.IntType = INT_MEMORY_AND_IO;
604 dev_table[i] = link; 583 dev_table[i] = link;
605 584
606 init_waitqueue_head(&dev->devq); 585 init_waitqueue_head(&dev->devq);
@@ -663,9 +642,7 @@ MODULE_DEVICE_TABLE(pcmcia, cm4040_ids);
663 642
664static struct pcmcia_driver reader_driver = { 643static struct pcmcia_driver reader_driver = {
665 .owner = THIS_MODULE, 644 .owner = THIS_MODULE,
666 .drv = { 645 .name = "cm4040_cs",
667 .name = "cm4040_cs",
668 },
669 .probe = reader_probe, 646 .probe = reader_probe,
670 .remove = reader_detach, 647 .remove = reader_detach,
671 .id_table = cm4040_ids, 648 .id_table = cm4040_ids,
@@ -675,7 +652,6 @@ static int __init cm4040_init(void)
675{ 652{
676 int rc; 653 int rc;
677 654
678 printk(KERN_INFO "%s\n", version);
679 cmx_class = class_create(THIS_MODULE, "cardman_4040"); 655 cmx_class = class_create(THIS_MODULE, "cardman_4040");
680 if (IS_ERR(cmx_class)) 656 if (IS_ERR(cmx_class))
681 return PTR_ERR(cmx_class); 657 return PTR_ERR(cmx_class);
@@ -700,7 +676,6 @@ static int __init cm4040_init(void)
700 676
701static void __exit cm4040_exit(void) 677static void __exit cm4040_exit(void)
702{ 678{
703 printk(KERN_INFO MODULE_NAME ": unloading\n");
704 pcmcia_unregister_driver(&reader_driver); 679 pcmcia_unregister_driver(&reader_driver);
705 unregister_chrdev(major, DEVICE_NAME); 680 unregister_chrdev(major, DEVICE_NAME);
706 class_destroy(cmx_class); 681 class_destroy(cmx_class);
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 67bdb05798b1..94b8eb4d691d 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -32,7 +32,6 @@
32#include <pcmcia/device_id.h> 32#include <pcmcia/device_id.h>
33#include <pcmcia/ss.h> 33#include <pcmcia/ss.h>
34#include <pcmcia/ds.h> 34#include <pcmcia/ds.h>
35#include <pcmcia/cs.h>
36 35
37static struct pcmcia_device_id ipw_ids[] = { 36static struct pcmcia_device_id ipw_ids[] = {
38 PCMCIA_DEVICE_MANF_CARD(0x02f2, 0x0100), 37 PCMCIA_DEVICE_MANF_CARD(0x02f2, 0x0100),
@@ -76,23 +75,18 @@ static void signalled_reboot_callback(void *callback_data)
76 schedule_work(&ipw->work_reboot); 75 schedule_work(&ipw->work_reboot);
77} 76}
78 77
79static int ipwireless_probe(struct pcmcia_device *p_dev, 78static int ipwireless_probe(struct pcmcia_device *p_dev, void *priv_data)
80 cistpl_cftable_entry_t *cfg,
81 cistpl_cftable_entry_t *dflt,
82 unsigned int vcc,
83 void *priv_data)
84{ 79{
85 struct ipw_dev *ipw = priv_data; 80 struct ipw_dev *ipw = priv_data;
86 struct resource *io_resource; 81 struct resource *io_resource;
87 int ret; 82 int ret;
88 83
84 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
89 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 85 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
90 p_dev->resource[0]->start = cfg->io.win[0].base;
91 p_dev->resource[0]->end = cfg->io.win[0].len;
92 86
93 /* 0x40 causes it to generate level mode interrupts. */ 87 /* 0x40 causes it to generate level mode interrupts. */
94 /* 0x04 enables IREQ pin. */ 88 /* 0x04 enables IREQ pin. */
95 p_dev->conf.ConfigIndex = cfg->index | 0x44; 89 p_dev->config_index |= 0x44;
96 p_dev->io_lines = 16; 90 p_dev->io_lines = 16;
97 ret = pcmcia_request_io(p_dev); 91 ret = pcmcia_request_io(p_dev);
98 if (ret) 92 if (ret)
@@ -102,65 +96,49 @@ static int ipwireless_probe(struct pcmcia_device *p_dev,
102 resource_size(p_dev->resource[0]), 96 resource_size(p_dev->resource[0]),
103 IPWIRELESS_PCCARD_NAME); 97 IPWIRELESS_PCCARD_NAME);
104 98
105 if (cfg->mem.nwin == 0) 99 p_dev->resource[2]->flags |=
106 return 0;
107
108 ipw->request_common_memory.Attributes =
109 WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_CM | WIN_ENABLE; 100 WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_CM | WIN_ENABLE;
110 ipw->request_common_memory.Base = cfg->mem.win[0].host_addr;
111 ipw->request_common_memory.Size = cfg->mem.win[0].len;
112 if (ipw->request_common_memory.Size < 0x1000)
113 ipw->request_common_memory.Size = 0x1000;
114 ipw->request_common_memory.AccessSpeed = 0;
115
116 ret = pcmcia_request_window(p_dev, &ipw->request_common_memory,
117 &ipw->handle_common_memory);
118 101
102 ret = pcmcia_request_window(p_dev, p_dev->resource[2], 0);
119 if (ret != 0) 103 if (ret != 0)
120 goto exit1; 104 goto exit1;
121 105
122 ret = pcmcia_map_mem_page(p_dev, ipw->handle_common_memory, 106 ret = pcmcia_map_mem_page(p_dev, p_dev->resource[2], p_dev->card_addr);
123 cfg->mem.win[0].card_addr);
124
125 if (ret != 0) 107 if (ret != 0)
126 goto exit2; 108 goto exit2;
127 109
128 ipw->is_v2_card = cfg->mem.win[0].len == 0x100; 110 ipw->is_v2_card = resource_size(p_dev->resource[2]) == 0x100;
129 111
130 ipw->common_memory = ioremap(ipw->request_common_memory.Base, 112 ipw->attr_memory = ioremap(p_dev->resource[2]->start,
131 ipw->request_common_memory.Size); 113 resource_size(p_dev->resource[2]));
132 request_mem_region(ipw->request_common_memory.Base, 114 request_mem_region(p_dev->resource[2]->start,
133 ipw->request_common_memory.Size, 115 resource_size(p_dev->resource[2]),
134 IPWIRELESS_PCCARD_NAME); 116 IPWIRELESS_PCCARD_NAME);
135 117
136 ipw->request_attr_memory.Attributes = 118 p_dev->resource[3]->flags |= WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_AM |
137 WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_AM | WIN_ENABLE; 119 WIN_ENABLE;
138 ipw->request_attr_memory.Base = 0; 120 p_dev->resource[3]->end = 0; /* this used to be 0x1000 */
139 ipw->request_attr_memory.Size = 0; /* this used to be 0x1000 */ 121 ret = pcmcia_request_window(p_dev, p_dev->resource[3], 0);
140 ipw->request_attr_memory.AccessSpeed = 0;
141
142 ret = pcmcia_request_window(p_dev, &ipw->request_attr_memory,
143 &ipw->handle_attr_memory);
144
145 if (ret != 0) 122 if (ret != 0)
146 goto exit2; 123 goto exit2;
147 124
148 ret = pcmcia_map_mem_page(p_dev, ipw->handle_attr_memory, 0); 125 ret = pcmcia_map_mem_page(p_dev, p_dev->resource[3], 0);
149 if (ret != 0) 126 if (ret != 0)
150 goto exit3; 127 goto exit3;
151 128
152 ipw->attr_memory = ioremap(ipw->request_attr_memory.Base, 129 ipw->attr_memory = ioremap(p_dev->resource[3]->start,
153 ipw->request_attr_memory.Size); 130 resource_size(p_dev->resource[3]));
154 request_mem_region(ipw->request_attr_memory.Base, 131 request_mem_region(p_dev->resource[3]->start,
155 ipw->request_attr_memory.Size, IPWIRELESS_PCCARD_NAME); 132 resource_size(p_dev->resource[3]),
133 IPWIRELESS_PCCARD_NAME);
156 134
157 return 0; 135 return 0;
158 136
159exit3: 137exit3:
160exit2: 138exit2:
161 if (ipw->common_memory) { 139 if (ipw->common_memory) {
162 release_mem_region(ipw->request_common_memory.Base, 140 release_mem_region(p_dev->resource[2]->start,
163 ipw->request_common_memory.Size); 141 resource_size(p_dev->resource[2]));
164 iounmap(ipw->common_memory); 142 iounmap(ipw->common_memory);
165 } 143 }
166exit1: 144exit1:
@@ -175,14 +153,13 @@ static int config_ipwireless(struct ipw_dev *ipw)
175 int ret = 0; 153 int ret = 0;
176 154
177 ipw->is_v2_card = 0; 155 ipw->is_v2_card = 0;
156 link->config_flags |= CONF_AUTO_SET_IO | CONF_AUTO_SET_IOMEM |
157 CONF_ENABLE_IRQ;
178 158
179 ret = pcmcia_loop_config(link, ipwireless_probe, ipw); 159 ret = pcmcia_loop_config(link, ipwireless_probe, ipw);
180 if (ret != 0) 160 if (ret != 0)
181 return ret; 161 return ret;
182 162
183 link->conf.Attributes = CONF_ENABLE_IRQ;
184 link->conf.IntType = INT_MEMORY_AND_IO;
185
186 INIT_WORK(&ipw->work_reboot, signalled_reboot_work); 163 INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
187 164
188 ipwireless_init_hardware_v1(ipw->hardware, link->resource[0]->start, 165 ipwireless_init_hardware_v1(ipw->hardware, link->resource[0]->start,
@@ -201,13 +178,9 @@ static int config_ipwireless(struct ipw_dev *ipw)
201 (unsigned int) link->irq); 178 (unsigned int) link->irq);
202 if (ipw->attr_memory && ipw->common_memory) 179 if (ipw->attr_memory && ipw->common_memory)
203 printk(KERN_INFO IPWIRELESS_PCCARD_NAME 180 printk(KERN_INFO IPWIRELESS_PCCARD_NAME
204 ": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n", 181 ": attr memory %pR, common memory %pR\n",
205 ipw->request_attr_memory.Base, 182 link->resource[3],
206 ipw->request_attr_memory.Base 183 link->resource[2]);
207 + ipw->request_attr_memory.Size - 1,
208 ipw->request_common_memory.Base,
209 ipw->request_common_memory.Base
210 + ipw->request_common_memory.Size - 1);
211 184
212 ipw->network = ipwireless_network_create(ipw->hardware); 185 ipw->network = ipwireless_network_create(ipw->hardware);
213 if (!ipw->network) 186 if (!ipw->network)
@@ -223,25 +196,23 @@ static int config_ipwireless(struct ipw_dev *ipw)
223 * Do the RequestConfiguration last, because it enables interrupts. 196 * Do the RequestConfiguration last, because it enables interrupts.
224 * Then we don't get any interrupts before we're ready for them. 197 * Then we don't get any interrupts before we're ready for them.
225 */ 198 */
226 ret = pcmcia_request_configuration(link, &link->conf); 199 ret = pcmcia_enable_device(link);
227
228 if (ret != 0) 200 if (ret != 0)
229 goto exit; 201 goto exit;
230 202
231 return 0; 203 return 0;
232 204
233exit: 205exit:
234 if (ipw->attr_memory) {
235 release_mem_region(ipw->request_attr_memory.Base,
236 ipw->request_attr_memory.Size);
237 iounmap(ipw->attr_memory);
238
239 }
240 if (ipw->common_memory) { 206 if (ipw->common_memory) {
241 release_mem_region(ipw->request_common_memory.Base, 207 release_mem_region(link->resource[2]->start,
242 ipw->request_common_memory.Size); 208 resource_size(link->resource[2]));
243 iounmap(ipw->common_memory); 209 iounmap(ipw->common_memory);
244 } 210 }
211 if (ipw->attr_memory) {
212 release_mem_region(link->resource[3]->start,
213 resource_size(link->resource[3]));
214 iounmap(ipw->attr_memory);
215 }
245 pcmcia_disable_device(link); 216 pcmcia_disable_device(link);
246 return -1; 217 return -1;
247} 218}
@@ -249,13 +220,13 @@ exit:
249static void release_ipwireless(struct ipw_dev *ipw) 220static void release_ipwireless(struct ipw_dev *ipw)
250{ 221{
251 if (ipw->common_memory) { 222 if (ipw->common_memory) {
252 release_mem_region(ipw->request_common_memory.Base, 223 release_mem_region(ipw->link->resource[2]->start,
253 ipw->request_common_memory.Size); 224 resource_size(ipw->link->resource[2]));
254 iounmap(ipw->common_memory); 225 iounmap(ipw->common_memory);
255 } 226 }
256 if (ipw->attr_memory) { 227 if (ipw->attr_memory) {
257 release_mem_region(ipw->request_attr_memory.Base, 228 release_mem_region(ipw->link->resource[3]->start,
258 ipw->request_attr_memory.Size); 229 resource_size(ipw->link->resource[3]));
259 iounmap(ipw->attr_memory); 230 iounmap(ipw->attr_memory);
260 } 231 }
261 pcmcia_disable_device(ipw->link); 232 pcmcia_disable_device(ipw->link);
@@ -324,7 +295,7 @@ static struct pcmcia_driver me = {
324 .owner = THIS_MODULE, 295 .owner = THIS_MODULE,
325 .probe = ipwireless_attach, 296 .probe = ipwireless_attach,
326 .remove = ipwireless_detach, 297 .remove = ipwireless_detach,
327 .drv = { .name = IPWIRELESS_PCCARD_NAME }, 298 .name = IPWIRELESS_PCCARD_NAME,
328 .id_table = ipw_ids 299 .id_table = ipw_ids
329}; 300};
330 301
@@ -336,9 +307,6 @@ static int __init init_ipwireless(void)
336{ 307{
337 int ret; 308 int ret;
338 309
339 printk(KERN_INFO IPWIRELESS_PCCARD_NAME " "
340 IPWIRELESS_PCMCIA_VERSION " by " IPWIRELESS_PCMCIA_AUTHOR "\n");
341
342 ret = ipwireless_tty_init(); 310 ret = ipwireless_tty_init();
343 if (ret != 0) 311 if (ret != 0)
344 return ret; 312 return ret;
@@ -355,9 +323,6 @@ static int __init init_ipwireless(void)
355 */ 323 */
356static void __exit exit_ipwireless(void) 324static void __exit exit_ipwireless(void)
357{ 325{
358 printk(KERN_INFO IPWIRELESS_PCCARD_NAME " "
359 IPWIRELESS_PCMCIA_VERSION " removed\n");
360
361 pcmcia_unregister_driver(&me); 326 pcmcia_unregister_driver(&me);
362 ipwireless_tty_release(); 327 ipwireless_tty_release();
363} 328}
diff --git a/drivers/char/pcmcia/ipwireless/main.h b/drivers/char/pcmcia/ipwireless/main.h
index c207be87b597..f2cbb116bccb 100644
--- a/drivers/char/pcmcia/ipwireless/main.h
+++ b/drivers/char/pcmcia/ipwireless/main.h
@@ -21,7 +21,6 @@
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/types.h> 22#include <linux/types.h>
23 23
24#include <pcmcia/cs.h>
25#include <pcmcia/cistpl.h> 24#include <pcmcia/cistpl.h>
26#include <pcmcia/ds.h> 25#include <pcmcia/ds.h>
27 26
@@ -45,13 +44,9 @@ struct ipw_dev {
45 struct pcmcia_device *link; 44 struct pcmcia_device *link;
46 int is_v2_card; 45 int is_v2_card;
47 46
48 window_handle_t handle_attr_memory;
49 void __iomem *attr_memory; 47 void __iomem *attr_memory;
50 win_req_t request_attr_memory;
51 48
52 window_handle_t handle_common_memory;
53 void __iomem *common_memory; 49 void __iomem *common_memory;
54 win_req_t request_common_memory;
55 50
56 /* Reference to attribute memory, containing CIS data */ 51 /* Reference to attribute memory, containing CIS data */
57 void *attribute_memory; 52 void *attribute_memory;
diff --git a/drivers/char/pcmcia/ipwireless/tty.h b/drivers/char/pcmcia/ipwireless/tty.h
index 3e163d4cab15..747b2d637860 100644
--- a/drivers/char/pcmcia/ipwireless/tty.h
+++ b/drivers/char/pcmcia/ipwireless/tty.h
@@ -21,7 +21,6 @@
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/sched.h> 22#include <linux/sched.h>
23 23
24#include <pcmcia/cs.h>
25#include <pcmcia/cistpl.h> 24#include <pcmcia/cistpl.h>
26#include <pcmcia/ds.h> 25#include <pcmcia/ds.h>
27 26
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 9ecd6bef5d3b..be1810057607 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -70,7 +70,6 @@
70#include <linux/workqueue.h> 70#include <linux/workqueue.h>
71#include <linux/hdlc.h> 71#include <linux/hdlc.h>
72 72
73#include <pcmcia/cs.h>
74#include <pcmcia/cistpl.h> 73#include <pcmcia/cistpl.h>
75#include <pcmcia/cisreg.h> 74#include <pcmcia/cisreg.h>
76#include <pcmcia/ds.h> 75#include <pcmcia/ds.h>
@@ -550,9 +549,6 @@ static int mgslpc_probe(struct pcmcia_device *link)
550 549
551 /* Initialize the struct pcmcia_device structure */ 550 /* Initialize the struct pcmcia_device structure */
552 551
553 link->conf.Attributes = 0;
554 link->conf.IntType = INT_MEMORY_AND_IO;
555
556 ret = mgslpc_config(link); 552 ret = mgslpc_config(link);
557 if (ret) 553 if (ret)
558 return ret; 554 return ret;
@@ -565,20 +561,8 @@ static int mgslpc_probe(struct pcmcia_device *link)
565/* Card has been inserted. 561/* Card has been inserted.
566 */ 562 */
567 563
568static int mgslpc_ioprobe(struct pcmcia_device *p_dev, 564static int mgslpc_ioprobe(struct pcmcia_device *p_dev, void *priv_data)
569 cistpl_cftable_entry_t *cfg,
570 cistpl_cftable_entry_t *dflt,
571 unsigned int vcc,
572 void *priv_data)
573{ 565{
574 if (!cfg->io.nwin)
575 return -ENODEV;
576
577 p_dev->resource[0]->start = cfg->io.win[0].base;
578 p_dev->resource[0]->end = cfg->io.win[0].len;
579 p_dev->resource[0]->flags |= pcmcia_io_cfg_data_width(cfg->io.flags);
580 p_dev->io_lines = cfg->io.flags & CISTPL_IO_LINES_MASK;
581
582 return pcmcia_request_io(p_dev); 566 return pcmcia_request_io(p_dev);
583} 567}
584 568
@@ -590,32 +574,24 @@ static int mgslpc_config(struct pcmcia_device *link)
590 if (debug_level >= DEBUG_LEVEL_INFO) 574 if (debug_level >= DEBUG_LEVEL_INFO)
591 printk("mgslpc_config(0x%p)\n", link); 575 printk("mgslpc_config(0x%p)\n", link);
592 576
577 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
578
593 ret = pcmcia_loop_config(link, mgslpc_ioprobe, NULL); 579 ret = pcmcia_loop_config(link, mgslpc_ioprobe, NULL);
594 if (ret != 0) 580 if (ret != 0)
595 goto failed; 581 goto failed;
596 582
597 link->conf.Attributes = CONF_ENABLE_IRQ; 583 link->config_index = 8;
598 link->conf.IntType = INT_MEMORY_AND_IO; 584 link->config_regs = PRESENT_OPTION;
599 link->conf.ConfigIndex = 8;
600 link->conf.Present = PRESENT_OPTION;
601 585
602 ret = pcmcia_request_irq(link, mgslpc_isr); 586 ret = pcmcia_request_irq(link, mgslpc_isr);
603 if (ret) 587 if (ret)
604 goto failed; 588 goto failed;
605 ret = pcmcia_request_configuration(link, &link->conf); 589 ret = pcmcia_enable_device(link);
606 if (ret) 590 if (ret)
607 goto failed; 591 goto failed;
608 592
609 info->io_base = link->resource[0]->start; 593 info->io_base = link->resource[0]->start;
610 info->irq_level = link->irq; 594 info->irq_level = link->irq;
611
612 dev_info(&link->dev, "index 0x%02x:",
613 link->conf.ConfigIndex);
614 if (link->conf.Attributes & CONF_ENABLE_IRQ)
615 printk(", irq %d", link->irq);
616 if (link->resource[0])
617 printk(", io %pR", link->resource[0]);
618 printk("\n");
619 return 0; 595 return 0;
620 596
621failed: 597failed:
@@ -2797,9 +2773,7 @@ MODULE_DEVICE_TABLE(pcmcia, mgslpc_ids);
2797 2773
2798static struct pcmcia_driver mgslpc_driver = { 2774static struct pcmcia_driver mgslpc_driver = {
2799 .owner = THIS_MODULE, 2775 .owner = THIS_MODULE,
2800 .drv = { 2776 .name = "synclink_cs",
2801 .name = "synclink_cs",
2802 },
2803 .probe = mgslpc_probe, 2777 .probe = mgslpc_probe,
2804 .remove = mgslpc_detach, 2778 .remove = mgslpc_detach,
2805 .id_table = mgslpc_ids, 2779 .id_table = mgslpc_ids,
@@ -2835,8 +2809,6 @@ static void synclink_cs_cleanup(void)
2835{ 2809{
2836 int rc; 2810 int rc;
2837 2811
2838 printk("Unloading %s: version %s\n", driver_name, driver_version);
2839
2840 while(mgslpc_device_list) 2812 while(mgslpc_device_list)
2841 mgslpc_remove_device(mgslpc_device_list); 2813 mgslpc_remove_device(mgslpc_device_list);
2842 2814
@@ -2859,8 +2831,6 @@ static int __init synclink_cs_init(void)
2859 BREAKPOINT(); 2831 BREAKPOINT();
2860 } 2832 }
2861 2833
2862 printk("%s %s\n", driver_name, driver_version);
2863
2864 if ((rc = pcmcia_register_driver(&mgslpc_driver)) < 0) 2834 if ((rc = pcmcia_register_driver(&mgslpc_driver)) < 0)
2865 return rc; 2835 return rc;
2866 2836
@@ -4127,6 +4097,8 @@ static int hdlcdev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
4127 if (cmd != SIOCWANDEV) 4097 if (cmd != SIOCWANDEV)
4128 return hdlc_ioctl(dev, ifr, cmd); 4098 return hdlc_ioctl(dev, ifr, cmd);
4129 4099
4100 memset(&new_line, 0, size);
4101
4130 switch(ifr->ifr_settings.type) { 4102 switch(ifr->ifr_settings.type) {
4131 case IF_GET_IFACE: /* return current sync_serial_settings */ 4103 case IF_GET_IFACE: /* return current sync_serial_settings */
4132 4104