aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/com20020_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/com20020_cs.c')
-rw-r--r--drivers/net/pcmcia/com20020_cs.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 3b53818e3eef..3c400cfa82ae 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -158,9 +158,8 @@ static int com20020_probe(struct pcmcia_device *p_dev)
158 /* fill in our module parameters as defaults */ 158 /* fill in our module parameters as defaults */
159 dev->dev_addr[0] = node; 159 dev->dev_addr[0] = node;
160 160
161 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 161 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
162 p_dev->io.NumPorts1 = 16; 162 p_dev->resource[0]->end = 16;
163 p_dev->io.IOAddrLines = 16;
164 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 163 p_dev->conf.Attributes = CONF_ENABLE_IRQ;
165 p_dev->conf.IntType = INT_MEMORY_AND_IO; 164 p_dev->conf.IntType = INT_MEMORY_AND_IO;
166 165
@@ -245,20 +244,24 @@ static int com20020_config(struct pcmcia_device *link)
245 244
246 dev_dbg(&link->dev, "com20020_config\n"); 245 dev_dbg(&link->dev, "com20020_config\n");
247 246
248 dev_dbg(&link->dev, "baseport1 is %Xh\n", link->io.BasePort1); 247 dev_dbg(&link->dev, "baseport1 is %Xh\n",
248 (unsigned int) link->resource[0]->start);
249
249 i = -ENODEV; 250 i = -ENODEV;
250 if (!link->io.BasePort1) 251 link->io_lines = 16;
252
253 if (!link->resource[0]->start)
251 { 254 {
252 for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10) 255 for (ioaddr = 0x100; ioaddr < 0x400; ioaddr += 0x10)
253 { 256 {
254 link->io.BasePort1 = ioaddr; 257 link->resource[0]->start = ioaddr;
255 i = pcmcia_request_io(link, &link->io); 258 i = pcmcia_request_io(link);
256 if (i == 0) 259 if (i == 0)
257 break; 260 break;
258 } 261 }
259 } 262 }
260 else 263 else
261 i = pcmcia_request_io(link, &link->io); 264 i = pcmcia_request_io(link);
262 265
263 if (i != 0) 266 if (i != 0)
264 { 267 {