306 == BIOS_CNTL_LOCK_ENABLE_MASK) {
307 static __initdata char warning[] =
308 KERN_WARNING PFX "Firmware space is locked read-only. If you can't or\n"
309 KERN_WARNING PFX "don't want to disable this in firmware setup, and if\n"
310 KERN_WARNING PFX "you are certain that your system has a functional\n"
311 KERN_WARNING PFX "RNG, try using the 'no_fwh_detect' option.\n";
312
313 if (no_fwh_detect)
314 return -ENODEV;
315 printk(warning);
316 return -EBUSY;
317 }
318
319 intel_rng_hw->mem = ioremap_nocache(INTEL_FWH_ADDR, INTEL_FWH_ADDR_LEN);
320 if (intel_rng_hw->mem == NULL)
321 return -EBUSY;
322
323 return 0;
324}
325
326
327static int __init mod_init(void)
328{
329 int err = -ENODEV;
330 int i;
331 struct pci_dev *dev = NULL;
332 void __iomem *mem = mem;
333 u8 hw_status;
334 struct intel_rng_hw *intel_rng_hw;
335
336 for (i = 0; !dev && pci_tbl[i].vendor; ++i)
337 dev = pci_get_device(pci_tbl[i].vendor, pci_tbl[i].device,
338 NULL);
339
340 if (!dev)
341 goto out;
342
343 if (no_fwh_detect < 0) {
344 pci_dev_put(dev);
345 goto fwh_done;
346 }