]>
Commit | Line | Data |
---|---|---|
5de4fc43 | 1 | diff -urN -X dontdiff linux-2.6.0-test9.vanilla/drivers/net/pcmcia/ibmtr_cs.c linux-2.6.0-test9/drivers/net/pcmcia/ibmtr_cs.c |
2 | --- linux-2.6.0-test9.vanilla/drivers/net/pcmcia/ibmtr_cs.c 2003-10-25 14:43:42.000000000 -0400 | |
3 | +++ linux-2.6.0-test9/drivers/net/pcmcia/ibmtr_cs.c 2003-10-25 19:01:02.000000000 -0400 | |
4 | @@ -136,7 +136,7 @@ | |
5 | struct net_device *dev; | |
6 | dev_node_t node; | |
7 | window_handle_t sram_win_handle; | |
8 | - struct tok_info ti; | |
9 | + struct tok_info *ti; | |
10 | } ibmtr_dev_t; | |
11 | ||
12 | static void netdev_get_drvinfo(struct net_device *dev, | |
13 | @@ -168,14 +168,19 @@ | |
14 | DEBUG(0, "ibmtr_attach()\n"); | |
15 | ||
16 | /* Create new token-ring device */ | |
17 | - dev = alloc_trdev(sizeof(*info)); | |
18 | - if (!dev) | |
19 | - return NULL; | |
20 | - info = dev->priv; | |
21 | + info = kmalloc(sizeof(*info), GFP_KERNEL); | |
22 | + if (!info) return NULL; | |
23 | + memset(info,0,sizeof(*info)); | |
24 | + dev = alloc_trdev(sizeof(struct tok_info)); | |
25 | + if (!dev) { | |
26 | + kfree(info); | |
27 | + return NULL; | |
28 | + } | |
29 | ||
30 | link = &info->link; | |
31 | link->priv = info; | |
32 | - | |
33 | + info->ti = dev->priv; | |
34 | + | |
35 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | |
36 | link->io.NumPorts1 = 4; | |
37 | link->io.IOAddrLines = 16; | |
38 | @@ -265,6 +270,7 @@ | |
39 | *linkp = link->next; | |
40 | unregister_netdev(dev); | |
41 | free_netdev(dev); | |
42 | + kfree(info); | |
43 | } /* ibmtr_detach */ | |
44 | ||
45 | /*====================================================================== | |
46 | diff -urN -X dontdiff linux-2.6.0-test9.vanilla/drivers/net/tokenring/ibmtr.c linux-2.6.0-test9/drivers/net/tokenring/ibmtr.c | |
47 | --- linux-2.6.0-test9.vanilla/drivers/net/tokenring/ibmtr.c 2003-10-25 14:43:58.000000000 -0400 | |
48 | +++ linux-2.6.0-test9/drivers/net/tokenring/ibmtr.c 2003-10-25 17:26:38.000000000 -0400 | |
49 | @@ -152,7 +152,7 @@ | |
50 | ||
51 | /* this allows displaying full adapter information */ | |
52 | ||
53 | -char *channel_def[] __initdata = { "ISA", "MCA", "ISA P&P" }; | |
54 | +char *channel_def[] __devinitdata = { "ISA", "MCA", "ISA P&P" }; | |
55 | ||
56 | static char pcchannelid[] __devinitdata = { | |
57 | 0x05, 0x00, 0x04, 0x09, | |
58 | @@ -864,7 +864,8 @@ | |
59 | ti->sram_virt &= ~1; /* to reverse what we do in tok_close */ | |
60 | /* init the spinlock */ | |
61 | ti->lock = (spinlock_t) SPIN_LOCK_UNLOCKED; | |
62 | - | |
63 | + init_timer(&ti->tr_timer); | |
64 | + | |
65 | i = tok_init_card(dev); | |
66 | if (i) return i; | |
67 | ||
68 | @@ -1033,7 +1034,7 @@ | |
69 | ||
70 | /* Important for PCMCIA hot unplug, otherwise, we'll pull the card, */ | |
71 | /* unloading the module from memory, and then if a timer pops, ouch */ | |
72 | - del_timer(&ti->tr_timer); | |
73 | + del_timer_sync(&ti->tr_timer); | |
74 | outb(0, dev->base_addr + ADAPTRESET); | |
75 | ti->sram_virt |= 1; | |
76 | ti->open_status = CLOSED; |