static int elmc_open(struct net_device *dev);
static int elmc_close(struct net_device *dev);
static int elmc_send_packet(struct sk_buff *, struct net_device *);
static int elmc_open(struct net_device *dev);
static int elmc_close(struct net_device *dev);
static int elmc_send_packet(struct sk_buff *, struct net_device *);
dev->irq=irq_table[(status & ELMC_STATUS_IRQ_SELECT) >> 6];
dev->base_addr=csr_table[(status & ELMC_STATUS_CSR_SELECT) >> 1];
dev->irq=irq_table[(status & ELMC_STATUS_IRQ_SELECT) >> 6];
dev->base_addr=csr_table[(status & ELMC_STATUS_CSR_SELECT) >> 1];
/*
If we're trying to match a specified irq or IO address,
we'll reject a match unless it's what we're looking for.
Also reject it if the card is already in use.
*/
/*
If we're trying to match a specified irq or IO address,
we'll reject a match unless it's what we're looking for.
Also reject it if the card is already in use.
*/
(base_addr && base_addr != dev->base_addr)) {
slot = mca_find_adapter(ELMC_MCA_ID, slot + 1);
continue;
(base_addr && base_addr != dev->base_addr)) {
slot = mca_find_adapter(ELMC_MCA_ID, slot + 1);
continue;
/* dump all the assorted information */
printk(KERN_INFO "%s: IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->name,
/* dump all the assorted information */
printk(KERN_INFO "%s: IRQ %d, %sternal xcvr, memory %#lx-%#lx.\n", dev->name,
dev->mem_start, dev->mem_end - 1);
/* The hardware address for the 3c523 is stored in the first six
dev->mem_start, dev->mem_end - 1);
/* The hardware address for the 3c523 is stored in the first six
/* note that we haven't actually requested the IRQ from the kernel.
That gets done in elmc_open(). I'm not sure that's such a good idea,
but it works, so I'll go with it. */
/* note that we haven't actually requested the IRQ from the kernel.
That gets done in elmc_open(). I'm not sure that's such a good idea,
but it works, so I'll go with it. */
static void cleanup_card(struct net_device *dev)
{
mca_set_adapter_procfn(((struct priv *) (dev->priv))->slot, NULL, NULL);
static void cleanup_card(struct net_device *dev)
{
mca_set_adapter_procfn(((struct priv *) (dev->priv))->slot, NULL, NULL);
/* The 3c523 has this habit of generating interrupts during the
reset. I'm not sure if the ni52 has this same problem, but it's
really annoying if we haven't finished initializing it. I was
/* The 3c523 has this habit of generating interrupts during the
reset. I'm not sure if the ni52 has this same problem, but it's
really annoying if we haven't finished initializing it. I was
if (len != skb->len)
memset((char *) p->xmit_cbuffs[p->xmit_count], 0, ETH_ZLEN);
memcpy((char *) p->xmit_cbuffs[p->xmit_count], (char *) (skb->data), skb->len);
if (len != skb->len)
memset((char *) p->xmit_cbuffs[p->xmit_count], 0, ETH_ZLEN);
memcpy((char *) p->xmit_cbuffs[p->xmit_count], (char *) (skb->data), skb->len);
p->xmit_cmds[0]->cmd_link = p->nop_cmds[next_nop]->cmd_link
= make16((p->nop_cmds[next_nop]));
p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0;
p->xmit_cmds[0]->cmd_link = p->nop_cmds[next_nop]->cmd_link
= make16((p->nop_cmds[next_nop]));
p->xmit_cmds[0]->cmd_status = p->nop_cmds[next_nop]->cmd_status = 0;
for(this_dev=0; this_dev<MAX_3C523_CARDS; this_dev++) {
struct net_device *dev = alloc_etherdev(sizeof(struct priv));
if (!dev)
for(this_dev=0; this_dev<MAX_3C523_CARDS; this_dev++) {
struct net_device *dev = alloc_etherdev(sizeof(struct priv));
if (!dev)