use pci_register_driver or pci_module_init not pci_find_device
> if (pci_enable_device(pdev))
> return(-1);
> linux_addr_start = pci_resource_start(pdev, 0);
> linux_addr_end = pci_resource_end(pdev, 0);
> pci_read_config_dword(pdev, PCI_BASE_ADDRESS_0, &config_addr);
> printk("Found %s\n", pdev->name);
> printk("pci_resource_start=%lx\n", linux_addr_start);
> printk("pci_resource_end=%lx\n", linux_addr_end);
> printk("PCI_BASE_ADDRESS_0=%lx\n", config_addr);
> IOAddress = ioremap(config_addr, 0xffff);
bug: calling ioremap with config_addr value directly from PCI BAR
register. You should mask the value. However, it is irrelevant:
linux_addr_start make config_addr unnecessary.
-- Jeff Garzik | A recent study has shown that too much soup Building 1024 | can cause malaise in laboratory mice. MandrakeSoft | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/