mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* pci_size() error condition
@ 2005-07-13 22:53 John Rose
  2005-07-13 23:40 ` Ivan Kokshaysky
  0 siblings, 1 reply; 4+ messages in thread
From: John Rose @ 2005-07-13 22:53 UTC (permalink / raw)
  To: ink; +Cc: lkml

Can anyone lend an explanation of the following?

	/* base == maxbase can be valid only if the BAR has
	   already been programmed with all 1s.  */
	if (base == maxbase && ((base | size) & mask) != mask) {
		printk("%s: 2 returning 0\n", __FUNCTION__);
		return 0;
	}

Before a recent change, mask was a 64-bit number.  The second part of
the if statement would always resolve to true, since the 32-bit bitop
would never equal the 64-bit mask.  So the second part of the if
statement was ineffectual up until very recently.

After the recent change, this is no longer the case.  Nonzero PCI sizes
are generating bogus resource records for some PPC64 devices.  So for
cases of base == maxbase, why would we ever want to return a nonzero
value?  What is the intended purpose of the second part of that
conditional?

Thanks-
John


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-14 22:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-13 22:53 pci_size() error condition John Rose
2005-07-13 23:40 ` Ivan Kokshaysky
2005-07-14 16:04   ` John Rose
2005-07-14 22:33     ` Ivan Kokshaysky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®