Rachita Kothiyal wrote:
Hi Dave
The population of pci devices list in do_pci() seems incorrect.
It wrongly assigns pci_devices.next.next as the start of the list,
instead of pci_devices.next, thereby missing one pci device in the
listing. Following patch fixes this.
Thanks
Rachita
Signed-off-by: Rachita Kothiyal <rachita(a)in.ibm.com>
---
dev.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
diff -puN dev.c~fix-pci-device-list dev.c
--- crash-4.0-3.9/dev.c~fix-pci-device-list 2006-12-22 11:00:23.147609992 +0530
+++ crash-4.0-3.9-rachita/dev.c 2006-12-22 11:01:39.989928184 +0530
@@ -1967,9 +1967,7 @@ do_pci(void)
if (VALID_MEMBER(pci_dev_global_list)) {
get_symbol_data("pci_devices", sizeof(void *), &tmp);
- readmem(tmp + OFFSET(list_head_next), KVADDR,
- &pcilist_data.start, sizeof(void *), "pci
devices",
- FAULT_ON_ERROR);
+ pcilist_data.start = tmp;
pcilist_data.end = symbol_value("pci_devices");
pcilist_data.list_head_offset = OFFSET(pci_dev_global_list);
_
Hi Rachita,
Interesting -- it's been done that way for many years and nobody's
noticed (or cared)...
But your fix is correct -- although now there's no need for "tmp", since
the get_symbol_data() can be read directly into pcilist_data.start.
Queued for the next release...
Thanks,
Dave