/* Deallocate memory for one device */ static void nozomi_card_exit(struct pci_dev *pdev) { int i; struct ctrl_ul ctrl; struct nozomi *dc = pci_get_drvdata(pdev); /* Disable all interrupts */ dc->last_ier = 0; writew(dc->last_ier, dc->reg_ier); tty_exit(dc); /* Send 0x0001, command card to resend the reset token. */ /* This is to get the reset when the module is reloaded. */ ctrl.port = 0x00; ctrl.reserved = 0; ctrl.RTS = 0; ctrl.DTR = 1; DBG1("sending flow control 0x%04X", *((u16 *)&ctrl)); /* Setup dc->reg addresses to we can use defines here */ write_mem32(dc->port[PORT_CTRL].ul_addr[0], (u32 *)&ctrl, 2); writew(CTRL_UL, dc->reg_fcr); /* push the token to the card. */ remove_sysfs_files(dc); free_irq(pdev->irq, dc); for (i = 0; i < MAX_PORT; i++) kfifo_free(&dc->port[i].fifo_ul); kfree(dc->send_buf); iounmap(dc->base_addr); pci_release_regions(pdev); pci_disable_device(pdev); ndevs[dc->index_start / MAX_PORT] = NULL; kfree(dc); }
void drv_disconnect() { unregister_netdev(); remove_sysfs_files(); }
void drv_disconnect() { int thread_id = corral_getThreadID(); unregister_netdev(); remove_sysfs_files(); }