Re: Linux MIPS PCI resource sanity check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Sharp wrote:

There's a sanity check in pcibios_enable_resources() that looks
like this:

	r = &dev->resource[idx];
	if (!r->start && r->end) {
		printk(KERN_ERR "PCI: Device %s not available
because of resource collisions\n", pci_name(dev)); return -EINVAL;
	}

What is this check actually doing?

  It makes sure that a PCI resource is allocated (base of 0 means
that it's unallocated due to previously detected resource conlict (or
some other reason).

Actually, IIRC, resources are based on what the device requested, so a
device behind a bridge could request a resource starting at 0.  I had

   Zero value in BAR was considered unallocated resource in the PCI 2.2 spec...

to change this for a system as well.  I changed it to

if (!r->start && !r->end) {

   r->end can't be 0.

WBR, Sergei



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux