Import 2.3.18pre1
[davej-history.git] / drivers / net / 3c501.c
blob47ad2e0765021c27ee37561dee65c01b5f1e59ef
1 /* 3c501.c: A 3Com 3c501 Ethernet driver for Linux. */
2 /*
3 Written 1992,1993,1994 Donald Becker
5 Copyright 1993 United States Government as represented by the
6 Director, National Security Agency. This software may be used and
7 distributed according to the terms of the GNU Public License,
8 incorporated herein by reference.
10 This is a device driver for the 3Com Etherlink 3c501.
11 Do not purchase this card, even as a joke. It's performance is horrible,
12 and it breaks in many ways.
14 The author may be reached as becker@CESDIS.gsfc.nasa.gov, or C/O
15 Center of Excellence in Space Data and Information Sciences
16 Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771
18 Fixed (again!) the missing interrupt locking on TX/RX shifting.
19 Alan Cox <Alan.Cox@linux.org>
21 Removed calls to init_etherdev since they are no longer needed, and
22 cleaned up modularization just a bit. The driver still allows only
23 the default address for cards when loaded as a module, but that's
24 really less braindead than anyone using a 3c501 board. :)
25 19950208 (invid@msen.com)
27 Added traps for interrupts hitting the window as we clear and TX load
28 the board. Now getting 150K/second FTP with a 3c501 card. Still playing
29 with a TX-TX optimisation to see if we can touch 180-200K/second as seems
30 theoretically maximum.
31 19950402 Alan Cox <Alan.Cox@linux.org>
33 Some notes on this thing if you have to hack it. [Alan]
35 1] Some documentation is available from 3Com. Due to the boards age
36 standard responses when you ask for this will range from 'be serious'
37 to 'give it to a museum'. The documentation is incomplete and mostly
38 of historical interest anyway.
40 2] The basic system is a single buffer which can be used to receive or
41 transmit a packet. A third command mode exists when you are setting
42 things up.
44 3] If it's transmitting it's not receiving and vice versa. In fact the
45 time to get the board back into useful state after an operation is
46 quite large.
48 4] The driver works by keeping the board in receive mode waiting for a
49 packet to arrive. When one arrives it is copied out of the buffer
50 and delivered to the kernel. The card is reloaded and off we go.
52 5] When transmitting dev->tbusy is set and the card is reset (from
53 receive mode) [possibly losing a packet just received] to command
54 mode. A packet is loaded and transmit mode triggered. The interrupt
55 handler runs different code for transmit interrupts and can handle
56 returning to receive mode or retransmissions (yes you have to help
57 out with those too).
59 Problems:
60 There are a wide variety of undocumented error returns from the card
61 and you basically have to kick the board and pray if they turn up. Most
62 only occur under extreme load or if you do something the board doesn't
63 like (eg touching a register at the wrong time).
65 The driver is less efficient than it could be. It switches through
66 receive mode even if more transmits are queued. If this worries you buy
67 a real Ethernet card.
69 The combination of slow receive restart and no real multicast
70 filter makes the board unusable with a kernel compiled for IP
71 multicasting in a real multicast environment. That's down to the board,
72 but even with no multicast programs running a multicast IP kernel is
73 in group 224.0.0.1 and you will therefore be listening to all multicasts.
74 One nv conference running over that Ethernet and you can give up.
78 static const char *version =
79 "3c501.c: 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov).\n";
82 * Braindamage remaining:
83 * The 3c501 board.
86 #include <linux/module.h>
88 #include <linux/kernel.h>
89 #include <linux/sched.h>
90 #include <linux/ptrace.h>
91 #include <linux/fcntl.h>
92 #include <linux/ioport.h>
93 #include <linux/interrupt.h>
94 #include <linux/malloc.h>
95 #include <linux/string.h>
96 #include <linux/errno.h>
97 #include <linux/config.h> /* for CONFIG_IP_MULTICAST */
98 #include <linux/spinlock.h>
100 #include <asm/bitops.h>
101 #include <asm/io.h>
103 #include <linux/netdevice.h>
104 #include <linux/etherdevice.h>
105 #include <linux/skbuff.h>
106 #include <linux/init.h>
108 /* A zero-terminated list of I/O addresses to be probed.
109 The 3c501 can be at many locations, but here are the popular ones. */
110 static unsigned int netcard_portlist[] __initdata = {
111 0x280, 0x300, 0
116 * Index to functions.
119 int el1_probe(struct net_device *dev);
120 static int el1_probe1(struct net_device *dev, int ioaddr);
121 static int el_open(struct net_device *dev);
122 static int el_start_xmit(struct sk_buff *skb, struct net_device *dev);
123 static void el_interrupt(int irq, void *dev_id, struct pt_regs *regs);
124 static void el_receive(struct net_device *dev);
125 static void el_reset(struct net_device *dev);
126 static int el1_close(struct net_device *dev);
127 static struct net_device_stats *el1_get_stats(struct net_device *dev);
128 static void set_multicast_list(struct net_device *dev);
130 #define EL1_IO_EXTENT 16
132 #ifndef EL_DEBUG
133 #define EL_DEBUG 0 /* use 0 for production, 1 for devel., >2 for debug */
134 #endif /* Anything above 5 is wordy death! */
135 static int el_debug = EL_DEBUG;
138 * Board-specific info in dev->priv.
141 struct net_local
143 struct net_device_stats stats;
144 int tx_pkt_start; /* The length of the current Tx packet. */
145 int collisions; /* Tx collisions this packet */
146 int loading; /* Spot buffer load collisions */
147 spinlock_t lock; /* Serializing lock */
151 #define RX_STATUS (ioaddr + 0x06)
152 #define RX_CMD RX_STATUS
153 #define TX_STATUS (ioaddr + 0x07)
154 #define TX_CMD TX_STATUS
155 #define GP_LOW (ioaddr + 0x08)
156 #define GP_HIGH (ioaddr + 0x09)
157 #define RX_BUF_CLR (ioaddr + 0x0A)
158 #define RX_LOW (ioaddr + 0x0A)
159 #define RX_HIGH (ioaddr + 0x0B)
160 #define SAPROM (ioaddr + 0x0C)
161 #define AX_STATUS (ioaddr + 0x0E)
162 #define AX_CMD AX_STATUS
163 #define DATAPORT (ioaddr + 0x0F)
164 #define TX_RDY 0x08 /* In TX_STATUS */
166 #define EL1_DATAPTR 0x08
167 #define EL1_RXPTR 0x0A
168 #define EL1_SAPROM 0x0C
169 #define EL1_DATAPORT 0x0f
172 * Writes to the ax command register.
175 #define AX_OFF 0x00 /* Irq off, buffer access on */
176 #define AX_SYS 0x40 /* Load the buffer */
177 #define AX_XMIT 0x44 /* Transmit a packet */
178 #define AX_RX 0x48 /* Receive a packet */
179 #define AX_LOOP 0x0C /* Loopback mode */
180 #define AX_RESET 0x80
183 * Normal receive mode written to RX_STATUS. We must intr on short packets
184 * to avoid bogus rx lockups.
187 #define RX_NORM 0xA8 /* 0x68 == all addrs, 0xA8 only to me. */
188 #define RX_PROM 0x68 /* Senior Prom, uhmm promiscuous mode. */
189 #define RX_MULT 0xE8 /* Accept multicast packets. */
190 #define TX_NORM 0x0A /* Interrupt on everything that might hang the chip */
193 * TX_STATUS register.
196 #define TX_COLLISION 0x02
197 #define TX_16COLLISIONS 0x04
198 #define TX_READY 0x08
200 #define RX_RUNT 0x08
201 #define RX_MISSED 0x01 /* Missed a packet due to 3c501 braindamage. */
202 #define RX_GOOD 0x30 /* Good packet 0x20, or simple overflow 0x10. */
206 * The boilerplate probe code.
209 #ifdef HAVE_DEVLIST
210 struct netdev_entry el1_drv = {"3c501", el1_probe1, EL1_IO_EXTENT, netcard_portlist};
211 #else
213 int __init el1_probe(struct net_device *dev)
215 int i;
216 int base_addr = dev ? dev->base_addr : 0;
218 if (base_addr > 0x1ff) /* Check a single specified location. */
219 return el1_probe1(dev, base_addr);
220 else if (base_addr != 0) /* Don't probe at all. */
221 return ENXIO;
223 for (i = 0; netcard_portlist[i]; i++)
225 int ioaddr = netcard_portlist[i];
226 if (check_region(ioaddr, EL1_IO_EXTENT))
227 continue;
228 if (el1_probe1(dev, ioaddr) == 0)
229 return 0;
232 return ENODEV;
234 #endif
237 * The actual probe.
240 static int __init el1_probe1(struct net_device *dev, int ioaddr)
242 struct net_local *lp;
243 const char *mname; /* Vendor name */
244 unsigned char station_addr[6];
245 int autoirq = 0;
246 int i;
249 * Read the station address PROM data from the special port.
252 for (i = 0; i < 6; i++)
254 outw(i, ioaddr + EL1_DATAPTR);
255 station_addr[i] = inb(ioaddr + EL1_SAPROM);
258 * Check the first three octets of the S.A. for 3Com's prefix, or
259 * for the Sager NP943 prefix.
262 if (station_addr[0] == 0x02 && station_addr[1] == 0x60
263 && station_addr[2] == 0x8c)
265 mname = "3c501";
266 } else if (station_addr[0] == 0x00 && station_addr[1] == 0x80
267 && station_addr[2] == 0xC8)
269 mname = "NP943";
271 else
272 return ENODEV;
275 * Grab the region so we can find the another board if autoIRQ fails.
278 request_region(ioaddr, EL1_IO_EXTENT,"3c501");
281 * We auto-IRQ by shutting off the interrupt line and letting it float
282 * high.
285 if (dev->irq < 2)
287 autoirq_setup(2);
288 inb(RX_STATUS); /* Clear pending interrupts. */
289 inb(TX_STATUS);
290 outb(AX_LOOP + 1, AX_CMD);
292 outb(0x00, AX_CMD);
294 autoirq = autoirq_report(1);
296 if (autoirq == 0)
298 printk("%s probe at %#x failed to detect IRQ line.\n",
299 mname, ioaddr);
300 return EAGAIN;
304 outb(AX_RESET+AX_LOOP, AX_CMD); /* Loopback mode. */
305 dev->base_addr = ioaddr;
306 memcpy(dev->dev_addr, station_addr, ETH_ALEN);
308 if (dev->mem_start & 0xf)
309 el_debug = dev->mem_start & 0x7;
310 if (autoirq)
311 dev->irq = autoirq;
313 printk("%s: %s EtherLink at %#lx, using %sIRQ %d.\n", dev->name, mname, dev->base_addr,
314 autoirq ? "auto":"assigned ", dev->irq);
316 #ifdef CONFIG_IP_MULTICAST
317 printk("WARNING: Use of the 3c501 in a multicast kernel is NOT recommended.\n");
318 #endif
320 if (el_debug)
321 printk("%s", version);
324 * Initialize the device structure.
327 dev->priv = kmalloc(sizeof(struct net_local), GFP_KERNEL);
328 if (dev->priv == NULL)
329 return -ENOMEM;
330 memset(dev->priv, 0, sizeof(struct net_local));
332 lp=dev->priv;
333 spin_lock_init(&lp->lock);
336 * The EL1-specific entries in the device structure.
339 dev->open = &el_open;
340 dev->hard_start_xmit = &el_start_xmit;
341 dev->stop = &el1_close;
342 dev->get_stats = &el1_get_stats;
343 dev->set_multicast_list = &set_multicast_list;
346 * Setup the generic properties
349 ether_setup(dev);
351 return 0;
355 * Open/initialize the board.
358 static int el_open(struct net_device *dev)
360 int ioaddr = dev->base_addr;
362 if (el_debug > 2)
363 printk("%s: Doing el_open()...", dev->name);
365 if (request_irq(dev->irq, &el_interrupt, 0, "3c501", dev))
366 return -EAGAIN;
368 el_reset(dev);
370 dev->start = 1;
372 outb(AX_RX, AX_CMD); /* Aux control, irq and receive enabled */
373 MOD_INC_USE_COUNT;
374 return 0;
377 static int el_start_xmit(struct sk_buff *skb, struct net_device *dev)
379 struct net_local *lp = (struct net_local *)dev->priv;
380 int ioaddr = dev->base_addr;
381 unsigned long flags;
383 if(dev->interrupt) /* May be unloading, don't stamp on */
384 return 1; /* the packet buffer this time */
386 if (dev->tbusy)
388 if (jiffies - dev->trans_start < 20)
390 if (el_debug > 2)
391 printk(" transmitter busy, deferred.\n");
392 return 1;
394 if (el_debug)
395 printk ("%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n",
396 dev->name, inb(TX_STATUS), inb(AX_STATUS), inb(RX_STATUS));
397 lp->stats.tx_errors++;
398 outb(TX_NORM, TX_CMD);
399 outb(RX_NORM, RX_CMD);
400 outb(AX_OFF, AX_CMD); /* Just trigger a false interrupt. */
401 outb(AX_RX, AX_CMD); /* Aux control, irq and receive enabled */
402 dev->tbusy = 0;
403 dev->trans_start = jiffies;
407 * Avoid incoming interrupts between us flipping tbusy and flipping
408 * mode as the driver assumes tbusy is a faithful indicator of card
409 * state
412 spin_lock_irqsave(&lp->lock, flags);
415 * Avoid timer-based retransmission conflicts.
418 if (test_and_set_bit(0, (void*)&dev->tbusy) != 0)
420 spin_unlock_irqrestore(&lp->lock, flags);
421 printk(KERN_WARNING "%s: Transmitter access conflict.\n", dev->name);
423 else
425 int gp_start = 0x800 - (ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN);
426 unsigned char *buf = skb->data;
428 load_it_again_sam:
429 lp->tx_pkt_start = gp_start;
430 lp->collisions = 0;
432 lp->stats.tx_bytes += skb->len;
435 * Command mode with status cleared should [in theory]
436 * mean no more interrupts can be pending on the card.
439 outb_p(AX_SYS, AX_CMD);
440 inb_p(RX_STATUS);
441 inb_p(TX_STATUS);
443 lp->loading=1;
446 * Turn interrupts back on while we spend a pleasant afternoon
447 * loading bytes into the board
450 spin_unlock_irqrestore(&lp->lock, flags);
452 outw(0x00, RX_BUF_CLR); /* Set rx packet area to 0. */
453 outw(gp_start, GP_LOW); /* aim - packet will be loaded into buffer start */
454 outsb(DATAPORT,buf,skb->len); /* load buffer (usual thing each byte increments the pointer) */
455 outw(gp_start, GP_LOW); /* the board reuses the same register */
457 if(lp->loading==2) /* A receive upset our load, despite our best efforts */
459 if(el_debug>2)
460 printk("%s: burped during tx load.\n", dev->name);
461 spin_lock_irqsave(&lp->lock, flags);
462 goto load_it_again_sam; /* Sigh... */
464 outb(AX_XMIT, AX_CMD); /* fire ... Trigger xmit. */
465 lp->loading=0;
466 dev->trans_start = jiffies;
469 if (el_debug > 2)
470 printk(" queued xmit.\n");
471 dev_kfree_skb (skb);
472 return 0;
477 * The typical workload of the driver:
478 * Handle the ether interface interrupts.
481 static void el_interrupt(int irq, void *dev_id, struct pt_regs *regs)
483 struct net_device *dev = dev_id;
484 struct net_local *lp;
485 int ioaddr;
486 int axsr; /* Aux. status reg. */
488 if (dev == NULL || dev->irq != irq)
490 printk (KERN_ERR "3c501 driver: irq %d for unknown device.\n", irq);
491 return;
494 ioaddr = dev->base_addr;
495 lp = (struct net_local *)dev->priv;
497 spin_lock(&lp->lock);
500 * What happened ?
503 axsr = inb(AX_STATUS);
506 * Log it
509 if (el_debug > 3)
510 printk(KERN_DEBUG "%s: el_interrupt() aux=%#02x", dev->name, axsr);
511 if (dev->interrupt)
512 printk(KERN_WARNING "%s: Reentering the interrupt driver!\n", dev->name);
513 dev->interrupt = 1;
514 if(lp->loading==1 && !dev->tbusy)
515 printk(KERN_WARNING "%s: Inconsistent state loading while not in tx\n",
516 dev->name);
518 if (dev->tbusy)
522 * Board in transmit mode. May be loading. If we are
523 * loading we shouldn't have got this.
526 int txsr = inb(TX_STATUS);
528 if(lp->loading==1)
530 if(el_debug > 2)
532 printk(KERN_DEBUG "%s: Interrupt while loading [", dev->name);
533 printk(" txsr=%02x gp=%04x rp=%04x]\n", txsr, inw(GP_LOW),inw(RX_LOW));
535 lp->loading=2; /* Force a reload */
536 dev->interrupt = 0;
537 spin_unlock(&lp->lock);
538 return;
541 if (el_debug > 6)
542 printk(KERN_DEBUG " txsr=%02x gp=%04x rp=%04x", txsr, inw(GP_LOW),inw(RX_LOW));
544 if ((axsr & 0x80) && (txsr & TX_READY) == 0)
547 * FIXME: is there a logic to whether to keep on trying or
548 * reset immediately ?
550 if(el_debug>1)
551 printk("%s: Unusual interrupt during Tx, txsr=%02x axsr=%02x"
552 " gp=%03x rp=%03x.\n", dev->name, txsr, axsr,
553 inw(ioaddr + EL1_DATAPTR), inw(ioaddr + EL1_RXPTR));
554 dev->tbusy = 0;
555 mark_bh(NET_BH);
557 else if (txsr & TX_16COLLISIONS)
560 * Timed out
562 if (el_debug)
563 printk("%s: Transmit failed 16 times, Ethernet jammed?\n",dev->name);
564 outb(AX_SYS, AX_CMD);
565 lp->stats.tx_aborted_errors++;
567 else if (txsr & TX_COLLISION)
570 * Retrigger xmit.
573 if (el_debug > 6)
574 printk(" retransmitting after a collision.\n");
576 * Poor little chip can't reset its own start pointer
579 outb(AX_SYS, AX_CMD);
580 outw(lp->tx_pkt_start, GP_LOW);
581 outb(AX_XMIT, AX_CMD);
582 lp->stats.collisions++;
583 dev->interrupt = 0;
584 spin_unlock(&lp->lock);
585 return;
587 else
590 * It worked.. we will now fall through and receive
592 lp->stats.tx_packets++;
593 if (el_debug > 6)
594 printk(" Tx succeeded %s\n",
595 (txsr & TX_RDY) ? "." : "but tx is busy!");
597 * This is safe the interrupt is atomic WRT itself.
600 dev->tbusy = 0;
601 mark_bh(NET_BH); /* In case more to transmit */
604 else
607 * In receive mode.
610 int rxsr = inb(RX_STATUS);
611 if (el_debug > 5)
612 printk(" rxsr=%02x txsr=%02x rp=%04x", rxsr, inb(TX_STATUS),inw(RX_LOW));
614 * Just reading rx_status fixes most errors.
616 if (rxsr & RX_MISSED)
617 lp->stats.rx_missed_errors++;
618 else if (rxsr & RX_RUNT)
619 { /* Handled to avoid board lock-up. */
620 lp->stats.rx_length_errors++;
621 if (el_debug > 5)
622 printk(" runt.\n");
624 else if (rxsr & RX_GOOD)
627 * Receive worked.
629 el_receive(dev);
631 else
634 * Nothing? Something is broken!
636 if (el_debug > 2)
637 printk("%s: No packet seen, rxsr=%02x **resetting 3c501***\n",
638 dev->name, rxsr);
639 el_reset(dev);
641 if (el_debug > 3)
642 printk(".\n");
646 * Move into receive mode
649 outb(AX_RX, AX_CMD);
650 outw(0x00, RX_BUF_CLR);
651 inb(RX_STATUS); /* Be certain that interrupts are cleared. */
652 inb(TX_STATUS);
653 dev->interrupt = 0;
654 spin_unlock(&lp->lock);
655 return;
660 * We have a good packet. Well, not really "good", just mostly not broken.
661 * We must check everything to see if it is good.
664 static void el_receive(struct net_device *dev)
666 struct net_local *lp = (struct net_local *)dev->priv;
667 int ioaddr = dev->base_addr;
668 int pkt_len;
669 struct sk_buff *skb;
671 pkt_len = inw(RX_LOW);
673 if (el_debug > 4)
674 printk(" el_receive %d.\n", pkt_len);
676 if ((pkt_len < 60) || (pkt_len > 1536))
678 if (el_debug)
679 printk("%s: bogus packet, length=%d\n", dev->name, pkt_len);
680 lp->stats.rx_over_errors++;
681 return;
685 * Command mode so we can empty the buffer
688 outb(AX_SYS, AX_CMD);
689 skb = dev_alloc_skb(pkt_len+2);
692 * Start of frame
695 outw(0x00, GP_LOW);
696 if (skb == NULL)
698 printk("%s: Memory squeeze, dropping packet.\n", dev->name);
699 lp->stats.rx_dropped++;
700 return;
702 else
704 skb_reserve(skb,2); /* Force 16 byte alignment */
705 skb->dev = dev;
707 * The read increments through the bytes. The interrupt
708 * handler will fix the pointer when it returns to
709 * receive mode.
711 insb(DATAPORT, skb_put(skb,pkt_len), pkt_len);
712 skb->protocol=eth_type_trans(skb,dev);
713 netif_rx(skb);
714 lp->stats.rx_packets++;
715 lp->stats.rx_bytes+=pkt_len;
717 return;
720 static void el_reset(struct net_device *dev)
722 int ioaddr = dev->base_addr;
724 if (el_debug> 2)
725 printk("3c501 reset...");
726 outb(AX_RESET, AX_CMD); /* Reset the chip */
727 outb(AX_LOOP, AX_CMD); /* Aux control, irq and loopback enabled */
729 int i;
730 for (i = 0; i < 6; i++) /* Set the station address. */
731 outb(dev->dev_addr[i], ioaddr + i);
734 outw(0, RX_BUF_CLR); /* Set rx packet area to 0. */
735 cli(); /* Avoid glitch on writes to CMD regs */
736 outb(TX_NORM, TX_CMD); /* tx irq on done, collision */
737 outb(RX_NORM, RX_CMD); /* Set Rx commands. */
738 inb(RX_STATUS); /* Clear status. */
739 inb(TX_STATUS);
740 dev->interrupt = 0;
741 dev->tbusy = 0;
742 sti();
745 static int el1_close(struct net_device *dev)
747 int ioaddr = dev->base_addr;
749 if (el_debug > 2)
750 printk("%s: Shutting down Ethernet card at %#x.\n", dev->name, ioaddr);
752 dev->tbusy = 1;
753 dev->start = 0;
756 * Free and disable the IRQ.
759 free_irq(dev->irq, dev);
760 outb(AX_RESET, AX_CMD); /* Reset the chip */
762 MOD_DEC_USE_COUNT;
763 return 0;
766 static struct net_device_stats *el1_get_stats(struct net_device *dev)
768 struct net_local *lp = (struct net_local *)dev->priv;
769 return &lp->stats;
773 * Set or clear the multicast filter for this adaptor.
774 * best-effort filtering.
777 static void set_multicast_list(struct net_device *dev)
779 int ioaddr = dev->base_addr;
781 if(dev->flags&IFF_PROMISC)
783 outb(RX_PROM, RX_CMD);
784 inb(RX_STATUS);
786 else if (dev->mc_list || dev->flags&IFF_ALLMULTI)
788 outb(RX_MULT, RX_CMD); /* Multicast or all multicast is the same */
789 inb(RX_STATUS); /* Clear status. */
791 else
793 outb(RX_NORM, RX_CMD);
794 inb(RX_STATUS);
798 #ifdef MODULE
800 static char devicename[9] = { 0, };
802 static struct net_device dev_3c501 =
804 devicename, /* device name is inserted by linux/drivers/net/net_init.c */
805 0, 0, 0, 0,
806 0x280, 5,
807 0, 0, 0, NULL, el1_probe
810 static int io=0x280;
811 static int irq=5;
812 MODULE_PARM(io, "i");
813 MODULE_PARM(irq, "i");
815 int init_module(void)
817 dev_3c501.irq=irq;
818 dev_3c501.base_addr=io;
819 if (register_netdev(&dev_3c501) != 0)
820 return -EIO;
821 return 0;
824 void cleanup_module(void)
827 * No need to check MOD_IN_USE, as sys_delete_module() checks.
830 unregister_netdev(&dev_3c501);
833 * Free up the private structure, or leak memory :-)
836 kfree(dev_3c501.priv);
837 dev_3c501.priv = NULL; /* gets re-allocated by el1_probe1 */
840 * If we don't do this, we can't re-insmod it later.
842 release_region(dev_3c501.base_addr, EL1_IO_EXTENT);
845 #endif /* MODULE */
848 * Local variables:
849 * compile-command: "gcc -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -m486 -c -o 3c501.o 3c501.c"
850 * kept-new-versions: 5
851 * End: