static void t3e3_remove_channel(struct channel *channel) { struct pci_dev *pdev = channel->pdev; struct net_device *dev = channel->dev; /* */ cpld_stop_intr(channel); free_irq(dev->irq, dev); dc_drop_descriptor_list(channel); unregister_hdlc_device(dev); free_netdev(dev); pci_release_regions(pdev); pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); }
void dc_stop(struct channel *sc) { int wcnt; /* stop receive and transmit processes */ dc_receiver_onoff(sc, SBE_2T3E3_OFF); dc_transmitter_onoff(sc, SBE_2T3E3_OFF); /* turn off ethernet interrupts */ dc_stop_intr(sc); /* wait to ensure the interrupts have been completed */ for (wcnt = 0; wcnt < MAX_INT_WAIT_CNT; wcnt++) { udelay(5); if (!sc->interrupt_active) break; } if (wcnt >= MAX_INT_WAIT_CNT) dev_warn(&sc->pdev->dev, "SBE 2T3E3: Interrupt active too long\n"); /* clear all receive/transmit data */ dc_drop_descriptor_list(sc); }