/* We cannot probe for an IO mapped card either, although we can check that *it'swhereweweretolditwas,andevenautoirq
*/ staticint __init com90io_probe(struct net_device *dev)
{ int ioaddr = dev->base_addr, status; unsignedlong airqmask;
if (BUGLVL(D_NORMAL)) {
pr_info("%s\n", "COM90xx IO-mapped mode support (by David Woodhouse et el.)");
pr_info("E-mail me if you actually test this driver, please!\n");
}
if (!ioaddr) {
arc_printk(D_NORMAL, dev, "No autoprobe for IO mapped cards; you must specify the base address!\n"); return -ENODEV;
} if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com90io probe")) {
arc_printk(D_INIT_REASONS, dev, "IO request_region %x-%x failed\n",
ioaddr, ioaddr + ARCNET_TOTAL_SIZE - 1); return -ENXIO;
} if (arcnet_inb(ioaddr, COM9026_REG_R_STATUS) == 0xFF) {
arc_printk(D_INIT_REASONS, dev, "IO address %x empty\n",
ioaddr); goto err_out;
}
arcnet_inb(ioaddr, COM9026_REG_R_RESET);
mdelay(RESETtime);
status = arcnet_inb(ioaddr, COM9026_REG_R_STATUS);
status = arcnet_inb(ioaddr, COM9026_REG_RW_MEMDATA); if (status != 0xd1) {
arc_printk(D_INIT_REASONS, dev, "Signature byte not found (%Xh instead).\n",
status); goto err_out;
} if (!dev->irq) { /* if we do this, we're sure to get an IRQ since the *cardhasjustresetandtheNORXflagisonuntil *wetellittostartreceiving.
*/
/* Set up the struct net_device associated with this card. Called after *probingsucceeds.
*/ staticint __init com90io_found(struct net_device *dev)
{ struct arcnet_local *lp; int ioaddr = dev->base_addr; int err;
/* Reserve the irq */ if (request_irq(dev->irq, arcnet_interrupt, 0, "arcnet (COM90xx-IO)", dev)) {
arc_printk(D_NORMAL, dev, "Can't get IRQ %d!\n", dev->irq); return -ENODEV;
} /* Reserve the I/O region */ if (!request_region(dev->base_addr, ARCNET_TOTAL_SIZE, "arcnet (COM90xx-IO)")) {
free_irq(dev->irq, dev); return -EBUSY;
}
arc_printk(D_NORMAL, dev, "COM90IO: station %02Xh found at %03lXh, IRQ %d.\n",
dev->dev_addr[0], dev->base_addr, dev->irq);
return0;
}
/* Do a hardware reset on the card, and set up necessary registers. * *Thisshouldbecalledaslittleaspossible,becauseitdisruptsthe *tokenonthenetwork(causesaRECON)andrequiresasignificantdelay. * *However,itdoesmakesurethecardisinadefinedstate.
*/ staticint com90io_reset(struct net_device *dev, int really_reset)
{ struct arcnet_local *lp = netdev_priv(dev); short ioaddr = dev->base_addr;
/* In case the old driver is loaded later, *setthethingbacktoMMAPmode
*/
arcnet_outb(arcnet_inb(ioaddr, COM9026_REG_RW_CONFIG) & ~IOMAPflag,
ioaddr, COM9026_REG_RW_CONFIG);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.