From: Jambunathan K <jambunathan@netxen.com>
To: Keir Fraser <keir@xensource.com>
Cc: xen-devel <xen-devel@lists.xensource.com>,
Stefan Neuwirth <neuwirt-xen-devel@trillian.hd.shuttle.de>,
Sanjeev Jorapur <sanjeev@netxen.com>
Subject: Re: PCI Passthru: fn0 exported but not fn1
Date: Thu, 30 Aug 2007 15:41:06 +0530 [thread overview]
Message-ID: <46D697BA.7040000@netxen.com> (raw)
In-Reply-To: <C2FB40B1.14FF5%keir@xensource.com>
>> Very odd. The tracing you provide clearly shows that the kernel is *not*
>> scanning every fn. It is only scanning every fn==0.
>>
>> The function of interest here is, I think,
>> linux/drivers/pci/probe.c:pci_scan_slot(). Notice how it iterates on every
>> fn but bails early if no device is found at fn 0 and !scan_all_fns. I
>> suggest you add some tracing to that function to check that:
>> A. It is being called; and
>> B. Exactly how it is bailing without checking fns != 0, if it ireally is
>> the case that scan_all_fns==1.
This is the broad outline of a fix.
--- ws1/xen-3.1.0-src/linux-2.6.18-xen/include/asm-x86_64/mach-xen/asm/pci.h
2007-08-29 07:22:52.000000000 -0400
+++ ws/xen-3.1.0-src/linux-2.6.18-xen/include/asm-x86_64/mach-xen/asm/pci.h
2007-08-30 05:37:46.000000000 -0400
@@ -16,7 +16,9 @@
#else
#define pcibios_assign_all_busses() 0
#endif
+
#define pcibios_scan_all_fns(a, b) 1
+#define HAVE_PCIBIOS_SCAN_ALL_FNS
extern unsigned long pci_mem_start;
#define PCIBIOS_MIN_IO 0x1000
--- ws1/xen-3.1.0-src/linux-2.6.18-xen/include/asm-generic/pci.h 2006-09-19
23:42:06.000000000 -0400
+++ ws/xen-3.1.0-src/linux-2.6.18-xen/include/asm-generic/pci.h 2007-08-30
05:37:03.000000000 -0400
@@ -43,7 +43,11 @@
return root;
}
+
+#ifndef HAVE_PCIBIOS_SCAN_ALL_FNS
+#error "Fix not OK"
#define pcibios_scan_all_fns(a, b) 0
+#endif
#ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
Compiler log below justifies the above fix.
In file included from
/root/src/ws/xen-3.1.0-src/linux-2.6.18-xen/include/linux/pci.h:691,
from
/root/src/ws/xen-3.1.0-src/linux-2.6.18-xen/arch/x86_64/kernel/../../i386/kernel/pci-dma-xen.c:13:
include2/asm/mach-xen/asm/pci.h:21:2: error: #error "Including this definition"
In file included from include2/asm/mach-xen/asm/pci.h:167,
from
/root/src/ws/xen-3.1.0-src/linux-2.6.18-xen/include/linux/pci.h:691,
from
/root/src/ws/xen-3.1.0-src/linux-2.6.18-xen/arch/x86_64/kernel/../../i386/kernel/pci-dma-xen.c:13:
/root/src/ws/xen-3.1.0-src/linux-2.6.18-xen/include/asm-generic/pci.h:46:1:
warning: "pcibios_scan_all_fns" redefined
In file included from
/root/src/ws/xen-3.1.0-src/linux-2.6.18-xen/include/linux/pci.h:691,
from
/root/src/ws/xen-3.1.0-src/linux-2.6.18-xen/arch/x86_64/kernel/../../i386/kernel/pci-dma-xen.c:13:
include2/asm/mach-xen/asm/pci.h:22:1: warning: this is the location of the
previous definition
next prev parent reply other threads:[~2007-08-30 10:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <C2FA6F3A.D05F%keir@xensource.com>
2007-08-29 14:18 ` PCI Passthru: fn0 exported but not fn1 Jambunathan K
2007-08-29 14:26 ` Keir Fraser
2007-08-30 10:11 ` Jambunathan K [this message]
2007-08-30 10:19 ` Keir Fraser
2007-08-30 14:45 ` Jambunathan K
2007-08-29 18:27 ` Stefan Neuwirth
2007-08-23 19:04 Jambunathan K
2007-08-24 14:42 ` Keir Fraser
2007-08-24 14:58 ` Jambunathan K
2007-08-24 15:01 ` Keir Fraser
2007-08-26 16:19 ` Jambunathan K
2007-08-27 14:08 ` Jambunathan K
2007-08-27 15:22 ` Keir Fraser
2007-08-27 15:27 ` Jambunathan K
2007-08-27 15:40 ` Keir Fraser
2007-08-27 15:58 ` Jambunathan K
2007-08-27 16:14 ` Keir Fraser
2007-08-27 16:34 ` Jambunathan K
2007-08-27 16:42 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46D697BA.7040000@netxen.com \
--to=jambunathan@netxen.com \
--cc=keir@xensource.com \
--cc=neuwirt-xen-devel@trillian.hd.shuttle.de \
--cc=sanjeev@netxen.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.