aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/depca.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/depca.c')
-rw-r--r--drivers/net/depca.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index b1cbe99249c1..af594664df51 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -4,9 +4,9 @@
4 4
5 5
6 Copyright 1994 David C. Davies 6 Copyright 1994 David C. Davies
7 and 7 and
8 United States Government 8 United States Government
9 (as represented by the Director, National Security Agency). 9 (as represented by the Director, National Security Agency).
10 10
11 Copyright 1995 Digital Equipment Corporation. 11 Copyright 1995 Digital Equipment Corporation.
12 12
@@ -61,7 +61,7 @@
61 Digital Equipment Corporation, 1989 61 Digital Equipment Corporation, 1989
62 8) "DEC EtherWORKS Turbo_(TP BNC) Ethernet Controller Owners Manual", 62 8) "DEC EtherWORKS Turbo_(TP BNC) Ethernet Controller Owners Manual",
63 Digital Equipment corporation, 1991, Pub. #EK-DE202-OM.001 63 Digital Equipment corporation, 1991, Pub. #EK-DE202-OM.001
64 64
65 65
66 Peter Bauer's depca.c (V0.5) was referred to when debugging V0.1 of this 66 Peter Bauer's depca.c (V0.5) was referred to when debugging V0.1 of this
67 driver. 67 driver.
@@ -135,20 +135,20 @@
135 [Alan Cox: Changed the code to allow command line irq/io assignments] 135 [Alan Cox: Changed the code to allow command line irq/io assignments]
136 [Dave Davies: Changed the code to allow command line mem/name 136 [Dave Davies: Changed the code to allow command line mem/name
137 assignments] 137 assignments]
138 6) run the net startup bits for your eth?? interface manually 138 6) run the net startup bits for your eth?? interface manually
139 (usually /etc/rc.inet[12] at boot time). 139 (usually /etc/rc.inet[12] at boot time).
140 7) enjoy! 140 7) enjoy!
141 141
142 Note that autoprobing is not allowed in loadable modules - the system is 142 Note that autoprobing is not allowed in loadable modules - the system is
143 already up and running and you're messing with interrupts. 143 already up and running and you're messing with interrupts.
144 144
145 To unload a module, turn off the associated interface 145 To unload a module, turn off the associated interface
146 'ifconfig eth?? down' then 'rmmod depca'. 146 'ifconfig eth?? down' then 'rmmod depca'.
147 147
148 To assign a base memory address for the shared memory when running as a 148 To assign a base memory address for the shared memory when running as a
149 loadable module, see 5 above. To include the adapter name (if you have 149 loadable module, see 5 above. To include the adapter name (if you have
150 no PROM but know the card name) also see 5 above. Note that this last 150 no PROM but know the card name) also see 5 above. Note that this last
151 option will not work with kernel built-in depca's. 151 option will not work with kernel built-in depca's.
152 152
153 The shared memory assignment for a loadable module makes sense to avoid 153 The shared memory assignment for a loadable module makes sense to avoid
154 the 'memory autoprobe' picking the wrong shared memory (for the case of 154 the 'memory autoprobe' picking the wrong shared memory (for the case of
@@ -157,7 +157,7 @@
157 ************************************************************************ 157 ************************************************************************
158 Support for MCA EtherWORKS cards added 11-3-98. 158 Support for MCA EtherWORKS cards added 11-3-98.
159 Verified to work with up to 2 DE212 cards in a system (although not 159 Verified to work with up to 2 DE212 cards in a system (although not
160 fully stress-tested). 160 fully stress-tested).
161 161
162 Currently known bugs/limitations: 162 Currently known bugs/limitations:
163 163
@@ -176,7 +176,7 @@
176 ---------------- 176 ----------------
177 177
178 Version Date Description 178 Version Date Description
179 179
180 0.1 25-jan-94 Initial writing. 180 0.1 25-jan-94 Initial writing.
181 0.2 27-jan-94 Added LANCE TX hardware buffer chaining. 181 0.2 27-jan-94 Added LANCE TX hardware buffer chaining.
182 0.3 1-feb-94 Added multiple DEPCA support. 182 0.3 1-feb-94 Added multiple DEPCA support.
@@ -190,7 +190,7 @@
190 0.351 30-apr-94 Added EISA support. Added DE422 recognition. 190 0.351 30-apr-94 Added EISA support. Added DE422 recognition.
191 0.36 16-may-94 DE422 fix released. 191 0.36 16-may-94 DE422 fix released.
192 0.37 22-jul-94 Added MODULE support 192 0.37 22-jul-94 Added MODULE support
193 0.38 15-aug-94 Added DBR ROM switch in depca_close(). 193 0.38 15-aug-94 Added DBR ROM switch in depca_close().
194 Multi DEPCA bug fix. 194 Multi DEPCA bug fix.
195 0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0. 195 0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0.
196 0.381 12-dec-94 Added DE101 recognition, fix multicast bug. 196 0.381 12-dec-94 Added DE101 recognition, fix multicast bug.
@@ -198,17 +198,17 @@
198 0.383 22-feb-95 Fix for conflict with VESA SCSI reported by 198 0.383 22-feb-95 Fix for conflict with VESA SCSI reported by
199 <stromain@alf.dec.com> 199 <stromain@alf.dec.com>
200 0.384 17-mar-95 Fix a ring full bug reported by <bkm@star.rl.ac.uk> 200 0.384 17-mar-95 Fix a ring full bug reported by <bkm@star.rl.ac.uk>
201 0.385 3-apr-95 Fix a recognition bug reported by 201 0.385 3-apr-95 Fix a recognition bug reported by
202 <ryan.niemi@lastfrontier.com> 202 <ryan.niemi@lastfrontier.com>
203 0.386 21-apr-95 Fix the last fix...sorry, must be galloping senility 203 0.386 21-apr-95 Fix the last fix...sorry, must be galloping senility
204 0.40 25-May-95 Rewrite for portability & updated. 204 0.40 25-May-95 Rewrite for portability & updated.
205 ALPHA support from <jestabro@amt.tay1.dec.com> 205 ALPHA support from <jestabro@amt.tay1.dec.com>
206 0.41 26-Jun-95 Added verify_area() calls in depca_ioctl() from 206 0.41 26-Jun-95 Added verify_area() calls in depca_ioctl() from
207 suggestion by <heiko@colossus.escape.de> 207 suggestion by <heiko@colossus.escape.de>
208 0.42 27-Dec-95 Add 'mem' shared memory assignment for loadable 208 0.42 27-Dec-95 Add 'mem' shared memory assignment for loadable
209 modules. 209 modules.
210 Add 'adapter_name' for loadable modules when no PROM. 210 Add 'adapter_name' for loadable modules when no PROM.
211 Both above from a suggestion by 211 Both above from a suggestion by
212 <pchen@woodruffs121.residence.gatech.edu>. 212 <pchen@woodruffs121.residence.gatech.edu>.
213 Add new multicasting code. 213 Add new multicasting code.
214 0.421 22-Apr-96 Fix alloc_device() bug <jari@markkus2.fimr.fi> 214 0.421 22-Apr-96 Fix alloc_device() bug <jari@markkus2.fimr.fi>
@@ -218,7 +218,7 @@
218 0.44 1-Sep-97 Fix *_probe() to test check_region() first - bug 218 0.44 1-Sep-97 Fix *_probe() to test check_region() first - bug
219 reported by <mmogilvi@elbert.uccs.edu> 219 reported by <mmogilvi@elbert.uccs.edu>
220 0.45 3-Nov-98 Added support for MCA EtherWORKS (DE210/DE212) cards 220 0.45 3-Nov-98 Added support for MCA EtherWORKS (DE210/DE212) cards
221 by <tymm@computer.org> 221 by <tymm@computer.org>
222 0.451 5-Nov-98 Fixed mca stuff cuz I'm a dummy. <tymm@computer.org> 222 0.451 5-Nov-98 Fixed mca stuff cuz I'm a dummy. <tymm@computer.org>
223 0.5 14-Nov-98 Re-spin for 2.1.x kernels. 223 0.5 14-Nov-98 Re-spin for 2.1.x kernels.
224 0.51 27-Jun-99 Correct received packet length for CRC from 224 0.51 27-Jun-99 Correct received packet length for CRC from
@@ -411,7 +411,7 @@ static struct platform_driver depca_isa_driver = {
411 .name = depca_string, 411 .name = depca_string,
412 }, 412 },
413}; 413};
414 414
415/* 415/*
416** Miscellaneous info... 416** Miscellaneous info...
417*/ 417*/
@@ -421,14 +421,14 @@ static struct platform_driver depca_isa_driver = {
421** Memory Alignment. Each descriptor is 4 longwords long. To force a 421** Memory Alignment. Each descriptor is 4 longwords long. To force a
422** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and 422** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and
423** DESC_ALIGN. DEPCA_ALIGN aligns the start address of the private memory area 423** DESC_ALIGN. DEPCA_ALIGN aligns the start address of the private memory area
424** and hence the RX descriptor ring's first entry. 424** and hence the RX descriptor ring's first entry.
425*/ 425*/
426#define DEPCA_ALIGN4 ((u_long)4 - 1) /* 1 longword align */ 426#define DEPCA_ALIGN4 ((u_long)4 - 1) /* 1 longword align */
427#define DEPCA_ALIGN8 ((u_long)8 - 1) /* 2 longword (quadword) align */ 427#define DEPCA_ALIGN8 ((u_long)8 - 1) /* 2 longword (quadword) align */
428#define DEPCA_ALIGN DEPCA_ALIGN8 /* Keep the LANCE happy... */ 428#define DEPCA_ALIGN DEPCA_ALIGN8 /* Keep the LANCE happy... */
429 429
430/* 430/*
431** The DEPCA Rx and Tx ring descriptors. 431** The DEPCA Rx and Tx ring descriptors.
432*/ 432*/
433struct depca_rx_desc { 433struct depca_rx_desc {
434 volatile s32 base; 434 volatile s32 base;
@@ -591,7 +591,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
591 */ 591 */
592 592
593 ioaddr = dev->base_addr; 593 ioaddr = dev->base_addr;
594 594
595 STOP_DEPCA; 595 STOP_DEPCA;
596 596
597 nicsr = inb(DEPCA_NICSR); 597 nicsr = inb(DEPCA_NICSR);
@@ -610,7 +610,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
610 610
611 printk ("%s: %s at 0x%04lx", 611 printk ("%s: %s at 0x%04lx",
612 device->bus_id, depca_signature[lp->adapter], ioaddr); 612 device->bus_id, depca_signature[lp->adapter], ioaddr);
613 613
614 switch (lp->depca_bus) { 614 switch (lp->depca_bus) {
615#ifdef CONFIG_MCA 615#ifdef CONFIG_MCA
616 case DEPCA_BUS_MCA: 616 case DEPCA_BUS_MCA:
@@ -657,7 +657,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
657 if (lp->depca_bus != DEPCA_BUS_MCA) 657 if (lp->depca_bus != DEPCA_BUS_MCA)
658 mem_start += 0x8000; 658 mem_start += 0x8000;
659 } 659 }
660 660
661 if ((mem_len = (NUM_RX_DESC * (sizeof(struct depca_rx_desc) + RX_BUFF_SZ) + NUM_TX_DESC * (sizeof(struct depca_tx_desc) + TX_BUFF_SZ) + sizeof(struct depca_init))) 661 if ((mem_len = (NUM_RX_DESC * (sizeof(struct depca_rx_desc) + RX_BUFF_SZ) + NUM_TX_DESC * (sizeof(struct depca_tx_desc) + TX_BUFF_SZ) + sizeof(struct depca_init)))
662 > (netRAM << 10)) { 662 > (netRAM << 10)) {
663 printk(",\n requests %dkB RAM: only %dkB is available!\n", (mem_len >> 10), netRAM); 663 printk(",\n requests %dkB RAM: only %dkB is available!\n", (mem_len >> 10), netRAM);
@@ -682,7 +682,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
682 printk(KERN_ERR "depca: cannot request ISA memory, aborting\n"); 682 printk(KERN_ERR "depca: cannot request ISA memory, aborting\n");
683 goto out_priv; 683 goto out_priv;
684 } 684 }
685 685
686 status = -EIO; 686 status = -EIO;
687 lp->sh_mem = ioremap(mem_start, mem_len); 687 lp->sh_mem = ioremap(mem_start, mem_len);
688 if (lp->sh_mem == NULL) { 688 if (lp->sh_mem == NULL) {
@@ -811,7 +811,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
811 811
812 device->driver_data = dev; 812 device->driver_data = dev;
813 SET_NETDEV_DEV (dev, device); 813 SET_NETDEV_DEV (dev, device);
814 814
815 status = register_netdev(dev); 815 status = register_netdev(dev);
816 if (status == 0) 816 if (status == 0)
817 return 0; 817 return 0;
@@ -822,7 +822,7 @@ out1:
822out_priv: 822out_priv:
823 return status; 823 return status;
824} 824}
825 825
826 826
827static int depca_open(struct net_device *dev) 827static int depca_open(struct net_device *dev)
828{ 828{
@@ -924,8 +924,8 @@ static void depca_tx_timeout(struct net_device *dev)
924} 924}
925 925
926 926
927/* 927/*
928** Writes a socket buffer to TX descriptor ring and starts transmission 928** Writes a socket buffer to TX descriptor ring and starts transmission
929*/ 929*/
930static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev) 930static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
931{ 931{
@@ -939,7 +939,7 @@ static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
939 939
940 if (skb_padto(skb, ETH_ZLEN)) 940 if (skb_padto(skb, ETH_ZLEN))
941 goto out; 941 goto out;
942 942
943 netif_stop_queue(dev); 943 netif_stop_queue(dev);
944 944
945 if (TX_BUFFS_AVAIL) { /* Fill in a Tx ring entry */ 945 if (TX_BUFFS_AVAIL) { /* Fill in a Tx ring entry */
@@ -963,7 +963,7 @@ static int depca_start_xmit(struct sk_buff *skb, struct net_device *dev)
963} 963}
964 964
965/* 965/*
966** The DEPCA interrupt handler. 966** The DEPCA interrupt handler.
967*/ 967*/
968static irqreturn_t depca_interrupt(int irq, void *dev_id, struct pt_regs *regs) 968static irqreturn_t depca_interrupt(int irq, void *dev_id, struct pt_regs *regs)
969{ 969{
@@ -1053,8 +1053,8 @@ static int depca_rx(struct net_device *dev)
1053 memcpy_fromio(buf, lp->rx_buff[lp->rx_old], pkt_len); 1053 memcpy_fromio(buf, lp->rx_buff[lp->rx_old], pkt_len);
1054 } 1054 }
1055 1055
1056 /* 1056 /*
1057 ** Notify the upper protocol layers that there is another 1057 ** Notify the upper protocol layers that there is another
1058 ** packet to handle 1058 ** packet to handle
1059 */ 1059 */
1060 skb->protocol = eth_type_trans(skb, dev); 1060 skb->protocol = eth_type_trans(skb, dev);
@@ -1167,9 +1167,9 @@ static int depca_close(struct net_device *dev)
1167 printk("%s: Shutting down ethercard, status was %2.2x.\n", dev->name, inw(DEPCA_DATA)); 1167 printk("%s: Shutting down ethercard, status was %2.2x.\n", dev->name, inw(DEPCA_DATA));
1168 } 1168 }
1169 1169
1170 /* 1170 /*
1171 ** We stop the DEPCA here -- it occasionally polls 1171 ** We stop the DEPCA here -- it occasionally polls
1172 ** memory if we don't. 1172 ** memory if we don't.
1173 */ 1173 */
1174 outw(STOP, DEPCA_DATA); 1174 outw(STOP, DEPCA_DATA);
1175 1175
@@ -1320,12 +1320,12 @@ static void SetMulticastFilter(struct net_device *dev)
1320static int __init depca_common_init (u_long ioaddr, struct net_device **devp) 1320static int __init depca_common_init (u_long ioaddr, struct net_device **devp)
1321{ 1321{
1322 int status = 0; 1322 int status = 0;
1323 1323
1324 if (!request_region (ioaddr, DEPCA_TOTAL_SIZE, depca_string)) { 1324 if (!request_region (ioaddr, DEPCA_TOTAL_SIZE, depca_string)) {
1325 status = -EBUSY; 1325 status = -EBUSY;
1326 goto out; 1326 goto out;
1327 } 1327 }
1328 1328
1329 if (DevicePresent(ioaddr)) { 1329 if (DevicePresent(ioaddr)) {
1330 status = -ENODEV; 1330 status = -ENODEV;
1331 goto out_release; 1331 goto out_release;
@@ -1337,7 +1337,7 @@ static int __init depca_common_init (u_long ioaddr, struct net_device **devp)
1337 } 1337 }
1338 1338
1339 return 0; 1339 return 0;
1340 1340
1341 out_release: 1341 out_release:
1342 release_region (ioaddr, DEPCA_TOTAL_SIZE); 1342 release_region (ioaddr, DEPCA_TOTAL_SIZE);
1343 out: 1343 out:
@@ -1359,16 +1359,16 @@ static int __init depca_mca_probe(struct device *device)
1359 struct depca_private *lp; 1359 struct depca_private *lp;
1360 1360
1361 /* 1361 /*
1362 ** Search for the adapter. If an address has been given, search 1362 ** Search for the adapter. If an address has been given, search
1363 ** specifically for the card at that address. Otherwise find the 1363 ** specifically for the card at that address. Otherwise find the
1364 ** first card in the system. 1364 ** first card in the system.
1365 */ 1365 */
1366 1366
1367 pos[0] = mca_device_read_stored_pos(mdev, 2); 1367 pos[0] = mca_device_read_stored_pos(mdev, 2);
1368 pos[1] = mca_device_read_stored_pos(mdev, 3); 1368 pos[1] = mca_device_read_stored_pos(mdev, 3);
1369 1369
1370 /* 1370 /*
1371 ** IO of card is handled by bits 1 and 2 of pos0. 1371 ** IO of card is handled by bits 1 and 2 of pos0.
1372 ** 1372 **
1373 ** bit2 bit1 IO 1373 ** bit2 bit1 IO
1374 ** 0 0 0x2c00 1374 ** 0 0 0x2c00
@@ -1381,12 +1381,12 @@ static int __init depca_mca_probe(struct device *device)
1381 1381
1382 /* 1382 /*
1383 ** Found the adapter we were looking for. Now start setting it up. 1383 ** Found the adapter we were looking for. Now start setting it up.
1384 ** 1384 **
1385 ** First work on decoding the IRQ. It's stored in the lower 4 bits 1385 ** First work on decoding the IRQ. It's stored in the lower 4 bits
1386 ** of pos1. Bits are as follows (from the ADF file): 1386 ** of pos1. Bits are as follows (from the ADF file):
1387 ** 1387 **
1388 ** Bits 1388 ** Bits
1389 ** 3 2 1 0 IRQ 1389 ** 3 2 1 0 IRQ
1390 ** -------------------- 1390 ** --------------------
1391 ** 0 0 1 0 5 1391 ** 0 0 1 0 5
1392 ** 0 0 0 1 9 1392 ** 0 0 0 1 9
@@ -1435,7 +1435,7 @@ static int __init depca_mca_probe(struct device *device)
1435 strncpy(mdev->name, depca_mca_adapter_name[mdev->index], 1435 strncpy(mdev->name, depca_mca_adapter_name[mdev->index],
1436 sizeof(mdev->name)); 1436 sizeof(mdev->name));
1437 mca_device_set_claim(mdev, 1); 1437 mca_device_set_claim(mdev, 1);
1438 1438
1439 /* 1439 /*
1440 ** Get everything allocated and initialized... (almost just 1440 ** Get everything allocated and initialized... (almost just
1441 ** like the ISA and EISA probes) 1441 ** like the ISA and EISA probes)
@@ -1452,10 +1452,10 @@ static int __init depca_mca_probe(struct device *device)
1452 lp->depca_bus = DEPCA_BUS_MCA; 1452 lp->depca_bus = DEPCA_BUS_MCA;
1453 lp->adapter = depca_mca_adapter_type[mdev->index]; 1453 lp->adapter = depca_mca_adapter_type[mdev->index];
1454 lp->mem_start = mem_start; 1454 lp->mem_start = mem_start;
1455 1455
1456 if ((err = depca_hw_init(dev, device))) 1456 if ((err = depca_hw_init(dev, device)))
1457 goto out_free; 1457 goto out_free;
1458 1458
1459 return 0; 1459 return 0;
1460 1460
1461 out_free: 1461 out_free:
@@ -1479,7 +1479,7 @@ static void __init depca_platform_probe (void)
1479 1479
1480 for (i = 0; depca_io_ports[i].iobase; i++) { 1480 for (i = 0; depca_io_ports[i].iobase; i++) {
1481 depca_io_ports[i].device = NULL; 1481 depca_io_ports[i].device = NULL;
1482 1482
1483 /* if an address has been specified on the command 1483 /* if an address has been specified on the command
1484 * line, use it (if valid) */ 1484 * line, use it (if valid) */
1485 if (io && io != depca_io_ports[i].iobase) 1485 if (io && io != depca_io_ports[i].iobase)
@@ -1503,7 +1503,7 @@ static void __init depca_platform_probe (void)
1503 * no hardware at this address. Unregister it, as the 1503 * no hardware at this address. Unregister it, as the
1504 * release fuction will take care of freeing the 1504 * release fuction will take care of freeing the
1505 * allocated structure */ 1505 * allocated structure */
1506 1506
1507 depca_io_ports[i].device = NULL; 1507 depca_io_ports[i].device = NULL;
1508 pldev->dev.platform_data = NULL; 1508 pldev->dev.platform_data = NULL;
1509 platform_device_unregister (pldev); 1509 platform_device_unregister (pldev);
@@ -1541,7 +1541,7 @@ static int __init depca_isa_probe (struct platform_device *device)
1541 goto out; 1541 goto out;
1542 1542
1543 adapter = depca_shmem_probe (&mem_start); 1543 adapter = depca_shmem_probe (&mem_start);
1544 1544
1545 if (adapter == unknown) { 1545 if (adapter == unknown) {
1546 status = -ENODEV; 1546 status = -ENODEV;
1547 goto out_free; 1547 goto out_free;
@@ -1554,10 +1554,10 @@ static int __init depca_isa_probe (struct platform_device *device)
1554 lp->depca_bus = DEPCA_BUS_ISA; 1554 lp->depca_bus = DEPCA_BUS_ISA;
1555 lp->adapter = adapter; 1555 lp->adapter = adapter;
1556 lp->mem_start = mem_start; 1556 lp->mem_start = mem_start;
1557 1557
1558 if ((status = depca_hw_init(dev, &device->dev))) 1558 if ((status = depca_hw_init(dev, &device->dev)))
1559 goto out_free; 1559 goto out_free;
1560 1560
1561 return 0; 1561 return 0;
1562 1562
1563 out_free: 1563 out_free:
@@ -1591,7 +1591,7 @@ static int __init depca_eisa_probe (struct device *device)
1591 * it's address with the ethernet prom)... As we don't parse 1591 * it's address with the ethernet prom)... As we don't parse
1592 * the EISA configuration structures (yet... :-), just rely on 1592 * the EISA configuration structures (yet... :-), just rely on
1593 * the ISA probing to sort it out... */ 1593 * the ISA probing to sort it out... */
1594 1594
1595 depca_shmem_probe (&mem_start); 1595 depca_shmem_probe (&mem_start);
1596 1596
1597 dev->base_addr = ioaddr; 1597 dev->base_addr = ioaddr;
@@ -1600,10 +1600,10 @@ static int __init depca_eisa_probe (struct device *device)
1600 lp->depca_bus = DEPCA_BUS_EISA; 1600 lp->depca_bus = DEPCA_BUS_EISA;
1601 lp->adapter = edev->id.driver_data; 1601 lp->adapter = edev->id.driver_data;
1602 lp->mem_start = mem_start; 1602 lp->mem_start = mem_start;
1603 1603
1604 if ((status = depca_hw_init(dev, device))) 1604 if ((status = depca_hw_init(dev, device)))
1605 goto out_free; 1605 goto out_free;
1606 1606
1607 return 0; 1607 return 0;
1608 1608
1609 out_free: 1609 out_free:
@@ -1650,7 +1650,7 @@ static int __init DepcaSignature(char *name, u_long base_addr)
1650 * used, at least on x86. Instead, reserve a memory region a 1650 * used, at least on x86. Instead, reserve a memory region a
1651 * board would certainly use. If it works, go ahead. If not, 1651 * board would certainly use. If it works, go ahead. If not,
1652 * run like hell... */ 1652 * run like hell... */
1653 1653
1654 if (!request_mem_region (mem_addr, 16, depca_string)) 1654 if (!request_mem_region (mem_addr, 16, depca_string))
1655 return unknown; 1655 return unknown;
1656 1656
@@ -1699,7 +1699,7 @@ static int __init DepcaSignature(char *name, u_long base_addr)
1699** if the first address octet is a 0x08 - this minimises the chances of 1699** if the first address octet is a 0x08 - this minimises the chances of
1700** messing around with some other hardware, but it assumes that this DEPCA 1700** messing around with some other hardware, but it assumes that this DEPCA
1701** card initialized itself correctly. 1701** card initialized itself correctly.
1702** 1702**
1703** Search the Ethernet address ROM for the signature. Since the ROM address 1703** Search the Ethernet address ROM for the signature. Since the ROM address
1704** counter can start at an arbitrary point, the search must include the entire 1704** counter can start at an arbitrary point, the search must include the entire
1705** probe sequence length plus the (length_of_the_signature - 1). 1705** probe sequence length plus the (length_of_the_signature - 1).
@@ -1804,7 +1804,7 @@ static int load_packet(struct net_device *dev, struct sk_buff *skb)
1804 entry = lp->tx_new; /* Ring around buffer number. */ 1804 entry = lp->tx_new; /* Ring around buffer number. */
1805 end = (entry + (skb->len - 1) / TX_BUFF_SZ) & lp->txRingMask; 1805 end = (entry + (skb->len - 1) / TX_BUFF_SZ) & lp->txRingMask;
1806 if (!(readl(&lp->tx_ring[end].base) & T_OWN)) { /* Enough room? */ 1806 if (!(readl(&lp->tx_ring[end].base) & T_OWN)) { /* Enough room? */
1807 /* 1807 /*
1808 ** Caution: the write order is important here... don't set up the 1808 ** Caution: the write order is important here... don't set up the
1809 ** ownership rights until all the other information is in place. 1809 ** ownership rights until all the other information is in place.
1810 */ 1810 */
@@ -2086,7 +2086,7 @@ static int __init depca_module_init (void)
2086#endif 2086#endif
2087 err |= platform_driver_register (&depca_isa_driver); 2087 err |= platform_driver_register (&depca_isa_driver);
2088 depca_platform_probe (); 2088 depca_platform_probe ();
2089 2089
2090 return err; 2090 return err;
2091} 2091}
2092 2092