aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/3c574_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/3c574_cs.c')
-rw-r--r--drivers/net/pcmcia/3c574_cs.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 042f6777e6b9..2807a0fcadc4 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -88,7 +88,6 @@ earlier 3Com products.
88#include <linux/bitops.h> 88#include <linux/bitops.h>
89#include <linux/mii.h> 89#include <linux/mii.h>
90 90
91#include <pcmcia/cs.h>
92#include <pcmcia/cistpl.h> 91#include <pcmcia/cistpl.h>
93#include <pcmcia/cisreg.h> 92#include <pcmcia/cisreg.h>
94#include <pcmcia/ciscode.h> 93#include <pcmcia/ciscode.h>
@@ -280,24 +279,14 @@ static int tc574_probe(struct pcmcia_device *link)
280 spin_lock_init(&lp->window_lock); 279 spin_lock_init(&lp->window_lock);
281 link->resource[0]->end = 32; 280 link->resource[0]->end = 32;
282 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 281 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;
283 link->conf.Attributes = CONF_ENABLE_IRQ; 282 link->config_flags |= CONF_ENABLE_IRQ;
284 link->conf.IntType = INT_MEMORY_AND_IO; 283 link->config_index = 1;
285 link->conf.ConfigIndex = 1;
286 284
287 dev->netdev_ops = &el3_netdev_ops; 285 dev->netdev_ops = &el3_netdev_ops;
288 dev->watchdog_timeo = TX_TIMEOUT; 286 dev->watchdog_timeo = TX_TIMEOUT;
289 287
290 return tc574_config(link); 288 return tc574_config(link);
291} /* tc574_attach */ 289}
292
293/*
294
295 This deletes a driver "instance". The device is de-registered
296 with Card Services. If it has been released, all local data
297 structures are freed. Otherwise, the structures will be freed
298 when the device is released.
299
300*/
301 290
302static void tc574_detach(struct pcmcia_device *link) 291static void tc574_detach(struct pcmcia_device *link)
303{ 292{
@@ -312,12 +301,6 @@ static void tc574_detach(struct pcmcia_device *link)
312 free_netdev(dev); 301 free_netdev(dev);
313} /* tc574_detach */ 302} /* tc574_detach */
314 303
315/*
316 tc574_config() is scheduled to run after a CARD_INSERTION event
317 is received, to configure the PCMCIA socket, and to make the
318 ethernet device available to the system.
319*/
320
321static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 304static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
322 305
323static int tc574_config(struct pcmcia_device *link) 306static int tc574_config(struct pcmcia_device *link)
@@ -351,7 +334,7 @@ static int tc574_config(struct pcmcia_device *link)
351 if (ret) 334 if (ret)
352 goto failed; 335 goto failed;
353 336
354 ret = pcmcia_request_configuration(link, &link->conf); 337 ret = pcmcia_enable_device(link);
355 if (ret) 338 if (ret)
356 goto failed; 339 goto failed;
357 340
@@ -462,12 +445,6 @@ failed:
462 445
463} /* tc574_config */ 446} /* tc574_config */
464 447
465/*
466 After a card is removed, tc574_release() will unregister the net
467 device, and release the PCMCIA configuration. If the device is
468 still open, this will be postponed until it is closed.
469*/
470
471static void tc574_release(struct pcmcia_device *link) 448static void tc574_release(struct pcmcia_device *link)
472{ 449{
473 pcmcia_disable_device(link); 450 pcmcia_disable_device(link);
@@ -1182,9 +1159,7 @@ MODULE_DEVICE_TABLE(pcmcia, tc574_ids);
1182 1159
1183static struct pcmcia_driver tc574_driver = { 1160static struct pcmcia_driver tc574_driver = {
1184 .owner = THIS_MODULE, 1161 .owner = THIS_MODULE,
1185 .drv = { 1162 .name = "3c574_cs",
1186 .name = "3c574_cs",
1187 },
1188 .probe = tc574_probe, 1163 .probe = tc574_probe,
1189 .remove = tc574_detach, 1164 .remove = tc574_detach,
1190 .id_table = tc574_ids, 1165 .id_table = tc574_ids,