On Sat, Nov 24, 2007 at 09:13:40PM -0500, Jon Smirl wrote:
> The ROM is mapped in drivers/pci/rom.c
> 
> You could add some printks and see if there is an error and if the ROM
> is accessible
> 
>         rom = ioremap(start, *size);
>         if (!rom) {
>                 /* restore enable if ioremap fails */
>                 if (!(res->flags & (IORESOURCE_ROM_ENABLE |
>                                     IORESOURCE_ROM_SHADOW |
>                                     IORESOURCE_ROM_COPY)))
>                         pci_disable_rom(pdev);
>                 return NULL;
>         }
I started in there from that, and ended up in pci-sysfs.c...
The ROM memcpy in drivers/pci/pci-sysfs.c:pci_read_rom() is never running.

Relevant section of my debug output:
[  306.396743] drivers/pci/pci-sysfs.c:577:pci_read_rom: size=0x0 
rom=0xd000080082580000 off=0x0
[  306.396764] drivers/pci/pci-sysfs.c:579:pci_read_rom: off >= size!
[  306.396768] drivers/pci/pci-sysfs.c:588pci_read_rom: unmapping

Relevant snippet of my debug patching:
-       if (off >= size)
+       printk(KERN_INFO "%s:%d:%s: size=0x%lx rom=0x%lx off=0x%lx\n", 
__FILE__,__LINE__,__FUNCTION__,size,rom,off);
+       if (off >= size) {
+               printk(KERN_INFO "%s:%d:%s: off >= size!\n", 
__FILE__,__LINE__,__FUNCTION__);
                count = 0;
-       else {
+       } else {

So next, why is it failing to decode the ROM size correctly?
pci_get_rom_size(), here I come.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail     : [EMAIL PROTECTED]
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Attachment: pgpg9qouF0GfX.pgp
Description: PGP signature

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to