// 新しいデバイスの発見 void pro100_new(struct pci_device *dev) { PRO100_CTX *ctx = SeZeroMalloc(sizeof(PRO100_CTX)); printf ("pro100_new\n"); #ifdef VTD_TRANS if (iommu_detected) { add_remap(dev->address.bus_no ,dev->address.device_no ,dev->address.func_no, vmm_start_inf() >> 12, (vmm_term_inf()-vmm_start_inf()) >> 12, PERM_DMA_RW) ; } #endif // of VTD_TRANS ctx->dev = dev; ctx->lock = SeNewLock(); dev->host = ctx; pro100_alloc_recv_buffer(ctx); if (pro100_ctx == NULL) { pro100_ctx = ctx; } else { printf("Error: Two or more pro100 devices found.\n"); pro100_beep(1234, 5000); } }
// 新しいデバイスの発見 void pro100_new(struct pci_device *dev) { PRO100_CTX *ctx = SeZeroMalloc(sizeof(PRO100_CTX)); debugprint ("pro100_new\n"); #ifdef VTD_TRANS if (iommu_detected) { add_remap(dev->address.bus_no ,dev->address.device_no ,dev->address.func_no, vmm_start_inf() >> 12, (vmm_term_inf()-vmm_start_inf()) >> 12, PERM_DMA_RW) ; } #endif // of VTD_TRANS ctx->dev = dev; spinlock_init (&ctx->lock); dev->host = ctx; dev->driver->options.use_base_address_mask_emulation = 1; pro100_alloc_recv_buffer(ctx); if (pro100_ctx == NULL) { pro100_ctx = ctx; } else { debugprint("Error: Two or more pro100 devices found.\n"); pro100_beep(1234, 5000); } }