On Tue, 2007-04-10 at 12:20 +1000, Alan Garfield wrote: > Hello all! > > I'm wondering if someone can point me in the direction of a solution to > my little problem. > > I've been porting a Linux driver across to FreeBSD and I've come against > this lovely little hack in it's code. > > I've tried to bus_alloc_resource() the IOAPIC_DEFAULT_ADDR and > IOAPIC_WINDOW but I never seem get allocated. Plus to my > knowing-little-about-kernels eye this seems like a really horrid hack to > figure out the IRQ. > > Any suggestions?
Further to this I've done the following :- --------------------------- static void jnet_identify(driver_t *driver, device_t parent) { uint32_t pci_intline; device_t dev; dev = pci_find_bsf(PCI_BUS, PCI_DEV, PCI_FUN); if(dev == NULL) { return; } device_printf(parent, "Looking for IRQ....\n"); pci_intline = pci_read_config(dev, PCIR_INTLINE, 1); printf("%x\n", pci_intline); return; } --------------------------- which just output the IRQ for the given bus,device,function. I can locate the IRQ's for all devices I care to throw at it, but the 0:7:3 device is found, but the PCIR_INTLINE is always 0xFF. Looking at the linux code I should get back 0x19. Am I totally missing something? Thanks in advance, Alan. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"